AI leader wont recruit on turn 1. why? how?
Moderator: Forum Moderators
AI leader wont recruit on turn 1. why? how?
the AI leader in my scenario can only recruit peasants, and he starts with 8 gold and then makes 8 gold a turn.
i want him to recruit a peasant every turn, why is he being stubborn and not recruiting on on the first turn.
does the AI have some wierd "keep some cash in reserve" thing or something?
here's the [side]
i want him to recruit a peasant every turn, why is he being stubborn and not recruiting on on the first turn.
does the AI have some wierd "keep some cash in reserve" thing or something?
here's the [side]
the {no_scouts} thing i just added, but it didnt help either. not sure what (if anything) it does, but saw it somewhere and figured i'd try.[side]
side=2
controller=ai
team_name=1
description=Lord Grishan
type=Grand Marshal
canrecruit=1
recruit=Peasant
village_gold=0
[ai]
{NO_SCOUTS}
passive_leader=yes
recruitment_pattern=fighter
villages_per_scout=0
[/ai]
{GOLD 8 8 8}
{INCOME 6 6 6}
[/side]
didnt have that one. added it. didnt help.
i have the suspicion that its because the thing wants to recruit scouts. but there are no scouts in its list (cause all it has is pesants)
the lands around it are mostly grassland and villages. there's a big river on the map (takes almost half the map proly) though, so maybe it wants to recruit water dwellingn units.
i'm trying to thing of a scenario where the recruitment possibilities are similar where the ai recruits on the first turn.
i have the suspicion that its because the thing wants to recruit scouts. but there are no scouts in its list (cause all it has is pesants)
the lands around it are mostly grassland and villages. there's a big river on the map (takes almost half the map proly) though, so maybe it wants to recruit water dwellingn units.
i'm trying to thing of a scenario where the recruitment possibilities are similar where the ai recruits on the first turn.
take out passive_leader
If you want him to stay put in his keep, you might want to add a leader goal (set to the keep's location), but I don't know what effect that will have on recruiting.
If you want him to stay put in his keep, you might want to add a leader goal (set to the keep's location), but I don't know what effect that will have on recruiting.
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
ye, may have to resort to droping his starting gold to 8 and making his first unit for him. (hope that dont make him not recruit on second turn).
the "leader goal" thing without "passive leader" works better then i expected. he walks away from the keep, but not for more then one turn. which is basicaly ideal for what i wanted from him. thanks scott.
got another problem now.
cant get the [teleport] thing to work.
well, i can get it to teleport the right unit at the right time, but not to where i want it to.
i've got it in a "moveto" event, and what i want it to do is teleport the unit one hex down (south) from whereever that unit moved to. (to prevent a player from crosing an artificial boundry).
everything works except that for some reason i cant seem to figure out the syntax for the "x1, y1" variables that i should be able to use inside the moveto event.
do they not work if i go inside another tag (meainin inside teleport) or am i just not puting the right type of brackets around the variables or something?
here's the event:
right now it works. it teleports to 20,20.
but if i do
so i think i'm doing something wrong with the syntax.
should i put x1 in to {}???
or do i need to somehow use the [variable] or [set_variable] things. not sure how exactly they work yet, so not sure if they even apply here.
the "leader goal" thing without "passive leader" works better then i expected. he walks away from the keep, but not for more then one turn. which is basicaly ideal for what i wanted from him. thanks scott.
got another problem now.
cant get the [teleport] thing to work.
well, i can get it to teleport the right unit at the right time, but not to where i want it to.
i've got it in a "moveto" event, and what i want it to do is teleport the unit one hex down (south) from whereever that unit moved to. (to prevent a player from crosing an artificial boundry).
everything works except that for some reason i cant seem to figure out the syntax for the "x1, y1" variables that i should be able to use inside the moveto event.
do they not work if i go inside another tag (meainin inside teleport) or am i just not puting the right type of brackets around the variables or something?
here's the event:
Code: Select all
#the girl cant swim
[event]
name=moveto
first_time_only=no
[filter]
description=Daira
x=01,02,03,03,03,04,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20
y=16,16,16,17,18,15,18,16,16,16,16,16,15,15,15,16,16,16,16,16,15,16,16
[/filter]
[message]
speaker=unit
message="Oh no. What am I thinking, I cant swim."
[/message]
[teleport]
[filter]
description=Daira
[/filter]
x=20
y=20
[/teleport]
[/event]
but if i do
which is what i want it to be, then it dont work, but i cant figure out why.x=x1
y=y1+1
doesnt work either.x=x1
y=20
so i think i'm doing something wrong with the syntax.
should i put x1 in to {}???
or do i need to somehow use the [variable] or [set_variable] things. not sure how exactly they work yet, so not sure if they even apply here.
i think you should use "$":
Code: Select all
x=$x1
y=$y+1
You can't do math like that in a sentence. You need to use {VARIABLE_OP y add 1} to add 1 to y before the action.tomsik wrote:i think you should use "$":Code: Select all
x=$x1 y=$y+1
"ILLEGITIMIS NON CARBORUNDUM"
Father of Flight to Freedom
http://www.wesnoth.org/wiki/FlightToFreedom
Father of Flight to Freedom
http://www.wesnoth.org/wiki/FlightToFreedom
cool. you're half right.
so i do need the $ there.
however
y=$y1+1
didnt work.
so that means i gotta do the computation seperately. but now that i know taht atleast part of it works, i'm sure i can get the rest to work. though if someone knows for sure hwo to do it, that'd save me some trial and error time.
EDIT: took too long to post.
thanks for the last piece MadMax.
WORKED!!!!x=$x1
y=20
so i do need the $ there.
however
y=$y1+1
didnt work.
so that means i gotta do the computation seperately. but now that i know taht atleast part of it works, i'm sure i can get the rest to work. though if someone knows for sure hwo to do it, that'd save me some trial and error time.
EDIT: took too long to post.
thanks for the last piece MadMax.