Results 1 to 17 of 17

Thread: Changing Turns Via Scripting

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Changing Turns Via Scripting

    I have some ideas for game play but I know nothing about scripting.

    I know you can kill a character with a script. But can you also change turns via some sort of script?
    Under the Patronage of Lord Condormanius

  2. #2

    Default Re: Changing Turns Via Scripting

    Change turns as in?

    There's the year-jump script, but I don't think that it's what you're looking for.

  3. #3
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Changing Turns Via Scripting

    Ah, perhaps I was not clear enough. It is jumping years.

    Basically. In order to get the family tree I want, I need to kill some characters, but, I would like to try to keep the years they died some what in the past instead of everyone dying all in the first year.

    So, what I would like is, a script that kills a bunch of characters, then jumps ahead in time so when the game starts the characters would be dead for a few years.

    Is this possible?
    Under the Patronage of Lord Condormanius

  4. #4

    Default Re: Changing Turns Via Scripting

    You can change the year via a script no problem you can even change the season

    Code:
        console_command date -58
        console_command season summer


  5. #5
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Changing Turns Via Scripting

    That's great. Thanks for the help. Now to learn scripting or find some one willing to do a few scripts for us.
    Under the Patronage of Lord Condormanius

  6. #6

    Default Re: Changing Turns Via Scripting

    You mean for Inca:TW ? Afaik , the jump date doesn't look to bad to script An advisor , and by pressing the show_me button , you'd jump in time .. That's what i would do

  7. #7
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Changing Turns Via Scripting

    Is there a way of doing it so that when you launch the game it all happens and you don't notice it?
    Under the Patronage of Lord Condormanius

  8. #8

    Default Re: Changing Turns Via Scripting

    Yes , i think so ..

    Code:
    If I_TurnNumber = 0 ; (actually the turn when you open the game i thought)
    
        console_command date 'x'
    
    end_if

  9. #9
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Changing Turns Via Scripting

    Hm, I know I PM'd you for help, but I think you might be close to helping me script for myself here.

    I'll look over the tutorials and give what you wrote above a test on my own. Gotta learn some how eh?
    Under the Patronage of Lord Condormanius

  10. #10

    Default Re: Changing Turns Via Scripting

    its loads easier than that you dont even need a show_me script for what you want just a simple campaign script will do.

    add something like this to your descr_strat (at the bottom)

    Code:
    script
    inca.txt
    Then in a text file in your campaign dir called inca.txt add

    Code:
    campaign_wait 5
    console_command kill_character "whoever"
    console_command date x
    console_command season summer
    end_script
    when you first start the campaign the descr_strat will run the script and "whoever" will be dead and the date will change, you could also add something like a historical even to coinside explaining what has happended to the player.


  11. #11
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Changing Turns Via Scripting

    Oh, that's great, thanks so much guys.
    Under the Patronage of Lord Condormanius

  12. #12

    Default Re: Changing Turns Via Scripting

    I was thinking of going with a background script , but yours is good to Hannibal

  13. #13
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Changing Turns Via Scripting

    Can I repeat that within the script so it looks like this?

    campaign_wait 5
    console_command kill_character "whoever"
    console_command date x
    console_command season summer
    console_command kill_character "whoever"
    console_command date x
    console_command season summer

    end_script
    Under the Patronage of Lord Condormanius

  14. #14

    Default Re: Changing Turns Via Scripting

    Looks good , and afaik , that should work .. Better to test it out though

  15. #15

    Default Re: Changing Turns Via Scripting

    It should work fine. I think I would add a campaign_wait command between each one, just to give the engine time to process (might not be needed though)

    edit: reason I suggested a campaign script is because its suited to this type of job and also the player doesnt have to activate it.
    Last edited by Hannibal Smith; May 27, 2009 at 05:13 PM.


  16. #16
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: Changing Turns Via Scripting

    Quote Originally Posted by Hannibal Smith View Post
    It should work fine. I think I would add a campaign_wait command between each one, just to give the engine time to process (might not be needed though)

    edit: reason I suggested a campaign script is because its suited to this type of job and also the player doesnt have to activate it.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  17. #17
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Changing Turns Via Scripting

    Great! It worked perfectly.

    The next thing I'm going to need is a characters death scripted to occur at a certain date. But I'm thinking that's going to be what KingTheoden 1 has recommended.
    Under the Patronage of Lord Condormanius

Posting Permissions

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