Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: Krn3ll Guide to add brand new buildings to RTW 1.5

  1. #1

    Default Krn3ll Guide to add brand new buildings to RTW 1.5

    Title: Krn3ll Guide to add brand new buildings to RTW 1.5
    Posted by: Seth Krn3ll
    Modding area: Buildings (strategic - battle map)
    Required software: Notepad (or other text editor), 3dmax, graphic editor like photoshop or GIMP
    Summary: This tutorial explains how to add totally new buildings to the gameplay, both in strategic and battle map modes.

    PREMISE:
    Just to be clear: I will NOT explain HOW to model buildings here, just how to add them to the gameplay. Specifically, I will explain step to step how to:
    Add new buildings in the building tree of the game
    Add their 3d models to the building DB so that they will appear in game

    Before starting, keep in mind there are different type of buildings you can add to the game.

    Ambient Buildings are the simpler ones. They need much less steps then the others. They can’t have recruiting capabilities, they can’t have bonus capabilities, they do not affect campaign game and in battles they are merely obstacles for troops or scenario decorations and they are discussed in this tutorial.

    Game Buildings are the ones buildable by the players during the game in the settlements. They affect both campaign and battle game, and they are discussed in this tutorial.

    Special buildings are walls and towers and they are somehow more complicated to manage due to their multiple features. They will not be discussed here, you can check my Wall Modding tutorial there:
    -->Krn3ll's RTW wall modding guide

    ADDING AMBIENT BUILDINGS TO RTW


    adding ambient buildings
    RTW host some buildings which are there just for decoration purposes. They shall indeed be improved to make them fully interactive with the game, host units or force passages in a city map, but those features will not be discussed here. Here I will only explain how to add or modify those models.

    Files involved:
    data\descr_items.db
    data\descr_items.txt
    data\descr_items\di_*.txt
    data\descr_building_battle.txt
    data\descr_building_battle\dbb_*_buildings.txt
    data\settlement_plans\*CITYNAME*_plan.txt


    As always, remember to backup those files before changing them, so if things go wrong you can always restore original situation.

    We assume you already have the new model you want to add to the game.
    Ambient buildings do not need specific text string nor they need to be added to any game related tree.
    To have them in the game all you need is to have the models, register them in the game db and place them in the settlement plan where you want them to show up.

    Lets say you want your new “MYHOUSE.cas” model in the game.

    Put your "MYHOUSE.cas" model in Data\models_building and if it uses new textures put them in Data\models_building\textures.

    1. open data\descr_items.txt
    Add a line like “include di_MYOWN_buildings.txt”
    Save and close

    2. create a file named “di_MYOWN_buildings.txt”
    Type in it:
    Code:
    type		MYHOUSE 
    lod
    max_distance	4000.0
    model_rigid	MYHOUSE.cas
    Save it in data\descr_items\ folder and close

    3. open data\descr_building_battle.txt
    Add a line like “include dbb_MYOWN_buildings.txt”
    Save and close

    4. create a file named “dbb_MYOWN_buildings.txt”
    Type in it:
    Code:
    MYHOUSE
        {
            stat_cat large_stone
            localised_name ambient
            level
            {
                min_health 1
                battle_stats
                item MYHOUSE
                physical_info info_roman_small_temple.cas
            }
            transition default_large_stone
            level
            {
                min_health 0
                battle_stats
                item roman_rubble_112x64
                physical_info info_roman_rubble_112x64.cas
            }
        }

    Three notes here:
    - the string “physical_info” tells the game which INFO file to be used to define some features of the building. In the example I put the “info_roman_small_temple.cas” but you’ll need to put there one compatible cas model with your own building.
    If you are not able to create your own INFO files you’ll have to add here an existing INFO file, so chose one of an item which have similar dimension of your model, or you’ll have weird results in game.
    I will discuss how to create the INFO files for your buildings in another tutorial, I’ll post here a link when its ready.

    - the “stat_cat” string tells the game the stats of resistance to damage of your building.
    The stats I knew of are:
    small_wooden
    medium_wooden
    small_stone
    medium_stone
    large_stone

    - the “transition” paragraph tells the game what happens if your building is damaged/destroyed during battle. If you want it to be damageable/destroyable you’ll need either to create another model of your building remains when destroyed or to use in such paragraph the model of an existing building remains. If it’s the latter, pick the remains of a model with compatible dimensions. The “level” string is the level of damage of the building. You can add there more then one level of damage along with more then one model of your partially damaged building.
    if you don’t want your new building to be damageable/destroyable, use such code:
    Code:
    MYHOUSE
        {
            stat_cat indestructable
            localised_name ambient
            level
            {
                min_health 1
                battle_stats
                item MYHOUSE.cas
                physical_info info_roman_small_temple.cas
            }
        }
    Save your “dbb_MYOWN_buildings.txt” into data\descr_building_battle\ folder and close it.

    5. Now you have to put your new building in some settlement plan where you’ll see it in game. Go to
    data\settlement_plans\ folder and open the settlement plan of the type where you want your building to show up.

    In the *_plan.txt file are defined all the features related to that specific settlement plan type. Look for the “;AMBIENT” comment line, usually there are already some ambient buildings set there. If there’s no one, just add it at the end of the file, BUT be sure to add it INSIDE the last “}” which closes the file.
    Add a line like this:
    “MYHOUSE, 140, 150, 180.0, 0.0”
    This string tells the game to put the model item “MYHOUSE” in that settlement map, at cords x 140 y 150, to rotate it of 180 degrees on his z axis and to have it at 0 meters altitude. You shall have a view of the settlement before deciding those parameters, otherwise your model shall be placed under a hill or collide with other buildings already present in that settlement at such position, or be put on a road and stop the passage of troops.

    If you are just replacing some existing models with your one, then simply replace their names with your model’s name and use their original coordinates as they are in the settlement_plan.


    Once all those tasks are done, save all, backup your descr_items.db file, rename or delete it and start the game. Game will freeze at starting screen or show errors, just ctrl-alt-canc, kill it, restart it. If you did everything correctly, You should have your buildings in the game.



    ADDING GAME BUILDINGS TO RTW

    adding game buildings - preparation

    PREPARATION:
    First thing, BACKUP all the files involved. I suggest to backup a copy of the folders, so to be sure you can get back to start if things goes wrong.

    Here is the list of files involved in the process:

    Data\export_descr_buildings.txt
    This file lists all the buildings that can be built during the game, specifying which cultures can build them, the costs and times, features, bonuses and recruitments capabilities.

    Data\text\export_buildings.txt
    here all buildings are given a text description which will appears in game.

    Data\text\building_battle.txt
    here all buildings are given a text description which will NOT appears in game. Its needed to the game.

    Data\settlement_plans\descr_settlement_plan.txt
    Here are listed the primary buildings, and you’ll have to add your new ones there. Are also set the city plans, and all the slots that can be called from the single settlement plan files.

    Data\settlement_plans\[culturetype_settlementtype].txt
    where " settlementtype " stands for each type of settlement in the game, forts and camps included. There you define all building models to be shown in each kind of settlement. You can specify coords and type for all kinda objects, including walls. It can list only models already listed in descr_settlement_plan, so if you want to customize settlements a lot you will have to work on descr_settlement_plan too.

    Data\descr_items.txt
    This file enlist all buildings the game will manage. You need to add here all the new buildings you want to appear in the game. You can also include subfiles there, to keep them separated for culture, for example.

    Data\descr_items.db
    This file is generated by the game when you start it. If there is already a descr_items.db the game will not generate a new one.

    Data\descr_settlement_plan
    this one defines the single elements to be used in every city shown ingame. There are set association with every culture settlement single plans, groups of various building models to be shown in settlements and culture variations.

    Data\descr_building_battle\dbb.*.txt
    Those files enlist all 3d building models to the game. Here are specified the health stats, the different cas models to refer to and some other things.


    PROCESS

    a) ADDING A NEW BUILDING TO THE GAME
    adding a new Game Building
    Lets say you want to add a new building named “MONOLITH”, buildable by Romans and Britons, with two levels named monolith1 and monolith2, which gives a some happiness to settlement population.

    1. Open export_descr-building.txt, scroll to the end of it and add the new building tree. It will look like that:

    Code:
    building monolith
    {
        levels monolith1 monolith2
        {
            monolith1 requires factions { romans, britons } 
            {
                capability
                {
                    happiness_bonus bonus 1
                }
                construction 1 
                cost 400 
                settlement_min town
                upgrades
                {
                    monolith2
                }
            }
            monolith2 requires factions { romans, britons } 
            {
                capability
                {
                    happiness_bonus bonus 2
                }
                construction 3
                cost 800
                settlement_min large_town
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }
    2. Open export_buildings.txt and add the description lines for the levels of your new building:
    Code:
    {monolith1} The wonderful lunar Monolith!
    {monolith1_desc} The lunar Monolith helps people read at night, so they love it. People is very happy to have it in the settlement.
    {monolith1 _desc_short} The lunar Monolith makes people happy.
    {monolith2} The Unbearable solar Monolith!
    {monolith2_desc} The solar Monolith gives all people a nice tan and makes all them say “Wohooo!”. People is very happy to have it in the settlement and they will love you for building it.
    {monolith2 _desc_short} The solar Monolith makes people happy.
    Add also a line to the name string at the end of the file:
    Code:
    {monolith_name} Wonderful Big Stones – Makes people happy
    3. Add some nice pictures to be seen in your building queue ingame.
    To do so you need to be able to use a graphic editor, like GIMP or Photoshop or something else. Find a nice picture you like and save it as your Building Card Picture with the name
    #roman_monolith1_constructed.tga
    In
    data\ui\roman\buildings
    Then resize to 78x62 pixels. If you are good with graphics add the alpha channel, if you dunno what is it, just forget it. Save that picture as
    #roman_monolith1.tga
    in
    data\ui\roman\buildings
    then make a copy, resize it to 64x51 pixels and save it with the same name in data\ui\roman\buildings\construction

    Do the same in barbarian building folders (as Britons are barbarian) and of course, name them
    #barbarian_etc etc

    At this point you can start the game and if you play as romans or as Britons you’ll find your new building available to be built in your settlements. You can play and benefit all the features of the monolith, but if you enter the settlement in tactical view, you will not see anything like a monolith. To have the monolith around in your battles, you’ll need to create and then add the 3d model to the models db, and that’s what I’m gonna explain now.


    b) ADDING THE 3D MODEL OF THE NEW BUILDING
    If adding a new building to the game was pretty easy, adding a 3d model is all BUT easy. There are two ways I know to go for it, one is complicated, the other is utterly complicated.

    b.1) – Using existing models
    Using existing models
    The complicated way is to use an existing building of the game, which means you will somehow rename an existing building. To do so first thing you have to pick the existing building you want to be your monolith. Lets say you chose the barbarian bardic circle.

    1. Open descr_settlement_plan.txt and first of all add monolith1 and monolith2 to the primary building list.
    Then chose a slot to settle your new building. Slots are prefixed areas in the settlement plans where specific buildings may be built. Given you want the monolith to be buildable in roman and (barbarian) britons settlements, you must pick a slot that is present in both those culture settlements files. You also have to pick slots with adequate dimensions, which means you have to open in 3dmax the bardic_circle and see the dimensions it occupies, or at least check it in descr_settlement_plan.txt. Remember that if you use a slot for that building, you will not be able to build another building in that slot – so if you decide to use lets say the slot_160x128_missiles slot, then you will not be able to build the missile building if you build your monolith.

    Best way is to create a brand new slot for your new building, something like a slot_monolith with the right dimensions. But you’ll have then to find the correct coordinates in romans and barbarian settlements to set your new slot. If you put it on a road, soldiers will run against it and get stuck there.
    So if you go to create your own slot, then you’ll have to add it to all the settlement files you want the monolith to be buildable in.

    2. Once found the right slot for your monolith, add a variant line to it. It will look like that:
    Code:
    		
    variant
    {
    	cultures
    	{
    		roman
            barbarian
    	}
    	buildings
    	{
    	    Monolith monolith1
        }
        bardic_circle_barbarian, 		0, 	0, 	0, 	0		
    }
    variant
    {
    	cultures
    	{
    		roman
            barbarian
    	}
    	buildings
    	{
    	    monolith monolith2
    	}
        bardic_circle_barbarian, 		0, 	0, 	0, 	0		
    }
    Consider that this way the 3d models shown ingame will be the bardic circle for both levels of your monolith, and for both romans and Britons. Of course you can use different models for cultures and levels if you want, but pay attention to dimensions of the models: if you use a model bigger then the slot you put it in, it may collide with other buildings or block roads.

    In descr_settlement_plan.txt file you can also set the models for the building time of your monolith, or what to show if its not at all built. Here I try to stay at the basics.

    3. Once you added your monolith to a slot and the slot is available in the settlement plans, you have to declare it in data/text/ building_battle.txt
    Easy step here: just add a line like:
    Code:
    {monolith1} My Monolith
    {monolith2} Again my Monolith
    Those lines never appears in game, ir at least I never saw them. But they are needed to have the building working.

    4. Now you have to include your new building to the models db of the game. To do so, first thing open
    descr_building_battle.txt
    and add the monolith entry like that:

    Code:
    monolith1
    {
        stat_cat large_stone
        localised_name monolith1
        level
        {
            min_health 1
            battle_stats
            item bardic_circle_barbarian
            physical_info	bardic_circle_barbarian_info.CAS
        }
        transition default_large_stone
        level
        {
            min_health 0
            battle_stats
            item		roman_rubble_112x64
            physical_info	info_roman_rubble_112x64.cas
        }
    }
    
    monolith2
    {
        stat_cat large_stone
        localised_name monolith2
        level
        {
            min_health 1
            battle_stats
            item bardic_circle_barbarian
            physical_info	bardic_circle_barbarian_info.CAS
        }
        transition default_large_stone
        level
        {
            min_health 0
            battle_stats
            item		roman_rubble_112x64
            physical_info	info_roman_rubble_112x64.cas
        }
    }
    At this point, given you used an existing model, there is nothing else you have to do with files. But you have to delete the existing descr_items.db (which you have already backupped, haven’t you?) and then run the game.
    You’ll have some errors, just ctrl-atl-canc and stop the program. If you have made no mistakes, the program creates the new descr_items.db including your monolith.
    Restart the game, and this time there should be no errors. If you play as romans or Britons you’ll be able not just to build the monolith but also to go and see it in your cities in tactical view. O well, you’ll see the bardic_circle, of course, but the cursor will say “Monolith” and you will be happy like the people in your settlement are.

    Ok this was the complicated way, which is not that much because, as I just outlined, you’ll see the same old models in your game. So lets go to see how to add a completely new model to your new building. And, well, it will be not that easy.
    Did I already say that?


    b.2) – Using brand new models
    Using brand new models

    1. To add a brand new model for your monolith, first thing you have to do is to create that model. You can do so by importing an original item form the game that have similar dimensions to the one you want to create and this also keep its own collision INFO file – or go on and create your new model with its own INFO file.

    If you keep and existent INFO file as reference for your new building, just import in 3dsMax the vanilla model and then start to create your own building keeping it within the dimensions of the original item. Once you created your new model, remove the original item and all its textures, add your own textures and finally export it as
    monolith1_high.cas
    Put it in
    Data\MODELS_BUILDING
    And put your textures in
    Data\MODELS_BUILDING\TEXTURES

    If you want to make a new building with its own INFO file, after you create the .cas for your new building you have to create the INFO file for it.
    To know how to do so, lets first explain what are INFO files and how they work. INFO files tell the game some functionalities of the model they refer to. Including their walkable/non walkable areas, if and where the camera will go around them or get through them, and some more complicated features like tunnels, platforms, siege points and the like.
    Here I will explain just the two basic ones needed to create functional INFO files for simple buildings, which are “collision” and “collision_3d” issues.
    - Collisions are simple squares, made on ONE SINGLE element (even better one single polygon) with no holes inside. They define the areas where troops or peasants will NOT be able to walk. If the building is just a cube, the basic collision file is a square a little bigger then the cube base. The units will walk into it and stop. If you don’t put working collision files in the INFO file, units will walk up on your buildings. If you need to add more then one collision area, you have to name them “collision_01”, “collision_02”, etc.
    - collision_3d is the general shape of your building in 3d. It mainly have two functions: telling the game that the camera will have to go around the building and not through it and blocking projectiles. Given so, it may be used to create fake roofs to some areas where the camera will be able to pass into, or invisible fences to protect troops from arrow attacks. Staying at the basics, the collision_3d is just a shape of the same size of your building, and that’s all. A good modeler will usually simplify it a lot, to make easier the job of the game engine.
    If you’re lazy, you can do it in the easy way by just keeping the model as it is, collapsing all its part in one object and naming it “collision_3d” then exporting it as
    monolith1_INFO.cas
    and
    monolith2_INFO.cas
    Put it in
    Data\MODELS_BUILDING\INFO
    Given the game engine will have to deal with all the polys of all the objects around, its strongly advised you simplify the object in the INFO file.

    2. follow the point 1. of the complicated way about descr_settlement_plan.txt
    I strongly suggest you to create your own slot for your own building.

    3. Add your monolith to your slot, this time with no references to bardic_circle.
    4. Once found the right slot for your monolith, add a variant line to it. It will look like that:
    Code:
    	variant
        {
            cultures
    		{
    		    roman
                barbarian
            }
    		buildings
    		{
    		    monolith monolith1
            }
            monolith1, 		0, 	0, 	0, 	0		
        }
    	variant
    	{
    	    cultures
            {
    		    roman
                barbarian
    		}
    		buildings
    		{
    		    monolith monolith2
            }
            monolith2, 		0, 	0, 	0, 	0		
        }
    5. Follow step 3. of complicated way:
    Code:
     data/text/ building_battle.txt
    {monolith1} My Monolith
    {monolith2} Again my Monolith
    6. Just like complicated way, add your entry to
    descr_building_battle.txt
    but no need to use the item “bardic_circle_barbarian” because you’re gonna use your brand new item “monolith1” and “monolith2”.
    Here it is:

    Code:
    monolith1
    {
        stat_cat large_stone
        localised_name monolith1
        level
            {
            min_health 1
            battle_stats
            item monolith1
            physical_info	monolith1_INFO.cas
            }
        transition default_large_stone
        level
        {
            min_health 0
            battle_stats
            item		roman_rubble_112x64
            physical_info	info_roman_rubble_112x64.cas
        }
    }
    
    monolith2
    {
        stat_cat large_stone
        localised_name monolith2
        level
        {
            min_health 1
            battle_stats
            item monolith2
            physical_info	monolith2_INFO.cas
        }
        transition default_large_stone
        level
        {
            min_health 0
            battle_stats
            item		roman_rubble_112x64
            physical_info	info_roman_rubble_112x64.cas
        }
    }
    Note that you keep using roman_rubble_112x64 as default transition item. If you are good, you’ll probably create some more ambient objects to fit the building stage / destroyed stage of your own building. Either, try to use some default item which have similar dimensions.

    7. Now you need to have the game creating the monolith items. To do so, you’ll need one more step then the complicated way. Open data\descr_items.txt and add your monolith entry as:
    Code:
    type		monolith1
    lod
    max_distance	4000.0
    model_rigid	monolith1_high.cas 
    
    type		monolith2
    lod
    max_distance	4000.0
    model_rigid	monolith2_high.cas
    This is the simplified version. You should actually have two or three cas files, high, med and low, to be used at different distances. That means you have to create three or more .cas files for each new building you create.
    But well, for now lets work with just the high one.

    8. Now again you have to get rid of the descr_items.db (backup, backup!) and start the game. Game shows errors, ctrl-alt-canc, kill it, restart it. You should have your buildings in the game.


    Now, there are about 1 million chances you’ll get errors. Trying to write a troubleshooting on this process is simply ridiculous, but let me share a few recurring problems:

    a) Game just does not load, no error messages – something is wrong in descr_settlement_plan.txt usually a not closed bracket or something similar.
    Game loads, you enter the campaign, no traces of your buildings in game – something wrong written in descr_items.txt or in descr_building_battle.txt
    Check if the game created the monolith1 and 2 items in data\items\ folder.
    b) Game loads, but when you go in tactical view, loading freezes – you missed adding the textures.
    c) All works, but your buildings are missing sides or show weird colors – 50% chances that the exporting procedure did not worked very well. It happens, export them again – no need to rebuild the db. The other 50% chances are – let me be rude – that you are a poor modeler.


    ***

    Have fun.
    Seth Krn3ll
    Last edited by Seth Krn3ll; April 05, 2011 at 04:36 PM.

  2. #2
    Lü Bu's Avatar "Mightyest Man Alive"
    Join Date
    May 2008
    Location
    Split,Croatia
    Posts
    5,332

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Usefull.Thanks!!
    Proud patron of Wlesmana
    Assyria Total War
    Check update thread for new HQ models
    My Workshop™


  3. #3

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Old, actually. I posted it in the Guild forums in 2008
    http://forums.totalwar.org/vb/showth...gs-to-the-game
    Just thought it may be useful here too.

    If I have time I'll write one on settlement modding too.

  4. #4
    Kylan271's Avatar Domesticus
    Join Date
    Jul 2007
    Location
    Vietnam
    Posts
    2,235

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Oh welcome back,yes I got your Guild one,and many thanks for that!

    I'll rep you for your work in this community,and to say thanks for your Guild work also.

    Got a 2nd level(town) equestion and missile building working and others now.

    1. Just not sure how to add more slots,seems about 5 or so free per building type,ie missile or temple etc. I used all the free slots(that is write over free unused slots) in missile and equestrian(5ish).
    2. Is there a reason the slots,ie missile etc are placed out of order,ie barb catapult range then roman archery range? Why not all building levels after the other,ie archery ranges then catapult ranges then siege engineers?
    3. I saw some slots with the curly brackets mixed up,that is a space missing,ie:
    Spoiler Alert, click show to read: 

    monolith1 { stat_cat large_stone localised_name monolith1 level { min_health 1 battle_stats item monolith1 physical_info monolith1_INFO.cas } transition default_large_stone level { min_health 0 battle_stats item roman_rubble_112x64 physical_info info_roman_rubble_112x64.cas } } monolith2


    I added a space where I can,but many I saw,will that cause problems in game?
    Last edited by Kylan271; March 26, 2011 at 04:31 AM.


  5. #5

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Quote Originally Posted by Kylan271 View Post
    (..)
    1. Just not sure how to add more slots,seems about 5 or so free per building type,ie missile or temple etc. I used all the free slots(that is write over free unused slots) in missile and equestrian(5ish).
    Wait, I'm not sure I get what you mean.
    Talking about adding slots to settlement_plans.txt file? There I saw no limits, you don't need "free" slots, you can add as many as you want. Just consider those two factors:
    a) if you want to use already set slots, replacing already vanilla buildings, then yes, you have just the number of those the game had in store.
    b) if you go on making your own slots like I did, then you have to check in the settlement plan where to put them, so to avoid having them on passages or other buildings or out of the walls. I usually make a settlement map in 3dsMax then work on it the areas where I'll set the slots. If you go that way, you can add and place as many slots as you like.

    Quote Originally Posted by Kylan271 View Post
    (..)
    2. Is there a reason the slots,ie missile etc are placed out of order,ie barb catapult range then roman archery range? Why not all building levels after the other,ie archery ranges then catapult ranges then siege engineers?
    I think the programmers had their orders in mind when they added them that way. But again, orders may be changed in time. probably they first ordered those slots in order of settlement level rather then race or building level. Moreover many features in many files have been dropped in next versions, so they remain as relics here and there. I personally made my own order of things to keep track of what I did, you shall make your one

    Quote Originally Posted by Kylan271 View Post
    (..)
    3. I saw some slots with the curly brackets mixed up,that is a space missing,ie:
    Spoiler Alert, click show to read: 

    monolith1 { stat_cat large_stone localised_name monolith1 level { min_health 1 battle_stats item monolith1 physical_info monolith1_INFO.cas } transition default_large_stone level { min_health 0 battle_stats item roman_rubble_112x64 physical_info info_roman_rubble_112x64.cas } } monolith2


    I added a space where I can,but many I saw,will that cause problems in game?
    I use to remove ALL spaces from everywhere, especially from text folder files. They always worked and they are much easier to check and manage at a look.

  6. #6
    Kylan271's Avatar Domesticus
    Join Date
    Jul 2007
    Location
    Vietnam
    Posts
    2,235

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Appreciated your reply.

    1. Yes the slots for existing vanilla buildings I was refering to in set_plans.txt..,I wanted to add more but did not know how? You have clarified that,but one thing left out,which I noted is the 'upgrading' as you start from a small slot to a large slot,ie: slot_upgrade_48x32_112x64_carthaginian. What are the rules for this?

    2. I wanted to organise the set_plan better as it looked messy,but was too afraid to adjust. I will rework it now you have pointed out that it doesn't cause problems.

    3. Having spaces around I thought caused probs,as in DMB. I know they have different programmers on this,as example from the various buildings and CA names mentioned. So I will try to clear this up also. It has not caused any CTDs etc with the space,but I will fix it to be safe,and looks neater.

    I do not have the knowledge of 3dsMax sorry,for reworkings the settlements,so have to stick with vanila slots to be safe.


  7. #7

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Quote Originally Posted by Kylan271 View Post
    1. Yes the slots for existing vanilla buildings I was refering to in set_plans.txt..,I wanted to add more but did not know how? You have clarified that,but one thing left out,which I noted is the 'upgrading' as you start from a small slot to a large slot,ie: slot_upgrade_48x32_112x64_carthaginian. What are the rules for this?
    Well, the settlements usually can grow up to bigger levels, and then some buildings shall be upgraded too. Given often the upgraded levels are more or less bigger then the lessen, the slot system is studied to place some "roomtaking" buildings in the slot's spot. When the building is done, if the upgrades are bigger, still some ambient buildings remains around to fill the area, until you upgrade the building and it occupies the slot completely. In the example you quoted, "slot_upgrade_48x32_112x64_carthaginian" is the area set where the given carthaginian building will grow up from its 48x32 model to its 112x64 upgraded model.


    Quote Originally Posted by Kylan271 View Post
    2. I wanted to organise the set_plan better as it looked messy,but was too afraid to adjust. I will rework it now you have pointed out that it doesn't cause problems.
    3. Having spaces around I thought caused probs,as in DMB. I know they have different programmers on this,as example from the various buildings and CA names mentioned. So I will try to clear this up also. It has not caused any CTDs etc with the space,but I will fix it to be safe,and looks neater.
    Yep, I did it with most files in the first year of modding RTW. Some of them works fine, some made troubles. Only suggestion I shall give you on such field is to test them each time you change something and ALWAYS keep some older version of your files, to be sure not to leave around some maybe little typo problems like deleting inadvertently a bracket and then having to restart the whole work when you can't find the problem.

  8. #8
    DAVIDE's Avatar QVID MELIVS ROMA?
    Join Date
    Nov 2005
    Location
    ITALIA
    Posts
    15,811

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    So if i want to change a Roman house, i should start reading from here? b.2) – Using brand new models

  9. #9

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Quote Originally Posted by davide.cool View Post
    So if i want to change a Roman house, i should start reading from here? b.2) – Using brand new models
    Nope, ambient buildings are way easier to add to the game.
    I wrote down and posted a full new chapter to the tutorial to get into ambient buildings specifically, check it out.

  10. #10
    DAVIDE's Avatar QVID MELIVS ROMA?
    Join Date
    Nov 2005
    Location
    ITALIA
    Posts
    15,811

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    mmm i dont understand, where the new model and texture go? which folder? you forgot to mention this

  11. #11
    Remlap's Avatar Lag Slayer
    Join Date
    Jul 2008
    Location
    Florida
    Posts
    5,564

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Quote Originally Posted by davide.cool View Post
    mmm i dont understand, where the new model and texture go? which folder? you forgot to mention this
    Textures go into the usual building texture folder, you need to make a new folder in models_building called models_walls

  12. #12
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,991

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Well, the settlements usually can grow up to bigger levels, and then some buildings shall be upgraded too. Given often the upgraded levels are more or less bigger then the lessen, the slot system is studied to place some "roomtaking" buildings in the slot's spot. When the building is done, if the upgrades are bigger, still some ambient buildings remains around to fill the area, until you upgrade the building and it occupies the slot completely. In the example you quoted, "slot_upgrade_48x32_112x64_carthaginian" is the area set where the given carthaginian building will grow up from its 48x32 model to its 112x64 upgraded model.
    I'm not sure if ambients occupy the area automatically or if you have to define what's around it. The slots are predetermined sizes in which you place buildings, underlays, overlays, floors, ambients etc that change as building up grades. But I believe you have to define everything that exists in them. The game wont just add ambients if a model placed in it is too small.

    There is a base level coding for what you see when no building exists. As well as a transition of what you see when a building is being built.

    These are located in descr_settlement_plans.txt and are fairly easy to figure out.


    Code:
    MYHOUSE
        {
            stat_cat large_stone
            localised_name ambient
            level
            {
                min_health 1
                battle_stats
                item MYHOUSE.cas
                physical_info info_roman_small_temple.cas
    Just an FYI to avoid confusion. The name used in the item bit there comes from what ever name you give the building in descr_items.txt in the 'type' section, so you would not want to have the .CAS bit.

    Thanks for sharing all your info here Seth Krn3ll
    Last edited by Ramashan; April 05, 2011 at 01:11 PM.
    Under the Patronage of Lord Condormanius

  13. #13

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Quote Originally Posted by davide.cool View Post
    mmm i dont understand, where the new model and texture go? which folder? you forgot to mention this

    O well, wasn't that hard to figure out
    Fixed anyway.

    Put your "MYHOUSE.cas" model in Data\models_building and if it uses new textures put them in Data\models_building\textures.

  14. #14

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Quote Originally Posted by Ramashan View Post
    I'm not sure if ambients occupy the area automatically or if you have to define what's around it. The slots are predetermined sizes in which you place buildings, underlays, overlays, floors, ambients etc that change as building up grades. But I believe you have to define everything that exists in them. The game wont just add ambients if a model placed in it is too small.
    Of course not.
    Even if some slots makes use of sub-slots, so they will actually fill the area when the level tells the engine there's free room around. But again, those sub-slots are as well set up in descr_settlement plan and called in in the level of the building slot, so you can mod or simply delete them at ease.

    Quote Originally Posted by Ramashan View Post
    (..)Just an FYI to avoid confusion. The name used in the item bit there comes from what ever name you give the building in descr_items.txt in the 'type' section, so you would not want to have the .CAS bit.
    Yep, my mistype, fixed.
    Thanks for pointing it out.

  15. #15

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Quote Originally Posted by Remlap View Post
    Textures go into the usual building texture folder, you need to make a new folder in models_building called models_walls
    Why?
    "models_walls" folder isn't needed to manage ambient or game buildings. In this tutorial I do not talk at all about walls

  16. #16

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    How Can I know the settlement coord for add the buidings??

    Thanks

  17. #17

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Quote Originally Posted by SakyaIllidan View Post
    How Can I know the settlement coord for add the buidings??

    Thanks
    I think there may be some tools around to help you in the procedure, you may try to search them with keywords on RTW modding sites. My way is always the basic one: In the rare cases when i do not work on my own custom sets, I import the .cas file of the underlay for the given set into a 3d editor and check there. Beware that (at least with 3dmax) the coords may be 180 degrees rotated (e.g. both voords must have the opposite "-" value added).

    There is one other tool I use sometimes, its the Settlement exporter by SigniferOne. It can be useful to trace some objects' coords at once after you put them in your 3dmax model.
    -> DOWNLOAD LINK

  18. #18
    michell's Avatar Tiro
    Join Date
    May 2008
    Location
    Gdańsk - Poland
    Posts
    283

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Hi
    How to add some special buildings for only one city? For example I want add Lucullus Gardens (not to build - it should be at the map from beginning) to Rome and give it +10 to happiness. Thanks for answers

  19. #19

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Quote Originally Posted by michell View Post
    Hi
    How to add some special buildings for only one city? For example I want add Lucullus Gardens (not to build - it should be at the map from beginning) to Rome and give it +10 to happiness. Thanks for answers
    Its pretty easy.

    First thing you have to create the entry for that building - to do so follow the tutorial at point
    a) ADDING A NEW BUILDING TO THE GAME
    and if you also want it to have a custom 3D model follow the next chapter of the tutorial.

    In the procedure, when you come to the point of adding the entry in the EDB file you'll have to add to it the happiness bonus you want it to give. Right there you can also add a hidden resource requirement which will be necessary to have it buildable. Then you'll give that hidden resource to the given settlement(s) you want to have that chance in descr_regions.txt.

    Sounds complicated? It really isn't, lets see that step by step:

    In EDB file first thing you have to add the hidden resource in the starting line, along after the other resources, this way:

    Code:
    hidden_resources sparta, rome, italy, MyNewBuildingHiddenResourceName
    Then the EDB entry for your new building to give the happiness bonus should look like this one:

    Code:
    building MYNewBuildingTypeName 
    {
        levels MyNewBuildingLevelName
        {
            MyNewBuildingLevelName requires factions { name_of_faction(s)_you_want_to_have_it } and hidden resource MyNewBuildingHiddenResourceName
            {
                capability
                {
                    happiness_bonus bonus 10
                }
                construction 1 
                cost 400 
                settlement_min town
                upgrades
              }
        }
        plugins 
        {
        }
    }
    Then you should open descr_regions.txt and find the region where the settlement you want to have that building is located and add there the hidden resource to make it available:

    Code:
    RegionName	 
    	SettlementName
    	germans
    	Bandits
    	246 150 121
    	MyNewBuildingHiddenResourceName
    	5
    	7
    If you want it to be present from start of the game in a specific settlement, you just have to open descr_strat.txt, find the settlement where you want it to be present and add it to the list of present buildings, this way:
    Code:
    	building
    	{
    		type MYNewBuildingTypeName MyNewBuildingLevelName
    	}
    Here I just outlined the specific sets for your needs, but remember to follow all the other steps of the tutorial or your building may not work.

  20. #20
    michell's Avatar Tiro
    Join Date
    May 2008
    Location
    Gdańsk - Poland
    Posts
    283

    Default Re: Krn3ll Guide to add brand new buildings to RTW 1.5

    Thanks for help

Page 1 of 2 12 LastLast

Posting Permissions

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