Results 1 to 5 of 5

Thread: [solved] building capabilities issue... (!!!)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    SpyrosM91's Avatar Despotes
    Join Date
    Aug 2010
    Location
    Patras, Greece
    Posts
    3,675

    Default [solved] building capabilities issue... (!!!)

    i have this system of worldwide traits...

    campaignscript
    Code:
        monitor_event FactionTurnStart FactionIsLocal
        
            if I_LocalFaction byzantium
    
                if I_FactionLeaderTrait byzantium Trait_1 = 1
                    set_event_counter trait_one_counter 1
                end_if
                if I_FactionLeaderTrait byzantium Trait_1 = 2
                    set_event_counter trait_one_counter 2
                end_if
                if I_FactionLeaderTrait byzantium Trait_1 = 3
                    set_event_counter trait_one_counter 3
                end_if
                   ...
                if I_FactionLeaderTrait byzantium Trait_1 = 9
                    set_event_counter trait_one_counter 9
                end_if
    
    
                if I_FactionLeaderTrait byzantium Trait_2 = 1
                    set_event_counter trait_two_counter 1
                end_if
                if I_FactionLeaderTrait byzantium Trait_2 = 2
                    set_event_counter trait_two_counter 2
                end_if
                if I_FactionLeaderTrait byzantium Trait_2 = 3
                    set_event_counter trait_two_counter 3
                end_if
                   ...
                if I_FactionLeaderTrait byzantium Trait_2 = 9
                    set_event_counter trait_two_counter 9
                end_if
    
            end_if
            if not I_LocalFaction byzantium
                terminate_monitor
            end_if
    
        end_monitor
    and then in my EDB, in every level of the core building, i write this code:
    Code:
            happiness_bonus bonus -1 requires factions { byzantium, } and event_counter trait_one_counter 1
            happiness_bonus bonus -1 requires factions { byzantium, } and event_counter trait_one_counter 2
            happiness_bonus bonus -2 requires factions { byzantium, } and event_counter trait_one_counter 3
              ...
            happiness_bonus bonus -8 requires factions { byzantium, } and event_counter trait_one_counter 9
    
    
            happiness_bonus bonus 6 requires factions { byzantium, } and event_counter trait_two_counter 1
            happiness_bonus bonus 6 requires factions { byzantium, } and event_counter trait_two_counter 2
            happiness_bonus bonus 5 requires factions { byzantium, } and event_counter trait_two_counter 3
              ...
            happiness_bonus bonus 1 requires factions { byzantium, } and event_counter trait_two_counter 9
    the Trait_1, after it has been activated, it increases 1 per turn... and after sth i have scripted happens, it goes to 0 and the Trait_2 is enabled, which is also goes up by 1 every turn...


    but then in the game i have this:
    Spoiler Alert, click show to read: 

    the public order was about 100%, and when the last (or so) level of Trait_1 was reached, the public order had still remained the same, as in the beginning...





    and also when some levels of the Trait_2 were reached, again the percentage remained about 100% (there might have been a change in the governor's traits... increase in population... or so... that probably why it's is 95%)






    so my question is:

    a) why the bonuses appear all on screen, despite that only one is "activated" every time...??
    b) why they don't work, by increasing or decreasing the public order....???


    thanks in advance!!
    Last edited by SpyrosM91; October 27, 2012 at 08:08 AM.
    Proud Tsardoms Total War: Historian - Coder - Scripter - Mapper

  2. #2
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: building capabilities issue...

    The use of event counters outside the campaign_script is limited to either 0 = off or 1 = on.


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  3. #3
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default Re: building capabilities issue...

    Just a shot in the dark, maybe add a not for the other counters.

    happiness_bonus bonus -1 requires factions { byzantium, } and event_counter trait_one_counter 1 and not event_counter trait_one_counter 2 and not event_counter trait_one_counter 3 and not etc...

    VB

  4. #4
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: building capabilities issue...

    Quote Originally Posted by Vegas_Bear View Post
    Just a shot in the dark, maybe add a not for the other counters.

    happiness_bonus bonus -1 requires factions { byzantium, } and event_counter trait_one_counter 1 and not event_counter trait_one_counter 2 and not event_counter trait_one_counter 3 and not etc...

    VB
    Quote Originally Posted by Aikanár View Post
    The use of event counters outside the campaign_script is limited to either 0 = off or 1 = on.
    = the game does not recognise event counters set to anything else than 0 or 1 outside of the campaign script, which in this case means insight the edb


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  5. #5
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: building capabilities issue...

    monitor_event PreFactionTurnStart FactionIsLocal

    Because you can't fire event counters after settlementturnstart and have them affect building capabilities. You might see an effect on the building description but it isn't there in time to be taken into account by the game.

    Also, event counters only work with 0 and 1 in edb - So use seperate counters.

    And you should need to add a condition that the event counters for the bonuses you don't want are set to 0 or they will all be listed. But individual capabilities vary in how conditions can be used with them, and I haven't checked happiness, so see how it goes.
    Last edited by Taiji; March 12, 2012 at 01:22 PM.

Posting Permissions

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