Page 1 of 1

How do you ChangeLeadersPool for an ongoing game?

Posted: Sat Jun 02, 2012 8:49 pm
by Kensai
Our 23-strong MP game has reached a point in time (1863) where we need to update the Leaders Pool as the developers suggest in the PON public DB. There is a problem though: even using the syntax for the command ChangeLeadersPool the parser seems to completely disregard it.

Don't tell me it's impossible to update these values on an ongoing game. Please, if you have time, show me the written command to change the leaders pool for say 1860 Austria.

These are supposed to be the values:

Code: Select all

SelectFaction = $AUS
  ChangeLeadersPool = 1;0
  ChangeLeadersPool = 2;6
  ChangeLeadersPool = 3;4
  ChangeLeadersPool = 11;0
  ChangeLeadersPool = 12;2
  ChangeLeadersPool = 13;1


Can you turn this into an event to be inserted through a script?

Posted: Sun Jun 03, 2012 1:14 pm
by sagji
When I run the following event I get lots of extra leaders show up. They don't show up until the turn after the event is applied - implying that number of leaders is checked before events are processed. Also from the script report it is clear that the command adds that number of leaders rather than sets it to a specific level - so instead of ChangeLeadersPool = 12;2 it should be ChangeLeadersPool = 12;1 to add one leader to the existing 1.

Code: Select all

SelectFaction = $AUS
SelectRegion = $Castilla La Nueva
StartEvent = evt_nam_updateleaders|1|0|NULL|NULL|$Castilla La Nueva|NULL
Conditions
Actions
SelectFaction = $AUS
  ChangeLeadersPool = 1;8
  ChangeLeadersPool = 2;8
  ChangeLeadersPool = 3;8
  ChangeLeadersPool = 11;8
  ChangeLeadersPool = 12;8
  ChangeLeadersPool = 13;8
EndEvent

Posted: Sun Jun 03, 2012 2:02 pm
by Kensai
If the above is right, then the syntax suggested in the Wiki is wrong...

Both in how the command works AND its syntax. <redacted by admin> :bonk:

Posted: Sun Jun 03, 2012 7:00 pm
by lodilefty
The wiki is now corrected, and checked vs function in the ScriptEngine code
http://www.ageod.net/agewiki/ChangeLeadersPool

I humbly apologize that neither I nor the Wiki are not as perfect as some people think seem to believe that they are.

Posted: Sun Jun 03, 2012 7:07 pm
by Kensai
Hey! I didn't swear. :p
It was just a frustration call to the divine after losing so much time. It is not your fault, I should have corrected the wiki myself instead of complaining. We managed to do it, btw. Take a look! :)

Btw, wouldn't it be better to set the change instead of adding-decreasing?!

Posted: Sun Jun 03, 2012 7:45 pm
by sagji
Kensai wrote:Btw, wouldn't it be better to set the change instead of adding-decreasing?!
It is more important to have a way of changing by a certain amount than to set it to a known amount. For example if the Formation of Germany gives Prussia more generals, and the passage of time gives Prussia more generals, and there was an army reorganisation that gave Prussia more generals, and they could fire in any order it becomes very complex to write the scripts to do them all. Even harder if the events are written by different people at different times in different files.

Posted: Sun Jun 03, 2012 9:07 pm
by Kensai
Yep. Makes sense. Actually all commands of the Change-fashion are of the same spirit: ChangeVPCount, ChangeRailPool, etc

Posted: Fri Nov 30, 2012 3:26 pm
by powloon1
Is there anyway to tell in the game files or though the command box how many leaders you have in the leader pool?

Am I correct in thinking that there is nothing to enforce the changing number of leaders in line with the LeaderSystem file and that you have to manually modify it?