Log in

View Full Version : Trouble Creating New Buildings



PatWest
09-03-2006, 11:37
I'm trying to create some new buildings to allow factions to recruit their own units outside of their ZOR's. The description files seem in order and don't cause a crash, but everytime I drop in the new EDB the game CTD's before reching a selection screen.
Here's the part of the EDB I added, does anyone see anything wrong with it?


building warcollege
{
levels military_school military_college
{
military_school requires factions { barbarian, carthaginian, eastern, parthia, egyptian, greek, roman, } and building_present_min_level militia_barracks
{
capability
{
recruit "carthaginian infantry" 0 requires factions { spain, }
recruit "warband sword briton" 0 requires factions { britons, }
recruit "warband sword gaul" 0 requires factions { gauls, }
recruit "warband axe german" 0 requires factions { germans, }
recruit "warband falx dacian" 0 requires factions { dacia, }
recruit "barb horse archers scythian" 0 requires factions { scythia, }
recruit "numidian javelinmen" 2 requires factions { numidia, }
recruit "carthaginian medium infantry" 0 requires factions { carthage, }
recruit "east hillmen" 0 requires factions { pontus, }
recruit "east hillmen" 0 requires factions { armenia, }
recruit "east hillmen" 0 requires factions { parthia, }
recruit "egyptian nile infantry" 0 requires factions { egyptian, }
recruit "greek hoplite" 0 requires factions { greek_cities, }
recruit "greek levy pikemen" 0 requires factions { macedon, }
recruit "greek levy pikemen" 0 requires factions { seleucid, }
recruit "roman hastati" 0 requires factions { roman, } and not marian_reforms
recruit "roman infantry auxillia" 0 requires factions { roman, } and marian_reforms
}
construction 4
cost 2000
settlement_min city
upgrades
{
military_college
}
}
military_college requires factions { barbarian, carthaginian, eastern, parthia, egyptian, greek, roman, } and building_present_min_level city_barracks
{
capability
{
recruit "carthaginian infantry" 0 requires factions { spain, }
recruit "spanish scutarii" 0 requires factions { spain, }
recruit "warband sword briton" 0 requires factions { britons, }
recruit "warband sword gaul" 0 requires factions { gauls, }
recruit "warband axe german" 0 requires factions { germans, }
recruit "warband falx dacian" 0 requires factions { dacia, }
recruit "barb horse archers scythian" 0 requires factions { scythia, }
recruit "barb warguard gaul" 0 requires factions { gauls, }
recruit "barb warguard briton" 0 requires factions { britons, }
recruit "barb warguard dacian" 0 requires factions { dacia, }
recruit "warband dhaxe german" 0 requires factions { germans, }
recruit "warband axe scythian" 1 requires factions { scythia, }
recruit "numidian javelinmen" 2 requires factions { numidia, }
recruit "carthaginian medium infantry" 0 requires factions { carthage, }
recruit "numidian desert warriors" 1 requires factions { numidia, }
recruit "carthaginian heavy infantry" 0 requires factions { carthage, }
recruit "east hillmen" 0 requires factions { pontus, }
recruit "east hillmen" 0 requires factions { armenia, }
recruit "east hillmen" 2 requires factions { parthia, }
recruit "east heavy infantry" 0 requires factions { armenia, }
recruit "east hoplite" 0 requires factions { pontus, }
recruit "egyptian nile infantry" 0 requires factions { egyptian, }
recruit "egyptian infantry" 0 requires factions { egyptian, }
recruit "greek hoplite" 0 requires factions { greek_cities, }
recruit "greek levy pikemen" 0 requires factions { macedon, }
recruit "greek levy pikemen" 0 requires factions { seleucid, }
recruit "greek pikemen" 0 requires factions { macedon, }
recruit "greek pikemen" 0 requires factions { seleucid, }
recruit "greek hoplite elite" 0 requires factions { greek_cities, }
recruit "roman hastati" 0 requires factions { roman, } and not marian_reforms
recruit "roman infantry auxillia" 0 requires factions { roman, } and marian_reforms
recruit "roman princeps" 0 requires factions { roman, } and not marian_reforms
recruit "roman legionary cohort i" 0 requires factions { roman, } and marian_reforms
}
construction 6
cost 3000
settlement_min large_city
upgrades
{
}
}
}
plugins
{
}
}
building horsemanship
{
levels equestrian_school equestrian_college
{
equestrian_school requires factions { barbarian, carthaginian, eastern, parthia, egyptian, greek, roman, } and building_present_min_level stables
{
capability
{
recruit "carthaginian warhounds" 0 requires factions { spain, }
recruit "carthaginian cavalry" 0 requires factions { spain, }
recruit "merc barbarian cavalry" 0 requires factions { britons, }
recruit "barb cavalry gaul" 0 requires factions { gauls, }
recruit "barb cavalry german" 0 requires factions { germans, }
recruit "barb cavalry dacian" 0 requires factions { dacia, }
recruit "barb cavalry scythian" 0 requires factions { scythia, }
recruit "barb wardogs briton" 0 requires factions { britons, }
recruit "barb wardogs dacian" 0 requires factions { dacia, }
recruit "barb wardogs gaul" 0 requires factions { gauls, }
recruit "barb wardogs german" 0 requires factions { germans, }
recruit "barb wardogs scythian" 0 requires factions { scythia, }
recruit "carthaginian cavalry" 0 requires factions { carthage, }
recruit "numidian cavalry" 0 requires factions { numidia, }
recruit "east cavalry" 0 requires factions { pontus, }
recruit "east horse archer" 0 requires factions { armenia, }
recruit "east horse archer" 0 requires factions { parthia, }
recruit "egyptian nubian cavalry" 0 requires factions { egyptian, }
recruit "greek light lancer" 0 requires factions { macedon, }
recruit "greek cavalry" 0 requires factions { greek_cities, }
recruit "greek cavalry" 0 requires factions { seleucid, }
recruit "roman wardogs" 0 requires factions { roman, }
}
construction 4
cost 2000
settlement_min city
upgrades
{
equestrian_college
}
}
equestrian_college requires factions { barbarian, carthaginian, eastern, parthia, egyptian, greek, roman, } and building_present_min_level cavalry_barracks
{
capability
{
recruit "carthaginian warhounds" 0 requires factions { spain, }
recruit "carthaginian cavalry" 0 requires factions { spain, }
recruit "carthaginian medium cavalry" 0 requires factions { spain, }
recruit "merc barbarian cavalry" 0 requires factions { britons, }
recruit "barb cavalry gaul" 0 requires factions { gauls, }
recruit "barb cavalry german" 0 requires factions { germans, }
recruit "barb cavalry dacian" 0 requires factions { dacia, }
recruit "barb cavalry scythian" 0 requires factions { scythia, }
recruit "barb wardogs briton" 0 requires factions { britons, }
recruit "barb wardogs dacian" 0 requires factions { dacia, }
recruit "barb wardogs gaul" 0 requires factions { gauls, }
recruit "barb wardogs german" 0 requires factions { germans, }
recruit "barb wardogs scythian" 0 requires factions { scythia, }
recruit "barb chariot heavy briton" 0 requires factions { britons, }
recruit "barb noble cavalry gaul" 0 requires factions { gauls, }
recruit "barb gothic cavalry german" 0 requires factions { germans, }
recruit "barb noble cavalry dacian" 0 requires factions { dacia, }
recruit "barb scythian nobles scythian" 0 requires factions { scythia, }
recruit "carthaginian cavalry" 0 requires factions { carthage, }
recruit "numidian cavalry" 0 requires factions { numidia, }
recruit "carthaginian medium cavalry" 0 requires factions { carthaginian, }
recruit "carthaginian elephant forest" 0 requires factions { carthage, } and resource elephants
recruit "numidian camel riders" 0 requires factions { numidia, } and resource camels
recruit "east cavalry" 0 requires factions { pontus, }
recruit "east horse archer" 0 requires factions { armenia, }
recruit "east horse archer" 0 requires factions { parthia, }
recruit "east heavy cavalry" 0 requires factions { pontus, }
recruit "east persian cavalry" 0 requires factions { parthia, }
recruit "east cataphract archer" 0 requires factions { armenia, }
recruit "egyptian cavalry" 0 requires factions { egyptian, }
recruit "egyptian nubian cavalry" 0 requires factions { egyptian, }
recruit "greek light lancer" 0 requires factions { macedon, }
recruit "greek cavalry" 0 requires factions { greek_cities, }
recruit "greek cavalry" 0 requires factions { seleucid, }
recruit "greek medium cavalry" 0 requires factions { seleucid, }
recruit "greek medium cavalry" 0 requires factions { greek_cities, macedon, }
recruit "greek elephant small" 0 requires factions { seleucid, } and resource elephants
recruit "roman cavalry auxillia" 0 requires factions { roman, }
recruit "roman wardogs" 0 requires factions { roman, }
}
construction 6
cost 3000
settlement_min large_city
upgrades
{
}
}
}
plugins
{
}
}
building balistics
{
levels missileer_school missileer_college
{
missileer_school requires factions { barbarian, carthaginian, eastern, parthia, egyptian, greek, roman, } and building_present_min_level practice_field
{
capability
{
recruit "carthaginian peltast" 0 requires factions { spain, }
recruit "barb peltast gaul" 0 requires factions { gauls, }
recruit "barb peltast german" 0 requires factions { germans, }
recruit "barb slinger briton" 0 requires factions { britons, }
recruit "barb archer dacian" 0 requires factions { dacia, }
recruit "barb archer scythian" 0 requires factions { scythia, }
recruit "carthaginian peltast" 0 requires factions { carthage, }
recruit "carthaginian archer" 0 requires factions { numidia, }
recruit "east peltast" 0 requires factions { pontus, }
recruit "east peltast" 0 requires factions { armenia, }
recruit "east slinger" 0 requires factions { parthia, }
recruit "egyptian peltast" 0 requires factions { egyptian, }
recruit "egyptian slingers" 0 requires factions { egyptian, }
recruit "egyptian archer" 0 requires factions { egyptian, }
recruit "greek peltast" 0 requires factions { seleucid, }
recruit "greek peltast" 0 requires factions { greek_cities, macedon, }
recruit "roman velite" 0 requires factions { roman, }
}
construction 4
cost 2000
settlement_min city
upgrades
{
missileer_college
}
}
missileer_college requires factions { barbarian, carthaginian, eastern, parthia, egyptian, greek, roman, } and building_present_min_level archery_range
{
capability
{
recruit "carthaginian slinger" 0 requires factions { spain, }
recruit "carthaginian peltast" 0 requires factions { spain, }
recruit "barb peltast gaul" 0 requires factions { gauls, }
recruit "barb peltast german" 0 requires factions { germans, }
recruit "barb slinger briton" 0 requires factions { britons, }
recruit "barb archer dacian" 0 requires factions { dacia, }
recruit "barb archer scythian" 0 requires factions { scythia, }
recruit "warband archer german" 0 requires factions { germans, }
recruit "warband archer dacian" 0 requires factions { dacia, }
recruit "warband archer scythian" 0 requires factions { scythia, }
recruit "warband archer gaul" 0 requires factions { gauls, }
recruit "warband huntsman briton" 0 requires factions { britons, }
recruit "carthaginian peltast" 0 requires factions { carthage, }
recruit "carthaginian archer" 2 requires factions { numidia, }
recruit "carthaginian slinger" 0 requires factions { carthaginian, }
recruit "east peltast" 0 requires factions { pontus, }
recruit "east peltast" 0 requires factions { armenia, }
recruit "east slinger" 0 requires factions { parthia, }
recruit "east archer" 0 requires factions { pontus, }
recruit "east archer" 0 requires factions { armenia, }
recruit "east archer" 0 requires factions { parthia, }
recruit "egyptian peltast" 0 requires factions { egyptian, }
recruit "egyptian slingers" 0 requires factions { egyptian, }
recruit "egyptian archer" 0 requires factions { egyptian, }
recruit "greek peltast" 0 requires factions { seleucid, }
recruit "greek peltast" 0 requires factions { greek_cities, macedon, }
recruit "greek archer" 0 requires factions { seleucid, }
recruit "greek archer" 0 requires factions { greek_cities, macedon, }
recruit "roman velite" 0 requires factions { roman, }
recruit "roman slingers" 0 requires factions { roman, } and not marian_reforms
recruit "roman archer" 0 requires factions { roman, } and marian_reforms
}
construction 6
cost 3000
settlement_min large_city
upgrades
{
}
}
}
plugins
{
}
}

I'm using one of the TWC tutorials, I've set up the graphics and descriptions already, but are their any other files that a building needs to be defined in.

Any help would be apreciated.

P.S. I couldn't find a good manual tutorial at the .org just the one for hadrians tool which I didn't want to use. Is their one?

Makanyane
09-03-2006, 13:25
Try it without giving any of the new buildings to 'carthaginian' culture there is apparently a general problem with that which normally results in KTM.
See posts #136 and #137 of this thread
https://forums.totalwar.org/vb/showthread.php?t=50039&page=7
(and please ignore the posts with me making a complete **** of myself)

I'm not sure if there is a complete solution to this - I got in such a mess I gave up using Carthaginian in my mod!

Dol Guldur
09-03-2006, 15:15
Yep, carthaginian will kick you back (and sometimes CTD I believe) if you put it in new buildings, or even if you add to higher levels in vanilla buildings; playing around with the DUB file can fix the latter though not the former.

PatWest
09-03-2006, 18:19
Thanks guys,

It turns out you were partially correct and thats all I needed to fix the problem. When I removed the Carthaginian faction and fired it up it crashed but this time I got an error message. I forgot to put the building before the level 'and building_present_min_level barracks militia_barracks'. After fixing that it fired up fine. I then added first Carthage and then Carthaginian back in and it worked fine.

Now I have two more questions if you don't mind.

1) In the building browser I'm getting 'Placeholder string for thread 4' and 5,6 as the descriptions for the 3 building tree's. Where do I correct this?

2) The Carthaginians, and possibly other factions, are using a combination of different graphics. If I make faction specific graphics and create the folders for them in UI, will that show up in game?

Makanyane, I didn't have to read that post so I have no idea how big a fool you made of yourself but I've certainly done it to myself on more than one occasion. ~:cheers:

Makanyane
09-03-2006, 19:14
To double check, before you decide its definitely working, have you tried it after deleting /re-naming your map.rwm - (in case you need to do that in future). Some EDB changes don't show up properly until thats done (despite not actually changing resource positions on map).

1. Text links i thought only came from data/export_descr_buildings_enums.txt
and data/text/export_buildings.txt do those both have correct descr and descr_short lines?

2. From what I can see, buildings and portraits have to go in culture specific folders in UI. Whereas unit cards etc have faction specific folders under UI/units etc. If there is any work around to get everything faction specific I too would be very interested.

Dol Guldur
09-03-2006, 19:29
Are you saying you have carthaginian listed as a requisitie culture for a new building? I have never got that to work (though I've only tried in BI).

You need to add the _name tags at the top of the EB file in order to get the thread text in-game. It is the name of your new building complex plus that suffix.

faction_specific images require faction-specific buildings otherwise they will sort by culture I believe. This is because the game is hardcoded to use the image of that culture which bears the same code name as the building level.

PatWest
09-03-2006, 19:34
To double check, before you decide its definitely working, have you tried it after deleting /re-naming your map.rwm - (in case you need to do that in future). Some EDB changes don't show up properly until thats done (despite not actually changing resource positions on map).
I've never know that to be the case. Every change I've ever made outside of the campaign folder worked without deleting map.rwm, in fact, they took effect immediately on saved games.


1. Text links i thought only came from data/export_descr_buildings_enums.txtand data/text/export_buildings.txt do those both have correct descr and descr_short lines?
When I right click on building icons all the descriptions for the buildings are correct. It works just like adding descriptions for units. The building browser window on the other hand doesn't have names in front of the building tree's for each, 3, strings of buildings I created. Their must be another text file just for the building browser window.


2. From what I can see, buildings and portraits have to go in culture specific folders in UI. Whereas unit cards etc have faction specific folders under UI/units etc. If there is any work around to get everything faction specific I too would be very interested.
On this question it's just that many cultures don't have their own building folder and share different tga's from other cultures. Carthage the only one other than the romans I've checked so far never had any tga's. It is using the Roman one for the building icon and the Eastern one for the constructed tga.

PatWest
09-03-2006, 19:41
Are you saying you have carthaginian listed as a requisitie culture for a new building? I have never got that to work (though I've only tried in BI).

You need to add the _name tags at the top of the EB file in order to get the thread text in-game. It is the name of your new building complex plus that suffix.

faction_specific images require faction-specific buildings otherwise they will sort by culture I believe. This is because the game is hardcoded to use the image of that culture which bears the same code name as the building level.
Wow I was busy replying to Makanyane when you dropped this post. Yes I placed Carthaginian back into the faction line for the buildings and when I fired the game up there were all the buildings in the Carthaginians building browser and the descriptions indicated that all the units I had placed could be built with them. Now I havn't actually tried to build them yet so maybe their could be a problem then but they all show up fine.

Thanks for the heads up on the string placement question. I'll try that out and test to see if the buildings are actually buildable and function properly.

Dol Guldur
09-03-2006, 19:43
Reading the DUB (descr_ui_buildings.txt) part of the Complete EDB Guide may help you...




https://forums.totalwar.org/vb/showthread.php?t=50439

PatWest
09-03-2006, 20:08
I'll try that out and test to see if the buildings are actually buildable and function properly.
Ok I can confirm that the buildings seem to work fine for Carthage at least. I did notice that I set Carthage up in a bad starting position. I had to add money and population, and fix an error with the city level vs building level, to finally build the first level infantry upgrade. I was able to recruit units outside their ZOR as planned.

I still havn't found where to list the buildings so they show up in the browser but I'll use your new info to see if I can fix that. The upside is it all works and I didn't have to stiff Carthage or Numidia out of the upgrades.

PatWest
09-03-2006, 20:37
I'm having no luck figuring out where those descriptions come from. They are definately not of part export_descr_buildings_enum.txt or text\export_buildings.txt when you look at the building browser each tree starts with a name and quick description like
Ports- build ships and increase trade
this designation and description do not appear in the afore mentioned files. They have to be somewhere :wall:

Finally, Yes I'm an idiot. It was in text\export_buildings.txt hidden in the middle where it was hard to see.~:doh:

BTW- there is one small anomaly, not counting some mixed up graphics, everytime I exit the game now I get a new sound echo.

Makanyane
09-03-2006, 21:46
Quote:
Originally Posted by Makanyane
To double check, before you decide its definitely working, have you tried it after deleting /re-naming your map.rwm - (in case you need to do that in future). Some EDB changes don't show up properly until thats done (despite not actually changing resource positions on map).

Originally Posted by PatWest
I've never know that to be the case. Every change I've ever made outside of the campaign folder worked without deleting map.rwm, in fact, they took effect immediately on saved games.

My flaw was that I too assumed that as resources are defined in map.txt files if they were not moved .rwm could be kept. However because hidden / visable resources are relevant in EDB if you have made previous changes to introduce / revise them, they don't neccessarily kick in till you delete .rwm with possibly suprising results!,
I'd still suggest that you test deleting map.rwm, if all still works afterwards you can smirk lots!!!!!

Sorry can't help with sound files as I normally turn music etc off in options.

PatWest
09-04-2006, 10:49
My flaw was that I too assumed that as resources are defined in map.txt files if they were not moved .rwm could be kept. However because hidden / visable resources are relevant in EDB if you have made previous changes to introduce / revise them, they don't neccessarily kick in till you delete .rwm with possibly suprising results!,
I'd still suggest that you test deleting map.rwm, if all still works afterwards you can smirk lots!!!!!

Sorry can't help with sound files as I normally turn music etc off in options.
Well I didn't mean to smirk. I'ts just changes that don't involve the campaign folder are not effected by map.rwm. Resources, hidden and otherwise do involve the campaign folder, so if any changes are made to them you would have to delete map.rwm to see the effect. If you added new hidden resources to the EDB and the descr_regions file you would have to delete map.rwm or you would get a CTD even if you tried to play a saved game.

My ZOR system had been up and running for almost a year starting on Mundus Magnus and now BB WarMap. I finally decided to add buildings to allow recruiting outside a factions homeland. It was the first time I had added buildings and it really just boiled down to a typo.:wall: I hate that! Since I never changed any resources I knew deleting map.rwm wasn't necessary.~:pat:

BTW- I have music turned off too, it's just an echo of that shutdown, gong/cymbol crash, noise you hear when quiting.