Page 1 of 5 12345 LastLast
Results 1 to 20 of 95

Thread: Comprehensive Overview of the Building System - Now with tutorial

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Comprehensive Overview of the Building System - Now with tutorial

    Contents




    Terminology


    • Structure: Definition of a group of attributes that comprise one building (eg. Cattle Pens)
    • Subchain: A single upgrade path within a chain (eg. Cattle subchain)
    • Instance: A group of one or more upgrade paths within a chain
    • Chain: A group of subchains originating from a primary structure for a faction/culture (eg. Farming Chain)
    • Superchain: Grouping of chains that share attributes from any culture/faction group


    Table Structure





    Tables Detailed

    Building_superchains
    • Defines a group of chains that share attributes across cultures/factions. Defines what structures you can convert something to when capturing buildings from another subculture
    • maxinstances_per_region column may be unused.


    Building_chains
    • Defines the primary structure in a group of structures for a culture/faction that all other structures branch off from
    • Sets category of chain and ties it to a superchain.


    Building_levels
    • Defines all the individual structures that can be built.
    • Key attributes such as chain, building level, cost to build, turns to build, faction unique, required resources, and instance defined here
    • Possible further options that aren’t currently in use (upkeep cost, demolition cost, wealth growth, …)


    Building_chain_availabilities

    • Defines which cultures have use of this chain
    • Optional fields for subcultures or factions as well


    Building_chain_availability_sets
    • Usage unknown


    Building_set_to_building_junctions
    • Defines what set each chain or structure belongs to (agriculture, city, industry, port, religion, sanitation, ...)
    • Optional entry for a specific structure to be part of a different set


    Cai_construction_system_buildings_values
    • Used by the AI so it knows how to build things


    Building_effects_junction
    • Defines what effects a building will have when constructed (income, growth, etc.)
    • Values for each effect can be set for when the structure is damaged or ruined also


    Building_level_required_technology
    • Defines technological requirements for a structure to be built
    • All pre-requisite technologies must be listed, not just the technology which unlocks the structure


    Building_units_allowed
    • Defines units that can be recruited if the structure is present
    • Experience column appears to be unused


    Building_level_armed_citizenry_junctions
    • Defines the garrison group granted by the structure being present in a region
    • Referenced unit groups defined in armed_citizenry_groups


    Building_upgrades_junction
    • Defines the links between structures in a chain
    • Allows for branched chains (you can have two or more structures as upgrades at any level, not just from the first)
    • Links do not have to be to consecutive structure levels. Useful for controlling structure conversion.


    Building_cultural_variants
    • Defines which cultures are allowed to use this structure
    • Sets icon to be used by building (referencing ui/buildings/*.png)
    • Optional column to restrict structure to subcultures or faction


    Building_instances
    • Defines groupings of sub-chain by type
    • Group membership defined in building_levels
    • Can be used for subchain mutual exclusivity of subchains or to allow multiple structures from a single subchain (neither used in vanilla)


    Campaign_settlement_display_buildings
    • Defines the model which will be displayed once a structure is complete
    • References key defined in campaign_display_building_ids, not the structure id (although they can be the same id


    Building_sets
    • Define broad categories of buildings
    • Used to set which buildings are affected by certain effects (effects defined in effect_bonus_value_building_set_junctions)


    Building_chain_availability_sets_ids
    • Usage unknown


    Building_culture_variants.loc
    • Structure name
    • Key format: building_culture_variants_name_<building id><culture id><subculture id>
    • Leave culture/subculture blank if not included in the entry in the building_culture_variants db table.


    Building_short_description_texts.loc
    • Short sentence describing structure
    • Key defined in building_culture_variants with the format: building_short_descriptions_texts_short_description_<key>


    Building_flavour_texts.loc
    • Long descriptions typically noting historical background. Shows up in the event message when structure is completed
    • Key defined in building_cultural_variants with the format: building_flavour_texts_flavour_<key>


    Campaign_settlement_display_building_ids
    • Defines the link between structure keys and the display keys for buildings on the strategic map
    • Structure key can be the same as the model key


    Campaign_settlement_display_building_construction
    • Entries required to enable animations for construction and dismantling
    • References model key, not structure key
    Last edited by crzyrndm; April 20, 2014 at 05:59 PM.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  2. #2
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Comprehensive Overview of the Building System

    Creating a new structure for an existing subchain
    Spoiler Alert, click show to read: 

    To create an entirely new structure for an existing chain, you need the table Building_levels and most of its dependencies (everything down to Campaign_settlement_display_building_construction) in your pack file. Effects, technology, units, and armed citizenry are optional depending on what you wish the structure to do, but if you're making more than one building, its better to grab them all at once anyway.

    Therefore your Building_mod.pack should start with the following tables:
    Spoiler Alert, click show to read: 



    Building_levels:
    Spoiler Alert, click show to read: 

    The first step in defining a new structure is to define its basic attributes and give it a name that we can reference it with (AKA a key). I've chosen to add a fifth level to the hellenic major city line using the key: rom_HELLENIC_city_major_5_Crzy

    As with most of this particular tutorial, cloning the row the official entry for the structure I wish to precede my one is the fastest way to get things done, in this case rom_HELLENIC_city_major_4, changing the levelname column to my new key, adding 1 to the level column, and changing the uniqueindex column to a unique value. You can also set a different createtime and createcost at this point, but it isn't neccesary to obtain a functioning structure.


    Building_upgrades_junction:
    Spoiler Alert, click show to read: 

    Next up is linking your new structure to the building you upgrade it from. Simply put the previous structure in the from column (in my case: rom_HELLENIC_city_major_4) and your new structure in the to column (rom_HELLENIC_city_major_5_Crzy).


    Building_culture_variants:
    Spoiler Alert, click show to read: 

    The final table required to get your structure to show ingame, once again cloning the previous building in the chain keeps headaches to a minimum. The important columns here are icon, shortdescription, and flavour. Icon is the name of a .png image with set parameters that will show in the UI whenever this structure is built, and the other two reference textual descriptions from the loc files that we will add later. If you cloned the row, you only need to change the building key to your new structure (rom_HELLENIC_city_major_5_Crzy) to get a working (if useless) version of your structure to show ingame. Yay


    Campaign_settlement_display_buildings:
    Spoiler Alert, click show to read: 

    Without the entry in this table, when your new building is constructed, it'll leave a large round hole in your settlement on the campaign map . However the keys it uses aren't those of our structure, we have to go to the table campaign_settlement_display_building_ids and make the link between our strucure key and the model key. It just so happens that the simplest method is to make both keys exactly the same (after cloning the previous structure again to fill the other columns).
    keybuildinglevel_keycultureunknownsprawlpiece_levelsprawlpiece_typeunknown7
    rom_HELLENIC_city_major_5_Crzyrom_HELLENIC_city_major_5_Crzy<blank>0


    Back in Campaign_display_buildings, once again clone the entry for the previous structure, change the key column to something unique, and displaybuilding column to the id you just defined.
    keybuildingpathdisplaybuilding_key<unknownX>
    50000RigidModels\...\greek_city_major_4.rigid_model_v2rom_HELLENIC_city_major_5_Crzy<leave blank>


    Finally, to enable the crane animations during construction and dismantling, go to campaign_settlement_display_building_construction, clone any 2 rows, give them a unique id, make sure one has "default" and the other "dismantle" in the constructiontype column and change the displaybuildingkey column to the id you defined.
    idbuildingpathconstructiontypedisplaybuilding_keyphasephase6
    70001RigidModels\...\building_construction_anim.rigid_model_v2defaultrom_HELLENIC_city_major_5_Crzy00
    70002RigidModels\...\building_construction_anim.rigid_model_v2dismantlerom_HELLENIC_city_major_5_Crzy00


    Now your new structure has a model on the campaign map (for now, it will be the same as the previous level unless you have a compatible model to add in Campaign_display_buildings)


    Buildings_level_required_technology:
    Spoiler Alert, click show to read: 

    This table sets the level of technological advancement required before this building is elegible for construction. Very simple table, building key in the first column, technology requirements in the second column. Note that it is preferable to have all previous tech requirements, not just the one that finally unlocks the structure.
    As my mod is for testing purposes, I wont be using this table


    Building_effects_junctions:
    Spoiler Alert, click show to read: 

    Time to make our building a little more useful. Effects defined here are things like a set income, % bonus to income, food, squalor, and the like. This table doesn't control garrisons or recruitment.

    The table is fairly self explanatory. The first column is your structure key, second column is the key for the effect you want to give th structure (for a complete list of available effects, see effects_tables in data_rome2.pack), the third column describes how widly the effect will be applied, and the last three set the value for when the structure is in its default state, damaged, or completely ruined respectively.

    I gave my city center structure just a single effect, a flat income increase of 3000 through subsistence (500 when damaged, 0 when ruined) with the following entry:
    buildingeffecteffectscopevaluevaluedamagedvalueruined
    rom_hellenic_city_major_5_Crzyrom_building_gdp_subsistencethis_building30005000



    Building_units_allowed:
    Spoiler Alert, click show to read: 

    This table sets which units can be recruited once construction is completed.

    Only the effects of 4 columns in this table are known at this time, and they are the key (unique id number), building id (column building), unit id (column unit), and the experience the recruited unit will begin with (column XP).

    Again, I'm only adding a single unit to my structure, Royal Peltasts starting with 3xp with the following entry:
    keybuildingunitXPenabledunknown6enabled7enabled8
    70020rom_HELLENIC_city_major_5_CrzyGre_Royal_Peltasts3FALSE0FALSEFALSE



    Building_level_armed_citizenry_junctions:
    Spoiler Alert, click show to read: 

    This table controls the garrison groups that will spawn if a settlement with this structure is attacked. Many pre-defined garrison groups are already defined in the armed_citizenry_unit_groups table, or you can create your own group using the armed_citizenry_units_to_unit_groups_junctions table.

    The table comprises of 4 columns, a key (column id), building id (column buildinglevel), an unknown value, and the unit_group to be spawned (column unitgroup)

    I'm going to add some decent melee units to my structure using the rom_hellenic_strong_melee unit group with the following entry
    keybuildinglevelunknown3unitgroup
    70030rom_HELLENIC_city_major_5_Crzy0rom_hellenic_melee_strong



    With our new structure functioning in a useful manner, it's time to add the appropriate UI elements to finish it off

    building_culture_variants.loc:
    Spoiler Alert, click show to read: 

    This controls the name your structure will display. The format for the key (column Tag) in this table is: building_culture_variants_name_<building id><culture id><subculture id><faction id> (subculture/faction only required if those fields are not blank in the culture_variants table)
    TagLocalised String
    building_culture_variants_name_rom_HELLENIC_city_major_5_Crzyrom_HellenisticTest City



    building_short_description_texts:
    Spoiler Alert, click show to read: 

    Controls the little short piece of text that sits under the name. The format for the key in this table is: building_short_description_texts_short_description_<key defined in short description column of culture_variants table>
    Taglocalised string
    building_short_description_texts_short_description_twr2_rome_greek_Test_shortTest town description



    building_
    flavour_texts:
    Spoiler Alert, click show to read: 

    I'm not entirely sure where this shows up ingame, but it's typically used for several sentences describing the function of the structure. Key format: building_flavour_texts_flavour_<key defined in flavour column of culture_variants table>

    Since I dont know where this shows up, I haven't bothered with an entry for testing purposes.
    TagLocalised String



    Icon:
    Spoiler Alert, click show to read: 

    The final object required to complete your new structure is a new icon for the UI. This must be a 66x66 pixel PNG image a filename exactly the same as the text in the icon column in the culture_variants table.

    Add it to your pack with the filepath: ui/buildings/icons/<filename>.png


    And thats all folks. Go take your new building for a spin, because it's now complete
    Spoiler Alert, click show to read: 



    EDIT

    Credit to Xil0 for this important detail, the tables which the AI needs to use your new structure

    cai_base_building_context_values
    Spoiler Alert, click show to read: 

    Clone a row, put in the key of your new structure.


    cai_construction_system_building_values
    Spoiler Alert, click show to read: 

    If you are adding a structure to the end of an existing subchain, find the key of the existing structure and replace the building_range_end_inclusive column with your structure. If you have created a branched sub chain, you will need to clone a row, and then replace the same entry as before with your new building.


    Creating a new subchain
    Spoiler Alert, click show to read: 

    Creating a new subchain or upgrade path is very simple, involving only 2 basic steps.
    1) Creating a new subchain key, otherwise known as a building instance (you can also use an existing key, but I'll explain that later. Under most circumstances you will need a new key)
    2) Linking 1 or more structures together to form the upgrade path of the subchain, much as you did to add a new structure to an existing subchain.

    building_instances
    Spoiler Alert, click show to read: 

    A very simple table, comprising of a key and an integer.

    The key has the format <chain>_<instance> unknown, so the food instances of the port chain will use the key rom_Port_Food while the economic instance uses the key rom_Port_Trade. For this example, I'm going to be making a new port subchain, so I add the key: rom_Port_Crzy

    The integer is the number of subchains from this group that can be built in a single region (1 city). In vanilla, this is set at 1 and used so that you cant build 3 cattle fams in a single region, and this is also how it shouls normally be used to create a new subchain (ie. 1 is a good value almost all the time). The interesting part of this is that multiple subchains can exist under a single instance which means if you put 2 subchains under an instance with a 1 in the limit column, only 1 of those subchains can be constructed in any region. This is how you can create mutually exclusive subchains and under this cicumstance you will be reusing an existing instance key.


    building_upgrades
    Spoiler Alert, click show to read: 

    Same as before, link the primary structure to the first of your new structures, then the first to the second and so on


    And now we have a new subchain
    Spoiler Alert, click show to read: 

    Adding to the major Roman port

    Or download the buildings_subchains.pack attachment below to see it yourself


    Creating a new building chain
    Spoiler Alert, click show to read: 

    Creating a new chain requires 4 steps
    1) Declaring the new chain, setting it's category and tying it to a superchain
    2) Setting which culture/subculture/factions can use buildings in this chain
    3 & 4) Some mess which CA just introduced with no apparent current use

    building_chains
    Spoiler Alert, click show to read: 

    3 important columns in this table. The key is the internal name for the new chain, and must be unique. The chain category looks to be used mostly by the AI functions, and has three used categories (military, happiness, money). The building superchain column ties it to the next step up the ladder, assigning the slot to be used by buildings in the chain.

    My entry for a new equipment chain is as follows
    keytech_category_tabtech_category_tab3chain_categoryin_encyclopediabuilding_superchain
    Crzy_Equipment_Chain<empty><empty>militaryFalserom_MilitaryEquipment



    building_chain_availabilities
    Spoiler Alert, click show to read: 

    A shorterned version of building_culture_variants, buildings using this chain must match these entries in both tables.
    idbuilding_chainculturefactionsub_culturecampaign
    30000Crzy_Equipment_Chainrom_Roman<empty><empty><empty>



    building_chain_availability_sets_ids
    Spoiler Alert, click show to read: 

    There is no apparent use for the chain sets yet, so just give it whatever name you want (I like CA's method of giving the same id as the chain to prevent mixups)
    key
    Crzy_Equipment_Chain



    building_chain_availability_sets
    Spoiler Alert, click show to read: 

    Linking the set to a building chain. As yet unknown use
    chainSet
    Crzy_Equipment_ChainCrzy_Equipment_Chain



    NOTE: The first building in a chain must be set to level 0 in the building_levels table


    Creating a new building superchain
    Spoiler Alert, click show to read: 

    Two final simple tables and then you can do whatever you want with your buildings

    building_superchains
    Spoiler Alert, click show to read: 

    Simple key declaration table, max_instances column appears to be unused (leave it at 1 as a default)
    keymax_instances_per_region
    rom_Equipment_Crzy1



    slot_template_to_building_superchain_junctions

    Spoiler Alert, click show to read: 

    Sets whether structures using this superchain are built in the first slot (primary), the optional dock slot, or the generic secondary slots, and whether it is available in major or minor settlements. Multiple entries can be used to give access to several slots (eg. using both major and minor secondary slots allows for chains that can be used in both major and minor towns)

    idbuilding_superchainslot_template
    72000rom_Equipment_Crzyrom_minor_secondary

    Last edited by crzyrndm; April 14, 2014 at 03:28 AM.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  3. #3
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Comprehensive Overview of the Building System

    Reserved for unforseen requirements

    As always, comments, corrections, and additional information are welcomed
    Last edited by crzyrndm; October 24, 2013 at 07:36 PM.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  4. #4

    Default Re: Comprehensive Overview of the Building System

    huzzah thank you very much for this

    Edit: having trouble locating the Campaign_display_buildings and Campaign_display_buildings_ids iv got the all the other tables but thos are they in a different .pack from the others. Here is what i have so far testbuilding.pack as far as tables go but i know im missing thos above
    Last edited by Regoso; October 24, 2013 at 11:35 PM.

  5. #5
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Comprehensive Overview of the Building System

    Added tutorial for creating a new structure for existing chain including example pack with completed new building (and edited pre-requisites so you can reach it in 4 turns.)
    Quote Originally Posted by Regoso View Post
    huzzah thank you very much for this

    Edit: having trouble locating the Campaign_display_buildings and Campaign_display_buildings_ids iv got the all the other tables but thos are they in a different .pack from the others. Here is what i have so far testbuilding.pack as far as tables go but i know im missing thos above
    Woops, typo! It's Campaign_settlement_display_buildings
    Last edited by crzyrndm; October 25, 2013 at 02:30 AM.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  6. #6

    Default Re: Comprehensive Overview of the Building System

    Quote Originally Posted by crzyrndm View Post
    Added tutorial for creating a new structure for existing chain including example pack with completed new building (and edited pre-requisites so you can reach it in 4 turns.)

    Woops, typo! It's Campaign_settlement_display_buildings
    ah ok i was like ..... they must be somewhere WHY CAN I NOT FIND THEM!!!

  7. #7

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Nice. I have a question though: Say i want to make a series of temples for the Afro-Arabian factions (and i do) when i specify that that chain of buildings is for that subfaction will it still allow those factions to build the normal set of eastern temples? If so then how can i stop that so that the Afro-Arabian factions can only build the A-A temples?

  8. #8
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    The easiest way to restrict a structure is through the cultural variants table. Instead of giving the temple to all eastern factions, make multiple entries using subculture restrictions (remember to add keys in the culture_variants.loc as well) for both Eastern and Parthian sub culture (the other two which fall under eastern culture). I dont think CA included a simple way to exclude​ a chain from a faction or sub culture.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  9. #9

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Hmm.. i'm running into problems somewhere, but i'm not sure what it is. Game won't load to the Sega screen.

    All i've done is copied the default eastern temples and renamed them and made them sub-culture specific. Would you mind taking a look to see if i'm missing something?

    http://www.mediafire.com/?a6oj6vbz6ozzxno

  10. #10
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Renaming the one you want everyone else to have wasn't neccesary (you've now got a bunch of references to structures that don't exist). Just clone the row and add the two subculture references.
    Last edited by crzyrndm; October 27, 2013 at 04:27 PM.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  11. #11

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Quote Originally Posted by crzyrndm View Post
    Renaming the one you want everyone else to have wasn't neccesary (you've now got a bunch of references to structures that don't exist). Just clone the row and add the two subculture references.
    I only renamed the African-Arab specific temples though (because i had to switch what culture they boosted)

  12. #12
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Quote Originally Posted by Threadoflength View Post
    I only renamed the African-Arab specific temples though (because i had to switch what culture they boosted)
    A) You shouldn't be renaming any vanilla buildings if you want other cultures to keep using them. You only need to add the entries to restrict them by sub-culture (you seem to have done this with the imperial chains).
    B) You shouldn't be touching the very bottom level building at all. You've renamed the structure which defines a superchain, which means you've got 2 buildings trying to start the same superchain. What you want to do is include your new chain as part of an existing super-chain (african nations wont see the standard eastern structures becuase they don't meet the sub-culture requirement)

    Here's what you need to do:
    1) Clone the current temple chain you don't want the african subculture to have in cultures_subcultures, and restrict it to the other eastern subcultures.
    2) Restrict your new chain to the african subculture.
    3) Tie your new chain to the first level temple structure (individual chains start from the second level, not the first)

    Don't go doing that all at once either, stop every few steps and make sure its working before continuing. It's much harder to debug all your changes at once, instead of 1-2 tables (you should also check your new chain by just tying it onto an existing one, like I did with the single structure in the OP to make sure all your structures are functioning)
    Last edited by crzyrndm; October 28, 2013 at 01:24 AM.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  13. #13
    Caki's Avatar First Consul of Thera
    Join Date
    May 2007
    Location
    Negotin, Serbia
    Posts
    655

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Do you know maybe is it possible to make a Hellenic building also buildable by Romans? If so what should I change?
    Proud To Be Under The Patronage Of TheFirstONeill
    Proud team member of Thera, A New Beginning

  14. #14

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Thanks for this... although I wish I saw it earlier before I spent about a week of trial and error figuring out how to add new buildings to the game lol.

  15. #15
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Quote Originally Posted by Xil0 View Post
    Thanks for this... although I wish I saw it earlier before I spent about a week of trial and error figuring out how to add new buildings to the game lol.
    No problem
    Quote Originally Posted by Caki View Post
    Do you know maybe is it possible to make a Hellenic building also buildable by Romans? If so what should I change?
    Clone the rows in culture_variants, change it to Roman culture (remembering the .loc that links to it)

    Building_Upgrades to link it to an existing roman building

    That should be all thats required
    Last edited by crzyrndm; October 31, 2013 at 03:37 AM.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  16. #16
    Caki's Avatar First Consul of Thera
    Join Date
    May 2007
    Location
    Negotin, Serbia
    Posts
    655

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Hmm I must be doing something wrong because I can't get it to work. Could you please do an example and let me download it so I could figure it out. If not then no worries you already helped enough whit this tutorial. Thanx
    Proud To Be Under The Patronage Of TheFirstONeill
    Proud team member of Thera, A New Beginning

  17. #17
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Working on examples for chain and super chain creation right now. Everything going to plan I should have both working and written up by tomorrow evening.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  18. #18

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Quote Originally Posted by crzyrndm View Post
    Working on examples for chain and super chain creation right now. Everything going to plan I should have both working and written up by tomorrow evening.
    Cant wait.. Chain creation Ive got down.. but everytime I try to create a new super chain I never load to the Sega screen. I've tried everything I can think of. Thx!

  19. #19
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Quote Originally Posted by Xil0 View Post
    Cant wait.. Chain creation Ive got down.. but everytime I try to create a new super chain I never load to the Sega screen. I've tried everything I can think of. Thx!
    Heh, I may actually be the cause of your difficulties due to a misunderstanding of what chains/superchains actually are.

    My initial definition of a chain is actually that of building_instances. An instance or sub-chain type is a grouping within a chain ie. rom_Port_Food for ports that focus on food over military or wealth.
    A chain is a culture/faction specific grouping of structures that originate from a singular primary structure (original definition for superchains)
    A Superchain is a group of chains that have similar characteristics across cultures and factions. Used primarily for setting up the links between a slot (name of the points where you can build a structure in each city) and groups of structures. Messing with these is probably unnecesary.

    This makes creating a new sub chain (previously chain) a very simple affair requiring only these three tables: (roughly, if you want to do it properly you need a new instance as well)

    All that is required is matching the instance and chain (you cant have the instance pointing to a city type and the chain to a port) and linking the structures together in building_upgrades.

    One of the interesting possibilities that instances creates is that in a region you can set how many structures of that instance can be built. In vanilla, this is used to keep you to only one of each specific type of structure per region (one cattle farm for example), but you could also do multiple upgrade paths under the same instance and make exclusive structures (if you have one, you cant have the other)
    Last edited by crzyrndm; November 01, 2013 at 01:34 AM.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  20. #20
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Comprehensive Overview of the Building System - Now with tutorial

    Quote Originally Posted by Xil0 View Post
    everytime I try to create a new super chain I never load to the Sega screen. I've tried everything I can think of. Thx!
    Looks like this will have to wait another day, life kinda happened and I never really got a chance to dig into whats happening with this.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

Page 1 of 5 12345 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
  •