Results 1 to 30 of 269

Thread: The Complete EDB Guide - discussion

Hybrid View

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

    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.

  2. #2
    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

  3. #3

    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

  4. #4

    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.

  5. #5

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

  6. #6
    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..."

  7. #7

    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.

  8. #8
    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..."

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