Poorlaggedman
Corporal
Posts: 45
Joined: Sat Mar 31, 2012 9:17 am

Creating event mid-game (div limit change)

Fri Feb 08, 2013 10:39 am

Hi. I thought I already had this implemented because I thought it had set off in prior games just recently. I meant to change the division limit for the CSA but it doesn't seem to fire ever.

Before I had been playing a normal 1861 campaign as the CSA. Now I'm playing as CSA in "1861 w/ Kentucky."

I added this
SelectFaction = $CSA
SelectRegion = $Richmond, VA

StartEvent = MaxDivisionsAllowedCSA|1|2|evt_txt_CSA_Commissioners186 1|Event-img_CSA_Commissioners1861|$Richmond, VA|127

Conditions
MinDate = 1861/08/01

Actions
SetCombiUnits = 0;0;99

EndEvent


to my CSA Events text but it didn't work. I also have tried adding it many times during the course of the game, tried messing around with the date and adding a max date that is the same or two weeks or a month after the min date.

It fired in my previous game and I made no changes to the file during my current game until I noticed it never fired and I reached max divisions. And I'm pretty sure I'm putting it in the file right. I searched through the same CSA event file for other references to "SetCombiUnits" but there are none to go off of.

I know I have added events in the middle of prior games before so I know its possible, specifically to increase the morale of the other side so as to keep things interesting. That was just a while back and I dont know what I'm doing different or can do or if the W/ Kentucky Scenario makes things different

Its now January 1864 and I have needed more divisions for a year now

Thanks

User avatar
Ethan
AGEod Guard of Honor
Posts: 1923
Joined: Mon Oct 05, 2009 1:22 pm
Location: Gádir

Fri Feb 08, 2013 12:59 pm

Hi Poorlaggedman,

The text you have to change to modify the divisions limit is only "SetCombiUnits = 0;0;99", so that should be shown like this:

SelectFaction = $CSA
SelectRegion = $Richmond, VA

SelectFaction = $CSA
SelectRegion = $Richmond, VA
StartEvent = evt_nam_CSA_DivisionFormation|1|1|NULL|NULL|$Richmond, VA|NULL

Conditions
FixedDate = 1861/10/01

Actions
SetCombiUnits = 0;0;99



Regards. :hat:
[color="Navy"][font="Georgia"]"Mi grandeza no reside en no haber caído nunca, sino en haberme levantado siempre". Napoleón Bonaparte.[/font][/color]

[color="Blue"]Same Land. Different Dreams. - Photobook[/color]

[SIGPIC][/SIGPIC]

Altaris
Posts: 1551
Joined: Wed Dec 07, 2011 8:20 pm

Fri Feb 08, 2013 2:02 pm

If you're still having trouble, it may be b/c that event has already fired and therefore not firing again with the updated code. Try copying the whole event and changing the event name (make sure it's something unique, like maybe puting XX1 on the end on the name or something).

Make sure you get the whole text that you have above (including the "SelectFaction = $CSA" part prior to StartEvent). If not, the game could potentially choose the wrong faction.

User avatar
Captain_Orso
Posts: 5766
Joined: Tue Sep 01, 2009 5:02 pm
Location: Stuttgart, Germany

Fri Feb 08, 2013 9:00 pm

All roads lead to Rome, but you guys are getting stuck in the ditch :blink:

Most of everything stated has been correct, but to get this to work you have to pick one method and one method only.

First off Poorlaggedman, if the example in the first post is a True™ Cut-n-Paste™ copy of your event then the first issue you have is in the event-text-name: "evt_txt_CSA_Commissione rs186 1". You have 2 spaces imbedded in it. This will cause the event to miss-fire. First check if those spaces are really embedded in the event-text-name.

Then check the ScriptPreParse.txt and ScriptPostParse.txt files in your
..\AGEod's American Civil War\ACW\Scripts
directory. Search for the event name "MaxDivisionsAllowedCSA" and check if anything is reported.

Next, check the ScriptReportXXXX.txt file in the same directory for the last turn you executed -- the XXXX is the game-turn-number.

There are two ways you can determin this file's name.

Method 1.
If you know the date and time of the last turn execution, look for the file with that date and time. You can look at your ..\Saves\{game_name}\{game_name}.hst file of the game in question. That should have nearly the exact date/time.

If that doesn't work for you, use Method 2.

Method 2.
Download and open the attached PDF file; it contains a list of dates and their corresponding turn-numbers.
Load the game in question and check the date of the current turn, eg 63 Sep, Early. Look for that date on the table I attached and locate the corresponding turn-number. 63 Sep, Early is turn-number 2729.

Since we are looking for the turn-number of the last executed turn, go up one on the table. In this example it would be turn-number 2728.

Now look in ..\AGEod's American Civil War\ACW\Scripts for the corresponding ScriptReportXXXX.txt, where "XXXX" is the turn-number.

Check the last couple of lines of the file to see how many errors have been counted.

Now search for the script name "MaxDivisionsAllowedCSA" and note what is says about the execution of that script. Now you should be clued into why it don't work.

[HR][/HR]

Now that that has be taken care of, forget all of it, edit your "CSA event.sct" file and delete that event, because there is a simpler solution :w00t:

In wise anticipation an event has been included in Balances.sct that will fulfill your needs. It's the last event in that file and has the name "evt_nam_USA_MODDivisionFormationUnlimited". Don't worry that it's a USA event, because it still modifies the division limit for both faction.

The MinDate for this event is 1861/10/16, which from my understanding is already passed. This means that the event has already fire numerous times. The catch is that it is programmed to fizzle. That is that it's execution-count is set to 0 - the first number following the event name:

StartEvent = evt_nam_USA_MODDivisionFormationUnlimited|0|0|NULL|NULL|NULL|NULL

This means that the event will successfully fire, but it's actions will not be executed.

So the first thing you do is edit this, changing the first 0 to a 1 so that it looks like this:

StartEvent = evt_nam_USA_MODDivisionFormationUnlimited|1|0|NULL|NULL|NULL|NULL

Now, your event is primed to fire once at any date later than 1861/10/16, BUuuUT since it has already fired as many or more times that allowed (0), the game is now ignoring it. BUuuUT we can tickle the game into checking the event for firing again.

The list of events that have "expired" is in every .hst file of the running game in question. We are only interested in the last one though.

Go to the ..\AGEod's American Civil War\ACW\Saves\{game_name} directory and find the {game_name}.hst file.

Open this in notepad.exe or the editor of your choice.

Search for the event name: evt_nam_USA_MODDivisionFormationUnlimited

You will find this:

Code: Select all

{EventState}
Name=evt_nam_USA_MODDivisionFormationUnlimited
Occurences=0
MaxOccurs=0
{/EventState}


Now edit MaxOccurs to read MaxOccurs=1 and save the changes.

Now on the next turn execution the game will again evaluate the event, which is now set to fire once, and will execute it, this modifying the division limit of both factions to 99 :thumbsup:
Attachments

[The extension pdf has been deactivated and can no longer be displayed.]


Poorlaggedman
Corporal
Posts: 45
Joined: Sat Mar 31, 2012 9:17 am

Mon Feb 11, 2013 10:17 am

Yes I did have an excess space in that program.

I followed your above instructions precisely and it did not work. However, I then saved the game as a new name and loaded that file, edited the .hst and it worked!!!

Thanks a lot, I was beginning to lose hope!

Poorlaggedman
Corporal
Posts: 45
Joined: Sat Mar 31, 2012 9:17 am

Wed Mar 13, 2013 10:20 am

Any short cut to increase the morale of one faction or another? Playing a new campaign as the North and I need more enemy troops to fight

User avatar
Jim-NC
Posts: 2981
Joined: Wed Feb 25, 2009 4:21 pm
Location: Near Region 209, North Carolina

Wed Mar 13, 2013 11:31 am

You could add a script to the game to raise the NM of one side or the other. I would look for the script for the CSA for the event "Dixie" for the syntax of the event.
Remember - The beatings will continue until morale improves.
[SIGPIC][/SIGPIC]

Poorlaggedman
Corporal
Posts: 45
Joined: Sat Mar 31, 2012 9:17 am

Fri Mar 15, 2013 8:00 am

I found the dixie, changed the dates to represent the next couple weeks of the game with correct year and all.

I also went into the .hst for the saved game and updated the maxoccurances to 2 or 3 (it had occured once already)

It still doesn't fire. I am a little unsure of when to set the date range and how to make sure it fires
SelectFaction = $CSA
SelectRegion = $Richmond, VA
StartEvent = evt_nam_CSA_Dixie1862|1|2|evt_txt_CSA_Dixie1862|Event-img_CSA_Dixie1862|$Richmond, VA|25

Conditions
MinDate = 1863/04/01
MaxDate = 1863/05/01

Actions
DescEvent = evt_desc_CSA_Dixie1862
ChangeFacMorale = 50

User avatar
Jim-NC
Posts: 2981
Joined: Wed Feb 25, 2009 4:21 pm
Location: Near Region 209, North Carolina

Fri Mar 15, 2013 11:25 am

Poorlaggedman wrote:I found the dixie, changed the dates to represent the next couple weeks of the game with correct year and all.

I also went into the .hst for the saved game and updated the maxoccurances to 2 or 3 (it had occured once already)

It still doesn't fire. I am a little unsure of when to set the date range and how to make sure it fires
SelectFaction = $CSA
SelectRegion = $Richmond, VA
StartEvent = evt_nam_CSA_Dixie1862|1|2|evt_txt_CSA_Dixie1862|Event-img_CSA_Dixie1862|$Richmond, VA|25

Conditions
MinDate = 1863/04/01
MaxDate = 1863/05/01

Actions
DescEvent = evt_desc_CSA_Dixie1862
ChangeFacMorale = 50


This event will only fire once (the 1 in the first group of || means only firing once, the 2 is the type of event notification). To fix that I would add a new event that looks like thus (add it right below the EndEvent line on the current dixie event):
SelectFaction = $CSA
SelectRegion = $Richmond, VA
StartEvent = evt_nam_CSA_NMboost1862|1|1|NULL|NULL|$Richmond, VA|NULL
Conditions
MinDate = 1863/04/01
MaxDate = 1863/05/01

Actions
ChangeFacMorale = 50
EndEvent


I have not tried this at home, but this should allow you to have the event to fire. I have changed several lines to NULL (you will no longer see a picture of the event, nor with there be any large announcements). Let me know if this doesn't work.
Remember - The beatings will continue until morale improves.

[SIGPIC][/SIGPIC]

Poorlaggedman
Corporal
Posts: 45
Joined: Sat Mar 31, 2012 9:17 am

Mon Mar 18, 2013 7:53 am

That worked.

On an unrelated note I feel like I spend a lot of time building up for a series of big battles that never happen. The CSA never seems to really smack it to me or even put a decent army in the field like the North might during a campaign. Maybe I should alter some of the aggression settings? The AI must be spending its manpower on something, right? I feel like I'm fighting with a couple fingers of one hand. I basically marched over, beat a small CSA Corps and then besieged Richmond which only has a few support units in it.

User avatar
Jim-NC
Posts: 2981
Joined: Wed Feb 25, 2009 4:21 pm
Location: Near Region 209, North Carolina

Mon Mar 18, 2013 5:08 pm

Glad to know it worked for you.

Athena tends to leave Richmond lightly defended. She will have her armies somewhere else (like attacking Ft. Monroe for example). You may be able to effect that with settings.
Remember - The beatings will continue until morale improves.

[SIGPIC][/SIGPIC]

Return to “AGEod's American Civil War”

Who is online

Users browsing this forum: No registered users and 24 guests