Teatime
Lieutenant
Posts: 109
Joined: Wed Apr 27, 2016 2:56 pm

Naming Brigades when merging and splitting

Wed Apr 27, 2016 4:10 pm

So I have been playing around with modding the game and love what you can do with it, however one of the things I am looking at is recruitment by regiment with the ability to brigade them into brigades of up to 5 regiments

Something that would be nice to have would be the ability to name those brigades when you merge and to subsequently split them into their component elements at a later date .. currently the brigade takes on the name of one of the elements (so I get brigades with regiment names :( ) and then you can't split them afterwards

It would work similarly to how you build and split divisions (though you can't currently name your divisions either and I see this is on a few peoples wishlist .. add my name to that)

Has anyone come across a way to do this?? .. i think this is in the code as i can't see anything in the files that allows this

Cheers
Teatime

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

Fri Apr 29, 2016 10:30 am

I don't know how to split them, but one idea I wanted to try when I was modding you might try. You could "name" them by making the first unit in them a Colonel which you recruit or arrive by event - so the brigade's name will just be the name of the Colonel. This unit be based on engineers but with whatever abilities you'd like. Even without abilities, the lower command cost(?) and ability to add multiple regiments as a unit to divisions makes it worth brigading regiments. What you could then do is allow the Colonel to be promoted to one star BG.

I'm not sure what will happen when the unit is promoted, but in the case of Beauregard in the first few turns getting moved by event from South Carolina to Virginia, if you brigade him, the brigade survives its disillusion, remaining in South Carolina with Beauregard off in Virginia no problem. So, maybe promotion would split the brigade up.

To expand my idea a bit, I thought it would be fun to decrease the number of units that can be added to a division to four or five but increase the number of elements to at least 21 (17 fighting elements + 4 colonels), but maybe to 24/25 (20 fighting elements + 4/5 colonels) or another value depending on your idea about the maximum brigade sizes, etc (max brigade sizes and possible compositions could/should vary by colonel).

Luckily, my job and pbems take up all of my time, so I'm not really in a place to try this myself, but maybe someday. If you try it, let me know how it goes.
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

Teatime
Lieutenant
Posts: 109
Joined: Wed Apr 27, 2016 2:56 pm

Fri Apr 29, 2016 4:25 pm

Not a bad idea at all .. may need to fiddle a bit to ensure the "naming unit" is the one used when merged .. a special model for that .. may need to use a specific family to get it to work too .. I could possibly use sharpshooters since i removed those in my mod .. but there may be an unused one about .. could possibly make that a fighting element with the correct amount of fudging .. would look something like this ..

ModelType0 = $mdl_CSA_Tripax|1
FamilyType0 = $famLeader|1
FamilyType1 = $famTripax|1
FamilyType2 = $famLine|4

CustomNames = Tripax's Bde.

The above will allow you to brigade 4 line infantry into that unit

Will play around with this and see if I can get it to work

One issue that is frustrating (I think you have come across it) is that single element units will not take element names from models and will always use the custom name in the unit file as the element name as well, when you merge 2 single element units the one that is merged is then recognised as unused and is used again next time you create one of those units

This post should probably now be in the modding section

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

Fri Apr 29, 2016 5:01 pm

I think you can create models/units, but not family types (see Models Families.ini in the alias folder), so I thought it would need to be $FamilyType1 = $famEngineer. Sharpshooters are $famSkirmisher, I'm not sure if any other models use that family, nor am I sure if it matters, but I think the icon in a unit on the right does depend on family type, and the $famSkirmisher "S" icon might not look right - although maybe you can change the icon in the Graphics\NATOSymbols folder.
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
Captain_Orso
Posts: 5482
Joined: Tue Sep 01, 2009 5:02 pm
Location: Stuttgart, Germany

Fri Apr 29, 2016 8:12 pm

The basic building block of the game is the unit, which must contain 1 or more elements/subunits, defined by models, depending on the unit definition.

As you have noted, each unit has a fixed set of models, which are used when creating the unit, which then contains a set of elements/subunits defined by the models. Each units also has a set of family types, which are used in determining what other units might be combined with this unit, especially in the case that the unit in question might have lost one or more elements/subunits through combat or attrition.

When you combine units, the game engine checks which unit might contain all the family-types of the models of the other unit. If this is not possible, the two units may not be combined. If it is possible the smaller unit has all of its elements integrated into the larger unit, and the now empty smaller unit is simple removed from the map and returned to the build pool.

De-combining a unit is not possible, because there is no way to determine what element(s) should be removed from the mother unit, nor what daughter unit should be created to contain the removed element(s)--there would be a multitude of possibilities. The game engine has no mechanism for this.
Image

Teatime
Lieutenant
Posts: 109
Joined: Wed Apr 27, 2016 2:56 pm

Sat Apr 30, 2016 1:56 am

I tend to look at it from the perspective that the basic building block is the model (i.e regiment/battery/ship etc) .. these are then combined into deployable Units of 1 to 5 elements .. but that may just be semantics

At the end of the day what is there works very well but I just feel it is inconsistent that when

1. You build a single element Unit then the element name is not sourced from the Model custom names but from the Unit custom names

2. You build a 2+ element Unit the element names are sourced from the model custom names

To me, element names should always be sourced from Model custom names no matter how many elements are part of a Unit

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

Sat Apr 30, 2016 5:33 pm

True, from a logical point of view, having a single element unit, with one element name and a different unit name is ... silly. But, we are kind of stuck with what we have.
Image

User avatar
Pocus
Posts: 24746
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Tue May 03, 2016 2:03 pm

That should be the case, have you run one turn? Single element units should take the exact same name as the element.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Teatime
Lieutenant
Posts: 109
Joined: Wed Apr 27, 2016 2:56 pm

Wed May 04, 2016 1:26 am

Yes, they do

so what happens is (hope I haven't rambled too much)

1. 2+ Element Unit - Unit Custom Name list = Big Brigade, Model Custom Name List = 1st State Inf|2nd State Inf
- Unit Name comes from Custom Name list in unit file
- Element names come from Custom Name list in Model File
e.g. Unit name = Big Brigade, Elements Names = 1st State Inf and 2nd State Inf

2. Single Element Unit - Unit Custom Name list = Small Brigade, Model Custom Name List = 1st State Inf|2nd State Inf
- Unit Name comes from Custom Name list in unit file
- Element Name comes from Custom Name list in unit file
e.g Unit name Small Brigade, Element Name = Small Brigade


If you Brigade (merge) a single element into another Unit then the name is then available again and so can result in duplicate element names, so that pretty much means you can't allow merging of units if you want consistent naming and you need to manage Custom Names between model files and unit files if you want single elements Units and multi element units for the same Model.

An example is .. For the US Colored Troops Regiments, I have 3 Element Brigades and also Single Element Brigades (single Regiment units) defined

So I have the
Model Custom Name List in the model as 1st USCT|2, USCT|3rd USCT|6th USCT|7th USCT|8th USC|11th USCT|12th USCT|13th USCT|16th USCT etc
Single Element Unit Custom Name List as 4th USCT|5th USCT|9th USCT|10th USCT|14th USCT|15TH USCT etc

I have left gaps in the Model Custom Names so I can have unique names in the Unit List .. I don't allow the single element units to be brigaded since that would allow that name to be reused

My original master plan was to recruit all infantry as single element regiments and then allow merging into brigades .. but that didn't work as the names were reused once the regiments were merged ..

I have worked around the issue and am pretty happy with what I have, it's just that I did found it inconsistent that element names for the same model were being sourced from different places which made it hard to manage the names so there was no duplication

As you can see I care about Element Names .. you can only have so many 69th New York Inf running about the map :)

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

Wed May 04, 2016 6:05 pm

Actually, what I've discovered through testing is that for single-element units, the unit and the element both take on the name in CustomName in the unit file and ignore the CustomName in the model file. This is the case right when the unit is dropped onto the map when the unit is being built, and doesn't change after the turn has been executed.
Image

Return to “Help improve CW2”

Who is online

Users browsing this forum: No registered users and 1 guest