Results 1 to 7 of 7

Thread: event that takes money from my treasure and other that falls people happiness

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    HELLEKIN's Avatar Miles
    Join Date
    Nov 2007
    Location
    LISBON - PORTUGAL
    Posts
    396

    Default event that takes money from my treasure and other that falls people happiness

    hello i would like to know what i must do to a hist.event when fires takes money from my treasure(for exemple...a fire in my taxmen office...costs to me 500 florins...) and another that when fires affects people happiness...(exemple anew priest arrives to town...or a new relic found...).i know how to add a hist event but this will affect other things that i donīt know how to do... how is the scripting part in the event?many thanks in advance
    Homo Homini Lupus

  2. #2
    Centenarius
    Join Date
    Jun 2012
    Location
    American president, Spanish conquistador, Italian cartographer
    Posts
    848

    Default Re: event that takes money from my treasure and other that falls people happiness

    I believe you would put the command in with your event, like so:
    Click to view content: 
    monitor_event FactionTurnEnd FactionIsLocal
    historical_event fire
    console_command add_money -500
    terminate_monitor
    end_monitor

    This might help more

  3. #3
    HELLEKIN's Avatar Miles
    Join Date
    Nov 2007
    Location
    LISBON - PORTUGAL
    Posts
    396

    Default Re: event that takes money from my treasure and other that falls people happiness

    Thanks firey5 iīll try this right now
    Homo Homini Lupus

  4. #4
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: event that takes money from my treasure and other that falls people happiness

    I believe that the only way to add happiness is via governor traits or building effects. Buildings would be the way to do it.

    In EDB add this capability to all wall levels (city and castle):

    Code:
    happiness_bonus bonus 5 requires factions { england, } and event_counter happiness_boost 1
    In campaign_script:

    Code:
    set_event_counter happiness_boost 0
    
    monitor_event (whatever)
      historic_event (whatever)
      set_event_counter happiness_boost 1
    end_monitor
    Here it is only affecting england settlements. Plus, once turned on it stays on. Is it supposed to be only temporary?
    Last edited by Withwnar; September 10, 2012 at 03:01 AM.

  5. #5
    HELLEKIN's Avatar Miles
    Join Date
    Nov 2007
    Location
    LISBON - PORTUGAL
    Posts
    396

    Default Re: event that takes money from my treasure and other that falls people happiness

    hello Withwnar,yes is only temporary....my goal here is to have hist events that alters happines...exemple...bad crops...people sad happinnes down,good crops people happy...new priest in town...happiness ,dead of a good priest...happiness down...and so on so onin trits mode how can i do it?....many thaks for your help...
    Homo Homini Lupus

  6. #6
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: event that takes money from my treasure and other that falls people happiness

    "trits mode"?

    Crops: I don't know if that can be tested for.

    To turn off the happiness bonus you just need to set that counter to 0. When to turn it off is the question but it sounds like you have more than one thing turning it on. e.g. If a special relic is found which makes people happy then under what conditions do they stop being happy? When it is lost again? After x turns?

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: event that takes money from my treasure and other that falls people happiness

    Random counters used in monitors below

    Code:
        monitor_event PreFactionTurnStart FactionIsLocal    
            generate_random_counter 1jahr 1 12      
            generate_random_counter 2jahre 1 24      
            generate_random_counter 3jahre 1 36       
            generate_random_counter 5jahre 1 60      
            generate_random_counter 6jahre 1 72       
            generate_random_counter 7jahre 1 84       
            generate_random_counter 8jahre 1 96       
            generate_random_counter prozent 1 100
            
        end_monitor
    Variable harvest from 1648

    Code:
        monitor_event PreFactionTurnStart FactionIsLocal
            and I_CompareCounter month = 8 ; triggered in August
            
            if I_CompareCounter hunger = 0
                if I_EventCounter prozent < 21
                    historic_event ernte_gut
                end_if
                if I_EventCounter prozent > 80
                    historic_event ernte_schlecht ; used in further events of this nature
                end_if
            end_if
            if I_CompareCounter hunger = 1
                historic_event ernte_hunger
            end_if
            
        end_monitor
        
        monitor_event PreFactionTurnStart FactionIsLocal
            and I_CompareCounter month = 6 ; reversal in June the following year
            
            if I_EventCounter ernte_gut = 1
                set_event_counter ernte_gut 0
            end_if
            if I_EventCounter ernte_schlecht = 1
                set_event_counter ernte_schlecht 0
            end_if
            
        end_monitor
    Capability in hinterland_farms (EDB) - number increases with each level

    Code:
                    farming_level 1 requires factions { all, } and not event_counter ernte_gut 1
                    farming_level 2 requires factions { all, } and event_counter ernte_gut 1
    Simulated sickness from 1648

    Code:
        ;--- Lepra ---
        
        declare_counter abzess
        monitor_event PreFactionTurnStart FactionIsLocal
            and I_EventCounter 5jahre = 59
            and I_TurnNumber > 3
            
            historic_event seuche_4
            
        end_monitor
        
        monitor_event PreFactionTurnStart FactionIsLocal
            if I_EventCounter seuche_4 = 1
                inc_counter abzess 1
            end_if
            if I_CompareCounter abzess = 2
                set_event_counter seuche_4 0
                set_counter abzess 0
            end_if
            
        end_monitor
        
        ;--- Pest! ---
        
        declare_counter beule
        monitor_event PreFactionTurnStart FactionIsLocal
            and I_EventCounter 3jahre = 32
            and I_TurnNumber > 3
            
            historic_event seuche_3
            
        end_monitor
        
        monitor_event PreFactionTurnStart FactionIsLocal
            if I_EventCounter seuche_3 = 1
                inc_counter beule 1
            end_if
            if I_CompareCounter beule = 2
                set_event_counter seuche_3 0
                set_counter beule 0
            end_if
            
        end_monitor
        
        ;--- Schwindsucht ---
        
        declare_counter schwind
        monitor_event PreFactionTurnStart FactionIsLocal
            and I_EventCounter 3jahre = 33
            and I_TurnNumber > 3
            
            historic_event seuche_2
            
        end_monitor
        
        monitor_event PreFactionTurnStart FactionIsLocal
            if I_EventCounter seuche_2 = 1
                inc_counter schwind 1
            end_if
            if I_CompareCounter schwind = 2
                set_event_counter seuche_2 0
                set_counter schwind 0
            end_if
            
        end_monitor
        
        ;--- Syphilis ---
        
        declare_counter syphilis
        monitor_event PreFactionTurnStart FactionIsLocal
            and I_EventCounter 3jahre = 34
            and I_TurnNumber > 3
            
            historic_event seuche_1
            
        end_monitor
        
        monitor_event PreFactionTurnStart FactionIsLocal
            if I_EventCounter seuche_1 = 1
                inc_counter syphilis 1
            end_if
            if I_CompareCounter syphilis = 2
                set_event_counter seuche_1 0
                set_counter syphilis 0
            end_if
            
        end_monitor
    Capability in core_building (EDB) - number increases with each level

    Code:
                    population_growth_bonus bonus -2 requires factions { all, } and event_counter seuche_1 1 or event_counter seuche_2 1 or event_counter seuche_3 1 or event_counter seuche_4 1










Posting Permissions

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