Page 1 of 1

scripting leader events

Posted: Tue Feb 12, 2008 7:36 pm
by beefcake
I am playing around with the various leaders.sct files. In some of the mods I have seen, there are promotion events that may promote a general from 1* to 2* status. For example, this comes from Runyon's Leader mod v1.09

SelectFaction = $USA
StartEvent = evt_nam_USA_63PromotionsA|1|1|NULL|NULL|NULL|NULL

Conditions
MinDate = 1863/04/01
MaxDate = 1863/12/31
SelUnqSubUnit = William F. Smith
EvalSubUnitSel = NULL

Actions
AltercuSubUnit = Model $ldr_USA_Smith2

EndEvent


My interpretation is that this event will trigger sometime between April 1 and December 1, 1863. If there is a random chance it could happen each turn, what determines the probability? Or is it a certainty that it will trigger, but simply a question of which turn between April and December '63?

I would appreciate comments from anybody who has more experience with modding the leaders.sct files.

Thanks.

Posted: Tue Feb 12, 2008 7:57 pm
by runyan99
I think the code allows for a probability factor, but that is not present in the example. So, the above event will always fire on 1863/4/1.

Posted: Tue Feb 12, 2008 8:44 pm
by beefcake
I appreicate your quick response. I had tried copying and pasting new events into the .sct file, then modifying the entries for different generals. But only a few of the generals were automatically promoted on my first test, and on my second test different generals were promoted instead. But I will review my changes to the .sct file and see if I can figure out what I did.

Thanks.

Posted: Tue Feb 12, 2008 8:49 pm
by lodilefty
beefcake wrote:I appreicate your quick response. I had tried copying and pasting new events into the .sct file, then modifying the entries for different generals. But only a few of the generals were automatically promoted on my first test, and on my second test different generals were promoted instead. But I will review my changes to the .sct file and see if I can figure out what I did.

Thanks.


Some generals can't be promoted. There has to be a unit/model at the higher rank to make this work....

It's difficult to follow this when using the .mdl and .uni files, but the database makes it somewhat easier.... :niark:

...of course then you get to learn how to extract and process the spreadsheets!!!!! :bonk:

Posted: Tue Feb 12, 2008 9:51 pm
by beefcake
Another good point, lodilefty. In this case, I'm working with the cream of the Union crop:

Sherman
Ord
Reynolds
Sedgwick
Hancock
Hooker
Sheridan

I've played several campaigns and I've had these mugs in the thick of the fighting every game, but it is always seems to be another leader winning seniority instead of them. Still love the game though. :coeurs:

Thanks.

Posted: Tue Feb 12, 2008 10:24 pm
by Rafiki
runyan99 wrote:I think the code allows for a probability factor, but that is not present in the example. So, the above event will always fire on 1863/4/1.

For the probability thingy, take a look at http://ageod.nsen.ch/aacwwiki/Modding_events#Probability :)

Posted: Wed Feb 13, 2008 8:52 pm
by beefcake
Thank you for pointing out the Wiki link to modding the game events. I will definitely start expirimenting with that!