Results 1 to 30 of 102

Thread: A Beginner's Guide to Scripting & Scripting "How To"s

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: A Beginner's Guide to Scripting & Scripting "How To"s

    - Do you want the spawning armies to appear in a specific date or only from a given year (in a randomly chosen date)?
    - Do you want the armies to spawn only once in game?
    - Do you want the armies to spawn at the same time?
    To these questions , my idea is to spawn the army only once at a specific date, for instance the first Greek army (Phyrrus) on summer 275 BC. I've restested my script (without editing from the frist spawn (in 275) to the second (in 246) and it works both times. The only this is if I save the game and reload. The second spawn (hamilcar in Sicily) keeps respawning every time I load the game and so the third one (Gaul) in 236 ..(not quite sure the date , but something like that.. )

    Just to test the syntax, you can prepare a short script that would allow one army to spawn in one early date (let's say turn number 2).

    Several advices:
    - You must declare all the counters used along the script: declare_counter spawn_armyA, etc.
    - If the army must appear when the counter is zero, you must use the command: I_CompareCounter spawn_armyA = 0 (see the docudemon files).
    Put it as part of the monitor_event
    - Once the army appears, you must change the counter, either setting the value or increasing one unit: set_counter spawn_armyA 1
    Actually I tried to read the docudemon file .. but coun't make any sense of it. Might be because of my poor command of English or my zero knowledge about codes / pc scripts etc..

    In any case, if the army is going to appear only once in a given date, forget the counter and set just the turn number.
    If the armies appear in different turns (with a given order), you can use only one counter, and put in the event the different values (for army A, I_CompareCounter spawn_armyA = 0; for army B, I_CompareCounter spawn_armyA = 1; etc).
    Guess this is what I'm gonna do. Thanks for the advice and I'm gonna see how it works. Just a quick question, will the script take any effect in middel of campaign ? Or will have to restart a new one ?
    Say: O unbelievers, I serve not what you serve, nor do you serve what I serve, nor shall I serve what you are serving, nor shall you be serving what I serve.
    To you your religion, and to me my religion.

  2. #2
    Honorary Argentinian Senior Member Gyroball Champion, Karts Champion Caius's Avatar
    Join Date
    Aug 2006
    Location
    I live in my home, don't you?
    Posts
    8,114

    Default Re: A Beginner's Guide to Scripting & Scripting "How To"s

    ok.

    I explain what im trying to do.I am making a autosave script for RTW 1.5.Yes, there is a feature of autosave, but it is damaged or something that makes a CTD when you click the end turn.
    So, I believe if I create a autosave script, this script will fix the problem.
    Now, How can I create a script of end turn?




    Names, secret names
    But never in my favour
    But when all is said and done
    It's you I love

  3. #3
    Bibliophilic Member Atilius's Avatar
    Join Date
    Oct 2005
    Location
    America Medioccidentalis Superior
    Posts
    3,837

    Default Re: A Beginner's Guide to Scripting & Scripting "How To"s

    Do you see the problem you mention with Autosave in an un-modded game? Autosave (or a manual save) will crash if you've made a mistake character names. I suspect this or some other mod-related change is your real problem.
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



  4. #4
    Honorary Argentinian Senior Member Gyroball Champion, Karts Champion Caius's Avatar
    Join Date
    Aug 2006
    Location
    I live in my home, don't you?
    Posts
    8,114

    Default Re: A Beginner's Guide to Scripting & Scripting "How To"s

    Quote Originally Posted by Atilius
    Do you see the problem you mention with Autosave in an un-modded game? Autosave (or a manual save) will crash if you've made a mistake character names. I suspect this or some other mod-related change is your real problem.
    It is the imperial campaign un-modded.
    I'm not the only who haves the same problem




    Names, secret names
    But never in my favour
    But when all is said and done
    It's you I love

  5. #5

    Default Re: A Beginner's Guide to Scripting & Scripting "How To"s

    tried using the example script for mo_money but that particular section of the txt seems to be disabled in patch 1.5. Tried using the advice thread for the settlements list again no joy.

    I'm trying to get force_diplomacy to work so I can play around with that in the early game if anyone has any help they could give I'd love to click their 'show me how' button.


  6. #6
    Bibliophilic Member Atilius's Avatar
    Join Date
    Oct 2005
    Location
    America Medioccidentalis Superior
    Posts
    3,837

    Post Re: A Beginner's Guide to Scripting & Scripting "How To"s

    Quote Originally Posted by Parenti's Child
    tried using the example script for mo_money but that particular section of the txt seems to be disabled in patch 1.5.
    Just copied and pasted the mo_money code snippet into an existing script of mine and it worked as expected in 1.5. I'd guess you have a problem in the triggering mechanism. The "show me how" button on the advisor should be dark (un-ghosted) until you click it. Is this what you see?
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



  7. #7

    Default Re: A Beginner's Guide to Scripting & Scripting "How To"s

    that's the problem. For some reason the request advice button in the shortcuts screen doesn't even bring up the advisor.

  8. #8

    Default Re: A Beginner's Guide to Scripting & Scripting "How To"s

    Quote Originally Posted by Atilius
    The "show me how" button on the advisor should be dark (un-ghosted) until you click it. Is this what you see?
    Please explain "Dark" and "Ghosted/Un-Ghosted", and how this corresponds to 'greyed-out' vs. 'active'.

    I (as far as I can tell) did everything correctly according to Richard's instructions. My problem is; The "Show Me How" button is greyed out and un-clickable.

    I reset the advisor in the options, as well as changing the Advice Level to 'High', but the Show Me How button is still greyed out (and now that snotty wench pops up to tell me everything she's told me once before already).

    I'm trying to do the force_diplomacy accept thing. Here's my files:

    data\export_descr_advice.txt:
    Code:
    ;------------------------------------------
    AdviceThread Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
        GameArea Campaign
    
        Item Help_Campaign_Keyboard_Shortcuts_Scroll_Text_01
            Uninhibitable
            Verbosity  0 
            Threshold  1 
            Attitude Normal
            Presentation Default
            Title Help_Campaign_Keyboard_Shortcuts_Scroll_Text_01_Title
            Script scripts\show_me\forcedip.txt
            Text Help_Campaign_Keyboard_Shortcuts_Scroll_Text_01_Text1
    data\scripts\show me\forcedip.txt:
    Code:
    script
    
    command_console force_diplomacy accept
    
    end_script
    Now, I added this script while in the middle of an Imperial Campaign, and I'm just wondering if that's the problem...

    On another subject;

    Where does this game hide the Targas? I've looked for them everywhere. There are data files that refer to them, but the targas themselves don't appear to exist anywhere. Like "roman_official_ancillary.tga" for example.

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