johandenver2
Lieutenant
Posts: 101
Joined: Mon May 09, 2016 9:46 pm

Rangers - where to add names?

Tue May 31, 2016 10:17 pm

How do I get the game to name ranger units with custom names?
I've tried adding a bunch of names to both 496USARangers.uni and 226USARangers.mdl but it does not use any of them.
I've used both CustomNames = $NM|newunitname and just CustomNames = newunitname but nothing seems to work.

The unit I'm creating is in New Mexico and always seem to be named 12. Ranger

Are ranger units handled differently?
Because I have no problems adding custom names to volunteer units for instance.

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

Wed Jun 01, 2016 3:07 am

I think your problem is related to the info below

1. They are a single element Unit therefore the custom names will generate from the 496USARangers.uni file.

2. Since you are recruiting in NM it will use this section of the custom names which has 8 names defined
§NM|1st New Mexico Cav.|2nd NM 'Carsons' New Mexico Cav.'|3rd New Mexico Cav.|4th NM 'Carleton's Rangers'|5th NM 'William's Rgt.'|NM 'Fremont's Rangers'|NM 'Hughes' Cav.'|6th NM 'Pennyweather's Mounted Vol.'

3. Once you have more than 8 rangers recruited and on the map it will start allocating names based on the info in the Names (or the ShortName, can't recall which it uses) line of the unit file with a numeric prefix .. so 9. Rangers, 10. Rangers, 11. Rangers etc

So if you add more names to that list it should resolve your issue.

Rangers are a bit unique in that their recruitment regions are defined as Area = $Recruit_Rangers which may be causing you an issue too

johandenver2
Lieutenant
Posts: 101
Joined: Mon May 09, 2016 9:46 pm

Wed Jun 01, 2016 6:21 am

Thank for the reply.
It seems that some states are handled differently than other.
New Mexico (and also California and Colorado, perhaps more) all begin with |§NM| while New York for example begin with §$NY|
The game doesn't seem to make any difference to names from states beginning with |§
If I create a ranger unit in California, it uses the names from New Mexico anyway. Even in the original game.

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

Wed Jun 01, 2016 7:35 am

Yeh, Think your issue relates to the Area = $Recruit_Rangers then

Couple of things you could try
1. Change recruitment area to Far West
2. Create specific units for the states you wish to recruit in (NM and CA)

Will try those myself to see which works

johandenver2
Lieutenant
Posts: 101
Joined: Mon May 09, 2016 9:46 pm

Wed Jun 01, 2016 5:43 pm

I tried changing area to "Area = $Recruit_USA_States" and I'm now able to recruit rangers in Pennsylvania for example.
The names are still not working though, I've added custom names for Pennsylvania in 496USARangers.uni but the unit still get the name 12. Rangers

It's very strange why the state variables wouldn't work for this specific file.

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

Thu Jun 02, 2016 10:19 am

I have played around with this and actually think it relates to the way unit file custom name lists operate. They seem to struggle with regional recruiting.

If I set the recruitment to a specific state then the names were allocated correctly, as soon as I made it a regional recruitment then I had issues.

This would explain why you have individual unit files for things like Militia and Volunteers and why Colored Militia never allocated state names even though they were defined.

Your only solutions would be to make Ranger units have multiple elements so it goes to the model custom name list or make state specific Ranger Unit files

Return to “CW2 Mods”

Who is online

Users browsing this forum: No registered users and 13 guests