Unit Renaming and WB Saves

Joined
Jul 28, 2006
Messages
4,016
Every time I try to give my units custom names in the worldbuilder and then save the file, all the names reset to the default unit name. I thought perhaps I would work around this by manually setting names in Notepad, along the lines of "Uniquename=blahblahblah" under the individual unit entries, but that does not work, either.

Does anyone know how to preserve renamed units in a WB file for a scenario? Do you have to resort to some kind of automatic renaming mechanism on the first turn? It seems like a shame that we can rename units only to have them lost upon save.
 
Can somebody answer this plz... i got the same problem
 
There was one stop-gap idea I had, but I don't know if it would work... you could set the unique names in the XML unitinfos file, and then the game would rename each unit in sequential order, presumably based on its map location (with the lower left corner being first). But like I said, I have no idea if this would work for units already placed.

Problem is, either way this isn't really a solution, but more of a workaround. And it would be very hard to do for maps with hundreds of units, where you'd have to know exactly how and where each one was placed to order them correctly.
 
Spent one freaking day surfing the forum to figure this out and i think i found it. You need to edit the unit name in the \Assets\XML\Text\CIV4GameTextInfos_Objects.xml
I try it yesterday but it didn't before i go to bed. Thinking it over it, I'd just realise I forgot to add the mod path in the wbs file. I'm confident it gonna work when i get home later :)
 
I really don't understand how that would affect this issue. TextInfos_Objects deals with the translation of your unit type names (e.g. "Infantry", "Marine", "Carrier", etc.) but not unique names, like "CV Hornet". I think we are talking about two entirely different things here.
 
The funny thing is that all unit names are saved within the actual savegame file, but not with the WB saves. I wish there were an easy way to script it to save it in a regular scenario map... maybe an SDK change would do the trick?

Other than that I guess you'd just have to use a Python script to rename each unit at the start of your scenario. :(
 
Wow... I didn't even know this was a problem... I always rename my ships in-game, and figured pre-set scenarios would have named ships too (USS Hornet, KMS Bismarck, etc), but I didn't know this problem occured... weird.

My Pre-Dreadnought Battleship "SMS Brandenburg" just sank four enemy age of sail ships in one turn last night! That was great!
 
The unit name field is not saved into the WBS file. This is controlled via python so give me a few days and I should have it sorted out. Remember, save games are DLL controlled and totally separate.

GO, I got your PM, just hadn't had time to respond yet. :)
 
you should see the civ specific GP mod. It gets around it in the way you described above.
 
Sorry I forgot. :p
 
well I think so, its been awhile since I've used it, I think its made by Mexico if memory serves.
 
well I think so, its been awhile since I've used it, I think its made by Mexico if memory serves.

No, what I mean is, I made the Civ-Specific Great People mod... I know how it works! :D That's what I'm trying to avoid--having to write a clumsy Python function to do this, which would be very hard when you have identical units on the same tile. Mexico's mod just checks for the presence of a UU. It doesn't deal with savegame ability.
 
GO:

Just what the doctor ordered. This updated WbDesc.py allows unit names to be saved and loaded in WBS scenarios.

Definition:
Code:
	BeginUnit
		UnitType=UNIT_AZTEC_JAGUAR, UnitOwner=11
[b]		UnitName=My Units Name Here[/b]
		Level=1, Experience=0
	EndUnit

Just unzip to your python folder (will end up in the PyWb folder). :)
 
Just what the doctor ordered. This updated WbDesc.py allows unit names to be saved and loaded in WBS scenarios.

Perhaps the understatement of the year! :lol:

I'm surprised that this has such a simple solution. There's not even a need for an SDK check! I think this is worthy of an upload to the DB even though it's just one file. :goodjob:

:thanx:
 
Perhaps the understatement of the year! :lol:

I'm surprised that this has such a simple solution. There's not even a need for an SDK check! I think this is worthy of an upload to the DB even though it's just one file. :goodjob:

:thanx:

Nah, I've asked Alex to put it in the next patch. ;)
 
You'd better tell all those nuts in the BtS subforum that there will be a next patch first... They spend all day arguing whether Firaxis has abandoned BtS. :crazyeye: :D
 
Top Bottom