Results 1 to 30 of 51

Thread: Research: Parameters for commands & console commands

Hybrid View

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

    Default Re: Research: Parameters for commands & console commands

    Thanks, ER.
    As I promised, I have a new doubt.
    As I told before, I was able to write a new trigger, a really simple one:
    Code:
    ;------------------------------------------
    Trigger 2902_Sicilia_Casus_Belli2_Trigger
        WhenToTest FactionTurnStart
    
        Condition I_SettlementOwner Lilybaeum = greek_cities
    
        AdviceThread Sicilia_Casus_Belli2_Thread  1
    That means, in case of Lilybaeum is conquered by greek_cities an advice will appear, in this way:
    Code:
    ;------------------------------------------
    AdviceThread Sicilia_Casus_Belli2_Thread
        GameArea Campaign
    
        Item Sicilia_Casus_Belli2_Text_01
            Uninhibitable
            Verbosity  0 
            Threshold  1 
            Attitude Normal
            Presentation Default
            Title Sicilia_Casus_Belli2_Text_01_Title
            Text Sicilia_Casus_Belli2_Text_01_Text1
    I have played a campaign with greek_cities and I have captured Lilybaeum. Just before pressing the end-of-turn button I saved the campaign, in order to have a quick test for this trigger. The advisor text appeared for the first time,
    but if I try to repeat (with or without modification), the advisor didn't appear anymore. I copied and renamed the trigger and the advice, and again it appeared only once.

    I tried by putting
    Code:
             MaxRepeats  100
    but there was no difference. Is there any problem with the repetition of a trigger?
    Last edited by Monkwarrior; 05-09-2005 at 23:17.

  2. #2

    Default Re: Research: Parameters for commands & console commands

    You want it to appear at the start of every faction's turn? Including the AI ones? For every turn that the Greeks hold Lilybaeum?

    Well, okay, try this trigger instead:
    Code:
    ;------------------------------------------
    Trigger 2902_Sicilia_Casus_Belli2_Trigger
        WhenToTest FactionTurnStart
    
        Condition I_SettlementOwner Lilybaeum = greek_cities
    
        AdviceThread Sicilia_Casus_Belli2_Thread  0
    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: Research: Parameters for commands & console commands

    Thanks, I've just remarked the zero!
    The answer is no, of course, but it was only a question of testing.
    Now I have run a short script:
    Code:
    script
    console_command diplomatic_stance romans_julii greek_cities war
       
    end_script
    and this is the result
    It works!

    So I can think in refining this system to stablish "security perimeters" or "security zones", where any movement will be seen as an agression.
    Thanks again!

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

    Default Re: Research: Parameters for commands & console commands

    I've been also trying the question of spawn_army.
    I think I've tried about a dozen of ways to write it. This is one:

    Code:
    spawn_army
    faction	romans_julii
    character	Publius Scipio, general, command 0, influence 0, management 0, subterfuge 0, age 23, , x 211, y 69 
    army
    unit roman generals guard cavalry early soldiers 15 exp 0 armour 0 weapon_lvl 0
    unit roman velite soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman velite soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman hastati soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman hastati soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman hastati soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman hastati soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman princeps soldiers 41 exp 0 armour 0 weapon_lvl 0
    unit roman triarii soldiers 41 exp 0 armour 0 weapon_lvl 0
    end
    It doesn't work, of course, but perhaps there is a useful information. The show_err option says me "don't recognise this token: unit".
    Does anybody know what token is?
    The interesting question is that it seems that recognise everything until "unit" (so army is necessary, isn't it?). I've tried also:
    roman generals...
    "roman generals...
    create_unit ...
    and the error message is always the same: don't recognise this token {first word}.

  5. #5
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: Research: Parameters for commands & console commands

    I've also tried many ways, copying entries from descr_battle.txt (like it says you should), the sample use given by CA, and even entries from descr_strat. Of course none worked.

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

    Default One possible application: senate missions emulator

    Well, I am interested in the possibilities of scripting from the start of this research, although I am a complete ignorant about all the relative to this aspect.
    Following the advice of Epistolary Richard and with the invaluable help of our moderator, Myrddraal, I've been trying to explore the use of a continuous script.
    My first idea was to simulate the senate missions, either in campaigns where the senate is not present or for factions different from romans (many people claims that Carthage had also a senate and that this faction could also be splited into two).
    This is my first (partial) success:
    Code:
    ;Senate Missions Emulator, by Monkwarrior Beta Version 0.1
    script
    
    ;set up counters
    declare_counter SenateMission	;used to know which mission is currently assigned
    declare_counter loop
    
    ;start of the first mission
    
    advance_advice_thread Senate_Mission_M01_Thread	;communication to the player
    set_counter SenateMission 1
    
    ;success in mission
    monitor_event GeneralCaptureSettlement FactionType romans_julii
    	and SettlementName Segesta
    
    	if I_TurnNumber < 10
    		advance_advice_thread Senate_Mission_Success1_Thread	;message of success
    		console_command add_money 3000	;this is the reward
    		inc_counter SenateMission 1	;pass to the next mission
    	end_if
    
    	terminate_monitor
    end_monitor
    
    ;mission failed
    monitor_conditions I_TurnNumber = 10
    	and I_CompareCounter SenateMission = 1
    
    	advance_advice_thread Senate_Mission_Failed1_Thread	;time for mission is over
    	console_command add_money -1000		;penalty
    	inc_counter SenateMission 1		;pass to the next mission
    
    	terminate_monitor
    end_monitor
    
    while I_CompareCounter loop = 0
    end_while
    terminate_script
    This script is completed with three advices in export_descr_advice, corresponding to the communication of the mission, the success message and the fail message.
    I have checked this script in my Iberia:TotalWar campaign and it works (thanks to the "loop" idea of Myrddraal).

    Why must it be considered a partial success? The advices appear only once. If I start again the campaign, they do not appear again and I must modify the advice name in all the related files. To be useful, the advices should appear only once in a campaign, but in every campaign.
    Does anybody know how to repeat an advice?
    Does anybody know what is this command used for?:
    Code:
    suspend_unscripted_advice false

  7. #7

    Default Re: Research: Parameters for commands & console commands

    Quote Originally Posted by Monkwarrior
    The show_err option says me "don't recognise this token: unit".
    Does anybody know what token is?
    Token is their name for words the scripting engine recognises. The problem with the spawn_army as the sample is written is that the game doesn't recognise 'unit' as an command - either because it never did or because it's been deactivated.

    Why must it be considered a partial success? The advices appear only once. If I start again the campaign, they do not appear again and I must modify the advice name in all the related files. To be useful, the advices should appear only once in a campaign, but in every campaign.
    Does anybody know how to repeat an advice?
    I don't quite understand this, when you say start again the campaign do you mean that you are starting a new campaign or that you are reloading one that you have previously saved?

    suspend_unscripted_advice false
    This command means that no advice will appear unless the thread is advanced as part of the script or the player has requested a piece of advice from a help button.

    Updates
    The top posts have also been updated. Console commands clear_messages and test_message both work. As Myrddraal already noted, spawn_character works to some extent as well. I expanded the testing to agents and found it works fine for them - see the sample use for the command line I used.
    Last edited by Epistolary Richard; 05-23-2005 at 12:00.
    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

  8. #8
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Lightbulb Re: Research: Parameters for commands & console commands

    Scripting with duplicate character names
    If there are multiple characters with duplicate names then the engine organises them at the start of the turn based on their coordinates. The order of checking goes like: check first top row from left right, then second row from left to right. It only checks the first character that it meets. So if you wish to check in script wether Captain Barrivendos has a specific trait then the command will turn out false if the first character doesn't have it, even when the second one in line does.

    How to move an army into a settlement
    Use the move command:
    Code:
    move Captain Barrivendos, 250, 62
    Note that the characther must have enough movement points.

  9. #9
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Research: Parameters for commands & console commands

    ...
    Last edited by Duke John; 08-31-2005 at 11:22. Reason: double post

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

    Default Re: Research: Parameters for commands & console commands

    Quote Originally Posted by Monkwarrior
    Thanks, I've just remarked the zero!
    The answer is no, of course, but it was only a question of testing.
    Now I have run a short script:
    Code:
    script
    console_command diplomatic_stance romans_julii greek_cities war
       
    end_script
    and this is the result
    It works!

    So I can think in refining this system to stablish "security perimeters" or "security zones", where any movement will be seen as an agression.
    Thanks again!
    Excellent! I was looking for something like this back in March when I was building the original TFT. Time to go script the Civil War.... thanks for sharing!

    Edit: And victory condition triggers!! DimeBagHo that is just brilliant! Now I have my TFT work cut out for me...
    Last edited by Stuie; 08-09-2005 at 16:08.

  11. #11
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: Research: Parameters for commands & console commands

    here is a neat scripting command which I found whilst working on the MP campaign:

    call_object_shortcut

    Here is an example of the syntax:

    call_object_shortcut strat_ui speedup_ai

    the strat_ui bit is the category of the shortcut. If you open data\text\descr_shortcuts.txt and scroll to the bottom end, you'll find a list of the shortcuts with their categories to the right.

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