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

    A few more questions: the only way to browse if a character has one of a list of traits is by having a monitor event for each trait, right? i.e. there's no way to do something like right:

    if Trait X = 1
    do A
    if Trait Y = 1
    do B

    Also, is there a limit for how many "and" conditions can exist for event_monitors? This sort of information seems not to be included in the Hardcoded Limits thread.
    Last edited by SigniferOne; 03-12-2006 at 21:44.

  2. #2

    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

  3. #3
    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?

  4. #4
    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.

  5. #5
    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).

  6. #6
    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.

  7. #7

    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

  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 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.

  11. #11

    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

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