Results 1 to 30 of 116

Thread: An Intermediate Guide to Scripting

Hybrid View

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

    Default Re: An Intermediate Guide to Scripting

    I think that's because no one has ever hit it. From my understanding of CA it seems unlikely that they would have imposed a limit because they never expected people to be using big scripts. But equally there may be an extent by which a big monitor may not work right.

    There's no easy way to do the trait thing - however if you want to use that in many different monitors then you may want to have a separate monitor to use the existence to set a counter. You can then use an if I_CompareCounter line within your monitors.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  2. #2
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: An Intermediate Guide to Scripting

    I've found problems in making the command test_message working:
    https://forums.totalwar.org/vb/showp...65&postcount=8

    Any of the experts in scripting could give me the tip?

  3. #3
    Member Member Piko's Avatar
    Join Date
    Dec 2004
    Location
    Belgium,Bredene
    Posts
    59

    Default Re: An Intermediate Guide to Scripting

    Can someone supply me with a code for changing diplomacy between factions? Thanks.

  4. #4
    Member Member Stuie's Avatar
    Join Date
    Aug 2001
    Location
    Upper Gwynedd, PA
    Posts
    406

    Default Re: An Intermediate Guide to Scripting

    diplomatic_stance
    Availability: campaign
    Usage: diplomatic_stance <faction_a> <faction_b> <allied/neutral/war>:
    Set the diplomatic stance between the two factions
    So the usage in a script would look like this:

    Code:
         console_command diplomatic_stance romans_brutii parthia neutral
         console_command diplomatic_stance romans_julii parthia neutral
         console_command diplomatic_stance romans_scipii parthia neutral
         console_command diplomatic_stance romans_senate parthia neutral
    That makes all the roman factions "Neutral" toward Parthia, whether they were are war or allied. Note that only allied, neutral and war are available - there does not appear to be a way to force protectorates (I only mention this since that's what people usually seem to be looking for).

  5. #5
    Member Member Piko's Avatar
    Join Date
    Dec 2004
    Location
    Belgium,Bredene
    Posts
    59

    Default Re: An Intermediate Guide to Scripting

    Thanks, that was easier than I thought it was.
    (BTW I'm Piko on the RTR forums, that was the only thing I wasn't able to locate in your TFT files, thanks again!)

    Yet another question, can you force ownership?
    Last edited by Piko; 04-29-2006 at 19:15.

  6. #6

    Default Re: An Intermediate Guide to Scripting

    Can you count how many battles the player has fought in the campaign so far?

    For the glory of Rome

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

    Post Re: An Intermediate Guide to Scripting

    Is this what you're looking for? It doesn't actually return a number unfortunately.

    Code:
    ---------------------------------------------------
    Identifier:              BattlesFought
    Trigger requirements:    faction
    Parameters:              logic token, quantity
    Sample use:              BattlesFought = 6
    Description:             How many battles has the player fought so far during this campaign?
    Battle or Strat:         Either
    Class:                   BATTLES_FOUGHT
    Implemented:             Yes
    Author:                  Guy
    ---------------------------------------------------
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



  8. #8

    Default Re: An Intermediate Guide to Scripting

    Hi all!

    I have a question about assassination and whether it's possible to script it?

    My idea involes the assassination a faction leader that i don't know the name of i.e a spawned character, has anyone tried this?

    Cheers!
    Fall of the Republic - Rise of the Empire (FRRE)
    Late Roman Republic mods for B.I

  9. #9

    Default Re: An Intermediate Guide to Scripting

    To my knowledge, no one's had any luck in scripting agent missions. The kill_character command, which could be used instead, as you say needs to know the character's name.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  10. #10

    Default Re: An Intermediate Guide to Scripting

    Quote Originally Posted by Epistolary Richard
    To my knowledge, no one's had any luck in scripting agent missions. The kill_character command, which could be used instead, as you say needs to know the character's name.
    Ah, oh well - back to the drawing board. Thank you anyway.
    Fall of the Republic - Rise of the Empire (FRRE)
    Late Roman Republic mods for B.I

  11. #11

    Default Re: An Intermediate Guide to Scripting

    Quote Originally Posted by Stuie
    So the usage in a script would look like this:

    Code:
         console_command diplomatic_stance romans_brutii parthia neutral
         console_command diplomatic_stance romans_julii parthia neutral
         console_command diplomatic_stance romans_scipii parthia neutral
         console_command diplomatic_stance romans_senate parthia neutral
    That makes all the roman factions "Neutral" toward Parthia, whether they were are war or allied. Note that only allied, neutral and war are available - there does not appear to be a way to force protectorates (I only mention this since that's what people usually seem to be looking for).
    I wonder, is there a way to detect the event of one faction becoming a protectorate?
    If so, there might be a way to work around the annoying alliance issue with protectorates (You can´t attack allies of your protectorate without losing the protectorate), simply by setting the relations of the protectorate to all other factions to neutral.

  12. #12

    Default Re: An Intermediate Guide to Scripting

    No, there's no way that I'm aware of to detect the existence or creation of a protectorate.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  13. #13
    Member Member Piko's Avatar
    Join Date
    Dec 2004
    Location
    Belgium,Bredene
    Posts
    59

    Default Re: An Intermediate Guide to Scripting

    Here I have learned how to script changing a city's ownership, but now I wish to change a family_members ownership, ex. G M from romans_julii to romans_brutii. I know his name.

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