PDA

View Full Version : Game auto applies faction colors to new units.



Osbot
10-10-2004, 08:38
So im messing around with the Macedonian Phalanx units. I try setting the Phalanx Pikes as Armoured Phalanx, and apply the basic greek_cities texture and sprites. It looks cool but my guys are identical to the Greeks so I decide to change it back.

Well in the process of removing the entries from the descr_model_battle.txt file I forgot to change the model from Armored Hoplites back to Greek Phalanx in the export_descr_unit.txt. Well I go about my business to see if everything is as it should be and BOOM I get into a custom game and my Phalanx Pikemen are still using the Armoured Hoplite Model and to top it all off they are Macedonian Colors.

So, I go back into the files and decide to flip some things around, i've got a combo I like. I make my phalanx pikemen use the default greek_hoplite model, I do not enter anything into descr_model_battle for them, and I change my Royal Pikes into Armored_Hoplites, I load up a custom battle and exactly as I predicted, both units are now in their appropriate model sporting the orange/black of Macedon. One small problem was the sprites for the Royal Pikes were not showing up, so I went back into the file and added apparently non-existant textures/sprites to the Armoured Hoplite section. It works almost perfectly now. So far when I load up a battle the Royal Pikes still don't load in sprite form untill I zoom in on them. Once I zoom in they appear and on subsequent zoom outs the sprites remain.

I havent tested this too much, but perhaps color schemes were added for all factions.

Duke John
10-10-2004, 12:50
No, that is not the case. Just look into unit_models/textures directory inside models_unit_textures.pak. You will see there all textures and that it will be futile if for exampe you want to add blue Hoplites to the Britons.

Steppe Merc
10-10-2004, 16:07
Agreed. I wanted my Parthians to train peltlasts, so I enabled them, but their in Armenian colors. And there just a grey peasant in the review pannel... :embarassed:

Osbot
10-10-2004, 18:30
Well, then explain to me why I have armored hoplites and regular hoplites with Macedonian textures and I assure you I have not the slightest capability to do those things myself.

I didnt think you could apply models from different cultures and no, obviously you are not going to have a unit card magically appear. Perhaps I phrased my topic incorrectly, it should read game auto applying faction colors to new models. Part of the difference between what you did, and I did was. I did not create a new unit, I simply edited an existing one, this leads me to believe that perhaps there are textures for all units in a given culture group or maybe im just stumbling on placeholder textures from earlier builds of the game? For example earlier in the day I was messing around with giving the Greeks Companions, I simply copied all the Macedonian information over and changed the correct pieces. This would lead you to believe that the Greeks would have "Macedonian Companions" in every sence of the word. No, The Greeks had white horses and much lighter armor than the very dark Macedonians with black horses. The same was true of the light lancers to a lesser degree.

If you don't believe me, go change the Macedonian Phalanx Pikeman, and give them the Armoured Hoplite Model to use. You will load up a custom game and have Macedonian Phalanx Pikemen in a bronze breastplate, with black and orange trimming, as opposed to Carthages white/blue or Greeces Bronze/Red.

Basically it looks like. If there is a texture file for a given model in a faction, said faction will auto apply a color scheme for it. So, the seleucids can probably have a properly textured Hoplite/Armored Hoplite. The Germans can probably have properly textured/colored Choson Swordsmen. Britians can probably have any of the german specific units in Britian colors.

Osbot
10-10-2004, 18:55
Ok, I just tried to apply Hoplite/Armoured Hoplite models to units in the Seleucid faction, they used the same color scheme as the Macedonians, not sure whats going on ;p Maybe like I guessed in the previous post, maybe i've found some placeholder textures for Macedon. No idea and im not really patient enough to figure it out. I'll just be happy with my replaced macedonians ;p

Duke John
10-11-2004, 05:47
I looked it up for you. These are the possible textures for hoplites:

Armoured Hoplites:
Carthage
Greek
Macedon

Hoplites:
Greek
Macedon
Mercenaries
Rebel

You just got lucky :wink:

Hagen
10-12-2004, 10:30
hi osbot,
i gave it a try yesterday, but failed :( i love that black/orange color theme of the macedonians, but even more the elite phalanx of the greeks... so if you wouldn't mind, tell me please in detail (in steps) how you made the correct changes.
many thanks in advance

ps: does anybody know, how to create an new charakter? i tried to add an new charakter names achilles to the macedonians. addes the name achilles in the descr_names.txt and the descr_names_lookup.txt files and put him in the line with the other childs in the descr_strat.txt file... i made him to the first child of the macedonian leader, without changing anything other.
in the end the game ctd or at least pulled me back to the game menu.
what do i have to do??

is it possible to change the pictures of the familiymembers/generals??

Basileios
10-12-2004, 18:10
@Hagen
Giving the colour of the macedon Companian Cavalry to the greek ones is
very easy. Just go to the descr_model_battle.txt, search for greek_royal_cavalry and change the entry "texture greek_cities, data/models_unit/textures/unit_greek_royal_cavalry_greek.tga" to
texture greek_cities, data/models_unit/textures/unit_greek_royal_cavalry_macedon.tga...

That would work with the armoured (elite) hoplites as well, but there is no thouch texture for them... so you will have to make the texture yourself, I´m
affraid... How to do so can be read here: Guides, tutorials & tools (https://forums.totalwar.org/vb/showthread.php?t=37203)

Hagen
10-12-2004, 21:40
Thanks Basileios!!

any idea, how to change the icons in game (unit building screen)??

Hagen
10-12-2004, 22:42
ok...

:help:


what am i doing wrong?? i changed f.e. macedon, data/models_unit/textures/unit_greek_pike_phalanx_macedon.tga against macedon, data/models_unit/textures/unit_greek_elite_hoplite_macedon.tga.

my soldiers become a kind of invisible... i can nearly look through their heads. if i do the same thing to the peasants they got the armour and the helmet, but without the (sry, don't know the expression) "hairs on the helmet".

thanks - in advance

Osbot
10-13-2004, 05:47
Ok, well basically for the Phalanx Pikemen you need to create an entire new unit, otherwise all factions that use Phalanx Pikemen will be using the Hoplite model.

For the royal pikemen to make them armoured is very easy.

The first thing you want to do is, go to export_desc_unit.txt hit ctrl-F and search for Royal Pike. You will find the entry for royal pikemen. Go to the entry "soldiers" change that from whatever it is, to greek_armoured_hoplite. This is now the model your unit will reference but you're not done yet.

Now go to descr_model_battle.txt locate in this file the greek_armoured_hoplite entry. Copy either the carthage or greek_cities texture entry.

For this example I will use greek_cities.

texture greek_cities, data/models_unit/textures/unit_greek_elite_hoplite_greek.tga

change it from that, to this.

texture macedon, data/models_unit/textures/unit_greek_elite_hoplite_macedon.tga

I have a pretty beefy computer, so I chose not to add a sprite for my Macedonian Royal Pikemen. I played around with several, but I could never get the colors to match up. If your computer struggles by rendering all these extra units at all times, simply copy the greek_cities sprite entry, and change it to reflect macedonian ownership. Im not sure if there is an actual Macedonian sprite for Armoured Hoplites, you may want to check.

This covers changing Royal Pikemen into Armoured Hoplites. Changing Macedons phalanx pikemen into standard hoplites without buggering over the other phalanx pikemen using nations is a much longer process. I'll give you step by step instructions and hopefully won't screw it up ;p

1) Go to export_descr_unit.txt search down to phalanx pikemen, copy the entire entry, paste it directly below the phalanx pikemen entry, make sure you keep proper spacing. Go to the phalanx entry and delete macedon from ownership. Now, lets rename your new unit.

Replace under Type Greek Pikemen with Macedon Pikemen
Replace under Dictionary greek_pikemen ; Phalanx Pikemen with macedon_pikemen ; Macedonian Pikemen
Under Soldiers change the model to greek_hoplite

Now make sure you set ownership to this new unit as Macedon.

2) Go to descr_model_battle.txt following the same procedure outlined with royal pikes, search down to find greek_hoplite add a texture. Copy this under your greek_cities entry
macedon, data/models_unit/textures/unit_greek_hoplite_macedon.tga
Again, I left this model without a sprite. This has the sideeffect that when you first load a battle your unit will not appear untill you zoom in, at which point it will stay fully rendered and not degrade through LOD to a sprite at distance. You can check if there is a macedon sprite for this model by copying the greek entry and substituting greek for macedon.

3) Ok, before we go any further, load up a custom battle and see if your units now look RIGHT. Basically you should see a grey peasant representing your Pikemen, and the old card representing your royal pikemen. Go into the battle and see if your unit changes look right. They should look exactly like greek hoplites/armoured hoplites except they are colored in black/orange as opposed to bronzishgoldish/red. They look pretty darn sharp.

4) Assuming everything is working as planned, its time to get your new unit buildable in a campaign. Open up export_descr_buildings.txt, find your barracks section. Create a new line to paste into each barracks level, it should look like this:
recruit "macedon pikemen" 0 requires factions { macedon, }
Now look for every entry of "greek pikemen" delete macedon from each entry, at the same time paste the line you created directly below the "greek pikemen" entry. You will have to modify each barracks level that the Phalanx Pikemen is avaliable in. If you forget any commas in the brackets the client will not boot up, so if you crash double check you havent missed any. Once everything is in working order, launch a macedon campaign, open your building browser and see if Phalanx Pikemen have been replaced by Macedonian Pikemen, or whatever you've chosen to name them.

5) Getting rid of the unlocalized placement text is a bit of a pain, as well as adding your unit card but its not that bad. First you need to go get the unpacking utility, I believe its somewhere here in this forum. Go do what it instructs.
Now go to Rome - Total War\Data\packs\DATA\UI\UNIT_INFO\GREEK_CITIES find greek_hoplite_info.tga and copy it to Rome - Total War\Data\UI\UNIT_INFO\MACEDON rename the file to MACEDON_PIKEMEN_INFO.TGA
Now go to Rome - Total War\Data\packs\DATA\UI\UNITS\GREEK_CITIES copy #GREEK_HOPLITE.TGA to Rome - Total War\Data\UI\UNITS\MACEDON rename it #MACEDON_PIKEMEN.TGA
Go load up a custom battle and see if your newly created unit now has a hoplite unit card.

6) Open up export_descr_unit_enums.txt scroll to the bottom and paste this:
macedon_pikemen
macedon_pikemen_descr
macedon_pikemen_descr_short
Go to Rome - Total War\Data\text open up export_units.txt, search for greek_pikemen, copy the entire entry and paste it to the bottom, it is probably wise to make sure you get the little dash thingies down below as well as we don't want to mess up their formate ;p In your newly pasted entry change it from:
{greek_pikemen} --> {macedon_pikemen}

{greek_pikemen_descr} --> {macedon_pikemen_descr}
feel free to change text here
{greek_pikemen_descr_short} --> {macedon_pikemen_descr_short}
feel free to change text here

Now, you SHOULD have a new unit card for your new unit, as well as a description and a name. If you have any problems reply, i'll see if I can help, or im sure someone else can if I dont get back to ya in a prompt manner ;p

Hagen
10-13-2004, 16:59
Wow!!! :happy2:
THANKS A LOT, Osbot!!!!
Great job! Will give it immediatly a try.

Once again: THANKS