wml help
Moderator: Forum Moderators
-
- Posts: 166
- Joined: June 4th, 2004, 8:18 pm
- Location: Atlanta, GA
- Contact:
wml help
the ogre gets created strong and resilient
no message is displayed
i dont think hes invisible either
the wiki is really vague on unit creation so i had to go rooting around for even the the apply_to=status and add=invisible parts
ended up finding it in items.cfg
so if anyone could help with being able to just recall and make it resilient and strong instead of putting all that code in there and possibly making it invisible for real (unless i dont understand what invisible really does) that would be great
no message is displayed
i dont think hes invisible either
the wiki is really vague on unit creation so i had to go rooting around for even the the apply_to=status and add=invisible parts
ended up finding it in items.cfg
so if anyone could help with being able to just recall and make it resilient and strong instead of putting all that code in there and possibly making it invisible for real (unless i dont understand what invisible really does) that would be great
Code: Select all
#define FINDOGRE xl yl ogrename ogreid
[event]
name=moveto
[filter]
x={xl}
y={yl}
[/filter]
[command]
[unit]
type=Ogre
description={ogrename}
x=2
y=18
side=$side_number
[modifications]
[trait]
id=resilient
name=resilient
[effect]
apply_to=hitpoints
increase_total=7
heal_full=yes
[/effect]
[/trait]
[trait]
id=invisible
name=invisible
[effect]
apply_to=status
add=invisible
[/effect]
[/trait]
[trait]
id=strong
name=strong
[effect]
apply_to=attack
range=short
increase_damage=1
[/effect]
[effect]
apply_to=hitpoints
increase_total=2
heal_full=yes
[/effect]
[/trait]
[/modifications]
[message]
id={ogreid}
description={ogrename}
message="Player $side_number has enlisted the aid of an invisible Ogre!"
[/message]
[/unit]
[/command]
[/event]
#enddef
{FINDOGRE 1 20 Thud ogre1}
Hard/Melodic Trance, other Electronica:
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
Re: wml help
AFAIK this is impossible; but you can of course do what you did. Anyway, why do you want the ogre to be strong and resilient? Most WML-generated units don't have traits.Stosswelle wrote:make it resilient and strong instead of putting all that code in there
where did you look? The wiki pages these are described on are SingleUnitWML and EffectWML.Stosswelle wrote:the wiki is really vague on unit creation so i had to go rooting around for even the the apply_to=status and add=invisible parts
ended up finding it in items.cfg
I don't know whether this is possible; invisible is a status meaning it goes away easily.Stosswelle wrote:making it invisible for real
-
- Posts: 166
- Joined: June 4th, 2004, 8:18 pm
- Location: Atlanta, GA
- Contact:
thanks
the code has changed a decent bit now
if i need more help ill come back
the code has changed a decent bit now
if i need more help ill come back
Hard/Melodic Trance, other Electronica:
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
-
- Posts: 166
- Joined: June 4th, 2004, 8:18 pm
- Location: Atlanta, GA
- Contact:
ok now the code looks like this
im not sure why it doesnt work
and im open to ways it can be shortened for greater efficiency
im not sure why it doesnt work
and im open to ways it can be shortened for greater efficiency
Code: Select all
#define FINDOGRE xl yl ogrename ogreid
[event]
name=moveto
[filter]
x={xl}
y={yl}
[/filter]
[command]
[unit]
type=Ogre
description={ogrename}
[if]
[variable]
name=side_number
numerical_equals=1
[/variable]
[then]
x=1
y=20
[/then]
[else]
[variable]
name=side_number
numerical_equals=2
[/variable]
[then]
x=27
y=20
[/then]
[else]
[then]
x=12
y=1
[/then]
[/else]
[/else]
[/if]
side=$side_number
[modifications]
[trait]
id=strongandresilientandinvisible
[effect]
apply_to=hitpoints
increase_total=12
heal_full=yes
[/effect]
[effect]
apply_to=attack
range=short
increase_damage=2
[/effect]
[effect]
apply_to=status
add=invisible
[/effect]
[/trait]
[/modifications]
[/unit]
[message]
id={ogreid}
description={ogrename}
message="Player $side_number has enlisted the aid of a temporarily invisible Ogre!"
[/message]
[/command]
[/event]
#enddef
Hard/Melodic Trance, other Electronica:
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
[if] is not like '#ifdef'; it can only be used as an action. So you could have instead:
Code: Select all
#define IFSIDECOORDINATES SIDE X Y
[if]
[variable]
name=side_number
numerical_equals={SIDE}
[/variable]
[then]
{VARIABLE x {X}}
{VARIABLE y {Y}}
[/then]
[/if]
#enddef
#define FINDOGRE xl yl ogrename ogreid
[event]
name=moveto
[filter]
x={xl}
y={yl}
[/filter]
{IFSIDECOORDINATES 1 1 20}
{IFSIDECOORDINATES 2 27 20}
{IFSIDECOORDINATES 3 12 1}
[unit]
type=Ogre
description={ogrename}
x=$x
y=$y
side=$side_number
[modifications]
[trait]
id=strongandresilientandinvisible
[effect]
apply_to=hitpoints
increase_total=12
heal_full=yes
[/effect]
[effect]
apply_to=attack
range=short
increase_damage=2
[/effect]
[effect]
apply_to=status
#this is actually called 'ambush'
add=ambush
[/effect]
[/trait]
[/modifications]
[/unit]
[message]
id={ogreid}
description={ogrename}
message="Player $side_number has enlisted the aid of a temporarily invisible Ogre!"
[/message]
[/event]
#enddef
-
- Posts: 166
- Joined: June 4th, 2004, 8:18 pm
- Location: Atlanta, GA
- Contact:
say what?[if] is not like '#ifdef'; it can only be used as an action
wiki refers to poison, slow, somethingelse, and invisibleapply_to=status
#this is actually called 'ambush'
   add=ambush
you sure its ambush?
thanks for the fix
Hard/Melodic Trance, other Electronica:
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
-
- Posts: 166
- Joined: June 4th, 2004, 8:18 pm
- Location: Atlanta, GA
- Contact:
oh yeah and ive been staring at this
why isnt that just
Code: Select all
{VARIABLE x {X}}
 {VARIABLE y {Y}}
Code: Select all
x={X}
y={Y}
Hard/Melodic Trance, other Electronica:
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
-
- Posts: 873
- Joined: July 4th, 2004, 9:14 pm
- Location: My imagination
- Contact:
Because WML doesn't do that. That syntax is used only for specifying attributes for tags. The only way to modify variables is with [set_variable]. ThisStosswelle wrote:oh yeah and ive been staring at this
why isnt that justCode: Select all
{VARIABLE x {X}}  {VARIABLE y {Y}}
Code: Select all
x={X} y={Y}
Code: Select all
{VARIABLE x {X}}
{VARIABLE y {Y}}
Code: Select all
[set_variable]
name=x
value={X}
[/set_variable]
[set_variable]
name=y
value={Y}
[/set_variable]
Play a Silver Mage in the Wesvoid campaign.
-
- Posts: 166
- Joined: June 4th, 2004, 8:18 pm
- Location: Atlanta, GA
- Contact:
and finally, unfortunately, wesnoth is rejecting that code
Hard/Melodic Trance, other Electronica:
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
-
- Posts: 166
- Joined: June 4th, 2004, 8:18 pm
- Location: Atlanta, GA
- Contact:
something doesnt make sense then, because it doesnt seem right that in one case you would have to treat the location as a variable and in another place treat it as a tagBecause WML doesn't do that. That syntax is used only for specifying attributes for tags. The only way to modify variables is with [set_variable].
Hard/Melodic Trance, other Electronica:
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
[if] is not a preprocessor symbol; it is more comparable to [message] than '#ifdef'.Stosswelle wrote:say what?[if] is not like '#ifdef'; it can only be used as an action
not anymore.Stosswelle wrote:wiki refers to poison, slow, somethingelse, and invisible
yes; I saved a game where an Elvish Ranger was in forest and looked at the savefile.Stosswelle wrote:you sure its ambush?
The variables are not the location of the unit; it's just a variable. However the variable is used to determine the location.Stosswelle wrote:something doesnt make sense then, because it doesnt seem right that in one case you would have to treat the location as a variable and in another place treat it as a tag
-
- Posts: 166
- Joined: June 4th, 2004, 8:18 pm
- Location: Atlanta, GA
- Contact:
ao ambush is for forestsyes; I saved a game where an Elvish Ranger was in forest and looked at the savefile.
and nightstalk im guessing is for nighttime
i bet you could code invisibility for all situations until you approach a unit...
ill get on that when theres nothing else to do
so x={x} and y={y} work in some sitautions because?The variables are not the location of the unit; it's just a variable. However the variable is used to determine the location.
oh yeah, code still blows up when trying to do multi, wesnoth rejects it, says something about illegal [/set_variable]
Hard/Melodic Trance, other Electronica:
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
-
- Posts: 166
- Joined: June 4th, 2004, 8:18 pm
- Location: Atlanta, GA
- Contact:
ok i just checked
invisible is a status
ambush and nightstalk are abilities
supposedly adding abilities to units doesnt work as of yet...
invisible is a status
ambush and nightstalk are abilities
supposedly adding abilities to units doesnt work as of yet...
Hard/Melodic Trance, other Electronica:
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
http://www.musicv2.com/artist/stosswelle
Play Blood Series Maps!
--- ~WAY~ We Are Yousnoth---
<Li`sar> he likes it when i stand up with the remote held high "I am the princess"
the fact that you are using brackets has nothing to do with whether you are storing a variable; the brackets are preprocessor symbols. Here's an example:Stosswelle wrote:so x={x} and y={y} work in some sitautions because?
Code: Select all
#define SETX X
x={X}
#enddef
{SETX 5}
Code: Select all
x=5
Code: Select all
{VARIABLE x 5}
x=$x
It works for me; maybe you should post the context you are using it in?Stosswelle wrote:oh yeah, code still blows up when trying to do multi, wesnoth rejects it, says something about illegal [/set_variable]
About statuses: I just checked and the system seems illogical. How it works is that all units with the ability 'ambush' always have the status 'ambush', regardless of whether they are in forest (similarly for 'nightstalk'). What is the point of that? You already know that the unit has ambush by its unit type! And 'invisible' is not a status; it doesn't do anything.