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
With first_time_only=no you might also want to add some limitation how it is allowed to trigger.
Re: [Ability] - Inspiration
It is the leaders goal in the scenario. I just wanted that one needs more than one character in the specific area to win the game. One also have to free another character, before one can left the game winning, thats why the event needs to be able to trigger more than once, in case the character isn't free by then.
however, thants a lot to both of you (:
however, thants a lot to both of you (:
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: Bitrons WML Questions
Hey there!
Is there a possibility to get new sides into the game, but later? like in turn 7-8?
Is there a possibility to get new sides into the game, but later? like in turn 7-8?
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: Bitrons WML Questions
I don't think so, but you could always have a side with no units and hidden=yes. Then you could use [modify_side] to change "hidden," making the side seem to appear.Bitron wrote:Is there a possibility to get new sides into the game, but later? like in turn 7-8?
The last few months have been nothing but one big, painful reminder that TIMTLTW.
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Re: Bitrons WML Questions
I just set theI don't think so, but you could always have a side with no units and hidden=yes. Then you could use [modify_side] to change "hidden," making the side seem to appear.
victory_when_enemies_defeated
to no
and stored them and unstore in turn 5 again. It's a "moveto" scenario so that worked fine. (:Thanks anyways, Samonella!
But acutally i have another question.. how exactly works the
ca_score
?EDIT:
And one more about vision.
Code: Select all
[event]
name=moveto
first_time_only=yes
[filter]
side=2
[filter_vision]
side=1
[/filter_vision]
[/filter]
[message]
speaker=unit
message="I am your enemy. I know that you can see me here."
[/message]
[/event]
Code is like this:
Code: Select all
[event]
name=moveto
first_time_only=yes
[filter]
side=1
[filter_vision]
side=2
[/filter_vision]
[/filter]
[message]
speaker=second_unit
message= _ "There they are!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
It triggers everytime I move a side 1 unit, wether its in vision of side 2 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: Bitrons WML Questions
You mean the ca_score from micro_ais? I don't know the details, but basically it determines how important the action described by the micro_ai is. The AI is made up of a bunch of "candid actions" or "ca"s, which are things like moving the leader towards a keep, moving units towards uncaptured villages, or attacking enemy units. Each action has a ca_score, and the ai will execute actions with a higher ca_score first. This way, the ai will always do certain things before others, such as recruiting before moving the leader away to attack. Now when you make a micro_ai, you are adding a candid action to the ai's list, so the ca_score determines when that action is executed relative to the other candid actions. For example:Bitron wrote:But acutally i have another question.. how exactly works theca_score
?
(Of course, I'm far from an ai expert. If somebody else says something else, trust them not me.)The micro_ai wiki wrote:By setting it, for example, to 170,000, we can have it be executed after the default recruitment CA, but before most of the other default CAs.
My guess is that side 2 doesn't have fog or shroud turned on?Bitron wrote:And one more about vision.
This just work fine, but when i try to switch the sides, so that it triggers when side 1 moves into the vision of side 2, it does not work at all
why?
It triggers everytime I move a side 1 unit, wether its in vision of side 2 or not.
The last few months have been nothing but one big, painful reminder that TIMTLTW.
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Re: Bitrons WML Questions
You got it right.Samonella wrote:(Of course, I'm far from an ai expert. If somebody else says something else, trust them not me.)
Except for one little detail: I like "candid actions", but unfortunately they are simply named "candidate actions"
The only thing I would add is the link to the wiki page explaining what the default AI CAs and their scores are: RCA AI candidate actions
SP campaigns: Galuldur's First Journey (1.12 & 1.14) & Grnk the Mighty (1.10 & 1.12)
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
AI experiments: Micro AIs (wiki, forum thread, known/fixed bugs), Fred, AI-demos add-on
Re: Bitrons WML Questions
Hey there. It is me again, with a question. I was looking for ways to tweak the AI in favour of balancing different difficulties and I've found this piece of code
I recken this does mean that the ai recruits just a specific number of higher leveled units, but I don't really see how exactly it is done here. I haven't found it in the WML docs yet so I am asking right here now.
EDIT: Nevermind, if found it here.
Code: Select all
[ai]
[aspect]
id=recruitment_instructions
[facet]
[value]
[recruit]
type=2
#ifdef EASY
number=0
#endif
#ifdef NORMAL
number=1
#endif
#ifdef HARD
number=2
#endif
total=yes
importance=1
[/recruit]
[recruit]
type=1
importance=0
[/recruit]
[/value]
[/facet]
[/aspect]
[/ai]
EDIT: Nevermind, if found it here.
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: Bitrons WML Questions
Hello guys! I'm here with a new problem. I have piece of wml code here which causes game crashes, and I don't know why. Here is the code:
It has something to do with the
Code: Select all
#define MOVEMENT_STONE_SLEEP
[event]
name=prerecruit
first_time_only=no
[filter]
type_adv_tree=Vampire Deformity
[/filter]
[store_time_of_day]
[/store_time_of_day]
[if]
[variable]
name=time_of_day.lawful_bonus
less_than_equal_to=0
[/variable]
[then]
[unpetrify]
type_adv_tree=Vampire Deformity
side=$side_number
[/unpetrify]
[/then]
[else]
[petrify]
type_adv_tree=Vampire Deformity
side=$side_number
[not]
[filter_location]
area=underground
[/filter_location]
[/not]
[/petrify]
[/else]
[/if]
[/event]
[event]
name=turn refresh
first_time_only=no
[store_time_of_day]
[/store_time_of_day]
[if]
[variable]
name=time_of_day.lawful_bonus
less_than_equal_to=0
[/variable]
[then]
[unpetrify]
type_adv_tree=Vampire Deformity
side=$side_number
[/unpetrify]
[/then]
[else]
[heal_unit]
[filter]
type_adv_tree=Vampire Deformity
side=$side_number
[not]
[filter_location]
area=underground
[/filter_location]
[/not]
[/filter]
amount=10
animate=yes
restore_statuses=yes
[/heal_unit]
[petrify]
type_adv_tree=Vampire Deformity
side=$side_number
[not]
[filter_location]
area=underground
[/filter_location]
[/not]
[/petrify]
[/else]
[/if]
[/event]
#enddef
filter_location
, because when I delete the three area=underground
filters, then it works fine. Otherwise, in Mutliplayer game, when playing with the Vampires (the code is for an ability of a vampire unit) the game just crashes right before the vampire's second turn. Maybe one of you knows why?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: Bitrons WML Questions
how exactly does it crash? most of the times it gives you a message about the error, did you check your stderr.txt file ?
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Bitrons WML Questions
Just that.
(Wesnoth Game Client does not work anymore)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: Bitrons WML Questions
hmm ok, so in your map, you you have a time area with the id "underground " defined?
please test the follwing things:
1) add a [time_area] to your scenairo wih id ="time_area"
2) add a [time_area] to your scenairo wih id ="underground "
please test the follwing things:
1) add a [time_area] to your scenairo wih id ="time_area"
2) add a [time_area] to your scenairo wih id ="underground "
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Bitrons WML Questions
Oh. I guess that means when I filter for a time_area, then I need to provide it in the szenario?
I played on normal Mutliplayer Maps, that's why there is no such area.
I played on normal Mutliplayer Maps, that's why there is no such area.
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: Bitrons WML Questions
Well clearly it shouldn't crash in that case, we likely be able to fix this before 1.14
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Bitrons WML Questions
pushed a fix to 1.14 https://github.com/wesnoth/wesnoth/comm ... 9e85e8f062
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.