Results 1 to 6 of 6

Thread: EDB editing - workaround for CTD involving building boni and building_present requirement?

  1. #1

    Icon5 EDB editing - workaround for CTD involving building boni and building_present requirement?

    Because I really like the garrison system of newer TW titles, I tried to get something similar into BOTET by adding free upkeep slots to recruitment buildings. Unfortunately that made the campaign crash upon loading and some research revealed that a building can't give any sort of bonus (including the free_upkeep bonus) when it can recruit units for which other buildings are also required via the building_present condition (found at http://www.twcenter.net/forums/showt...nt-quot-in-EDB ). As it stands, that is true for basically every building that I want to give free upkeep slots to

    An example would be

    Code:
            cannon_arsenal_2 requires factions { russia, southern_european, poland, } and not factions { papal_states, kalmar_union, hungary, }
            {
                capability
                {
                    recruit_pool "Uragan"  1   0.125   2  0  requires factions { russia, } and building_present_min_level academic alchemists_lab
    
                    recruit_pool "Empire Cannon"  1   0.1   1  0  requires factions { portugal, spain, hre, scotland, sicily, milan, venice, saxons, byzantium, france, } and building_present_min_level academic alchemists_lab    
                    recruit_pool "Empire Mortar"  1   0.1   1  0  requires factions { spain, hre, portugal, scotland, sicily, milan, venice, saxons, byzantium, france, } and building_present_min_level academic alchemists_lab 
                    
                    recruit_pool "Nuln Cannon"  1   0.084   1  0  requires factions { portugal, } and building_present_min_level academic alchemists_lab    
                    
                    recruit_pool "Dwarfs cannon"  1   0.125   1  0  requires factions { poland, }
    
                    ;free_upkeep bonus 3    <-- causes crash when uncommented
                 }
                material wooden
                construction  5
                cost  5000 
                settlement_min village
                upgrades
                {
                    cannon_arsenal_3
                }
            }
    Is there any way to circumvent the crash while keeping those sweet free upkeep slots?
    Thanks beforehand (optional addition )
    With best regards,

    Förster44

  2. #2

    Default Re: EDB editing - workaround for CTD involving building boni and building_present requirement?

    Make 2 recuitments pools
    Building 1 provides max pool
    recruit_pool "Unit" 0 0 3 0 requires factions { faction, }
    Building 2 provides unit growth
    recruit_pool "Unit" 1 0.13 0 0 requires factions { faction, }

  3. #3
    QuintusSertorius's Avatar EBII Hod Carrier
    Artifex

    Join Date
    Feb 2008
    Location
    UK
    Posts
    11,561

    Default Re: EDB editing - workaround for CTD involving building boni and building_present requirement?

    Have you got room in the tree for another level which requires the alchemists_lab? That would be the easiest way to do it.

  4. #4

    Default Re: EDB editing - workaround for CTD involving building boni and building_present requirement?

    Quote Originally Posted by QuintusSertorius View Post
    Have you got room in the tree for another level which requires the alchemists_lab? That would be the easiest way to do it.
    I'm not sure if I understand what you mean. Wouldn't that make the alchemists_lab required for the whole building (and not all factions that use the building can construct an alchemists_lab) instead of for only some of the recruitable units?

    Anyway, I fiddled around with the approach of splitting up the recruitment pools and while it did involve a lot of jumping around in the EDB file and tricksing around a bit, it seems to work now

    Thank you very much for the help!
    Thanks beforehand (optional addition )
    With best regards,

    Förster44

  5. #5
    QuintusSertorius's Avatar EBII Hod Carrier
    Artifex

    Join Date
    Feb 2008
    Location
    UK
    Posts
    11,561

    Default Re: EDB editing - workaround for CTD involving building boni and building_present requirement?

    No, I mean separate out the units you want into the next level up/branch of the building, and put the requirement for the alchemists_lab in the upgrade path instead of on the recruit_pool line. Thus you need an alchemists_lab in order to upgrade to the level of the building offering the unit.

  6. #6

    Default Re: EDB editing - workaround for CTD involving building boni and building_present requirement?

    The CTD is because the recruit_pool lines requiring building_present_min_level cannot be used with other types of capabilities, such as free_upkeep bonus, in a building. See this thread: https://www.twcenter.net/forums/show...uire-buildings

    So the solution may be either
    (a) splitting recruit_pool line, to avoid requiring building_present_min_level.
    (b) move the free_upkeep bonus to another building, (free_upkeep bonus 1 requires [tree name] cannon_arsenal_2)

    Anyway, you've done (a), that's why they work now.

Tags for this Thread

Posting Permissions

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