Page 1 of 1

Faction modifiers

Posted: Sun Oct 25, 2015 8:09 pm
by PaRappaSan
Hello all. I've been scripting an event directly onto events/BOR_4_Pyrrhus280

SelectFaction = EPI
StartEvent = Genius|999|0|NULL|NULL|NULL|NULL
Conditions
MinDate = -279/01/01
Actions
AddFacModifiers = $fmdPercProgRateMod|-90 (the idea is to attach leaders to the sarisaphoroi and crank up their ratings quickly)
EndEvent

I've tried different faction modifiers; especially interested in those which enhance Discipline Value (so my cavalry trigger Charge reliably) or boost the final value for leader ratings during combat. Within a varying number of turns, the game crashes. I'm wondering if the values are being applied cumulatively until it exceeds some kind of parameter or something. Is there a way to script such events that is more stable?

Posted: Sun Oct 25, 2015 9:02 pm
by Bohémond
Could you post the mainlog generated just after the crash as well as the last scriptReport ?

Regards

Posted: Sun Oct 25, 2015 9:20 pm
by PaRappaSan
[ATTACH]35020[/ATTACH][ATTACH]35021[/ATTACH]

OK thanks!

Posted: Sun Oct 25, 2015 10:19 pm
by Bohémond
The crash seems related to Faction Modifier as you say.

Why not apply them once and not 999 times ?

Regards

Posted: Mon Oct 26, 2015 12:03 am
by PaRappaSan
Ah, I assumed the application of FacMod would affect only for that turn... thank you!

Posted: Mon Oct 26, 2015 12:32 am
by PaRappaSan
Hmm i changed value to:
StartEvent = Genius|1|0|NULL|NULL|NULL|NULL

But the same crash occurred. Is there another variable that I must change from the original script?

Posted: Mon Oct 26, 2015 2:35 am
by Bohémond
With AddFacModifier command you can add a FacMod but not alter a fmd.

For example in VGN


SelectFaction = $AUS
SelectRegion = $Oesterreich
StartEvent = evt_nam_AUS_GeneralConscription_VoteAccepted|999|0|NULL|NULL|$Oesterreich|NULL

Conditions
CheckOption = $gmaOptionMil;AUS_GeneralConscription;=;1

Actions

SelectFaction = $CMN
GenTextMsg = opt_notify_AUS_GeneralConscription;1;NULL;NULL;NULL

SelectFaction = $AUS
AddFacModifiers = $FM_MIlitaryReforms_DrawReplace
ChangeResStock = $merMoney;-200
ChangeActorPool = $gmaOptionMil;MaxUse;0;SubType;AUS_GeneralConscription

EndEvent


So you have to build a FacMod from one or more fmd's , see VGN for details.


Let me know if it's not clear enough.


Regards

Posted: Mon Oct 26, 2015 2:58 am
by PaRappaSan
Aha, thank you! I had been mistaken as exactly what is invoked by scripting AddFacModifiers. I believe you have shown me what I will need.

Posted: Mon Oct 26, 2015 3:10 am
by PaRappaSan
But perhaps you can aid me further. I tried to do faction scripting because for some reason, when I try to follow the forum link, I am denied access to the file for the CSV-splitter, to design new abilities for my leaders as I had first thought. Now I see I need CSV-splitter for either choice. Would it be possible to be given a correct link?
EDIT: NVM, I have the editing process for models with deleting models.cache, which is certainly enough for what I wish.

Posted: Mon Oct 26, 2015 10:15 am
by Bohémond
Hello,

You are right, the link for CSV Splitter is broken,

Attached is the last version ;

The attachment CSVSplitter.rar is no longer available



Regards