Results 1 to 16 of 16

Thread: General Modding Question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default General Modding Question

    Hey all,

    I am making a submod for another Mod. I'd like to implement the "choose your administration" dichotomy to it, but I can't figure out how you made the buildings mutually exclusive. Did you use the - temple feature? How did you make it so that both the admin and the temples can exist alongside each other?

    Thanks j advance

  2. #2

    Default Re: General Modding Question

    Simpler than that, every factional government is its own building tree, available only to that faction (and exclusive of both Allied Government and Rebel ones). Then the Allied Governments bar all other types in the building requirements line.

  3. #3

    Default General Modding Question; Electric Bogaloo

    Hey all,

    Reposting my question here for visibility.

    I would like to copy the Conquest > Oligarchy >or> Democracy system of EB 2 in another Mod.

    How can I make it so that you build the initial building and then have to CHOOSE an upgrade that negates the other option?

    How does EB2 do it?
    Does it use the - temple feature?
    How can the *Administration* chain and the *Temple* chain both exist without influencing each other?
    Is there maybe a script I could copy?

    Thanks in advance!

  4. #4
    Lusitanio's Avatar Campidoctor
    Join Date
    Jan 2018
    Location
    Portugal
    Posts
    1,530

    Default Re: General Modding Question; Electric Bogaloo

    You should look at the export_buildings text file to see how the allied government building line works.

  5. #5

    Default Re: General Modding Question

    I see... sorry, I might be a bit slow on the uptake... what do you mean by "exclusive of both Allied Governments and Rebel ones"?

  6. #6

    Default Re: General Modding Question

    Merging these threads, because they're the same topic and aren't bugs.

    Quote Originally Posted by Domeric_Bolton View Post
    I see... sorry, I might be a bit slow on the uptake... what do you mean by "exclusive of both Allied Governments and Rebel ones"?
    There are three types of government building in EBII. Factional governments - one per faction (and exclusive to that faction only). Allied governments everyone (but the Rebels) can build. Rebels have their own governments, which are the third type. All of them are mutually exclusive, you cannot build one if another is present.

    There's also a script which removes any instance of a "foreign" factional government on conquest, to stop new options being blocked for the AI conqueror (because the AI never destroys anything).

    Quote Originally Posted by Domeric_Bolton View Post
    Hey all,

    Reposting my question here for visibility.

    I would like to copy the Conquest > Oligarchy >or> Democracy system of EB 2 in another Mod.

    How can I make it so that you build the initial building and then have to CHOOSE an upgrade that negates the other option?

    How does EB2 do it?
    Does it use the - temple feature?
    How can the *Administration* chain and the *Temple* chain both exist without influencing each other?
    Is there maybe a script I could copy?

    Thanks in advance!
    If you want to do it that way, they'd have to be part of the same building tree, which would limit you to 1 "precursor" plus up to 8 "branches".

    So you'd have your initial level, an upgrade path each (ie you fork) to the first level of Oligarchy/Democracy, and each of those can upgrade to the next level of their successor.

    Note you need to move the recruitment away from the first (and possibly second tier) if you don't want the AI to build only those, if it's a universally-available building.
    Last edited by QuintusSertorius; August 16, 2019 at 11:17 AM.

  7. #7

    Default Re: General Modding Question

    Right, but how (And I realise I might seem actually retarded) do I make it so that of the second tier only *ONE* can be built?

    I don't know how I can make the second tier (I.e. the fork) be on the same level. Right now, one of the buildings is always automatically not the *ALSO SECOND TIER* but becomes the *THIRD TIER* .

    I really don't know how to articulate this better as a non native speaker.

  8. #8

    Default Re: General Modding Question

    I am confused. Being in the same building tree should make them mutually exclusive. You can only have one level of a tree at any given time.

    Are you trying to restrict it to only one of that second tier building for the whole faction?

    Post your code in [ CODE ] tags.
    Last edited by QuintusSertorius; August 16, 2019 at 04:17 PM.

  9. #9

    Default Re: General Modding Question

    Code:
    building barding_taxation
    {
     levels barding_taxation noble_administration guild_administration
     {
      barding_taxation requires factions { scotland, }
      {
       capability
       {      
        recruitment_slots 1  requires factions { scotland, }        
       }
       material wooden
       construction  4
       cost  3250
       settlement_min village
       upgrades
                {
      noble_administration requires factions { scotland, }
      guild_administration requires factions { scotland, }
                }
            }
      noble_administration requires factions { scotland, }
      {
       capability
       {      
        recruit_pool "Dale Medium Billmen"  1   0.1   2  0  requires factions { scotland, }  and region_religion northmen 25 and hidden_resource grassland or hidden_resource forest
        recruit_pool "Dale Medium Billmen"  0   0.06   1  0  requires factions { scotland, }  and region_religion northmen 25 and hidden_resource desert or hidden_resource mountains    
        recruit_pool "Barding Marksmen"  1   0.1   2  0  requires factions { scotland, }  and region_religion northmen 65 and hidden_resource grassland or hidden_resource forest
        recruit_pool "Barding Marksmen"  0   0.06   1  0  requires factions { scotland, }  and region_religion northmen 65 and hidden_resource desert or hidden_resource mountains
        recruit_pool "Dale Cavalry"  1   0.1   2  0  requires factions { scotland, }  and region_religion northmen 25 and hidden_resource grassland
        recruit_pool "Dale Cavalry"  1   0.06   1  0  requires factions { scotland, }  and region_religion northmen 25 and hidden_resource forest
        recruit_pool "Dale Cavalry"  0   0.04   1  0  requires factions { scotland, }  and region_religion northmen 25 and hidden_resource desert or hidden_resource mountains    
        recruitment_slots 1  requires factions { scotland, }        
       }
       material wooden
       construction  4
       cost  3250
       settlement_min village
       upgrades
        }
        plugins
        {
        }
      guild_administration requires factions { scotland, }
      {
       capability
       {      
        recruit_pool "Dale Medium Swordsmen"  2   0.04   1  0  requires factions { scotland, }  and region_religion northmen 25 and hidden_resource grassland or hidden_resource forest
        recruit_pool "Dale Medium Swordsmen"  2   0.04   1  0  requires factions { scotland, }  and region_religion northmen 25 and hidden_resource desert or hidden_resource mountains
        
        recruit_pool "Dale Medium Pikemen"  2   0.04   1  0  requires factions { scotland, }  and region_religion northmen 65 and hidden_resource grassland or hidden_resource forest
        recruit_pool "Dale Medium Pikemen"  2   0.04   1  0  requires factions { scotland, }  and region_religion northmen 65 and hidden_resource desert or hidden_resource mountains    
        
        recruit_pool "Dalian Longbowmen"  2   0.04   2  0  requires factions { scotland, }  and region_religion northmen 25 and hidden_resource grassland or hidden_resource forest
        recruit_pool "Dalian Longbowmen"  2   0.04   1  0  requires factions { scotland, }  and region_religion northmen 25 and hidden_resource desert or hidden_resource mountains
        
        recruitment_slots 1  requires factions { scotland, }        
       }
       material wooden
       construction  4
       cost  3250
       settlement_min village
       upgrades
                {
                }
            }
        }
        plugins
        {
        }
    }
    I want the Barding_Taxation to be the *Base* and the Noble or Guild Options to be mutually exclusive choices.
    <So you conquer a place. You can build (of the three mentioned) *only* the barding_taxation one.
    Once done, you have to decide which of the two powerful factions get Control of the Region: Nobles or Merchants(Guilds)

    Right now, this Code crashes the game.
    Last edited by QuintusSertorius; August 17, 2019 at 03:43 AM.

  10. #10
    Razor's Avatar Licenced to insult
    Join Date
    Apr 2004
    Location
    Deventer, The Netherlands
    Posts
    4,056

    Default Re: General Modding Question

    I'm pretty sure it's impossible to do what you want. You'd have to progress through the building tree and upgrade them to get from barding_taxation to noble_administration and from noble_administration to guild_administration. What you can do is create noble_administration and guild_administration as separate buildings and use "requires factions { scotland, } and not building_present_min_level building name building level" to exclude one when the other is built.

  11. #11

    Default Re: General Modding Question

    But that is actually super helpful, so thank you, I'll try that :*

  12. #12

    Default Re: General Modding Question

    But what I want is literally in EB 2, that is why I am asking the question here.

    You conquer a region, you create "Allied State" then you can *CHOOSE* between the *Mutually exclusive* Oligarchic allies state or the Democratic allied state.

    I want *that* in a "reskinned" form, I just can't get it to work.

  13. #13

    Default Re: General Modding Question

    What does the log say on the crash? I can't see anything wrong with your code.

    Have you added a new tree to the top/bottom (depends on your mod where they are) of your export_buildings.txt?

    Quote Originally Posted by Razor View Post
    I'm pretty sure it's impossible to do what you want. You'd have to progress through the building tree and upgrade them to get from barding_taxation to noble_administration and from noble_administration to guild_administration. What you can do is create noble_administration and guild_administration as separate buildings and use "requires factions { scotland, } and not building_present_min_level building name building level" to exclude one when the other is built.
    No, forking and mutually exclusive options within the same building are featured repeatedly in EBII. It's not impossible at all.

  14. #14
    Razor's Avatar Licenced to insult
    Join Date
    Apr 2004
    Location
    Deventer, The Netherlands
    Posts
    4,056

    Default Re: General Modding Question

    Quote Originally Posted by QuintusSertorius View Post
    What does the log say on the crash? I can't see anything wrong with your code.

    Have you added a new tree to the top/bottom (depends on your mod where they are) of your export_buildings.txt?



    No, forking and mutually exclusive options within the same building are featured repeatedly in EBII. It's not impossible at all.
    Ah, I wasn't aware that was a possibility at all! I stand corrected then.

    EDIT: I believe the trick is adding multiple buildings as upgrade of one building?

  15. #15

    Default Re: General Modding Question

    Quote Originally Posted by Razor View Post
    Ah, I wasn't aware that was a possibility at all! I stand corrected then.

    EDIT: I believe the trick is adding multiple buildings as upgrade of one building?
    Yes, which we have lots of. You get false-positive "errors" reported in the logs, but they cause no problems beyond the reports themselves.

  16. #16
    Razor's Avatar Licenced to insult
    Join Date
    Apr 2004
    Location
    Deventer, The Netherlands
    Posts
    4,056

    Default Re: General Modding Question

    Thanks for the info!

Posting Permissions

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