Problem with creating a unit
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Problem with creating a unit
Hey, dear people,
I must confess that I am experiencing problems with adding a unit called "Cold Soul" to the units of the faction Despair of Ageless Era. Actually, the unit Cold Soul advances from the Widow and it has a weapon special that is named "Drain". So, I made this extra unit by myself but when I was trying to open a local game there was an error message saying that there were probably nested quote strings related to the abilities file inherent to Wesnoth. Then I noticed that I had put the special ability text in the configuration file of the Cold Soul supposedly at the wrong place and I fixed this. Yet, when opening a local game, I can not choose Ageless Era and I got another error message after the change but now I don't get the error messages anymore.
Here is the configuration file of the unit:
I would be really delighted if somebody could help me with this somehow!
And I thank you for having read this!
Greets
Lehor
I must confess that I am experiencing problems with adding a unit called "Cold Soul" to the units of the faction Despair of Ageless Era. Actually, the unit Cold Soul advances from the Widow and it has a weapon special that is named "Drain". So, I made this extra unit by myself but when I was trying to open a local game there was an error message saying that there were probably nested quote strings related to the abilities file inherent to Wesnoth. Then I noticed that I had put the special ability text in the configuration file of the Cold Soul supposedly at the wrong place and I fixed this. Yet, when opening a local game, I can not choose Ageless Era and I got another error message after the change but now I don't get the error messages anymore.
Here is the configuration file of the unit:
Code: Select all
#textdomain wesnoth-Ageless_Era
[unit_type]
id=AE_arc_despair_Cold_Soul
name= _ „Cold Soul„
race=AE despair
gender=female
image="units/despair/phantomcoldsoul.png"
# profile="portraits/.png"
{MAGENTA_IS_THE_TEAM_COLOR}
ellipse="misc/ellipse"
hitpoints=38
movement_type=AE_arc_despair_foot
movement=6
experience=100
level=2
alignment=chaotic
advances_to=„AE_arc_despair_Withered_Rose„
cost=30
usage=archer
description= _ „The Cold Souls roam almost eternally through the dark places of this world, hiding for the sun and bound to darkness. Once actually, they were normal women but the wars that devastated them let their hearts turn into ice, there seems to be another guide for them than a heart, right now.“
die_sound=lich-die.ogg
[defend]
start_time=-126
[if]
hits=hit,kill
offset=0.0~-0.05:126,-0.05~0.0:126
alpha=0.8~0.5:126,0.5~0.8:126
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=100
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=150
image="units/despair/phantomcoldsoul-defend.png"
sound={SOUND_LIST:HUMAN_FEMALE_HIT}
[/frame]
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[/if]
[else]
hits=miss
offset=0.0~-0.1:126,-0.1~0.0:126
alpha=0.8~0.25:126,0.25~0.8:126
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=100
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=150
image="units/despair/phantomcoldsoul-defend.png"
[/frame]
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[/else]
[/defend]
[attack]
name=touch
description=_“Frozen Touch"
icon=attacks/touch-undead.png
type=cold
range=melee
damage=8
number=2
[/attack]
[attack]
name=delectation_of_sorrow
description=_“Delectation of Sorrow“
icon=attacks/delectation-of-sorrow-icon.png
type=cold
range=ranged
damage=17
number=2
[specials]
{WEAPON_SPECIAL_DRAIN}
[/specials]
[/attack]
[attack_anim]
[filter_attack]
name=delectation_of_sorrow
[/filter_attack]
[missile_frame]
begin=0
end=-50
image="projectiles/delecation-of-sorrow.png"
image_diagonal="projectiles/delectation-of-sorrow-attack.png"
[/missile_frame]
[frame]
duration=25
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=75
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=150
image="units/despair/phantomcoldsoul.png"
sound=wail.wav
[/frame]
[frame]
duration=75
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=25
image="units/despair/phantomcoldsoul.png"
[/frame]
[/attack_anim]
[attack_anim]
[filter_attack]
name=touch
[/filter_attack]
start_time=-500
offset=0.0~1.0:425,0.0:225
alpha=0.8~0.0:425,0.0~0.8:225
[frame]
duration=25
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=175
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=175
image="units/despair/phantomcoldsoul-attack.png"
[/frame]
[if]
hits=yes
[frame]
duration=100
image="units/despair/phantomcoldsoul-attack.png"
# change this
sound=slowed.wav
[/frame]
[/if]
[else]
hits=no
[frame]
duration=100
image="units/despair/phantomcoldsoul-attack.png"
sound={SOUND_LIST:MISS}
[/frame]
[/else]
[frame]
duration=75
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=75
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=25
image="units/despair/phantomcoldsoul.png"
[/frame]
[/attack_anim]
{AE_DESPAIR_STAND phantomcoldsoul}
[/unit_type]


Greets
Lehor
Re: Problem with creating a unit
name= _ „Cold Soul„
Change quotes like this to normal ".However please do not use AE_..._..._ type prefix for your units ids, that is just to avoid clashes.
Re: Problem with creating a unit
Hey, Ravana,
thank you very much!
So, this is the present state of the configuration of the unit "Cold Soul":
Now I screenshot the error message that I still get:

thank you very much!

So, this is the present state of the configuration of the unit "Cold Soul":
Code: Select all
#textdomain wesnoth-Ageless_Era
[unit_type]
id=Cold_Soul
name= _ "Cold Soul"
race=AE despair
gender=female
image="units/despair/phantomcoldsoul.png"
# profile="portraits/.png"
{MAGENTA_IS_THE_TEAM_COLOR}
ellipse="misc/ellipse"
hitpoints=38
movement_type=AE_arc_despair_foot
movement=6
experience=100
level=2
alignment=chaotic
advances_to="Withered_Rose"
cost=30
usage=archer
description= _ "The Cold Souls roam almost eternally through the dark places of this world, hiding for the sun and bound to darkness. Once actually, they were normal women but the wars that devastated them let their hearts turn into ice, there seems to be another guide for them than a heart, right now."
die_sound=lich-die.ogg
[defend]
start_time=-126
[if]
hits=hit,kill
offset=0.0~-0.05:126,-0.05~0.0:126
alpha=0.8~0.5:126,0.5~0.8:126
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=100
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=150
image="units/despair/phantomcoldsoul-defend.png"
sound={SOUND_LIST:HUMAN_FEMALE_HIT}
[/frame]
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[/if]
[else]
hits=miss
offset=0.0~-0.1:126,-0.1~0.0:126
alpha=0.8~0.25:126,0.25~0.8:126
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=100
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=150
image="units/despair/phantomcoldsoul-defend.png"
[/frame]
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[/else]
[/defend]
[attack]
name=touch
description=_“Frozen Touch"
icon=attacks/touch-undead.png
type=cold
range=melee
damage=8
number=2
[/attack]
[attack]
name=delectation_of_sorrow
description=_“Delectation of Sorrow“
icon=attacks/delectation-of-sorrow-icon.png
type=cold
range=ranged
damage=17
number=2
[specials]
{WEAPON_SPECIAL_DRAIN}
[/specials]
[/attack]
[attack_anim]
[filter_attack]
name=delectation_of_sorrow
[/filter_attack]
[missile_frame]
begin=0
end=-50
image="projectiles/delecation-of-sorrow.png"
image_diagonal="projectiles/delectation-of-sorrow-attack.png"
[/missile_frame]
[frame]
duration=25
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=75
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=150
image="units/despair/phantomcoldsoul.png"
sound=wail.wav
[/frame]
[frame]
duration=75
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=25
image="units/despair/phantomcoldsoul.png"
[/frame]
[/attack_anim]
[attack_anim]
[filter_attack]
name=touch
[/filter_attack]
start_time=-500
offset=0.0~1.0:425,0.0:225
alpha=0.8~0.0:425,0.0~0.8:225
[frame]
duration=25
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=175
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=175
image="units/despair/phantomcoldsoul-attack.png"
[/frame]
[if]
hits=yes
[frame]
duration=100
image="units/despair/phantomcoldsoul-attack.png"
# change this
sound=slowed.wav
[/frame]
[/if]
[else]
hits=no
[frame]
duration=100
image="units/despair/phantomcoldsoul-attack.png"
sound={SOUND_LIST:MISS}
[/frame]
[/else]
[frame]
duration=75
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=75
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=25
image="units/despair/phantomcoldsoul.png"
[/frame]
[/attack_anim]
{AE_DESPAIR_STAND phantomcoldsoul}
[/unit_type]

Re: Problem with creating a unit
All cases of those quotes not just with unit name.
Code: Select all
description=_“Delectation of Sorrow“
description=_“Frozen Touch"
Re: Problem with creating a unit
Hello,
I have to reveal that the problem is solved by now! Thank you very much for your second advice!
Greets
I have to reveal that the problem is solved by now! Thank you very much for your second advice!

Greets
Re: Problem with creating a unit
Hey,
I got to admit that I encountered another problem:
The unit keeps on disappearing, when casting the attack, the animation of Delectation of Sorrow works actually, apart from the unit's animation. And the unit also seems to move forward somehow but this is a magical attack and it should just stay in the same place, does anybody know how to fix this? 
I got to admit that I encountered another problem:
Code: Select all
[attack_anim]
[filter_attack]
name=delectation_of_sorrow
[/filter_attack]
[frame]
begin=150
end=300
image="units/despair/phantomcoldsoul.png"
image="projectiles/delectation-of-sorrow-attack-1.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-1.png"
[/frame]
[frame]
begin=300
end=450
image="units/despair/phantomcoldsoul.png"
image="projectiles/delectation-of-sorrow-attack-2.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-2.png"
[/frame]
[frame]
begin=450
end=600
image="units/despair/phantomcoldsoul.png"
image="projectiles/delectation-of-sorrow-attack-3.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-3.png"
[/frame]
[frame]
begin=600
end=750
image="units/despair/phantomcoldsoul.png"
image="projectiles/delectation-of-sorrow-attack-4.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-4.png"
[/frame]
[frame]
begin=750
end=900
image="units/despair/phantomcoldsoul.png"
image="projectiles/delectation-of-sorrow-attack-5.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-5.png"
[/frame]
[frame]
begin=900
end=1050
image="units/despair/phantomcoldsoul.png"
image="projectiles/delectation-of-sorrow-attack-6.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-6.png"
[/frame]
[frame]
begin=1050
end=1200
image="units/despair/phantomcoldsoul.png"
image="projectiles/delectation-of-sorrow-attack-7.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-7.png"
[/frame]
[frame]
begin=0
end=1200
image="units/despair/phantomcoldsoul.png"
[/frame]
[/attack_anim]

Re: Problem with creating a unit
Possibly requires use of [missile_frame].
Re: Problem with creating a unit
Hi,
thank you.
But using such frame the animation of the attack doesn't change, only one picture is employed though the animation consists of seven pictures.
Greets
Lehor
thank you.

Greets
Lehor
Re: Problem with creating a unit
Reference mainline units. The begin/end syntax is obsolete, and you can't have two of the same key (image= in your case) in the same tag ever anywhere.
Re: Problem with creating a unit
Hey,
thanks, now I got it looking like this:
However the attack's animation is absent though the unit is visible by now. Do you know how to render this attack's animation visible as well? 
thanks, now I got it looking like this:
Code: Select all
[attack_anim]
[filter_attack]
name=delectation_of_sorrow
[/filter_attack]
[frame]
image="units/despair/phantomcoldsoul.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-1.png"
[/frame]
[frame]
image="units/despair/phantomcoldsoul.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-2.png"
[/frame]
[frame]
image="units/despair/phantomcoldsoul.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-3.png"
[/frame]
[frame]
image=„units/despair/phantomcoldsoul.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-4.png"
[/frame]
[frame]
image="units/despair/phantomcoldsoul.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-5.png"
[/frame]
[frame]
image="units/despair/phantomcoldsoul.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-6.png"
[/frame]
[frame]
image="units/despair/phantomcoldsoul.png"
image_diagonal="projectiles/delectation-of-sorrow-attack-7.png"
[/frame]
[/attack_anim]

Re: Problem with creating a unit
Don't save over anything, because I'm not used to the new format, but first you should try commenting out all the
If that doesn't work, get rid of everything and change it to this, which I got from here: http://wiki.wesnoth.org/AnimationWML
Not sure about the image_diagonal thing you have going on there though.
Code: Select all
image="units/despair/phantomcoldsoul.png"
Code: Select all
[frame]
image=projectiles/delectation-of-sorrow-attack-[1~7].png
[/frame]
Re: Problem with creating a unit
Hi,
thanks. However both the unit's animation and the attack's animation disappear having this text:
I sent the whole configuration file's text because I reckoned that the problem might originate from another place.
thanks. However both the unit's animation and the attack's animation disappear having this text:
Code: Select all
#textdomain wesnoth-Ageless_Era
[unit_type]
id=Cold_Soul
name= _ "Cold Soul"
race=AE despair
gender=female
image="units/despair/phantomcoldsoul.png"
# profile="portraits/.png"
{MAGENTA_IS_THE_TEAM_COLOR}
ellipse="misc/ellipse"
hitpoints=38
movement_type=AE_arc_despair_foot
movement=6
experience=100
level=2
alignment=chaotic
advances_to="Withered_Rose"
cost=30
usage=archer
description= _ "The Cold Souls roam almost eternally through the dark places of this world, hiding for the sun and bound to darkness. Once actually, they were normal women but the wars that devastated them let their hearts turn into ice, there seems to be another guide for them than a heart, right now."
die_sound=lich-die.ogg
[defend]
start_time=-126
[if]
hits=hit,kill
offset=0.0~-0.05:126,-0.05~0.0:126
alpha=0.8~0.5:126,0.5~0.8:126
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=100
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=150
image="units/despair/phantomcoldsoul-defend.png"
sound={SOUND_LIST:HUMAN_FEMALE_HIT}
[/frame]
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[/if]
[else]
hits=miss
offset=0.0~-0.1:126,-0.1~0.0:126
alpha=0.8~0.25:126,0.25~0.8:126
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=100
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=150
image="units/despair/phantomcoldsoul-defend.png"
[/frame]
[frame]
duration=1
image="units/despair/phantomcoldsoul.png"
[/frame]
[/else]
[/defend]
[attack]
name=touch
description=_"Frozen Touch"
icon=attacks/touch-undead.png
type=cold
range=melee
damage=8
number=2
[/attack]
[attack]
name=delectation_of_sorrow
description=_"Delectation of Sorrow"
icon=attacks/delectation-of-sorrow-icon.png
type=cold
range=ranged
damage=13
number=2
[specials]
{WEAPON_SPECIAL_DRAIN}
[/specials]
[/attack]
[attack_anim]
[filter_attack]
name=delectation_of_sorrow
[/filter_attack]
[frame]
image=projectiles/delectation-of-sorrow-attack-[1~7].png
[/frame]
[/attack_anim]
[attack_anim]
[filter_attack]
name=touch
[/filter_attack]
start_time=-500
offset=0.0~1.0:425,0.0:225
alpha=0.8~0.0:425,0.0~0.8:225
[frame]
duration=25
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=175
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=175
image="units/despair/phantomcoldsoul-attack.png"
[/frame]
[if]
hits=yes
[frame]
duration=100
image="units/despair/phantomcoldsoul-attack.png"
# change this
sound=slowed.wav
[/frame]
[/if]
[else]
hits=no
[frame]
duration=100
image="units/despair/phantomcoldsoul-attack.png"
sound={SOUND_LIST:MISS}
[/frame]
[/else]
[frame]
duration=75
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=75
image="units/despair/phantomcoldsoul.png"
[/frame]
[frame]
duration=25
image="units/despair/phantomcoldsoul.png"
[/frame]
[/attack_anim]
{AE_DESPAIR_STAND phantomcoldsoul}
[/unit_type]
Re: Problem with creating a unit
You are missing a lot in that animation. Like zookeeper said, use a reference. You could even use the ranged animation of the original widow unit as a reference. (Assuming Ageless Era didn't change it strangely.)
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: Problem with creating a unit
Hi,
okay, thanks. But how can I add such reference? Having googled it, I couldn't find it, actually.
okay, thanks. But how can I add such reference? Having googled it, I couldn't find it, actually.
Re: Problem with creating a unit
I'm not sure what you mean, I think we are having a failure to communicate.
The file that you originally edited to get this far had a ranged animation, right? Take a look at that. The {MISSILE_FRAME_WAIL} line (again, I'm assuming Ageless Era didn't change that from the original) may be a bit confusing, but check out the file
The file that you originally edited to get this far had a ranged animation, right? Take a look at that. The {MISSILE_FRAME_WAIL} line (again, I'm assuming Ageless Era didn't change that from the original) may be a bit confusing, but check out the file
<wherever-you-have-wesnoth-data-installed>/data/core/macros/animation-utils.cfg
and see how that macro expands, if you want to change something, you can just copy&paste the macro contents into the [attack_anim] and edit it to your needs.BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects