3 little 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.
3 little questions
HI
Here are some questions:
1. Is there a list of all the macros in the game? The use seems to be very common. But some I just cant figure out.
2. Whats the advantage of creating a story.cfg? It works perfectly if I include it just in the scenario file.
3. I guess this one has been asked a bazillion times, but i did not find a solution. I want to create a unit that is poisoned, and stay this way - even if moved to a village. Or it should be automatically re poisoned when it leaves the village.
I tryed some Ideas, but none did work.
First try:
second:
third
Nitzer
Here are some questions:
1. Is there a list of all the macros in the game? The use seems to be very common. But some I just cant figure out.
2. Whats the advantage of creating a story.cfg? It works perfectly if I include it just in the scenario file.
3. I guess this one has been asked a bazillion times, but i did not find a solution. I want to create a unit that is poisoned, and stay this way - even if moved to a village. Or it should be automatically re poisoned when it leaves the village.
I tryed some Ideas, but none did work.
First try:
Code: Select all
[event]
name=new turn
first_time_only=no
[filter]
description=Maria
[/filter]
[status]
poisoned=on
[/status]
[/event]
Code: Select all
[event]
name=new turn
first_time_only=no
[store_unit]
[filter]
description=Maria
[/filter]
[status]
poisoned=on
[/status]
[/store_unit]
[unstore_unit]
[filter]
description=Maria
[/filter]
[/unstore_unit]
[/event]
Code: Select all
[event]
name=new turn
first_time_only=no
[store_unit]
[filter]
description=Maria
[/filter]
[status]
poisoned=on
[/status]
[/store_unit]
[set_variable]
name=unit_store.status.poisoned
value=yes
[/set_variable]
[unstore_unit]
[filter]
description=Maria
[/filter]
[/unstore_unit]
[/event]
Re: 3 little questions
Check data/utils.cfg. Personally I think the file has lots of useless stuff, and could need some updating.Nitzer wrote:1. Is there a list of all the macros in the game? The use seems to be very common. But some I just cant figure out.
I've never understood why someone would put the [story] things in a separate file. It just makes zero sense to me.Nitzer wrote:2. Whats the advantage of creating a story.cfg? It works perfectly if I include it just in the scenario file.
You're not using [store_unit] correctly. In the last one, the [filter] part is ok, but you do not provide the key variable in the [store_unit]. Here is what you need:Nitzer wrote:3. I guess this one has been asked a bazillion times, but i did not find a solution. I want to create a unit that is poisoned, and stay this way - even if moved to a village. Or it should be automatically re poisoned when it leaves the village.
I tryed some Ideas, but none did work.
Code: Select all
[event]
name=new turn
first_time_only=no
[store_unit]
[filter]
description=Maria
[/filter]
variable=stored_Maria #The variable into which to store the unit
kill=yes #[unstore_unit] will restore the unit, so no worries
[/store_unit]
[set_variable]
name=stored_Maria.status.poisoned #The variable we're setting
value=on #poisoned if 'on', the unit loses 8 HP each turn.
[/set_variable]
[unstore_unit]
variable=stored_Maria
[/unstore_unit]
[/event]
This is how I'd make a unit always be poisoned:
Code: Select all
[event]
name=side turn
first_time_only=no
[if]
[variable]
name=side_number
equals=1
[/variable]
[then]
{MODIFY_UNIT description=Maria status.poisoned on}
[/then]
[/if]
[/event]
[event]
name=moveto
first_time_only=no
[filter]
description=Maria
[/filter]
{MODIFY_UNIT description=Maria status.poisoned on}
[/event]
The MODIFY_UNIT macro, which I find incredibly handy, is from the WML Utilities page (inside the UsefulWMLFragments page).
Re: 3 little questions
There is also some description on the Wiki IIRCzookeeper wrote:Check data/utils.cfg. Personally I think the file has lots of useless stuff, and could need some updating.Nitzer wrote:1. Is there a list of all the macros in the game? The use seems to be very common. But some I just cant figure out.
It can be useful fo readability... If your story is quite huge, you don't have to scroll a lot down if you just intend to modify the rest of the scenario.zookeeper wrote:I've never understood why someone would put the [story] things in a separate file. It just makes zero sense to me.Nitzer wrote:2. Whats the advantage of creating a story.cfg? It works perfectly if I include it just in the scenario file.