Results 1 to 13 of 13

Thread: Adding New Buildings

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    ccllnply's Avatar Tribunus
    Join Date
    Jan 2007
    Location
    Ireland
    Posts
    7,360

    Default Adding New Buildings

    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.


  2. #2

    Default Re: Adding New Buildings

    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.

  3. #3

  4. #4
    ccllnply's Avatar Tribunus
    Join Date
    Jan 2007
    Location
    Ireland
    Posts
    7,360

    Default Re: Adding New Buildings

    Thank you both

    Here's my progress



    I can't get the pictures to work, no matter what I do. Also, how can I make it non-buildable and indestructible?
    Last edited by ccllnply; December 20, 2008 at 04:23 PM.


  5. #5

    Default Re: Adding New Buildings

    Quote Originally Posted by ccllnply View Post
    Thank you both
    I can't get the pictures to work, no matter what I do. Also, how can I make it non-buildable and indestructible?
    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.

  6. #6

    Default Re: Adding New Buildings

    Non-buildable: Make it available to no factions in EDB. ( requires factions { , } )
    Indestructible: Use the prefix "hinterland_" for the building-tree.
    UI: Have you followed the naming conversions, eg: "#culture-name_level-name(_constructed)" ?

  7. #7
    ccllnply's Avatar Tribunus
    Join Date
    Jan 2007
    Location
    Ireland
    Posts
    7,360

    Default Re: Adding New Buildings

    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
    {
    }
    }


  8. #8

    Default Re: Adding New Buildings

    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 
    {
    }
    }
    If you add "hinterland_" in the tree name, you must also add it in the export_buildings tag, like this: "{hinterland_prancing_pony_name}".
    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.

  9. #9
    ccllnply's Avatar Tribunus
    Join Date
    Jan 2007
    Location
    Ireland
    Posts
    7,360

    Default Re: Adding New Buildings

    {hinterland_prancing_pony_name}
    An inn at the centre of the village of Bree.
    I put that in Export_buildings but it still KTM when I click start campaign.


  10. #10

    Default Re: Adding New Buildings

    Might sound silly, but you have updated your descr_strat with the new building name, right?

  11. #11
    ccllnply's Avatar Tribunus
    Join Date
    Jan 2007
    Location
    Ireland
    Posts
    7,360

    Default Re: Adding New Buildings

    Quote Originally Posted by Aradan View Post
    Might sound silly, but you have updated your descr_strat with the new building name, right?
    Yeah, I did but, here's the stupid part, I forgot to save the file . I saved it and it worked the first time but now whenever I click on Bree it CTDs again


  12. #12

    Default Re: Adding New Buildings

    Do you have a UI icon for it?
    If not, in descr_ui_buildings add this line at the end:

    Code:
    prancing_pony    tavern
    (Or whatever building you want it to look like.)

    Expand your borders, a mod based on XGM 5.

  13. #13
    ccllnply's Avatar Tribunus
    Join Date
    Jan 2007
    Location
    Ireland
    Posts
    7,360

    Default Re: Adding New Buildings

    Quote Originally Posted by CaesarVincens View Post
    Do you have a UI icon for it?
    If not, in descr_ui_buildings add this line at the end:

    Code:
    prancing_pony    tavern
    (Or whatever building you want it to look like.)
    Thanks! Although, I got it to work.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •