Results 1 to 12 of 12

Thread: Questions about scripting commands

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    alhoon's Avatar Comes Rei Militaris
    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,233

    Default Questions about scripting commands

    Can someone please answer me how this can be done with scripting for M2TW (kingdoms)?

    - What's the command for giving a settlement from faction A to faction B?

    - What's the command for giving a named_character from faction A to faction B?

    - What's the command for giving an agent from faction A to faction B?

    - How the condition to check if there's a marriage alliance between faction A and faction B is spelled?
    "monitor_event InterFactionMarriage" doesn't seem to work as intented. It doesn't seem to work between faction A and B but just with marriage alliances in general.

    - What exactly "FactionIsLocal" does?

    Thanks in advance.
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  2. #2

    Default Re: Questions about scripting commands

    I'm not sure about the first three but i think factionsIsLocal test if the player is the local faction i have been getting alot of help for scripting from the scripting course sorry this probably does not help much.

    --Krycek

  3. #3
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Questions about scripting commands

    Look up the docudemons for some references, or my version of them.

    Quote Originally Posted by alhoon View Post
    Can someone please answer me how this can be done with scripting for M2TW (kingdoms)?

    - What's the command for giving a settlement from faction A to faction B?
    There isnt one. The closest thing is capture_settlement which takes the named settlement from whoever owns it and gives it to the player. If you switch factions using the hotseat commands you can move settlement to the new faction, then switch back to your original faction.



    - What's the command for giving a named_character from faction A to faction B?
    There isnt one.



    - What's the command for giving an agent from faction A to faction B?
    There isnt one.



    - How the condition to check if there's a marriage alliance between faction A and faction B is spelled?
    There isnt one. However there are events to detect when marriages occur.

    "monitor_event InterFactionMarriage" doesn't seem to work as intented. It doesn't seem to work between faction A and B but just with marriage alliances in general.
    Of course it doesnt work, you cannot just make up your own conditions. You have to use the ones CA created.

    - What exactly "FactionIsLocal" does?
    Local means the player has control, and is used with all sorts of stuff. CharacterIsLocal, SettlementIsLocal, etc.

  4. #4
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Questions about scripting commands

    Quote Originally Posted by GrnEyedDvl View Post
    There isnt one. The closest thing is capture_settlement which takes the named settlement from whoever owns it and gives it to the player. If you switch factions using the hotseat commands you can move settlement to the new faction, then switch back to your original faction.
    Doesn't making a faction emerge script sort of do this archaic-like :hmmm:

    Code:
    Identifier:         faction_emerge
    Parameters:         emerging_faction, target_faction, min_num_remain, max_order_threshold, max_order_threshold_surrounding, max_order_dropoff, min_level_threshold, fire_emerge_message, leader_script_label, leader_name, leader_age
    Description:        Evaluates the target factions settlements with a settlement level >= min_level_threshold and public order <= max_order_threshold.  If the settlement with the lowest order fails, is it turned over to the emerge_faction.  The leader_script_label and leader_name are used if a new leader is required.  min_num_remain specifies the minimum number of settlements for the target faction to keep. Surrounding regions are also evaluated against the surrounding threshold.
    Sample use:         faction_emerge barons_alliance England 1 85.0 100.0 1.2 town false edward1 Edward 30
    Class:              FACTION_EMERGE
    Implemented:        Yes
    Author:             ScottL
    I personally have never tried it, I don't know if that was introduced for the Brittania campaign but it certainly looks like it in the Description. Certainly provides some interesting implications, maybe not for giving to an existing AI faction though.

    Cheers,
    Augustus

  5. #5
    alhoon's Avatar Comes Rei Militaris
    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,233

    Default Re: Questions about scripting commands

    THanks, I'll check the commands. I wasn't aware that such a document existed.

    About FactionisLocal, I had come to the same conclusion... but it doesn't work all the time for me. Perhaps it's something else. Anyway as long as there is a list of the script commands, I'll have my answers.
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  6. #6
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Questions about scripting commands

    You have to make sure you are using the right condition with the events, check the sports lines and the trigger requirements lines.

  7. #7
    alhoon's Avatar Comes Rei Militaris
    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,233

    Default Re: Questions about scripting commands

    The following doesn't properly for me.
    In fact it works all the time, not dependant on what the FS with the papal states is. What I do wrong?

    monitor_event FactionTurnStart FactionType hungary
    if FactionStanding papal_states > 0.7

    Blah, blah, blah

    terminate_monitor
    end_if

    NOTE: even if I put anything beyond the "if FactionStanding" the script fires! And I mean evem if I type "if FactionStanding sdfecs>0.7"
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  8. #8
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: Questions about scripting commands

    You might want to read my scripting tutorial in this thread. A decent source to get information about how the event/condition system works is my old trigger tutorial (linked in the scripting tutorial)

    No thing is everything. Every thing is nothing.

  9. #9
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Questions about scripting commands

    You are using an event that doesnt export the proper trigger requirement. There IS a reason they are listed in the files. Do as Alpaca suggested and read his tutorial, and then read these too.

    http://www.twcenter.net/forums/showthread.php?t=121589

    http://www.twcenter.net/forums/forumdisplay.php?f=743

  10. #10
    alhoon's Avatar Comes Rei Militaris
    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,233

    Default Re: Questions about scripting commands

    Quote Originally Posted by GrnEyedDvl View Post
    You are using an event that doesnt export the proper trigger requirement. There IS a reason they are listed in the files. Do as Alpaca suggested and read his tutorial, and then read these too.

    http://www.twcenter.net/forums/showthread.php?t=121589

    http://www.twcenter.net/forums/forumdisplay.php?f=743
    Thanks I guess. It seems I have to do more reading.

    However I checked the triggers and the requirements. It seems I need to be more careful. Those exports are a bit tricky.

    EDIT: AWESOME TUTORIAL! ! ! It could have saved me dozens of hours if I have seen them before started scripting! Thanks!

    I was thinking, can you compile your tutorials to a word file for us to download?

    EDIT2: Can't give you rep again.
    Last edited by alhoon; August 26, 2008 at 10:57 AM.
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  11. #11
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Questions about scripting commands

    I have never used that one either, but I assumed he meant giving to an already existing faction.

  12. #12
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Questions about scripting commands

    No rep needed.

    Actually there is a modding manual in progress for both RTW and M2. It will probably be a while, but when we finish those we will start with Empire.

Posting Permissions

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