To allow the vanguard of side0 launching a long and continuous pursuit. Increased AP points will be necessary. When I type Setattrib(ID,"AP",16); to a MAA(AP originally 14), It’s AP was still 14 in gameplay. I guess the value I set exceeded the maximum limitation?
So I have to try the other way? Using function setting unit moving cost?
Ask for help:About increasing the maneuverbility,setting ”AP”didn’t work
Moderator: rbodleyscott
-
locustmustdie
- Senior Corporal - Destroyer

- Posts: 117
- Joined: Fri Mar 05, 2021 11:33 am
-
rbodleyscott
- Field of Glory 2

- Posts: 28429
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Ask for help:About increasing the maneuverbility,setting ”AP”didn’t work
You will also need to
SetBaseAttrib(ID, "AP", 16)
because the AP are reset to that at the start of each turn.
SetBaseAttrib(ID, "AP", 16)
because the AP are reset to that at the start of each turn.
Richard Bodley Scott


Re: Ask for help:About increasing the maneuverbility,setting ”AP”didn’t work
I think if you use this script (or something like that) in your Scenario.BSF it will work (at least such script composition works in P&S):locustmustdie wrote: Mon Jul 18, 2022 2:29 am To allow the vanguard of side0 launching a long and continuous pursuit. Increased AP points will be necessary. When I type Setattrib(ID,"AP",16); to a MAA(AP originally 14), It’s AP was still 14 in gameplay. I guess the value I set exceeded the maximum limitation?
So I have to try the other way? Using function setting unit moving cost?
Code: Select all
FUNCTION StartTurnPost(side)
{
int i;
int id;
int turn;
int team;
turn = GetTurn();
if (side == 0)
{
// if (turn <= 12) // till turn 7 including
// {
for (i = 0; i < GetUnitCount(0); i++)
{
id = GetUnitID(0,i);
if (id != -1)
{
if ((IsUnitValid(id) == 1) && (IsUnitSquadType(id, "Knights") == 1))
{
team = GetUnitTeam(id);
if (team == 0)
{
// if (GetAttrib(id, "MoraleState") < 2) // only for Steady or Disrupted units
// {
SetAttrib(id, "AP", 16);
// }
}
}
}
}
// }
}I commented out the conditions of turns and morale state. You can use it with your own parameters (do not forgot to delete // in this case)
-
locustmustdie
- Senior Corporal - Destroyer

- Posts: 117
- Joined: Fri Mar 05, 2021 11:33 am
Re: Ask for help:About increasing the maneuverbility,setting ”AP”didn’t work
Thanks,Richard!
Thanks,Cronos!
Thanks,Cronos!
-
locustmustdie
- Senior Corporal - Destroyer

- Posts: 117
- Joined: Fri Mar 05, 2021 11:33 am
Re: Ask for help:About increasing the maneuverbility,setting ”AP”didn’t work
I tried,”error:setbaseattrib undefined variety”rbodleyscott wrote: Mon Jul 18, 2022 6:02 am You will also need to
SetBaseAttrib(ID, "AP", 16)
because the AP are reset to that at the start of each turn.
I checked the tools.bsf,there’s GetBaseAttrib(), no SetBaseAttrib() found. Might have to looking for other methods.
-
rbodleyscott
- Field of Glory 2

- Posts: 28429
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Ask for help:About increasing the maneuverbility,setting ”AP”didn’t work
Ah yes, you are right. Sorry.locustmustdie wrote: Tue Jul 19, 2022 12:21 amI tried,”error:setbaseattrib undefined variety”rbodleyscott wrote: Mon Jul 18, 2022 6:02 am You will also need to
SetBaseAttrib(ID, "AP", 16)
because the AP are reset to that at the start of each turn.
I checked the tools.bsf,there’s GetBaseAttrib(), no SetBaseAttrib() found. Might have to looking for other methods.
You will need to set their "AP" to 16 in StartTurnPost() in your scenario script.
This is activated after the vanilla StartTurn() function, so that way they will be switched back to 16 AP after the vanilla script has updated them to 14.
Richard Bodley Scott


-
locustmustdie
- Senior Corporal - Destroyer

- Posts: 117
- Joined: Fri Mar 05, 2021 11:33 am
Re: Ask for help:About increasing the maneuverbility,setting ”AP”didn’t work
It works! Thanks Richard! Thanks Cronos09!
