Results 1 to 2 of 2

Thread: Interactive Event Monitor Help needed

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Live2sculpt's Avatar Senator
    Join Date
    Sep 2009
    Location
    MI, U.S.A.
    Posts
    1,146

    Default Interactive Event Monitor Help needed

    I need to get some HELP on the last details for a small interactive event I'm using to supplement the Americas.
    A simple trigger event I want to toss in. "Sponsor an Expidition" or some such name. In effect its just a popup event at the start of a players turn that invites him to put in 5000 fl for a low probability return of much more.



    But I need some help in stitching this puppy together. I'm not a very good modder in the end, and don't know much about scripting, being a left handed artist type..... What is mainly shutting me down is a lack of understanding how to properly implement a RandomPercent condition in a monitor.
    So if anyone could review this script I've made and tell me what's missing or how to do it better, please jump in and post a response. And if you don't but you might know someone who might, please direct them here for me. Thanks.

    The related scripts are divided into sections in the same window...
    Spoiler Alert, click show to read: 

    ;;;;;;To insert in correct location within campaign_script.txt;;;;;;;;;;;;;

    set_event_counter new_world_accepted 0
    set_event_counter new_world_declined 0
    set_counter exploration_decided 1

    ;--------------------------------------------------------------------

    end_if
    if I_EventCounter merchants_wharf_exists = 1
    and RandomPercent < 5
    historic_event new_world true

    ;---------------------------------------------------------------------

    ;New World
    monitor_event EventCounter I_EventCounter new_world_accepted = 1
    and I_CompareCounter exploration_decided = 1
    generate_random_counter playgame 1 2
    if I_EventCounter invest = 1
    console_command add_money -5000
    console_command give_trait this Gambling 1
    historic_event invest_lost
    end_if
    if I_EventCounter invest = 2
    console_command add_money 50000
    console_command give_trait this Gambling 1
    historic_event invest_won
    end_if
    inc_counter gov_points -2
    set_counter exploration_decided 0
    end_monitor

    ;-----------------------------------------------------------------------

    ;;;;;;;To insert in historic_events.txt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    {NEW_WORLD_TITLE} Sponsor Exploration
    {NEW_WORLD_BODY} Well referenced adventurers are appealing to your Sovereign for official sponsorship. A growing majority of cartographers and merchants are convinced of the outlandish conclusion that the world is in the shape of a perfect sphere. Rumors and legends are now circulating that a strange New World has been discovered by those seeking trade accross the waters to the west. Inspired by these tidings, these new courtiers are proposing a profitable expedition to explore and chart this New World, establish a claim upon lands in your Sovereign's name, and return with holds laden with wonderous treasures. If you choose to sponsor such a risky expedition, your subjects might consider you foolhardy. But there is a possibility of great riches for your coffers if your ambitious adventurers should succeed.
    \n\nWill you risk investing in such a sponsorship?
    \n\n+Yes:
    \nIf you finance these men with 5000 Florins, there is a chance they will return to your court with enough treasures from the new world to rebuild your empire, or even finance a whole new war.
    \nYour Leader would gain a trait for Gambling.
    \n\n-No:
    \nThe would-be explorers respectfully thank you and your court for indulging their proposal, gather their effects, and make plans to appeal to the next likely investor.

    {INVEST_WON_BODY} The Expedition Party that you sponsored returns to your court in a grand style. They have succesfully charted new lands, claimed some vast streches of territory in your name, and they have ships holds bursting with the treasures promised to your Royal coffers. There is only a little spoken of the Godless heathens whom these items were wrested from.
    {INVEST_WON_TITLE} A Great Treasure

    {INVEST_LOST_BODY} The Expedition Party returns with great tales of wonderous sights and future opportunities, but little more. They do tell promises of wealth and power to be had, if another expedition were financed however....
    {INVEST_LOST_TITLE} The Expedition Return

    ;------------------------------------------------------------------------

    ;;;;;;;;;;This is the kind of randomizer I want to use to reduce the odds of success, but how to impliment it correctly?;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    if I_EventCounter invest_won = 1
    and RandomPercent < 20
    historic_event invest_won
    console_command add_money 50000


    Anyway, please let me know of any solutions. I feel this is probably pretty simple for modders experienced with monitor and event work.
    Thanks!

  2. #2

    Default Re: Interactive Event Monitor Help needed

    Semper fidelis!!!

Posting Permissions

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