PDA

View Full Version : It appears that modifying export_descr_buildings causes immediate CTD..



Nerouin
10-09-2004, 23:23
I was attempting to give the Greek Cities access to Light Lancers and Companion Cav, but this obviously caused a problem.

Editing the export_descr_units file did not cause CTD.. however it did nothing.

Any ideas?

TigerVX
10-09-2004, 23:25
Maybe you made a line wrong or something? In the unit file, if you do anything wrong the game will CTD.

Nerouin
10-09-2004, 23:32
No- the only thing I changed was in the { } section that contains the factions.. I added in greek_cities for the equestrian buildings.

I did the same for the actual units in the unit file, but this did nothing as they were still not available for the greek cities to build.. either way, it did not cause a CTD by itself. Modding the buildings file afterward caused a CTD, and modding the buildings file without modding the units file also caused a CTD.. thus it is fairly certain that the buildings file was causing it.

Has anyone else successfully modded the buildings file without CTD??

TigerVX
10-09-2004, 23:35
Well, when you change the Unit ownership in the unit file, you can use them in custom battles. I'm not usre about buildings though.

Osbot
10-10-2004, 00:23
What you need to do is. Go to the export_descr_unit file, find the unit you wish to edit. At the bottom of the units info it will say something like:

ownership macedon,

you want to change it to

ownership macedon, greek_cities

Now you want to go to export_descr_buildings. Find the stables section, and find the appropriate level stable, find the greek lancers entry.

Change it from:
recruit "greek light lancer" 0 requires factions { macedon, }
to
recruit "greek light lancer" 0 requires factions { macedon, greek_cities, }

Don't forget the comma at the end of greek_cities. I haven't actually tried this, but this is exactly what i've done to add companions to the greek cities, the only problem is you don't have a unit card in combat.

ShadesPanther
10-10-2004, 00:26
you can get the unitcard by unpacking the pack files and adding the appropriate pictures to the factions in ui/units and unit_info

Sinner
10-10-2004, 00:55
I've modded both the building and the unit files, so I would guess that you might have made a typo somewhere, or you've left some of the other changes required undone.

In export_descr_buildings.txt, you'd need to edit the following line...

circus_maximus requires factions { carthage, parthia, macedon, seleucid, roman, }

to this...

circus_maximus requires factions { carthage, parthia, macedon, seleucid, roman, greek_cities, } (Note the end comma after 'greek_cities)

Plus both Light Lancer entries (the first under Hippodrome, the second under Circus Maximus), from this...

recruit "greek light lancer" 0 requires factions { macedon, }

to this...

recruit "greek light lancer" 0 requires factions { macedon, greek_cities, }

And the Companion Cavalry entry under Circus Maximus from this...

recruit "greek royal cavalry" 0 requires factions { seleucid, macedon, }

to this...

recruit "greek royal cavalry" 0 requires factions { seleucid, macedon, greek_cities, }

In export_descr_unit.txt, find the Light Lancer and change the ownership field from this...

ownership macedon

to this...

ownership macedon, greek_cities

Do a similar change for Companion cavalry.

Next you need to edit descr_model_battle.txt. Assuming you won't be creating your own greek textures for the two units, edit the file as follows:

Copy the following line under the Light Lancer entry...

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

... pasting it under the original line and editing as follows...

texture greek_cities, data/models_unit/textures/unit_greek_cavalry_macedon.tga
(Note: If you had your own TGA texture, you'd need to create the textures folder under models_unit and change the TGA file entry to whatever you've called your texture)

Also copy the following line under the Light Lancer entry...

model_sprite macedon, 60.0, data/sprites/macedon_greek_light_lancer_sprite.spr


... again pasting it under the original line and editing as follows...

model_sprite greek_cities, 60.0, data/sprites/macedon_greek_light_lancer_sprite.spr


For both the above lines, note that it's tabs and not spaces between texture/model_sprite and greek_cities. I'm not sure if spaces are OK, and don't really have the energy to check, but all the standard entries use tabs so it's best to keep with what's used.

Do a similar change for Companion cavalry.

Nearly done...

Under the Data folder you need to create a sub-folder called ui, and under that a pair of sub-folders called unit_info and units. Under each of those two folders create a sub-folder called greek_cities. Next, get the Xpak tool from the RTW mods forum on this board and use that to unpack the PAK files in the Data\packs folder.

Once you've unpacked the PAK files, it will have created a directory tree that matches much of the current Data structure. Drill down to Data\packs\DATA\UI\UNIT_INFO\MACEDON and copy the files called GREEK_ROYAL_CAVALRY_INFO.TGA and GREEK-LIGHT_LANCER_INFO.TGA to the unit_info\greek_cities folder you created above. Do the same for #GREEK_ROYAL_CAVALRY.TGA and #GREEK-LIGHT_LANCER.TGA under the units\greek_cities folder.

The last part gives you the tile that appears on the recruiting page when viewing a city and the army list on the campaign map, plus the bigger picture when you view the unit stats and description by right clicking on it. I think they can be left out, although you get a default picture of a peasant instead.

Hopefully I haven't fubared or left anything out, so I hope this helps.

Osbot
10-10-2004, 01:58
When you do this, should the Lancers be appearing in Macedonian colors when fielded by the Greeks?

Inuyasha12
10-10-2004, 04:16
Ok i unpacked all those files, i clicked on DATA, amd started looking at all the files inside but they are all empty. I mean there are "folders" but no actual tga or files in them. Example i go to DATA-SHADERS and its all blank.

What am i doing wrong?? :help:

Steppe Merc
10-10-2004, 16:08
It worked fine for me... make sure that after each faction you have a comma and space after it...

Plantagenet
10-10-2004, 19:52
Yes, I've edited it successfully, making all Roman temples buildable by the Julii, and adding all the priests for those temples to the Julii's potential retinue pool. All tested and working. There are 3 files for modifying buildings, and of course everything has to match in all 3:

export_descr_buildings_enums.txt: Points at the building itself and its description (both located in the 2 files below). In the case of temples, if you add any to Roman factions that they can't usually build, you have to add a simple line here for each temple in question (like temple_of_battle_shrine_roman). For exact syntax, look at the 3 lines for a faction that CAN build that building; the Romans will already have 2 of the 3, so just copy and paste to add the 1st line, and change the faction/culture tag to "roman".

export_descr_buildings.txt: Sets which faction can build which buildings, units made possible by each building, and attributes of each building (temple bonuses and so on). To add a building to your faction, copy your faction tag from a building you can build and paste it to the faction list of the one you want to be able to build (include the comma and space after your tag, even if your faction is last in the list).

export_buildings.txt: Contains actual descriptions for each building. If you're playing a Roman faction and any other Roman faction can build the buildings you want to add, you don't need to add a new description here. Otherwise, you must or you will see "WARNING! This baseline description should never appear on screen!" instead of the in-game description text. Again, in the case of temples, you MUST have the first line (as in export_descr_buildings_enums.txt), so copy it from another faction that CAN build that temple and change faction tag to "roman".

Nerouin
10-11-2004, 01:55
Worked great. I was missing the commas at the end in the buildings file. Thanks!!