Modding Generals' Ratings (Full Version)

All Forums >> [Current Games From Matrix.] >> [American Civil War] >> Forge of Freedom: The American Civil War 1861-1865 >> Mods and Scenarios



Message


Gil R. -> Modding Generals' Ratings (12/5/2006 6:39:35 AM)

Since there's clearly a demand for this, here is how to modify the ratings assigned to generals. It's very easy to do.

First, here is how the rating system works:

These are the ratings for generals along with the numerical values:
Terrible = 0
Bad = 1
Poor = 2
Normal = 3
Fair = 4
Good = 5
Great = 6
Excellent = 7
Superb = 8

And these are the five areas for which each general is rated according to that system:

Initiative: Adds to the movement of brigades in detailed combat; affects the movement initiative of the division/corps/army on the main map

Leadership: helps disorganized units regain order; gives morale boost for rallying; has chance of negating effects of fatigue from forced march

Tactics: Increases damage done by brigades in combat

Command: Determines the chance of bringing out-of-command units back into command; helps brigades change formation; helps units resist charges; enables units to enter dangerous zones (i.e., certain hexes where they ordinarily would be at a penalty because of terrain type and/or proximity to enemy units)

Cavalry: Increases damage done by charging cavalry in combat (Note that if the cavalry rating is 0 that means that the general has no cavalry rating, not that he's terrible at it. There is no way to give a "Terrible" cavalry rating to a general.)


Okay, to make the modification itself, go to the Commanders.txt spreadsheet file in the main data folder (or in the scenarios folders) and simply replace the numbers in the columns labeled "Leadership," "Tactical," etc. It's that simple.

In addition to changing ratings, you can change the chance a general has of getting into the game by going to the "Chance" column and making a general a 100-percenter by typing in 200, a 25-percenter by typing in 50, or a 9-percenter by typing in 9.

Let me know if you have any questions about this file.




Steely Glint -> RE: Modding Generals' Ratings (12/5/2006 7:06:55 AM)

You type in "9" and not "18"?

Inconsistent and puzzling that is.




Gil R. -> RE: Modding Generals' Ratings (12/5/2006 7:12:21 AM)

quote:

ORIGINAL: Steely Glint

You type in "9" and not "18"?

Inconsistent and puzzling that is.



Yeah, I have no idea why that is, not being the programmer. But I know that's how it works.




Gil R. -> RE: Modding Generals' Ratings (12/5/2006 7:13:16 AM)

By the way, be careful not to make a mistake and give a general a '9' rating, since that could cause a crash, or at the very least some non-crashing badness. So don't try to be clever by giving some ultra-superb general (Nathan Bedford Forrest?) a 9.




Steely Glint -> RE: Modding Generals' Ratings (12/5/2006 4:01:13 PM)

I promise you that I won't do that.

But that other "9" is inconsistent and makes no sense.




chris0827 -> RE: Modding Generals' Ratings (12/5/2006 9:22:54 PM)

Are the at start leaders ranks affected by your number of academies? I keep having generals show up at one star when the database shows them as 3 or 4 star?




jchastain -> RE: Modding Generals' Ratings (12/6/2006 12:15:12 AM)


quote:

ORIGINAL: Gil R.

quote:

ORIGINAL: Steely Glint

You type in "9" and not "18"?

Inconsistent and puzzling that is.


Yeah, I have no idea why that is, not being the programmer. But I know that's how it works.



I wonder... I wonder...

I remember that Grant, Lee and others were not showing up when "Fewer Generals" was selected and through the cobwebs I seem to remember that the % chance for each general's entry is cut in half with that option. So, I *think* the 100%'ers were increased to 200% to ensure they would always show up - even with the fewer generals option. When cut in half, they were then still 100% likely to show up and 200% doesn't break anything because the code is just an "if x >" type check.

If that is the case, it explains why the 9%'ers are still 9%. It doesn't explain though why the 25%'ers are 50%. I cannot help but wonder if they are accidentally showing up with greater regularity than planned and if their % chance wasn't improperly increased.




Gil R. -> RE: Modding Generals' Ratings (12/6/2006 1:15:52 AM)

I just checked with Eric, and jchastain is in the right ballpark. The use of 200% ensures that even in the "Fewer Generals" setting the 100-percenters will show up 100% of the time. This also means that 9-percenters actually have a 4.5% chance of showing up and 25-percenters do indeed have a 25% chance of appearing in the game. At "More Generals," 100-percenters always show up at some point, while "25-percenters" actually have a 50% chance of showing up (which is fine, since there are "more generals" overall), and the "9-percenters" have an 18% chance of entering the game. When neither "more" nor "fewer" is toggled on, 100-percenters are at 100%, 25-percenters at 50%, and 9-percenters at 9%.

This might seem confusing, but the key thing is to get the more famous generals into the game more frequently, and this system achieves that.




netjam99 -> RE: Modding Generals' Ratings (5/31/2007 2:31:44 AM)

How could I imput a new General? I got a Great Great Great Grandfather who served the south. Got a kewl pic of him with a major's calvary uniform on. He has the greasy hair and nice long beard going on. Would like to give the old guy a promotion to General and have him in the game.




Gil R. -> RE: Modding Generals' Ratings (5/31/2007 2:45:18 AM)

It's not that hard, but it's time-consuming because you have to look up all sorts of stuff. To get a picture of him in, you'll need to create a .pcx file and name it Gen1007.pcx and put it in the appropriate folder that has generals' mugshots. (Note, though, that we're still missing some generals that we'll add in future patches, so someone else will become Gen1007, and you'll need to give your general a new number.) You should e-mail pixelpusher, our graphics guy, for technical info on the size and shape of the photo. Once you've got your graphics file, you need to mod commanders.txt in each scenario that you're likely to play. The column headings make it easy enough to know what info to provide, but you'll need to spend time checking other .txt files to get the number of the state he was from and (possibly) starting province. When including his name in the second column be sure to use an underscore and NOT a blank space, or else it won't work. The columns from "WP" to "Medal" are not used in the game, so it's okay just to put a zero in each one. Special abilities can be looked up in another .txt file. If you're not writing a bio, be sure to include "nobio". And finally, in the "Notes" column be sure to have that _____ or else it won't work. Good luck.




netjam99 -> RE: Modding Generals' Ratings (6/1/2007 12:34:10 AM)

Gil thanks for the answer! I might just get ambitious and try to edit him in.




pixelpusher -> RE: Modding Generals' Ratings (6/1/2007 5:56:46 AM)

So, if you want to make more generals here's what to do. You will need an image editor package, such as photoshop or the GIMP. Here are their specifications:

-The images are 80x105. (I try to get the eyes at about 40px from the top.)
-They have a black border around them: 4px on the right, 4px on the left, and 9px on the bottom. The border must be fully 100% black or they won't look right. (That is it must be 0,0,0 RGB value.)
-Save as a .pcx file, with the others, and name it as Gil describes above.

That's it!

[image]local://upfiles/16293/E7C6E3315A1A43B7A5B20BB698852336.jpg[/image]




epaminondas -> RE: Modding Generals' Ratings (10/29/2007 12:20:24 PM)

I've done something wrong - but I can't figure out what.

I've successfully modified the Generals ratings under the previous patch, but trying to it for the July 1861 scenario under 1.10.9 has got me stymied before I even get to inputting amended values.

I've opened the Commanders file in notepad (as I've done previously), tabbed each entry to properly align the various columns (as I've done previously), removed the bios and notes to avoid clutter (while making sure to enter "nobio" and "____" replacements - as I've done previously), and that's it. When running a check load I get an Assertion failed error on Line 213, specifically: pGeneralList(square bracket)i(square unbracket).hState<34.

Can't figure it out.

I've checked the line in question (happens to be Sam Cooper) and the HomeState value is 31. That's indeed less than 34 - but all state values are less than 34.

Any advice from someone more knowledgeable would be vastly appreciated.

Edit: Please ignore all that. Seems I needed to tab in an extra column to get the alignments to agree with the letter labels. Still can't figure out why it waited until Line 213 to detect it as a problem - but I guess that's why they call us "mug-punters".

Thanks for the attention, though.




ericbabe -> RE: Modding Generals' Ratings (10/29/2007 6:55:30 PM)

I strongly recommend editing these files in some sort of spreadsheet to avoid problems like this.  We've used the free Open Office (http://www.openoffice.org/) to edit files, and it works wonderfully.




Gil R. -> RE: Modding Generals' Ratings (10/29/2007 8:17:04 PM)

I use good ol' Excel for the generals files, and when I'm done with my changes I do a SAVE AS and save the file as a text file that is "tab delimited." Works perfectly that way.




epaminondas -> RE: Modding Generals' Ratings (10/30/2007 12:40:53 AM)

I find that when I open the file in Excel the cells aren't aligned anyway. Maybe it's just my inexperience with the format, but since I seem to have to restructure the data anyway I find it easier to do that in the text format.

I'll certainly give Openoffice a look.




Gil R. -> RE: Modding Generals' Ratings (10/30/2007 12:46:35 AM)

That's weird. Well, if Open Office doesn't work let us know and we'll try to figure out something else.




Steely Glint -> RE: Modding Generals' Ratings (1/7/2008 10:38:46 PM)


quote:

ORIGINAL: epaminondas

I find that when I open the file in Excel the cells aren't aligned anyway. Maybe it's just my inexperience with the format


Open commanders.txt in Excel using File/Open. At he first screen, select Delimited. At he second screen, select Tab. That will do it.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
3.5