wml help please - will be a few questions.
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.
-
- Posts: 64
- Joined: November 24th, 2007, 9:46 am
wml help please - will be a few questions.
ok first things first is there a way to give a unit a trait or ability so that it makes gold? for example if the unit did not move attack or be attacked that turn it gives you 2 gold. ? if so what is it?
secondly is there a way to give a unit a trait or ability so that it gives units adjacent to it a predefined ranged attack which they then can use while still adjacent to the unit with the ability but only in defence? if so how?
thirdly lol is there a way to give a unit a ability/trait where it will act as a gate for a unit with the teleport ability? if it is possible would a new teleport ability have to be remade aswell? is so how?
thanks guys
secondly is there a way to give a unit a trait or ability so that it gives units adjacent to it a predefined ranged attack which they then can use while still adjacent to the unit with the ability but only in defence? if so how?
thirdly lol is there a way to give a unit a ability/trait where it will act as a gate for a unit with the teleport ability? if it is possible would a new teleport ability have to be remade aswell? is so how?
thanks guys
Re: wml help please - will be a few questions.
Try a look at UnitWML and AbilitiesWML.
I am NO WML wizard, but from my experience so far...
1) should be possible,
2) sounds complicated (even to play),
3) don't know.
So, I learned something today: I have to learn more about UnitWMl myself.
I am NO WML wizard, but from my experience so far...
1) should be possible,
2) sounds complicated (even to play),
3) don't know.
So, I learned something today: I have to learn more about UnitWMl myself.

ThanatoNoth | Necromanteion | Undead Rights Protection Society
"The gods can demand nothing of me. Even gods answer to me, eventually. [...] I cannot be bidden, I cannot be forced. I will do only that which I know to be right." (Death in Pratchett's "Mort")
"The gods can demand nothing of me. Even gods answer to me, eventually. [...] I cannot be bidden, I cannot be forced. I will do only that which I know to be right." (Death in Pratchett's "Mort")
Re: wml help please - will be a few questions.
A template to start with: Works Ability. Try to figure out how to modify that...ok first things first is there a way to give a unit a trait or ability so that it makes gold? for example if the unit did not move attack or be attacked that turn it gives you 2 gold. ? if so what is it?
- beetlenaut
- Developer
- Posts: 2867
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: wml help please - will be a few questions.
2) This is possible, but will be awfully complicated to program. You will need some experience with WML. Get the first one done and working, then worry about the second.
3) Not currently possible. I has been requested as a feature, so it sounds like it will happen eventually.
3) Not currently possible. I has been requested as a feature, so it sounds like it will happen eventually.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Re: wml help please - will be a few questions.
I'm sure with some fancy event-driven abilities that #3 is possible, but I wouldn't want to see the mess that would be
#1 should be pretty simple, and #2... I think I saw a thread some time ago that somebody was trying to do the same.

#1 should be pretty simple, and #2... I think I saw a thread some time ago that somebody was trying to do the same.
- beetlenaut
- Developer
- Posts: 2867
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: wml help please - will be a few questions.
There are some hacks you could do, yes, but they would be ugly. And I don't mean just the code. If a teleporter moved next to a unit with the gate ability, you could pop up a dialog box asking the player to type x and y coordinates to teleport to. That would certainly work, but it would be clunky, you wouldn't be able to see all your possible moves, and the AI would not be able to use it or plan for it. You could also have the teleporter carry a village around with him when he's near the other unit. All in all, I'd rather wait until it's a feature of the game.Lord_Aether wrote:I'm sure with some fancy event-driven abilities that #3 is possible, but I wouldn't want to see the mess that would be.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
-
- Posts: 64
- Joined: November 24th, 2007, 9:46 am
Re: wml help please - will be a few questions.
i agree ill wait for that one to become a feature, quick question where can i find a working version of darkness (opposite of illuminate)?
also trying to get inspireto work on a unit of mine this is the code i got whats wrong?
#define ABILITY_INSPIRE
[leadership]
id=leadership
value=10
cumulative=no
name= _ "inspire"
description= _ "Inspire:
This unit can inspire friendly units that are next to it, making them fight better.
Adjacent friendly level 1 units will do 10% more damage in battle. Does not work on SHADOWPRINES."
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
level=1
[not]
type=EOR_Shadowprince [/not]
[/filter]
[/affect_adjacent]
[/leadership]
[leadership]
id=leadership
value=25
cumulative=no
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
level=0
[/filter]
[/affect_adjacent]
[/leadership]
#enddef
also trying to get inspireto work on a unit of mine this is the code i got whats wrong?
#define ABILITY_INSPIRE
[leadership]
id=leadership
value=10
cumulative=no
name= _ "inspire"
description= _ "Inspire:
This unit can inspire friendly units that are next to it, making them fight better.
Adjacent friendly level 1 units will do 10% more damage in battle. Does not work on SHADOWPRINES."
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
level=1
[not]
type=EOR_Shadowprince [/not]
[/filter]
[/affect_adjacent]
[/leadership]
[leadership]
id=leadership
value=25
cumulative=no
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
level=0
[/filter]
[/affect_adjacent]
[/leadership]
#enddef
-
- Posts: 64
- Joined: November 24th, 2007, 9:46 am
Re: wml help please - will be a few questions.
still need help guys thanks
- beetlenaut
- Developer
- Posts: 2867
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: wml help please - will be a few questions.
The only obvious thing I see is the [/not] at the end of a line. This is very hard to read though. From now on, please indent it like this:illcwaticando wrote:still need help guys thanks
Code: Select all
[tag]
key=value
second_key=value_too
[another_tag]
key=value
another_key=value
[/another_tag]
[/tag]
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
-
- Posts: 64
- Joined: November 24th, 2007, 9:46 am
Re: wml help please - will be a few questions.
im new to this so i dont know how to do that, and what should the above code be? instead
- beetlenaut
- Developer
- Posts: 2867
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: wml help please - will be a few questions.
The only thing you have to do to make your code work is move the [/not] to its own line.
The rest of my post was me complaining that your code was hard to read. I was giving you an example of how to indent the lines between tags. Any reasonable text editor (in other words, not notepad) will do it automatically if you set it up that way.
The rest of my post was me complaining that your code was hard to read. I was giving you an example of how to indent the lines between tags. Any reasonable text editor (in other words, not notepad) will do it automatically if you set it up that way.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide