Bitrons WML 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.
Re: [Ability] - Inspiration
I meant conditions if $x1= and $y1=
I do not see where you define X and Y.
I do not see where you define X and Y.
Re: [Ability] - Inspiration
x,y=X,Y
<-- those are placeholder for the acutal coordinates of a village.Depends on wich Village Ysedda will reach, she will tell a variable name. (:
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [Ability] - Inspiration
And once again I desperately need your help.
in one scenario, i want the opponent team not to move at first. thats why I set the ai_special from all of them to guardian with
But there is a point in the game, I wan't them to move again, of course. But i have no clue how to take away the guardian status from the opponent team :/
hope you can help me out with it and best wishes
- Bitron
in one scenario, i want the opponent team not to move at first. thats why I set the ai_special from all of them to guardian with
{MODIFY_UNIT side=2 ai_special guardian}
But there is a point in the game, I wan't them to move again, of course. But i have no clue how to take away the guardian status from the opponent team :/
hope you can help me out with it and best wishes
- Bitron
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [Ability] - Inspiration
Why not just remove all mp where needed?
Or when doing so each turn is too slow, then modify max_mp.
Or when doing so each turn is too slow, then modify max_mp.
Re: [Ability] - Inspiration
The point of changing the behavior is variable. it could be second turn, it also could be the 20th turn.
It depends on when you get cought by the orcs, which you don't want to.
And if i'd take the maximum movementpoints of all units, it's quite hard to give them those specific points back.
Well, i could use a variable for filtering if they discovered me or not.
It depends on when you get cought by the orcs, which you don't want to.
And if i'd take the maximum movementpoints of all units, it's quite hard to give them those specific points back.
Well, i could use a variable for filtering if they discovered me or not.
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [Ability] - Inspiration
Who does the
somehow the orcish units are not moving in turn 1, but do move in turn 2.
{MODIFY_UNIT side=2 moves 0}
work in event name=side 2 turn 1
but not in event name=side 2 turn 2
?Code: Select all
#
# Morgals army moves 1
#
[event]
name=side 2 turn 1
{MOVE_UNIT id=Agser'revs 13 5}
{MOVE_UNIT id=Grumok 13 6}
{MOVE_UNIT id=Brok 16 4}
{MOVE_UNIT id=Vurk 17 4}
{MOVE_UNIT id=Rasha 17 5}
{MOVE_UNIT id=Vurga 17 6}
{MOVE_UNIT id=Knargal 16 6}
{MOVE_UNIT id=Vurgash 15 5}
{MOVE_UNIT id=Norol 16 5}
{MOVE_UNIT id=Narrak 14 5}
{MODIFY_UNIT side=2 moves 0}
[/event]
#
# Grumok moves back 1
#
[event]
name=side 2 turn 2
{MOVE_UNIT id=Grumok 6 7}
{MODIFY_UNIT side=2 moves 0}
[/event]
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [Ability] - Inspiration
You must modify their moves in a turn refresh type event. The game fills movement points after the normal turn type events, but before turn refresh type events. So use "side 2 turn <number> refresh" instead.
Re: [Ability] - Inspiration
That turn 1-2 difference is from how income is calculated. I am not quite sure why it was chosen to make turn 1 special that way.
Create variable in each unit that says how many it should have, and when its time then iterate over them and restore. Or if they are all nonmodified then can restore them just based on unit type.it's quite hard to give them those specific points back.
Re: [Ability] - Inspiration
What has the income to so with the movementpoints of those units?That turn 1-2 difference is from how income is calculated.
Thanks for the hint, I'll try it. (:You must modify their moves in a turn refresh type event.
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [Ability] - Inspiration
turn refresh
Like side turn, triggers just before a side is taking control but after healing, calculating income, and restoring unit movement and status.
Note that the turn refresh event does occur on turn 1, even though healing, income and unit refreshing do not.
Re: [Ability] - Inspiration
And here I am, with another little Question.
Has anything changed with the
here are two examples:
somehow it doesn't trigger if I move Denvan (and Ysedda in the second example) to the specific position.
Has anything changed with the
name=moveto
events ? Somehow some of them are not working anymore in my campaign. It's about those which would end a scenario.here are two examples:
Code: Select all
#
# VICTORY
#
[event]
name=moveto
[filter]
x=29
y=1
id=Denvan
[/filter]
[message]
speaker=Ysedda
message= _ "We did it!"
[/message]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
Code: Select all
[event]
name=moveto
[filter]
id=Denvan
[and]
id=Ysedda
[/and]
x,y=41,0
radius=3
[/filter]
[...]
[/event]
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [Ability] - Inspiration
I kinda solved the first one (or it solved itself), but I still have problems with the second one. How can I write it that two specific Units have to be in one specific area to trigger the event?
this doesn't work, however.
this doesn't work, however.
Code: Select all
#define TEST_EVENT
[event]
name=moveto
first_time_only=yes
[filter]
id=Johan
[and]
id=Ysedda
[/and]
x=23-24
y=15-16
[/filter]
[message]
speaker=Ysedda
message= _ "Done!"
[/message]
[/event]
#enddef
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
- beetlenaut
- Developer
- Posts: 2829
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: [Ability] - Inspiration
What you wrote looks for a unit that has an id of Ysedda AND Johan which is impossible. Instead, use [or] in the filter part to select the two units, then use an [if] with [have_unit] to specify the locations. The [have_unit] tag will use an [and] in it to include both units. (With this method, the [filter] is actually optional, but should make the code a bit faster.) You will also have to put
Edit: Or what Ravana said would be a little shorter. I just like [if] statements.
first_time_only=no
in the event because the [if] statement will have to be checked every time either unit moves.Edit: Or what Ravana said would be a little shorter. I just like [if] statements.
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: [Ability] - Inspiration
It looks for unit that has id that equals both of them. Use [filter_condition] with two [have_unit].
Re: [Ability] - Inspiration
Like that ?
Code: Select all
#define TEST_EVENT
[event]
name=moveto
first_time_only=no
[filter_condition]
[have_unit]
id=Ysedda
x,y=23-24,14-15
[/have_unit]
[and]
[have_unit]
id=Johan
x,y=23-24,14-15
[/have_unit]
[/and]
[/filter_condition]
[message]
speaker=Ysedda
message= _ "Done!"
[/message]
[/event]
#enddef
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code