User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Editing Generals - Ranking & Promotion

Wed Mar 30, 2016 2:56 pm

Hello, A few of you responded to me on the Portrait thread, but since this is different I thought I would start a new one so as not to jumble the Portrait thread with digressions....

As you mentioned, a leader can be edited to be able to be promoted from Brigadier to the next two ranks even if the vanilla game doesn't allow it. From your responses there are two things that need to be done: Editing the model folder and creating a link to the new promotion. I was hoping maybe someone could provide more details so someone like me can learn to do this correctly and not start corrupting files all over the place, lol.

Maybe we could use CSA John G. Walker as an example? He was promoted to Major General but in the game he is fixed at Brigadier. Looking forward to learning from you guys when you have the time!!!

Thanks!

User avatar
Eugene Carr
Colonel
Posts: 387
Joined: Wed Jun 20, 2007 6:58 pm
Location: Dundee, Scotland

Wed Mar 30, 2016 9:24 pm

If CW2 follows AACW you can either promote by jumping from one model to another eg from * to **. For this you need to have 2 distinct models for the same general linked together. There is also an entry in the database for a generic promotion which in AACW allowed you to ugrade the same model to a higher rank. The difference was that they retained the stats from the lower level while the other method allowed different stats and sttributes.

One thing to remember is that the game isnt concerned with rank but with appointment, a * is generally a divisional commander irl they may have been a colonel or a major general, ** are Corps Commanders *** Armies.

John G Walker commanded divisions as both B/General and M/General in game terms both would be * when he became a District Commander then ** might be appropriate .

If feeling brave open his model file (no 357 in GameData/Models) and change GenPromotable = 0 to GenPromotable = 2 also change MaxRank = 1 to MaxRank = 2 and he should be able to earn promotion to **
There's another step to allow corps command but its a bit more involved.

If you are interested in modding these files its really worthwhile learning to use the excell sheets and splitter rather than wading into the files individually.
There are some stickies in the general modding page.
http://www.ageod-forum.com/forumdisplay.php?132-Modding-AGE-engine-games

Lots of fun to be had

S!
[SIGPIC][/SIGPIC]

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Wed Mar 30, 2016 11:36 pm

Eugene Carr wrote:If CW2 follows AACW you can either promote by jumping from one model to another eg from * to **. For this you need to have 2 distinct models for the same general linked together. There is also an entry in the database for a generic promotion which in AACW allowed you to ugrade the same model to a higher rank. The difference was that they retained the stats from the lower level while the other method allowed different stats and sttributes.

One thing to remember is that the game isnt concerned with rank but with appointment, a * is generally a divisional commander irl they may have been a colonel or a major general, ** are Corps Commanders *** Armies.

John G Walker commanded divisions as both B/General and M/General in game terms both would be * when he became a District Commander then ** might be appropriate .

If feeling brave open his model file (no 357 in GameData/Models) and change GenPromotable = 0 to GenPromotable = 2 also change MaxRank = 1 to MaxRank = 2 and he should be able to earn promotion to **
There's another step to allow corps command but its a bit more involved.

If you are interested in modding these files its really worthwhile learning to use the excell sheets and splitter rather than wading into the files individually.
There are some stickies in the general modding page.
http://www.ageod-forum.com/forumdisplay.php?132-Modding-AGE-engine-games

Lots of fun to be had

S!



Why thank you sir! If I was to change someone to 2 stars it would only be because they commanded a district or corps in history, so therefore I definitely want to learn how to enable corps command. If the stickies above don;t tell you, maybe someone can help with that also!

;)

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Wed Mar 30, 2016 11:52 pm

WOW. That is all I have to say.

I consider myself pretty technical, but I admit I am no programmer and am having a tough time seeing how all these spreadsheets and files talk to each other.

I was able to get the portrait changes to work following the leads on the forum, but this part is another level. I am going to try to edit J. Walker in his model file as mentioned above for practice, and maybe if someone can help me get him to enable corps command then I will at least have a basic understanding of what I want to do.

***** I'd really love to get Walker to have 2 stars and Corps command as it is historically accurate and then I can do the same for a handful of others. So if anyone can help with that I would be eternally grateful.

Am I understanding you correctly that you can modify these spreadsheets somehow and they will modify the generals in game without changing each of the actual model files directly?
I understand editing the model files but how the spreadsheets come into it is unclear as of now.

I'll keep sifting through old forum posts but if someone out there wants to continue to guide me through it I am sure this will help a lot of other people too get grounded in how to do this stuff.

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Thu Mar 31, 2016 12:03 am

tribeticus wrote:WOW. That is all I have to say.

I consider myself pretty technical, but I admit I am no programmer and am having a tough time seeing how all these spreadsheets and files talk to each other.

I was able to get the portrait changes to work following the leads on the forum, but this part is another level. I am going to try to edit J. Walker in his model file as mentioned above for practice, and maybe if someone can help me get him to enable corps command then I will at least have a basic understanding of what I want to do.

***** I'd really love to get Walker to have 2 stars and Corps command as it is historically accurate and then I can do the same for a handful of others. So if anyone can help with that I would be eternally grateful.

Am I understanding you correctly that you can modify these spreadsheets somehow and they will modify the generals in game without changing each of the actual model files directly?
I understand editing the model files but how the spreadsheets come into it is unclear as of now.

I'll keep sifting through old forum posts but if someone out there wants to continue to guide me through it I am sure this will help a lot of other people too get grounded in how to do this stuff.




One thing to add, I did find the mdl file and changed the max setting, however I did not see anything referencing General Promotable. Perhaps that is AACW?

User avatar
Eugene Carr
Colonel
Posts: 387
Joined: Wed Jun 20, 2007 6:58 pm
Location: Dundee, Scotland

Thu Mar 31, 2016 12:16 am

Sorry it doesnt show when its not enabled, add GenPromotable = 2 as a line after Land Leader.
There are 2 Mexican generals Palacio and Zaragosa who have it enabled in their files to show you what it looks like.

It doesnt look like much of the process has changed since AACW so the old wiki should be a help. Basically you make your edits on the excell save as a csv file and then use the splitter to make a batch of model files. Some of the details make it a bit more complicated than that so you are better following one of the step by steps to get the hang of it.

By the way the relevant line to add to make a corps commander is "CanBeHQStack = 1"

S!
[SIGPIC][/SIGPIC]

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Thu Mar 31, 2016 12:36 am

Eugene Carr wrote:Sorry it doesnt show when its not enabled, add GenPromotable = 2 as a line after Land Leader.
There are 2 Mexican generals Palacio and Zaragosa who have it enabled in their files to show you what it looks like.

It doesnt look like much of the process has changed since AACW so the old wiki should be a help. Basically you make your edits on the excell save as a csv file and then use the splitter to make a batch of model files. Some of the details make it a bit more complicated than that so you are better following one of the step by steps to get the hang of it.

By the way the relevant line to add to make a corps commander is "CanBeHQStack = 1"

S!



Thank you so much for getting back to me. I will try adding this and hopefully it works.

I tried adding some character traits like "Charismatic Leader" just for fun to AS Johnston, but it didn't give him the trait even in a new game. I am sure I am getting in over my head to try and add traits to leaders, and I would even love to change some of the spawn times too. Maybe you should just come over for a beer lol.

One thing I did notice was the multiple files for leaders if they change stats during promotion, that was pretty cool. But so far the changes I make to the files have not corresponded in game. I am guessing I am missing something.

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Thu Mar 31, 2016 1:25 am

Maybe things have changed over a couple years, but I don't seem to be having any luck with the mdl files. Nothing I do seems to change anything. See what Ace said below in the past:



Ace
December 17th, 2013, 19:44
I was not actually modding model files. I was speaking about scenario event files.
I will try to mod general stats and will report it in a minute.
Stay tuned.

EDIT:
Apparently, general stats cannnot be changed within *.mdl files. They appear stored in alias files which reads from somewhere else, I do not know from where.
fred zeppelin
December 18th, 2013, 01:16
EDIT:
Apparently, general stats cannnot be changed within *.mdl files. They appear stored in alias files which reads from somewhere else, I do not know from where.

It's the same with Region names. There must be a set of hidden files somewhere that override the data files we can see. Very different system than AACW - although the apparent file structure is the same. Odd.

Any word from the devs on this?

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Thu Mar 31, 2016 1:39 am

Update for Modding (editing) Newbies like me: I deleted the cache file and surprisingly the general trait I added to Johnston as a test actually worked. Still no change to Walker on his info sheet regarding if he is promotable or not. One thing did change for everyone though, now it says Generation: NULL in everyone's leader info...

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Thu Mar 31, 2016 6:12 pm

tribeticus wrote:Update for Modding (editing) Newbies like me: I deleted the cache file and surprisingly the general trait I added to Johnston as a test actually worked. Still no change to Walker on his info sheet regarding if he is promotable or not. One thing did change for everyone though, now it says Generation: NULL in everyone's leader info...



So, changing traits and stats, is no problem in the model file. But changing the general to being promotable is not working.

I tried to mimick other files in the model folder by making a second MDL file for Walker and making both walker files identical to EJ Johnson and others who also have a second file for their promotion. The Generation: NULL was from me trying to add a link to an ALias line in the Alias file in the bottom, so I removed that and the Generation: NULL Disappeared.

SO, back to troubleshooting for the promotion. But very easy to add traits and change stats for the Generals.

**** I am thinking that there are the follwing things that I need to do correctly to get the promotion to work: 1) create a new MDL file for the next rank of Walker 2) Have that file point correctly to the Alias file at the bottom of the page 3) Have the Alias written correctly so it stops saying GENERATION: NULL and say the General is Promotable like the others on the General Info screen in game -- I appear to be missing something in the way I do it or there is another step I need to learn........................

** Can anyone explain what this Generation Null Means? And if it affects the game at all? Seems every time I try to change something in the leader info in game it says this Generation NULL

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Thu Mar 31, 2016 9:56 pm

So...For those of you undoubtedly standing by earnestly for my latest update (or none of you lol), here is what I have found through troubleshooting on and off the past couple days...

The bottom line is: Yes you can edit the Generals directly through the MDL files.

What did I discover?: Basic changes to the current stats of the leaders are easy as long as you are doing basic changes to the existin mdl file. Just figure out what you want to change and change it, the best way being comparison to other generals and see what works, i.e. adding lines for "Forager" "Charismatic General" etc., changing stats, or seniority

MAKE SURE TO DELETE THE CACHE FILE AT THE BOTTOM

Regarding Promotions: This is tricky. I understand you can use the excel files and the splitter, I will work on that next..this way is for beginners like me who just want to make a couple changes.
First make a copy of the MDL file for the leader you want to change. Then open the original.
The main thing to remember is to add the TechUpgrade line in the original MDL file, and change the Max General rating to 2 or 3, and save it.
(compare you file to one star mdl files of already upgradable generals)
Rename the copy of the MDL file to make sense according to the number scheme, i.e Walker's original file is 357. His new file for his 2-star ratings will be 870
Then look at another 2 star upgrade MDL file, like 291 Johnson, and look at each line making sure to change 870 Walker accordingly so the image files, alias name, etc are correct.
Next add a line with correct name in the alias file on the bottom, and also the mdl alias file in the main alias folder. This will make the two mdl files talk to each other correctly.
The new alias name will need a 2 like the line in the MDL folder...


The only thing at this point I don't get is the appearance of Generation: NULL in the leader screen for all generals once I make changes, but I am assuming it is no big deal.

All changes I made are working and appear in the leader screen.

* So, now I need to figure out how to change when some leaders spawn, anybody know where I should look to do that? --> just look in the event folder and edit the CSA and USA Leader files. Easy.

grimjaw
General
Posts: 506
Joined: Wed Feb 09, 2011 5:38 am
Location: Arkansas

Fri Apr 01, 2016 1:17 am

Some leaders are created at the beginning of a scenario, the rest will be created by various event files.

For the leaders it is, IMO, easier to keep up with all the changes you want to make to them by using the 'database' (the CSV files) and the splitter. It helps you keep all your changes in one place, and makes it easier to apply (or undo) changes wholesale. If you make extensive changes to the model files themselves, you either have to remember what you did by noting it somewhere, or you end up digging through a bunch of individual files. I speak from experience.

Now the event files I usually like to edit directly, but they are a little easier to keep track of.

I think 'generation' has to do with making some model obsolescent via an engine method, but leaders are never obsolete, so I would expect them to have a NULL value. I don't have the game in front of me to check. Is that field the same for the leaders you haven't edited? If so, you can ignore it. I *think* some fields only appear in-game if you have debugging turned on, but I could be wrong.

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Fri Apr 01, 2016 1:37 am

Hi Grimjaw, I agree that lots of editing would require the spreadsheets and the splitter. I am still trying to figure out how to use it effectively. But yes I heed your experience on the matter and hope to learn how to use it soon.

Regarding the Generation: NULL, it shows up for all the Generals no matter if I edited them or not, but only after I edit. In other words, I have only edited one General, and it shows up for all of them. I have debugging off.

Do you know a good post to learn about editing events and scenario files?

User avatar
tripax
AGEod Veteran
Posts: 777
Joined: Thu Aug 29, 2013 9:58 pm

Sat Apr 02, 2016 1:27 am

Once you start using the spreadsheet/database (DB) and splitter, editing the event files is easy. The Scenario file takes another step, see: http://www.ageod-forum.com/showthread.php?9756-Scenario-creation-(example-from-AACW) (the pictures were missing when I used it, if you are careful you can still follow the directions).

As for the Generation: NULL, I'm not sure but I don't see any mention of modifying files in the units folder, and that might make the difference.

In any case, your best use of time is learning to use the DB and splitter (sorry to be a broken record, but everyone else is right)
Across the South, we have a deep appreciation of history -- we haven’t always had a deep appreciation of each other’s history. - Reverend Clementa Pinckney

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Mon Apr 04, 2016 3:14 pm

Thank you, I'll be looking forward to figuring these things out.

User avatar
Jerzul
Captain
Posts: 155
Joined: Sat Jul 03, 2010 10:10 pm
Location: Germantown, MD

Mon Apr 04, 2016 3:58 pm

When adding several new generals to my game. Some which stayed at 1* and others which were promotable, I used Notepad++ to edit all the files. MUCH easier than trying to navigate through a spreadsheet.

Also, when creating new leaders you need to change more than just the .mdl files. You also need to change and or add to the unit files (in the Unit folder). Beware, the Unit folder also has a cache file that needs to be deleted for the changes to take effect.

I completely agree that copying and pasting out of files you know will work is the best way to ensure that your changes will hold up.

Also, make sure to add new lines to the various "alias" files for both new models and new units. I have found four different alias files, two each for models and units. I think only one matters for each, but I change all of them as needed just to be safe. I believe (I'm at work, so I don't have the files in front of me), that there are alias files in the model and units folders themselves and one each in the "alias" folder in the game files.

To break it down. Whenever I added a new leader I would follow these steps:

1. Copy a model file of a leader that was similar to what I was looking to create or just copy one of the “extra” files in the game “FutureUSAGen/FutureCSAGen” etc.

2. Open the file with Notepad++ (this is a free program, Google it)

3. Open up another file for a promotable leader (such as Hooker, or Doubleday, etc)

4. Compare the two files side by side (do this by dragging the tab for one of the files into the main part of Notepad++ and select “move to other view” when prompted)

5. You can then compare the files yourself or use Notepad++’s compare feature. (It’s under Plugins -> Plugin Manager. PM me and I’ll give you a run down on how to get to it or Google it)

6. Make the changes to your new leader’s model file, copying parts from other leaders for help. Make good use of database files found on this forum for help with things like abilities. (There is a spreadsheet that defines all of them and the code for using them in the files).

7. Ensure that your model file has a unique user ID.

8. Save and go to the two model.alias (or alias.model - I’m not in front of the files at the moment) files, open them with Notepad++, go to the bottom of the page and add a new line with your new model ID and name. Just follow the format for everything else and you’ll be fine.

9. Delete the cache file!

10. Go to the Units file and basically do the same thing. Copy an existing file, compare it with the unit file of the leader your are copying/emulating, and you’ll be fine. Unit files are much, much less complex. Every new model should have a corresponding new unit. Note, just like models, units need unique ID’s and need to be added to the alias files.

11. Note, once the unit files are created, you will almost never have to change them, most editing is done in the model files.

12. Oh. Delete the cache files in the Unit folder too!


This is just how I’ve done it and I have yet to run into a problem. I’ll report back if I run into one.

Other modders: please feel free to correct any glaring mistakes I may have, but I’ve honestly never used a splitter for any of my work and have yet to run into issues.
I have heard, in such a way as to believe it, of your recently saying that both the army and the government needed a dictator. Of course it was not for this, but in spite of it, that I have given you the command. Only those generals who gain success can be dictators. What I now ask of you is military success, and I will risk the dictatorship.

-Abraham Lincoln, 1863, in a letter to Major General Joseph Hooker.

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Fri Apr 08, 2016 8:27 pm

Jerzul,

Thank you so much for your very detailed response. Apparently I have been following the exact same steps as you except I have never done anything with any unit files, and I use whatever basic notepad is already on my computer. I agree the spreadsheet I find annoying and the individual files are more easily organized, as least for me (and you...). All my changes are still working though without doing anything with unit files, with the exception that Generation:NULL appears in the General info page but I found that it later disappears and everything acts normal... Someone has mentioned that this Generation: NULL thing could be because I never edited any unit files, but other than that I never saw an issue. I have actually played complete games with my edited generals without editing any unit files, but I intend to go into the Unit Folder and make the changes you mentioned to do it right.

User avatar
tribeticus
Captain
Posts: 191
Joined: Tue Jan 19, 2016 9:05 pm
Location: Ocean, NJ

Fri Apr 08, 2016 9:09 pm

One thing I have never done is create a completely new General, for instance I would love to create Chamberlain because of his record and importance in the war, and he did in fact make it to Major General earlier than the Omnibus of promotions that happened at the end of the war and after.

I am assuming adding a general from scratch is much more involved, requiring portrait, unit, and model files, in addition to being added to the event file. Is there anything else needed in order to create a leader from scratch???

User avatar
Jerzul
Captain
Posts: 155
Joined: Sat Jul 03, 2010 10:10 pm
Location: Germantown, MD

Mon Apr 11, 2016 3:51 pm

Yes. If you are adding a completely new general you need to add them into the game!

The easiest way is to go the events folder and find USA leaders or CSA leaders events. These are script files that contain most (but not nearly all) of the leader creation events for both sides. Again, I recommend using Notepad++ to open and edit them.

Then find where you want to include the new leader and insert him.

For example. Using Chamberlain you might want to insert him in with George Custer (he is one of the last Union generals to arrive in the game, early in 1864 which is earlier than Chamberlain became a General - June, 1864 - but close enough for government work.) You could also create a whole new event for Chamberlain too, but let's keep it simple to start with.

First, find this entry:


Code: Select all

SelectFaction = USA
StartEvent = evt_nam_USA_Custer|1|1|NULL|NULL|NULL|NULL

Conditions
  MinDate = 1864/03/01
  MaxDate = 1864/03/31
  EvalUnqUnit = George A. Custer;NOT
SelectFaction = USA
  SelMostNumGroup = Area $Mid_Atlantic;CPCount
  GenMsg
  SelectRegInArea = $MD;OwnedVPCities;CondSkip
  GenMsg
  PickFromRegList = NotEnemy
  GenMsg
  EvalRegionSel = NULL

Actions
  GenMsg

SelectFaction = USA
  CreateGroup
  Posture = $Defensive
  SetKind = $Land
  Entranch = 0
  InCS = 0
  FixType = 0
  SetName = G. Custer
  Apply
  CreateUnit
  SetType = $uni_USA_Custer
  SetName = George A. Custer
  Apply

EndEvent


Then copy the last section from "CreateUnit" to "Apply" and then paste it below the first one:

Code: Select all

  CreateUnit
  SetType = $uni_USA_Custer
  SetName = George A. Custer
  Apply
  CreateUnit
  SetType = $uni_USA_Custer
  SetName = George A. Custer
  Apply


Then change the information in the second copy from Custer to Chamberlain. The only real important part is the "SetType" section, I have found that the "SetName" area doesn't really seem to matter, BUT it's always good practice to change it as well, if nothing else it makes reading the code easier. If you want you can also seek out the "local_strings_CW2.csv" file and change the description of the event to include Chamberlain, but that is not required.

That should do it. If you want to test your new general, I recommend, first inserting him in the 61 Generals Pool (which will appear on turn 2 of an April start game). This will let you verify that he is everything you want him to be before putting him where he belongs in 1864.

Let me know if you have any questions.
I have heard, in such a way as to believe it, of your recently saying that both the army and the government needed a dictator. Of course it was not for this, but in spite of it, that I have given you the command. Only those generals who gain success can be dictators. What I now ask of you is military success, and I will risk the dictatorship.



-Abraham Lincoln, 1863, in a letter to Major General Joseph Hooker.

Return to “CW2 Mods”

Who is online

Users browsing this forum: No registered users and 38 guests