Page 7 of 9 FirstFirst ... 3456789 LastLast
Results 181 to 210 of 269

Thread: The Complete EDB Guide - discussion

  1. #181

    Default Re: The Complete EDB Guide - discussion

    Using a positive would not solve the logical contradition of
    Code:
    kelt_govt_4 requires factions { gauls, } and hidden_resource indo_european and hidden_resource not_indo_european
    Besides, it wastes hidden resources and creates extra work in having to code hidden resources for every region.
    RTR VII Developer

  2. #182
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: The Complete EDB Guide - discussion

    Um, you'd use the not_indo_european HR instead of the not indo_european, not together in the same argument. But in any case, if it is tested this way and still fails then he may have the factions with a gap.

    FATW covers most things, as do other mods; just see how they get around it.
    "One of the most sophisticated Total War mods ever developed..."

  3. #183

    Default Re: The Complete EDB Guide - discussion

    is it possible the building faction works like the faction capability, ie building capability?

    EDIT: tested and no it doesnt
    Last edited by Centurion Varricus; 09-14-2008 at 20:28.

  4. #184
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: The Complete EDB Guide - discussion

    I think I pretty much tested all possibilities - there might be some posts in this thread about it if you search. Good luck though :)
    "One of the most sophisticated Total War mods ever developed..."

  5. #185

    Default Re: The Complete EDB Guide - discussion

    Hey,

    Great Guide! Really usefull.

    I had a question though... Is there a way to require a specific building level in a tree? (ie not only a level and all levels that come after it)

    I have already tried to do this:
    Code:
    requires building_present_min_level treeX level_2 and not building_present_min_level treeX level_3
    The code above does work, but when shutting the game down this seems to cause an error saying
    [..] Gap in building tree prior to building [...]
    If there is no solution for this, is there then maybe a way to block this error message? It seems kid of useless to me since the code simply works...


    Thanks in advance!!

    ~ PS

    RTR VII Developer

  6. #186
    Bassist, God and Modder Member Thor the Bassist's Avatar
    Join Date
    Jan 2008
    Location
    Yorkshire, England
    Posts
    213

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by PatricianS View Post
    a way to block this error message?
    Remove -show_err from your shortcut. If you need to test things and you think this error is blocking other errors then simply put a ; before the "and not" part and then test. Bit of a pain but thats all I can think of unless there's another problem other than what you've quoted.

    Building for the Future of METW

  7. #187

    Default Re: The Complete EDB Guide - discussion

    Unfortunately this error seems to appear whenever you make a requirement for something and then in the same line make it a "requires not"... It happens with hidden resources as well as with the same building tree :(

    Guess that's the only options left then... Thanks for the answer :D

    RTR VII Developer

  8. #188

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by PatricianS View Post
    Unfortunately this error seems to appear whenever you make a requirement for something and then in the same line make it a "requires not"... It happens with hidden resources as well as with the same building tree :(

    Guess that's the only options left then... Thanks for the answer :D
    Make a hidden resource that is not present in any region and add an 'or' condition to the end of the requirements line. Like this:
    Code:
    requires building_present_min_level treeX level_2 and not building_present_min_level treeX level_3 or hidden_resource nowhere
    I use this for filling in all sorts of "gaps" in the building DB. I tested this quickly, and it all seemed to work as intended with no error message.

  9. #189

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by DimeBagHo View Post
    Make a hidden resource that is not present in any region and add an 'or' condition to the end of the requirements line. Like this:
    Code:
    requires building_present_min_level treeX level_2 and not building_present_min_level treeX level_3 or hidden_resource nowhere
    I use this for filling in all sorts of "gaps" in the building DB. I tested this quickly, and it all seemed to work as intended with no error message.
    hmm...

    Thanks for thinking, but this won't work :(

    The game gives an error already on the first part of this line... (before your "or hidden_resource nowhre")

    I'm afraid that the only option is what Thor the B. said... with the ; in front of the trouble area's... :(

    RTR VII Developer

  10. #190

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by PatricianS View Post
    The game gives an error already on the first part of this line... (before your "or hidden_resource nowhere")
    Are you sure you didn't just make a mistake with the earlier conditions? I tried a couple of versions:
    Code:
    blacksmith requires building_present_min_level market trader and not building_present_min_level port_buildings port or hidden_resource nowhere
    Code:
    blacksmith requires building_present_min_level market trader and not building_present_min_level market forum or hidden_resource nowhere
    Both loaded fine. With the first one the blacksmith was available to build in settlements with a trader, but not in settlements with a port. Afterwards the game exited fine with no error messages from either version. Obviously you need to add the resource 'nowhere' at the top of EDB.
    Last edited by DimeBagHo; 10-23-2008 at 12:39.

  11. #191

    Default Re: The Complete EDB Guide - discussion

    I've found an interesting phenomenon concerning the Carthaginian culture UI bug.

    What I found was that after working around the bug (deleting a line referencing Carthaginian in DUB) and loading my mod, I could re-add the line for Carthaginian in DUB with no ill effects.

    This may not seem like a big deal, but it means I don't have to create new UI cards for the Carthaginian culture for every new (non-eastern) building.

    In fact, I just realized that the Extended Greek Mod benefits from this, perhaps unknowingly, because it doesn't use any special Carthaginian UI cards, but clearly has new buildings from vanilla. And my modifications of the Extended Greek Mod also include new buildings, some exclusively for Carthage, and I created no new cards either.

    Expand your borders, a mod based on XGM 5.

  12. #192
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: The Complete EDB Guide - discussion

    Technically, you never have to create new UI cards, you just need to copy the UI card from the appropriate culture folder and rename it.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  13. #193

    Default Re: The Complete EDB Guide - discussion

    Well, I know, but I meant that that is unnecessary as well. The game correctly finds the cards from the other cultures with no problems.

    Expand your borders, a mod based on XGM 5.

  14. #194

    Default Re: The Complete EDB Guide - discussion

    I have coded in a building tree with more than one upgrade and have had it work fine. But I'm trying to make a tree that up grades different buildings for different factions. The code looks like this;

    Code:
    building taverns
    {
        levels tavern tavern_faction1 tavern_faction2 tavern_faction3 tavern_faction4 
        {
            tavern requires factions { pontus, dacia, egypt, armenia, numidia, } 
            {
                capability
                {
                }
                construction  1 
                cost  200
                settlement_min village
                upgrades
                {
                    tavern_faction1
                    tavern_faction2
                    tavern_faction3
                    tavern_faction4
                }
            }
            tavern_faction1 requires factions { pontus, dacia, } 
            {
                capability
                {
                }
                construction  2 
                cost  800 
                settlement_min town
                upgrades
                {
                }
            }
            tavern_faction2 requires factions { egypt, } 
            {
                capability
                {
                }
                construction  2 
                cost  800 
                settlement_min town
                upgrades
                {
                }
            }
            tavern_faction3 requires factions { armenia, } 
            {
                capability
                {
                }
                construction  2 
                cost  800 
                settlement_min town
                upgrades
                {
                }
            }
            tavern_faction4 requires factions { numidia, } 
            {
                capability
                {
                }
                construction  2 
                cost  800 
                settlement_min town
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }
    I can build the tavern but I don't get the option to build any of the factional upgrades. What am I doing wrong or overlooking? Any help would be appreciated.

  15. #195
    Bassist, God and Modder Member Thor the Bassist's Avatar
    Join Date
    Jan 2008
    Location
    Yorkshire, England
    Posts
    213

    Default Re: The Complete EDB Guide - discussion

    You could try making the effects faction specific rather than the buildings faction specific although that code looks right so it should work.

    Building for the Future of METW

  16. #196

    Default Re: The Complete EDB Guide - discussion

    Try changing the conditionals like that:

    1st-faction: requires factions { pontus, dacia, } or factions { egypt, armenia, numidia, } and hidden_resource non-existant
    2nd-faction: requires factions {egypt, } or factions { armenia, numidia, } and hidden_resource non-existant
    3rd-faction requires factions {armenia, } or factions { numidia, } and hidden_resource non-existant
    4th-faction: requires factions {numidia, }

    Norman Invasion - The fate of England lies in your hands...

    Viking Invasion II - Unite Britain in the best TW campaign ever!

    Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland

  17. #197

    Default Re: The Complete EDB Guide - discussion

    I did as you suggested Aradan and now I can construct the next level. However, it seems to just completely ignore the the requirements and the construction tree shows only the info for what ever building level is next in the building tree regardless if the faction is a requirement or not.

  18. #198

    Default Re: The Complete EDB Guide - discussion

    I am currently modding my own version of RTW and I am using the ALEXANDER engine, not RTW or BI. I am not 100% sure that this has not been posted, but it is not in the EDB guide so I decided to post what I found:

    under the upgrades:

    building government
    {
    levels gov1 gov2 gov3 gov4 gov5 gov6 gov7 gov8
    {
    gov1 requires factions { ... } ;(1)
    {
    capability
    {
    ...
    }
    construction 1
    cost 200
    settlement_min village
    upgrades
    {
    gov2 requires factions { romans_julii, } and not hidden_resource italy
    gov6 requires factions { romans_julii, } and hidden_resource italy
    gov7 requires factions { romans_julii, } and hidden_resource italy
    gov2 requires factions { carthage, } ;and hidden_resource
    gov2 requires factions { egypt, } ;and hidden_resource
    gov3 requires factions { egypt, } ;and hidden_resource
    gov4 requires factions { egypt, } ;and hidden_resource
    gov2 requires factions { armenia, } ;and hidden_resource
    gov3 requires factions { armenia, } ;and hidden_resource
    }
    }
    ;...
    gov2 requires factions { ... } ;(2)NOTICE no requirements
    ;...
    }

    When I tried this out in the game, the gov2, 6 and 7 buildings for romans_julii was only present in places with the hidden resources as specified even though the gov2, 6, 7 buildings DID not have any requirements tied to it - refer to (2).

    This opened up a lot of possibilities for me because I was no longer restricted to doing the usual building requirements in the opening statement - refer to (1) which did not allow complex conditions.

    I have not tested whether there will be a CTD, but it seems to run fine for a few turns of testing. However, there is draw back as the game always report an error only upon quitting, which is harmless from my point of view.

    I have yet to try this out, but I plan to use such a function to create the following upgrade statements based on hidden resources which will define specific regions:

    e.g.
    upgrades
    {
    upgrade1 requires factions { romans_julii, } and hidden_resource 1 and hidden_resource 2
    upgrade2 requires factions { romans_julii, } and hidden_resource 2 and hidden_resource 3
    upgrade3 requires factions { romans_julii, } and hidden_resource 4 and hidden_resource 5
    upgrade4 requires factions { romans_julii, } and hidden_resource 6 and hidden_resource 7
    upgrade5 requires factions { romans_julii, } and hidden_resource 1 and hidden_resource 9
    ;... etc.
    }

  19. #199

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by Ramashan View Post
    I have coded in a building tree with more than one upgrade and have had it work fine. But I'm trying to make a tree that up grades different buildings for different factions. The code looks like this;
    This is a continuation from my earlier post, I believe my upgrade options will the solution.

    Code:
    	gov2 requires factions { ... }
    	{
    		capability
    		{
    ;imperium
    		law_bonus bonus 1 requires factions { romans_julii, }
    		population_loyalty_bonus bonus -1 requires factions { romans_julii, }
    		taxable_income_bonus bonus 1 requires factions { romans_julii, }
    ;new colony
    		happiness_bonus bonus -1 requires factions { carthage, }
    		law_bonus bonus 1 requires factions { carthage, }
    		trade_base_income_bonus bonus 1 requires factions { carthage, }
    ;controlled allied state
    		taxable_income_bonus bonus 4 requires factions { numidia, }
    		happiness_bonus bonus -1 requires factions { numidia, }
    ;satrapy
    		law_bonus bonus -2 requires factions { armenia, }
    		taxable_income_bonus bonus 1 requires factions { armenia, }
    		recruits_morale_bonus bonus -1 requires factions { armenia, }
    		}
    		construction  2
    		cost  400
    		settlement_min town
    		upgrades
    		{
    		gov3 requires factions { romans_julii, } and not hidden_resource italy
    		gov4 requires factions { romans_julii, } and not hidden_resource italy
    		gov5 requires factions { romans_julii, } and not hidden_resource italy
    ;client states
    		gov3 requires factions { carthage, }
    ;hegemony
    		gov4 requires factions { carthage, }
    ;punic colony
    		gov5 requires factions { carthage, } ;and hidden_resource
    ;hyparchy
    		gov4 requires factions { egypt, } ;and hidden_resource
    ;royal satrapy
    		gov4 requires factions { armenia, } ;and hidden_resource armenia_home
    		}
    	}

  20. #200
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: The Complete EDB Guide - discussion

    I have not had time to digest this yet, but an exit error report is not a good sign. Even if there is no underlying potential game-breaking issue, the error may mask more serious reports associated with other elements of the modification.

    I would avoid any error reports whatsoever.
    "One of the most sophisticated Total War mods ever developed..."

  21. #201

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by Dol Guldur View Post
    I have not had time to digest this yet, but an exit error report is not a good sign. Even if there is no underlying potential game-breaking issue, the error may mask more serious reports associated with other elements of the modification.

    I would avoid any error reports whatsoever.
    In response to your concerns, I have extracted the error after exiting the game. I hope you can enlighten me on the seriousness of such an error because I usually try to ignore such errors and add a simple condition to avoid such errors from occurring.

    Script Error in exrm/data/export_descr_buildings.txt, at line 10059, column 4. Building DB error - faction romans_julii has a gap in building prior to gov6

    The line 10059 corresponds to the last line in export_descr_buildings.txt
    I will skip many of the unnecessary coding and jump to the crucial parts because the coding is correct as the game is able to load. The reason for the "gap" is because the structure of my government building for romans_julii is as follows:

    Code:
    ;building levels
    levels gov1 gov2 gov3 gov4 gov5 gov6 gov7 gov8
    
    ;gov1
    upgrades
    {
    gov2 requires factions { romans_julii, } and not hidden_resource italy
    gov6 requires factions { romans_julii, } and hidden_resource italy
    gov7 requires factions { romans_julii, } and hidden_resource italy
    }
    
    ;gov2
    upgrades
    {
    gov3 requires factions { romans_julii, } and not hidden_resource italy
    gov4 requires factions { romans_julii, } and not hidden_resource italy
    gov5 requires factions { romans_julii, } and not hidden_resource italy
    }
    
    ;gov3
    upgrades
    {
    gov8 requires factions { romans_julii, }
    }
    
    ;gov4
    upgrades
    {
    gov8 requires factions { romans_julii, }
    }
    
    ;gov5
    upgrades
    {
    gov8 requires factions { romans_julii, }
    }
    
    ;gov6
    upgrades
    {
    gov8 requires factions { romans_julii, }
    }
    
    ;gov7
    upgrades
    {
    gov8 requires factions { romans_julii, }
    }
    I haven't tested this code out but I suppose it should remove the exit error, i.e. by attaching a hidden resource requirement which will not be present at all.

    Code:
    gov1 requires factions { romans_julii, } and not hidden_resource not_here
    I have not fully tested what I discovered because I have yet to link up the rest of the buildings for all the factions. If it works, I do not need to rely simply on scripts to settle the complex building requirements like some mods like EB has done. Once I have settled all the government details of all the factions, I would do a test and show my findings.

  22. #202
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: The Complete EDB Guide - discussion

    We look forward to your findings. Seems interesting!

    Do remember to test it both ways (positively and negatively) as sometimes a piece of redundant or useless code that is not reported as incorrect may nevertheless pass as a positive and mislead.

    I meant, with the exit report, that the game seems to only report one error (or one sort of error) and it therefore may mask another error at work - so it's always good to make sure you resolve an exit error when it appears.

    Best of luck.
    Last edited by Dol Guldur; 05-23-2009 at 16:47.
    "One of the most sophisticated Total War mods ever developed..."

  23. #203

    Default Re: The Complete EDB Guide - discussion

    Excellent find, lim_lucky.

    I'll be doing some testing with this as well.

    Expand your borders, a mod based on XGM 5.

  24. #204

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by Dol Guldur View Post

    Do remember to test it both ways (positively and negatively) as sometimes a piece of redundant or useless code that is not reported as incorrect may nevertheless pass as a positive and mislead.

    Best of luck.
    Before I proceed with the findings, I have 1 question: Dol Guldur, what do u mean by testing it both ways?

    I'm finally completed with the building description and some upgrade options.
    Before I continue with the findings, I have to stress that I am only using the ALEXANDER engine, not RTW or BI so I cannot guarantee it will work for the older engines.

    I will first summarize all the details which are indicative of my findings:

    1) Upgrade statements based on hidden resources which defines specific regions may be possible for different factions within the same building tree, however note that this is only based on a one time testing which is definitely not exhaustive. This sort of solves the complex logic required to allow different factions to have different upgrade options in different regions.
    e.g.
    upgrades
    {
    upgrade1 requires factions { romans_julii, } and hidden_resource 1 and hidden_resource 2
    upgrade2 requires factions { cathage, } and hidden_resource 2 and hidden_resource 3
    upgrade3 requires factions { egypt, } and hidden_resource 4 and hidden_resource 5
    upgrade4 requires factions { scythia, } and hidden_resource 6 and hidden_resource 7
    ;... etc.
    }
    2) The upgrade options seem to reject building_present_min_level requirements as it will CTD on the turn the building is completed.

    3) I have not checked whether the following requirements will work because it do not intend to use it in my upgrade options for my personal mod.
    resource
    building_present
    marian_reforms
    building_present

    4) After I have allocated the hidden resources in the other regions, I will continue to post any other findings, especially with regards to other faction upgrade options once their hidden resource requirements are filled. I really hope it will work well with the rest of the factions.

    Disclaimer: I only intend to post whatever I find asap, and I have no intention to test upgrade requirements as stated in 3. Any other modder should be able to test it easily, but I feel that a 'positive test' does not seem to expand the building options that much and I am quite tight with other commitments as well, so I'm giving it a miss.

    Details:
    I have only tested with the factions romans_julii, because I have yet to place other hidden_resources for the other factions. So please ignore code for all other factions for simplicity.

    Code:
    building government
    {
    	levels gov1 gov2 gov3 gov4 gov5 gov6 gov7 gov8
    	{
    	gov1 requires factions { romans_julii, egypt, epirus, macedon, thrace, armenia, pontus, dacia, germans, spain, scythia, numidia, }
    	{
    		capability
    		{
    		law_bonus bonus 1 requires factions { romans_julii, egypt, epirus, macedon, thrace, armenia, pontus, dacia, germans, spain, }
    		}
    		construction  1
    		cost  200
    		settlement_min village
    		upgrades
    		{
    ;imperium ;and not building_present_min_level hinterland_loc1 a_italia
    		gov2 requires factions { romans_julii, } and not hidden_resource italy
    ;sociorum(18) ;and building_present_min_level hinterland_loc1 a_italia
    		gov6 requires factions { romans_julii, } and hidden_resource italy
    		gov6 requires factions { romans_julii, } and hidden_resource SW and hidden_resource B and hidden_resource y1 and hidden_resource n2 and hidden_resource y4 and hidden_resource y8 ;Trinakrie, Corieltauvae
    		gov6 requires factions { romans_julii, } and hidden_resource SW and hidden_resource B and hidden_resource n1 and hidden_resource n2 and hidden_resource y4 and hidden_resource y8 ;Sicilia
    		gov6 requires factions { romans_julii, } and hidden_resource SW and hidden_resource B and hidden_resource n1 and hidden_resource y2 and hidden_resource y4 and hidden_resource y8 ;Elimya
    		gov6 requires factions { romans_julii, } and hidden_resource SW and hidden_resource B and hidden_resource y1 and hidden_resource n2 and hidden_resource n4 and hidden_resource n8 ;Insubramrog
    		gov6 requires factions { romans_julii, } and hidden_resource SW and hidden_resource B and hidden_resource n1 and hidden_resource y2 and hidden_resource n4 and hidden_resource n8 ;Venetia
    		gov6 requires factions { romans_julii, } and hidden_resource SW and hidden_resource B and hidden_resource y1 and hidden_resource y2 and hidden_resource y4 and hidden_resource y8 ;Korsim
    		gov6 requires factions { romans_julii, } and hidden_resource SW and hidden_resource B and hidden_resource n1 and hidden_resource n2 and hidden_resource n4 and hidden_resource n8 ;Sardin
    ;sine suffragio(10)
    		gov7 requires factions { romans_julii, } and hidden_resource italy
    ;autonomous allied state
    		gov2 requires factions { egypt, }
    ;controlled allied state
    		gov3 requires factions { egypt, }
    ;hyparchy
    		gov4 requires factions { egypt, }
    ;allied territory
    		gov2 requires factions { epirus, }
    		gov2 requires factions { macedon, }
    ;controlled territory, garrisoned state
    		gov3 requires factions { epirus, }
    		gov3 requires factions { macedon, }
    ;semiautonomous satrapy
    		gov2 requires factions { thrace, }
    ;satrapy
    		gov2 requires factions { armenia, }
    ;allied kingdom
    		gov3 requires factions { armenia, }
    ;allied state
    		gov2 requires factions { pontus, }
    ;satrapy
    		gov3 requires factions { pontus, }
    ;3 allied tribes
    		gov2 requires factions { dacia, }
    		gov2 requires factions { germans, }
    		gov2 requires factions { spain, }
    		}
    	}
    	gov2 requires factions { romans_julii, egypt, epirus, macedon, thrace, armenia, pontus, dacia, germans, spain, } and not hidden_resource not_here
    	{
    		capability
    		{
    ;imperium
    		law_bonus bonus 1 requires factions { romans_julii, } and not hidden_resource italy
    		population_loyalty_bonus bonus -1 requires factions { romans_julii, } and not hidden_resource italy
    		taxable_income_bonus bonus 1 requires factions { romans_julii, } and not hidden_resource italy
    ;autonomous allied state
    		trade_base_income_bonus bonus 1 requires factions { egypt, }
    		recruits_exp_bonus bonus 1 requires factions { egypt, }
    ;allied territory
    		population_growth_bonus bonus 1 requires factions { epirus, macedon, }
    		population_loyalty_bonus bonus -1 requires factions { epirus, }
    		population_loyalty_bonus bonus -2 requires factions { macedon, }
    		trade_base_income_bonus bonus 1 requires factions { epirus, macedon, }
    		recruits_exp_bonus 1 requires factions { epirus, macedon, }
    ;semiautonomous satrapy
    		happiness_bonus bonus -1 requires factions { thrace, }
    		population_loyalty_bonus bonus -1 requires factions { thrace, }
    		trade_base_income_bonus bonus 1 requires factions { thrace, }
    		recruits_exp_bonus bonus 1 requires factions { thrace, }
    ;satrapy
    		law_bonus bonus -2 requires factions { armenia, }
    		taxable_income_bonus bonus 1 requires factions { armenia, }
    		recruits_morale_bonus bonus -1 requires factions { armenia, }
    ;allied state
    		population_loyalty_bonus bonus -2 requires factions { pontus, }
    		trade_base_income_bonus bonus 1 requires factions { pontus, }
    		recruits_exp_bonus bonus 1 requires factions { pontus, }
    		recruits_morale_bonus bonus -1 requires factions { pontus, }
    ;3 allied tribes
    		happiness_bonus bonus 1 requires factions { dacia, }
    		law_bonus bonus -1 requires factions { dacia, germans, spain, }
    		taxable_income_bonus bonus 2 requires factions { spain, }
    		trade_base_income_bonus bonus 1 requires factions { dacia, germans, }
    		recruits_exp_bonus bonus 1 requires factions { germans, spain, }
    		}
    		construction  2
    		cost  400
    		settlement_min town
    		upgrades
    		{
    		gov3 requires factions { romans_julii, } and not hidden_resource italy
    		gov4 requires factions { romans_julii, } and not hidden_resource italy
    		gov5 requires factions { romans_julii, } and not hidden_resource italy
    ;hyparchy
    		gov4 requires factions { egypt, } ;and hidden_resource
    ;military territory
    		gov4 requires factions { epirus, } ;and hidden_resource epirus
    ;satrapy
    		gov4 requires factions { macedon, } ;and hidden_resource alexander's empire
    ;allied state
    		gov3 requires factions { thrace, } ;and not hidden_resource thrace if
    		gov4 requires factions { thrace, } ;and hidden_resource thrace land
    ;royal satrapy
    		gov4 requires factions { armenia, } ;and hidden_resource armenia_home
    ;persian satrapy
    		gov4 requires factions { pontus, } ;and hidden_resource pontus
    ;3 client tribes
    		gov3 requires factions { dacia, }
    		gov3 requires factions { germans, }
    		gov3 requires factions { spain, }
    		}
    	}
    	gov3 requires factions { romans_julii, egypt, epirus, macedon, thrace, armenia, pontus, dacia, germans, spain, } and not hidden_resource not_here
    	{
    		capability
    		{
    ;libera (free state)
    		happiness_bonus bonus 1 requires factions { romans_julii, } and not hidden_resource italy
    		taxable_income_bonus bonus 2 requires factions { romans_julii, } and not hidden_resource italy
    		trade_base_income_bonus bonus 1 requires factions { romans_julii, } and not hidden_resource italy
    ;controlled allied state
    		happiness_bonus bonus -1 requires factions { egypt, }
    		taxable_income_bonus bonus 4 requires factions { egypt, }
    ;controlled territory
    		population_growth_bonus bonus 1 requires factions { epirus, }
    		happiness_bonus bonus -1 requires factions { epirus, }
    		taxable_income_bonus bonus 2 requires factions { epirus, }
    ;garrisoned state
    		happiness_bonus bonus -3 requires factions { macedon, }
    		law_bonus bonus 1 requires factions { macedon, }
    		population_loyalty_bonus bonus -1 requires factions { macedon, }
    		taxable_income_bonus bonus 3 requires factions { macedon, }
    		recruits_exp_bonus bonus 1 requires factions { macedon, }
    ;allied state
    		population_loyalty_bonus bonus -1 requires factions { thrace, }
    		taxable_income_bonus bonus 1 requires factions { thrace, }
    		trade_base_income_bonus bonus 1 requires factions { thrace, }
    		recruits_exp_bonus bonus 1 requires factions { thrace, }
    ;allied kingdom
    		trade_base_income_bonus bonus 2 requires factions { armenia, }
    		happiness_bonus bonus 1 requires factions { armenia, }
    		population_loyalty_bonus bonus -1 requires factions { armenia, }
    		recruits_exp_bonus bonus -2 requires factions { armenia, }
    ;satrapy
    		happiness_bonus bonus 1 requires factions { pontus, }
    		population_loyalty_bonus bonus -1 requires factions { pontus, }
    		trade_base_income_bonus bonus 1 requires factions { pontus, }
    		recruits_exp_bonus bonus 1 requires factions { pontus, }
    		recruits_morale_bonus bonus -1 requires factions { pontus, }
    ;3 client tribes
    		happiness_bonus bonus 1 requires factions { germans, spain, }
    		law_bonus bonus 1 requires factions { spain, }
    		taxable_income_bonus bonus 1 requires factions { dacia, germans, }
    		trade_base_income_bonus bonus -1 requires factions { spain, }
    		recruits_exp_bonus bonus 1 requires factions { dacia, germans, }
    		recruits_morale_bonus 1 requires factions { spain, }
    		}
    		construction  2
    		cost  400
    		settlement_min town
    		upgrades
    		{
    		gov8 requires factions { romans_julii, } and not hidden_resource italy
    ;hyparchy
    		gov4 requires factions { egypt, } ;and hidden_resource
    ;military territory
    		gov4 requires factions { epirus, } ;and hidden_resource epirus
    ;satrapy
    		gov4 requires factions { macedon, } ;and hidden_resource alexander's empire
    ;royal satrapy
    		gov4 requires factions { armenia, } ;and hidden_resource armenia_home
    ;persian satrapy
    		gov4 requires factions { pontus, } ;and hidden_resource pontus
    ;administration
    		gov4 requires factions { dacia, } ;and hidden_resource gaul home
    		gov4 requires factions { germans, } ;and hidden_resource gaul home
    		gov4 requires factions { spain, } ;and hidden_resource gaul home
    		}
    	}
    	gov4 requires factions { romans_julii, egypt, epirus, macedon, thrace, armenia, pontus, dacia, germans, spain, } and not hidden_resource not_here
    	{
    		capability
    		{
    ;stipendiaria (tributary state)
    		happiness_bonus bonus -1 requires factions { romans_julii, } and not hidden_resource italy
    		law_bonus bonus 1 requires factions { romans_julii, } and not hidden_resource italy
    		taxable_income_bonus bonus 5 requires factions { romans_julii, } and not hidden_resource italy
    ;hyparchy
    		law_bonus bonus 1 requires factions { egypt, } ;and hidden_resource
    		population_loyalty_bonus bonus 1 requires factions { egypt, } ;and hidden_resource
    		trade_base_income_bonus bonus 1 requires factions { egypt, } ;and hidden_resource
    		taxable_income_bonus bonus 1 requires factions { egypt, } ;and hidden_resource
    ;military territory
    		population_growth_bonus bonus -2 requires factions { epirus, }
    		happiness_bonus bonus -1 requires factions { epirus, }
    		taxable_income_bonus bonus 4 requires factions { epirus, }
    		recruits_exp_bonus bonus 1 requires factions { epirus, }
    ;satrapy
    		population_growth_bonus bonus -1 requires factions { macedon, }
    		taxable_income_bonus bonus 1 requires factions { macedon, }
    		population_loyalty_bonus bonus 1 requires factions { macedon, }
    		recruits_morale_bonus 1 requires factions { macedon, }
    ;satrapy
    		happiness_bonus bonus 1 requires factions { thrace, }
    		taxable_income_bonus bonus 2 requires factions { thrace, }
    		recruits_morale_bonus 1 requires factions { thrace, }
    ;royal satrapy
    		law_bonus bonus -1 requires factions { armenia, } ;and hidden_resource
    		population_loyalty_bonus bonus 1 requires factions { armenia, } ;and hidden_resource
    		taxable_income_bonus bonus 2 requires factions { armenia, } ;and hidden_resource
    ;persian satrapy
    		population_growth_bonus bonus -1 requires factions { pontus, }
    		population_loyalty_bonus bonus 1 requires factions { pontus, }
    		taxable_income_bonus bonus 1 requires factions { pontus, } ;and hidden_resource
    		recruits_morale_bonus bonus 1 requires factions { pontus, }
    ;3 administration
    		population_growth_bonus bonus -1 requires factions { dacia, }
    		happiness_bonus bonus 1 requires factions { germans, }
    		happiness_bonus bonus 2 requires factions { spain, }
    		law_bonus bonus 1 requires factions { dacia, germans, }
    		trade_base_income_bonus bonus -1 requires factions { germans, }
    		trade_base_income_bonus bonus -2 requires factions { spain, }
    		recruits_exp_bonus bonus 1 requires factions { dacia, }
    		recruits_morale_bonus 1 requires factions { germans, spain, }
    		}
    		construction  4
    		cost  1000
    		settlement_min town
    		upgrades
    		{
    		gov8 requires factions { romans_julii, } and not hidden_resource italy
    ;nomarchy
    		gov5 requires factions { egypt, } ;and hidden_resource
    ;hegemonia
    		gov5 requires factions { epirus, } ;and hidden_resource
    ;hegemonia
    		gov5 requires factions { macedon, } ;and hidden_resource
    ;hegemonia
    		gov5 requires factions { thrace, } ;and hidden_resource
    ;royal kingdom
    		gov5 requires factions { armenia, } ;and hidden_resource armenia_royal
    ;royal territory
    		gov5 requires factions { pontus, } ;and hidden_resource pontus_home
    ;king's tribe
    		gov5 requires factions { dacia, germans, spain, } ;and hidden_resource gaul home
    		gov5 requires factions { germans, } ;and hidden_resource gaul home
    		gov5 requires factions { spain, } ;and hidden_resource gaul home
    		}
    	}
    	gov5 requires factions { romans_julii, egypt, epirus, macedon, thrace, armenia, pontus, dacia, germans, spain, } and not hidden_resource not_here
    	{
    		capability
    		{
    ;foederata (allied state)
    		happiness_bonus bonus 1 requires factions { romans_julii, } and not hidden_resource italy
    		law_bonus bonus 1 requires factions { romans_julii, } and not hidden_resource italy
    		taxable_income_bonus bonus 3 requires factions { romans_julii, } and not hidden_resource italy
    ;nomarchy
    		population_growth_bonus bonus -2 requires factions { egypt, } ;and hidden_resource
    		law_bonus bonus 1 requires factions { egypt, } ;and hidden_resource
    		taxable_income_bonus bonus 3 requires factions { egypt, } ;and hidden_resource
    		trade_base_income_bonus bonus 2 requires factions { egypt, } ;and hidden_resource
    		recruits_exp_bonus 1 requires factions { egypt, } ;and hidden_resource
    ;hegemonia
    		population_growth_bonus bonus -1 requires factions { epirus, }
    		happiness_bonus bonus 1 requires factions { epirus, }
    		population_loyalty_bonus bonus 1 requires factions { epirus, }
    		taxable_income_bonus bonus 7 requires factions { epirus, }
    		recruits_morale_bonus bonus 2 requires factions { epirus, }
    ;hegemonia
    		happiness_bonus bonus 1 requires factions { macedon, }
    		law_bonus bonus 1 requires factions { macedon, }
    		population_loyalty_bonus bonus 1 requires factions { macedon, }
    		taxable_income_bonus bonus -3 requires factions { macedon, }
    		recruits_exp_bonus bonus 1 requires factions { macedon, }
    		recruits_morale_bonus bonus 1 requires factions { macedon, }
    ;hegemonia
    		religious_belief zoroastrian 1 requires factions { thrace, } ;and hidden_resource
    		trade_base_income_bonus bonus 2 requires factions { thrace, } ;and hidden_resource
    		recruits_exp_bonus 1 requires factions { thrace, } ;and hidden_resource
    ;royal kingdom
    		population_growth_bonus bonus -1 requires factions { armenia, } ;and hidden_resource
    		law_bonus bonus 1 requires factions { armenia, } ;and hidden_resource
    		population_loyalty_bonus bonus 1 requires factions { armenia, } ;and hidden_resource
    		taxable_income_bonus bonus 3 requires factions { armenia, } ;and hidden_resource
    		recruits_morale_bonus bonus 1 requires factions { armenia, } ;and hidden_resource
    ;royal territory
    		population_growth_bonus bonus -2 requires factions { pontus, }
    		population_loyalty_bonus bonus 2 requires factions { pontus, }
    		taxable_income_bonus bonus 3 requires factions { pontus, } ;and hidden_resource
    		recruits_morale_bonus bonus 1 requires factions { pontus, }
    ;king's tribe
    		happiness_bonus bonus 1 requires factions { dacia, }
    		trade_base_income_bonus bonus 1 requires factions { dacia, }
    		law_bonus bonus 1 requires factions { dacia, }
    		recruits_morale_bonus 1 requires factions { dacia, }
    		trade_base_income_bonus bonus 1 requires factions { germans, }
    		construction_cost_bonus_other bonus 1 requires factions { germans, }
    		construction_cost_bonus_military bonus 1 requires factions { germans, }
    		population_loyalty_bonus bonus 1 requires factions { germans, }
    		recruits_morale_bonus 1 requires factions { germans, }
    		trade_base_income_bonus bonus 1 requires factions { spain, }
    		construction_cost_bonus_religious bonus 2 requires factions { spain, }
    		construction_cost_bonus_military bonus 2 requires factions { spain, }
    		recruits_morale_bonus 1 requires factions { spain, }
    		}
    		construction  5
    		cost  2000
    		settlement_min town
    		upgrades
    		{
    ;military administration
    		gov6 requires factions { pontus, } ;and hidden_resource pontus_home
    		gov8 requires factions { romans_julii, } and not hidden_resource italy
    		}
    	}
    ;(1)Xromans_julii, egypt, epirus, macedon, thrace, armenia, pontus, dacia, germans, spain,
    	gov6 requires factions { romans_julii, } and not hidden_resource not_here
    	{
    		capability
    		{
    ;sociorum (allied states)
    		religious_belief christianity 1 requires factions { romans_julii, }
    		happiness_bonus bonus 1 requires factions { romans_julii, }
    		taxable_income_bonus bonus 3 requires factions { romans_julii, }
    		}
    		construction  4
    		cost  500
    		settlement_min town
    		upgrades
    		{
    		gov8 requires factions { romans_julii, }
    		}
    	}
    	gov7 requires factions { romans_julii, } and not hidden_resource not_here
    	{
    		capability
    		{
    ;sine suffragio (romanized states)
    		religious_belief christianity 1 requires factions { romans_julii, }
    		happiness_bonus bonus 1 requires factions { romans_julii, }
    		law_bonus bonus 1 requires factions { romans_julii, }
    		taxable_income_bonus bonus 3 requires factions { romans_julii, }
    		}
    		construction  5
    		cost  1000
    		settlement_min town
    		upgrades
    		{
    		gov8 requires factions { romans_julii, }
    		}
    	}
    	gov8 requires factions { romans_julii, } and not hidden_resource not_here
    	{
    		capability
    		{
    ;romana (citizenship)
    		religious_belief christianity 1 requires factions { romans_julii, }
    		happiness_bonus bonus 2 requires factions { romans_julii, }
    		law_bonus bonus 1 requires factions { romans_julii, }
    		taxable_income_bonus bonus 5 requires factions { romans_julii, }
    		}
    		construction  6
    		cost  2000
    		settlement_min city
    		upgrades
    		{
    		}
    	}
    	}
    plugins
    {
    }
    }
    According to the above codes, specifically for gov2, gov6 and gov7, the building options will be present as long as the hidden_resources stated in the upgrade options match the logic.
    For instance, in the region Insubramrog, hidden resource SW, B, n1, y2, n4, n8 is present, but hidden resource italy is absent, so 2 upgrade options gov2 and gov6 is present. Locations with hidden resource italy also has 2 upgrade options gov6 and gov7.

    Code:
    Upgrade options for gov1 building in EXPORT_DESCR_BUILDINGS.TXT:
    		gov2 requires factions { romans_julii, } and not hidden_resource italy
    ;Insubramrog
    		gov6 requires factions { romans_julii, } and hidden_resource SW and hidden_resource B and hidden_resource n1 and hidden_resource y2 and hidden_resource n4 and hidden_resource n8 
    		gov7 requires factions { romans_julii, } and hidden_resource italy
    
    Respective region in DESCR_REGIONS.TXT:
    Insubramrog
           Mediolanum
           gauls
           Insubre
           221 232 41
           river, SW, B, y1, n2, n4, n8
           5
           2
    	christianity 10 pagan 90 zoroastrian 0

    Regrettably, the codes within the upgrade options as shown below do not work:
    Code:
    ;gov1 building ...
    		upgrades
    		{
    		gov2 requires factions { romans_julii, } and not building_present_min_level hinterland_loc1 a_italia ;The intention was to use buildings as a requirement and not hidden resource italy
    		gov6 requires factions { romans_julii, } and building_present_min_level hinterland_loc1 a_italia
    		}
    The building option for gov1 will definitely be present, but the game will immediately CTD in the turn when gov1 is completed. That means, I never even get to see whether gov2 and gov6 are buildable options in the correct regions because the game just CTD once it reaches the start of the turn.

  25. #205
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: The Complete EDB Guide - discussion

    Before I proceed with the findings, I have 1 question: Dol Guldur, what do u mean by testing it both ways?
    I meant that sometimes it will appear that an added condition is being parsed as true when in fact it is simply being ignored, so it should be tested the other way (usually by putting something in that you know is false or just plain nonsense to see if it reports an error or CTDs etc).

    You've probably done this by now - I, like you, and too stretched to even look at this right now but I am sure others will at some point.

    I do have a vague recollection that I had tried conditionals on the upgrade lines some years ago (probably under an early version of RTW) but cannot remember the result. Obviously, if I had got it to work I would have mentioned it. Maybe I did it wrong, looked at the results incorrectly or maybe that version was not as flexible - Thanks for exploring and testing!

    I hope someone can confirm your findings soon!
    "One of the most sophisticated Total War mods ever developed..."

  26. #206

    Default Re: The Complete EDB Guide - discussion

    Great find!

    I'm surely going to test this... It adds so much more options when designing rather complex building trees :)

    (I'll let you all know if I find something interesting (working/not working/limited working))

    Thanks!!

    RTR VII Developer

  27. #207

    Thumbs up Re: The Complete EDB Guide - discussion

    (sorry for not just editing my previous post, but I can't find how to do that :P)

    I just tested the upgrade requirements with the walls building tree.

    I tested:

    requires factions { rome_republic, }
    Worked as expected
    - Only Rome can upgrade walls

    requires hidden_resource not_used
    Worked as expected
    - Walls can't be upgraded (no region has this HR)

    requires hidden_resource rome
    Worked as expected
    - Walls can only be upgraded in the city Roma

    requires not hidden_resource italy
    Worked as expected
    - Walls can only be upgraded outside of Italy

    requires building_present_min_level core_building governors_palace
    Worked as expected
    - Only cities with a core building "Governors Palace" and higher can upgrade the walls

    :)

    RTR VII Developer

  28. #208

    Default Re: The Complete EDB Guide - discussion

    Did you get an error message on exit?

    Spoiler Alert, click show to read: 
    You need to not be a junior member to edit your posts.

    Norman Invasion - The fate of England lies in your hands...

    Viking Invasion II - Unite Britain in the best TW campaign ever!

    Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland

  29. #209

    Default Re: The Complete EDB Guide - discussion

    Quote Originally Posted by Aradan View Post
    Did you get an error message on exit?
    Nope.

    I also haven't tried yet to get one...

    However when experimenting a bit further, I did get a "gap in building tree prior to blabla"-error. And it surely came from the upgrade requirement. Meaning that the requirement does not get ignored. :)

    Spoiler Alert, click show to read: 
    You need to not be a junior member to edit your posts.
    Thanks :)

    RTR VII Developer

  30. #210
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: The Complete EDB Guide - discussion

    Good, good.

    OK, I have added:

    Upgrades, it would seem, can also take conditionals. For more discussion and examples of this please see lim lucky's posts on page 6 of the EDB discussion thread here: https://forums.totalwar.org/vb/showth...t=50039&page=6
    to the EDB Guide.
    "One of the most sophisticated Total War mods ever developed..."

Page 7 of 9 FirstFirst ... 3456789 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO