Results 1 to 30 of 42

Thread: Can I use a script to end the turn?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member mrtwisties's Avatar
    Join Date
    Nov 2007
    Location
    Sydney, Australia
    Posts
    235

    Default Re: Can I use a script to end the turn?

    Thanks for the -ai link, M. I'm testing that as well.

  2. #2
    Member Member mrtwisties's Avatar
    Join Date
    Nov 2007
    Location
    Sydney, Australia
    Posts
    235

    Default Re: Can I use a script to end the turn?

    Hmmm... my capacity to edit my posts seems to appear and disappear at random.

    Anyhoo, first attempts with the -ai command are a bit buggy. I can put myself in control of a faction, I can end turn, I can keep playing with that faction for a bit... I can even save the game I'm playing with the faction. But I can't load the game again. Any attempt to do so CTDs.

    I'm trying again with a different faction - the Julii, instead of the Gauls. I figure the Gauls aren't unlocked in my RTW game, so that might be why loading a Gallic game CTDs.

  3. #3
    Member Member mrtwisties's Avatar
    Join Date
    Nov 2007
    Location
    Sydney, Australia
    Posts
    235

    Default Re: Can I use a script to end the turn?

    The -ai thing totally works. I just took over a Julii campaign in 168 BCE. Then I saved it. Then I closed RTW. Then I loaded it and played for a bit.

    Totally. Works.

  4. #4
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

    Default Re: Can I use a script to end the turn?

    afaik the -ai switch will not work properly ...

    at least I've ran a zillion games with the -ai switch and there is always "something" that makes me believe there is some diff. (dont ask me what, I just wouldnt risk it, the -ai switch clearly hasnt been intended to jump a campaign ... my advise, dont use it as such)


    also about the "simulate_mouse_click lclick_down/up" ... afaik you do not need both, dont know where people got the 2nd command from but I'm not using it and have the same results ...


    G

  5. #5
    Member Member mrtwisties's Avatar
    Join Date
    Nov 2007
    Location
    Sydney, Australia
    Posts
    235

    Default Re: Can I use a script to end the turn?

    You're right. When I implemented the -ai switch in EB, I couldn't get the EB background script to work, even when I turned the ai switch off and reloaded the game.

  6. #6
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

    Default Re: Can I use a script to end the turn?

    just wondering, what are you trying to do?

    make some sort of randomised start?

    if so, there are easier ways imo, wich again leave slightly more of the control in your hands ...

    like I've partially set up my game, take traits and ancillaries, I've made a few hidden traits, where one is used only in descr_strat, it is given to starting families wich than at characterturnstart get a random collection of traits

    like so;
    Code:
    ;------------------------------------------
    Trigger game_startup2
        WhenToTest CharacterTurnStart
    
        Condition IsGeneral
              and Trait RS_StartGame >= 1
    
        Affects RS_StopGame  1  Chance  100 
        Affects RS_Management  1  Chance  30 
        Affects RS_Influence  1  Chance  30 
        Affects RS_Law  1  Chance  30 
        Affects RS_Trading  1  Chance  30 
        Affects RS_TaxCollection  1  Chance  30 
        Affects RS_TrainingAgents  1  Chance  30 
        Affects RS_TrainingUnits  1  Chance  30
    the stopgame trait prevents it giving traits again as its the startgame trait's antitrait, together with some random augmentation of the traits the generals get in descr_strat
    wich together wich some other settings creates a mild feel of a diff game each "turn 0" (gamestart), scripts can even do the same with entire factions


    G

  7. #7
    Member Member mrtwisties's Avatar
    Join Date
    Nov 2007
    Location
    Sydney, Australia
    Posts
    235

    Default Re: Can I use a script to end the turn?

    Hi RedSpot, I explained what I'm trying to do a bit more clearly in posts 9 and 11. It's not just about a randomised start - it's about starting the game at a whole new point in history, when the factions are a little more developed.

    Since the -ai switch seems a bit buggy, I'm having another crack at my original script. What I'd really like to do now is to set up code to have the AI deal with battles and diplomacy.

    Here's my script at the moment:

    script

    declare_counter loop
    set_counter loop 0

    monitor_event FactionTurnStart FactionType romans_julii
    and I_TurnNumber < 5
    console_command control greek_cities
    campaign_wait 10
    console_command add_money 40000
    console_command control romans_julii
    end_monitor

    ;monitor_event PreBattlePanelOpen
    ;console_command puppify_my_love
    ;end_monitor

    ;monitor_event NavalAutoResolvePanelOpen
    ;console_command puppify_my_love
    ;end_monitor

    ;monitor_event DiplomacyMission
    ;console_command puppify_my_love
    ;end_monitor

    ;monitor_event ScrollOpened
    ;console_command puppify_my_love
    ;end_monitor

    while I_CompareCounter loop = 0
    end_while

    end_script
    If I take out the comments on my new monitor_events, RTW 1.5 CTDs as it loads (presumably when it tries to load this script). But these events are in the docudemon - can anyone tell me what I'm doing wrong?

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