Can someone please point me in the direction of a tutorial or give me a guide on how to add new buildings to the game. I'm not talking about battlefield models.
I think there isn't any guide exactly on "adding new buildings". But what you need is:
- a new tech-tree entry (with at least one level) in export_descr_buildings
- new entries (name, descr and short descr) for the tree and the level(s) in text/export_buildings
- UI cards (regular, construction and building-browser) in UI/culture_name/buildings[/construction]
If you follow the example of how things are coded already in those files/structured in those folders, you'll have no problem.
This might help
http://www.twcenter.net/forums/showthread.php?t=13734
The only way I could get those pictures to show up was to repack the .pak files in data/packs, with the new files included in the packs, of course. I know there are easier ways to do it, like using the UI folder in data but they were stubborn. Probably just an operator error on my part.
Last edited by Red Knight Alex; December 20, 2008 at 09:45 PM.
Ok, I got the UI to work, thanks Aradan. However, when I add hinterland_ the game kicks me back to the menu with no error message. Also, when I put in requires factions { , } the game CTDs when I click on Bree again with no error message, my guess is something to do with the UI?
Here's the EDU entery that works:
building prancing_pony
{
levels prancing_pony
{
prancing_pony requires factions { barbarian }
{
capability
{
happiness_bonus bonus 1
}
construction 2
cost 800
settlement_min large_town
upgrades
{
}
}
}
plugins
{
}
}
If you add "hinterland_" in the tree name, you must also add it in the export_buildings tag, like this: "{hinterland_prancing_pony_name}".Code:building hinterland_prancing_pony { levels prancing_pony { prancing_pony requires factions { barbarian, } and hidden_resource not_here { capability { happiness_bonus bonus 1 } construction 2 cost 800 settlement_min large_town upgrades { } } } plugins { } }
Another way to make a building unavailable is to make it require a hidden resource which has been defined at the top of EDB, but has not been added to any region in descr_regions. I've used "not_here" as an example, I can't remember which non-existant resource Wles has used in LotRTW.
You were also missing a comma in the faction list, be very careful with those.