You must be logged in to post messages.
Please login or register

Game Modification & Editor Discussion

Hop to:    
Welcome! You are not logged in. Please Login or Register.19 replies
Total War Heaven » Forums » Game Modification & Editor Discussion » Making new General unit
Bottom
Topic Subject:Making new General unit
quagnatus legion
Legionary
posted 11 April 2008 16:06 EDT (US)         
If I wanted to make spartan hoplites for example the new general unit for the greek cities, how would I do this?

"The point of war is not to die for your country, but to make the other bastard die for his." -General George Patton
"If we can't find a way, we'll make one" -Hannibal
Spanish AAR (not finished)
AuthorReplies:
SubRosa
Legionary
posted 11 April 2008 18:56 EDT (US)     1 / 19       
It is actually rather easy.

The text files pertaining to the general are:

RTW\data\descr_character.txt - This file lists the name of the unit that will be used for the strat and battle maps. Note that the Generals are listed at the top of the file, and then later there is another section for the Captains.

RTW\data\descr_model_battle.txt - The unit name above points to here (the name after Type) for the battle model to use.

RTW\data\descr_model_strat.txt - Likewise, but for the strategic map.
quagnatus legion
Legionary
posted 11 April 2008 19:09 EDT (US)     2 / 19       
Thanks for the help. I looked at the files, but my question is this just changing the general himself or his whole unit? Because, I would like to change his whole unit to a good unit of infantry to test something out.

Also if I changed the unit for the greek cities would it change the unit for macedon, and other hellenic factions as well; If so how would I stop this.

"The point of war is not to die for your country, but to make the other bastard die for his." -General George Patton
"If we can't find a way, we'll make one" -Hannibal
Spanish AAR (not finished)

[This message has been edited by quagnatus legion (edited 04-11-2008 @ 07:35 PM).]

SubRosa
Legionary
posted 11 April 2008 19:34 EDT (US)     3 / 19       
Ahh, you mean the Bodyguard then, not the actual General.

That is easy. In go to RTW\Data\Export_Descr_Unit.txt, find the Bodyguard unit you want to change (keep in mind there are two, one for Pre-Marius and the other for Post-Marius), and change the Soldier line to point to the unit you want to use for the bodyguard (this is the name after "Type" in RTW\Data\Descr_Model_Battle.txt.

Since you want to make them infantry as well, you will have to change a few other things in Export_Descr_Unit.txt too, like the Class line, and remove the Mount and Mount Effect lines.

You can find everything you ever wanted to know about creating or altering units in the Guide To Creating New Units
quagnatus legion
Legionary
posted 11 April 2008 20:25 EDT (US)     4 / 19       
Ive made further progress, but I have encountered a problem

For export_descr_unit I put


type: early_spartan royal guard
dictionary: early_spartan_royal_guard ; Early Spartan Royal Guard
category: infantry
class: spearmen
voice_type: Heavy_1
soldier: spartan_royal_guard, 30, 0, 1
officer: greek _standard
attributes: sea_faring, hide_forest, can_sap, command, frighten_foot, frighten_mounted, general_unit,
formation 1, 1, 1.7, 0.5, 4, square, phalanx
stat_health: 2, 0
stat_pri: 27, 8, no, 0, 0, melee, simple, piercing, spear, 25,1
stat_pri_attr: spear, long_pike
stat_sec: 21, 4, no, 0, 0, melee, simple, piercing, sword, 25, 1
stat_sec_attr: no
stat_pri_armour: 12, 8, 5, leather
stat_sec_armour: 0, 1, flesh
stat_heat: -2
stat_ground: 2, 0, 0, 0
stat_mental: 60, disciplined, highly_trained
stat_charge_dist: 30
stat_fire_delay: 0
stat_food: 60, 300
stat_cost: 1, 1000, 220, 130, 190, 1740
ownership: greek_cities


and


type: spartan royal guard
dictionary: spartan_royal_guard ; Spartan Royal Guard
category: infantry
class: spearmen
voice_type: Heavy_1
soldier: spartan_royal_guard, 30, 0, 1
officer: greek_standard
attributes: sea_faring, hide_forest, can_sap, command, frighten_foot, frighten_mounted, general_unit, general_unit_upgrade
formation: 1, 1, 1.7, 0.5, 4, square, phalanx
stat_health: 2, 0
stat_pri: 30, 8, no, 0, 0, melee, simple, piercing, spear, 25,1
stat_pri_attr: spear, long_pike
stat_sec: 21, 4, no, 0, 0, melee, simple, piercing, sword, 25, 1
stat_sec_attr: no
stat_pri_armour: 12, 11, 5, leather
stat_sec_armour: 0, 1, flesh
stat_heat: -2
stat_ground: 2, 0, 0, 0
stat_mental: 60, disciplined, highly_trained
stat_charge_dist: 30
stat_fire_delay: 0
stat_food: 60, 300
stat_cost: 1, 1000, 220, 130, 190, 1740
ownership: greek_cities


I then put in all necessary changes to descr_model_battle and then ran the game to see if the changes worked and when I checked to look at generals body guard info it was still the same shity cavalry...

"The point of war is not to die for your country, but to make the other bastard die for his." -General George Patton
"If we can't find a way, we'll make one" -Hannibal
Spanish AAR (not finished)
SubRosa
Legionary
posted 11 April 2008 20:31 EDT (US)     5 / 19       
You did not really have to creating a whole new unit. You could have just gone to the Greek Bodyguard and change its soldier line to that for you new unit.

But, to keep what you have, go the regular greek bodyguard units and remove the greek_cities from the ownership line. That might do it.

[This message has been edited by SubRosa (edited 04-11-2008 @ 08:37 PM).]

quagnatus legion
Legionary
posted 11 April 2008 20:36 EDT (US)     6 / 19       
Ahh I see I thank you once more for your help, but how do I not make the bodyguard available for macedon and the seleucids. I do not want them to have the same bodyguard

"The point of war is not to die for your country, but to make the other bastard die for his." -General George Patton
"If we can't find a way, we'll make one" -Hannibal
Spanish AAR (not finished)
SubRosa
Legionary
posted 11 April 2008 20:38 EDT (US)     7 / 19       
quagnatus legion
Legionary
posted 11 April 2008 21:01 EDT (US)     8 / 19       
I'm sry to be such a pain. I have gone in and made the changes that you advised following this I put in

type greek cities general's guard cavalry early
dictionary greek_cities_generals_guard_cavalry_early ; General's Bodyguard
category infantry
class spearmen
voice_type Heavy_1
soldier spartan_royal_guard, 30, 0, 1
officer greek_standard
attributes sea_faring, hide_forest, can_sap, command, frighten_foot, frighten_mounted, general_unit,
formation 1, 1, 1.7, 0.5, 4, square, phalanx
stat_health 2, 0
stat_pri 27, 8, no, 0, 0, melee, simple, piercing, spear, 25,1
stat_pri_attr spear, long_pike
stat_sec 21, 4, no, 0, 0, melee, simple, piercing, sword, 25, 1
stat_sec_attr no
stat_pri_armour 12, 8, 5, leather
stat_sec_armour 0, 1, flesh
stat_heat -2
stat_ground 2, 0, 0, 0
stat_mental 60, disciplined, highly_trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 1000, 220, 130, 190, 1740
ownership greek_cities

and took them out of ownership for the other factions general unit.
Also jic you where wondering. The reason I put the greek cities general guard cavalry early is so it would be unique and no crash would happen obviously.
I then checked the game and same results as last time.

"The point of war is not to die for your country, but to make the other bastard die for his." -General George Patton
"If we can't find a way, we'll make one" -Hannibal
Spanish AAR (not finished)
SubRosa
Legionary
posted 11 April 2008 21:40 EDT (US)     9 / 19       
quagnatus legion
Legionary
posted 11 April 2008 21:48 EDT (US)     10 / 19       
just like this


type: spartan_royal_guard
skeleton: fs_fast_spearman, fs_fast_swordsman ; combat spear
indiv_range: 40
texture: greek_cities, data/models_unit/textures/Royal_Spartan.tga
model_flexi: data/models_unit/Royal_Spartan_100.cas, 15
model_flexi: data/models_unit/Royal_Spartan_200.cas, 30
model_flexi: data/models_unit/Royal_Spartan_300.cas, 40
model_flexi: data/models_unit/Royal_Spartan_400.cas, max
model_sprite: greek_cities, 60.0, data/sprites/greek_hoplite_spartan_pylos_sprite.spr
model_tri: 400, 0.5f, 0.5f, 0.5f

"The point of war is not to die for your country, but to make the other bastard die for his." -General George Patton
"If we can't find a way, we'll make one" -Hannibal
Spanish AAR (not finished)
SubRosa
Legionary
posted 11 April 2008 21:52 EDT (US)     11 / 19       
I got it working by doing the following.

First I changed the original greek bodyguard by removing the greek_cities from their ownership, like so:
type greek general's guard cavalry early
dictionary greek_generals_guard_cavalry_early ; General's Bodyguard
category cavalry
class heavy
voice_type General_1
soldier greek_medium_cavalry, 12, 0, 1
mount generals horse
mount_effect elephant -8, camel -4
attributes sea_faring, general_unit, hide_forest, hardy
formation 1.5, 4, 3, 6, 3, square
stat_health 2, 0
stat_pri 11, 6, no, 0, 0, melee, simple, piercing, spear, 25 ,1
stat_pri_attr no
stat_sec 0, 0, no, 0, 0, no, no, no, none, 25 ,1
stat_sec_attr no
stat_pri_armour 3, 7, 0, leather
stat_sec_armour 0, 0, flesh
stat_heat 1
stat_ground 0, 0, -6, 0
stat_mental 10, disciplined, highly_trained
stat_charge_dist 40
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 690, 130, 70, 110, 690
ownership seleucid, macedon, slave
Then I copied, pasted, and changed it to make the following new entry using the Spartan Hoplites from vanilla RTW.
type greek bodyguard early
dictionary greek_bodyguard_early ; General's Bodyguard
category infantry
class heavy
voice_type General_1
soldier greek_hoplite_spartan_pylos, 12, 0, 1
attributes sea_faring, general_unit, hide_forest, hardy
formation 1.5, 4, 3, 6, 3, square
stat_health 2, 0
stat_pri 16, 4, no, 0, 0, melee, simple, piercing, spear, 25 ,1
stat_pri_attr spear, spear_bonus_8
stat_sec 12, 3, no, 0, 0, melee, simple, piercing, sword, 25 ,1
stat_sec_attr no
stat_pri_armour 3, 7, 0, leather
stat_sec_armour 0, 0, flesh
stat_heat 1
stat_ground 0, 0, -6, 0
stat_mental 10, disciplined, highly_trained
stat_charge_dist 40
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 690, 130, 70, 110, 690
ownership greek_cities
It works for me. Although without unit cards or descriptions (because I did not bother with those).
SubRosa
Legionary
posted 11 April 2008 21:53 EDT (US)     12 / 19       
Hmmm, maybe you just need to remove the comma from the end of general_unit in your code for Export_Descr_Unit.

Edited:

Nope, the comma does not matter, I just tried it.

Go back and check the regular bodyguard again to make sure that greek_cities is not in the ownership.

[This message has been edited by SubRosa (edited 04-11-2008 @ 09:59 PM).]

quagnatus legion
Legionary
posted 11 April 2008 21:54 EDT (US)     13 / 19       
Is it an attribute causing the problem maybe, because I have a lot of attributes for this unit?

"The point of war is not to die for your country, but to make the other bastard die for his." -General George Patton
"If we can't find a way, we'll make one" -Hannibal
Spanish AAR (not finished)

[This message has been edited by quagnatus legion (edited 04-11-2008 @ 09:55 PM).]

SubRosa
Legionary
posted 11 April 2008 22:01 EDT (US)     14 / 19       
That should not matter. You should be able to see it in custom battles, even with the original bodyguard still having greek_cities ownership. I just tried that and the infantry general still shows up also.

Edit: Wait, take the Command attribute out. That is for non-general units who have a general's effect. It might be confusing the game.

Edit Again: Well, that is not it either. I put that in mine and the unit still shows up. Although you still should not have that attribute.

[This message has been edited by SubRosa (edited 04-11-2008 @ 10:11 PM).]

quagnatus legion
Legionary
posted 11 April 2008 22:10 EDT (US)     15 / 19       
After taking the command out, I did notice they where available in custom battle, but in the the imperial campaign when i checked the starting faction leader's bodyguard it was the same cavalry, any way to solve this?

"The point of war is not to die for your country, but to make the other bastard die for his." -General George Patton
"If we can't find a way, we'll make one" -Hannibal
Spanish AAR (not finished)
SubRosa
Legionary
posted 11 April 2008 22:19 EDT (US)     16 / 19       
Hmmm, I am getting that too. I am not sure why. When I put the new generals in ATW the only files I had to edit were Export_Descr_Unit, Descr_Model_Battle, Export_Units (for the descriptions), and of course the new unit cards and actual models and textures.

Edit: Wait, I think I have it. Descr_Strat still has the old bodyguard unit listed for all the starting generals. Let me change that and see what happens.

[This message has been edited by SubRosa (edited 04-11-2008 @ 10:34 PM).]

quagnatus legion
Legionary
posted 11 April 2008 22:31 EDT (US)     17 / 19       
Hmm nice thinking, I never would have thought of that. I guess it makes sense, because descr_strat is campaign related.

"The point of war is not to die for your country, but to make the other bastard die for his." -General George Patton
"If we can't find a way, we'll make one" -Hannibal
Spanish AAR (not finished)

[This message has been edited by quagnatus legion (edited 04-11-2008 @ 10:31 PM).]

SubRosa
Legionary
posted 11 April 2008 22:34 EDT (US)     18 / 19       
Yes, that did it. Just change the starting general's units in Descr_Strat.txt also.

Hmmm, I think this would make a good subject to write up for an article.

[This message has been edited by SubRosa (edited 04-11-2008 @ 10:35 PM).]

quagnatus legion
Legionary
posted 11 April 2008 22:38 EDT (US)     19 / 19       
I'm excited to get this working, and desided to start looking through descr_strat. Although I don't know how to do anything in descr_strat besides making factions playable, so where do I find this and how do I edit it.

After looking through the descr_strat I eventually found it and made the necessary changes and I report complete and utter success!!!


So thank you Subrosa and sry if I became a pain.

"The point of war is not to die for your country, but to make the other bastard die for his." -General George Patton
"If we can't find a way, we'll make one" -Hannibal
Spanish AAR (not finished)

[This message has been edited by quagnatus legion (edited 04-11-2008 @ 11:55 PM).]

You must be logged in to post messages.
Please login or register

Hop to:    

Total War Heaven | HeavenGames