Page 2 of 2 FirstFirst 12
Results 31 to 51 of 51

Thread: Research: Parameters for commands & console commands

  1. #31

    Default Re: Research: Parameters for commands & console commands

    That is a good idea. But rather than hidding the building out of the way I think I will make it something obviously connected to victory. If the player decides to knock it down and relive victory, that's OK with me.

  2. #32

    Default Re: Research: Parameters for commands & console commands

    I have tried this method out and it works fine. Here is the new trigger.

    Code:
    ;------------------------------------------
    Trigger Greek_Cities_Win_Trigger
        WhenToTest SettlementTurnStart
    
        Condition SettlementIsLocal
            and SettlementName Sparta
            and I_LocalFaction greek_cities
    	and not SettlementBuildingExists = victory_memorial
            and I_SettlementOwner Athens = greek_cities
    
        AdviceThread Greek_Cities_Win_Thread  1
    Now, in addition to triggering the victory scroll the script creates a unique building, victory_memorial, in Sparta. Note that I had to change the WhenTotest to SettlementTurnStart rather than FactionTurnStart, so that I could use the SettlementBuildingExists test.

  3. #33

    Default Re: Research: Parameters for commands & console commands

    Doubt has been cast over whether the add_money console command can be used for anyone aside from the local faction. If anyone has anything different to report, please let us know.
    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

  4. #34

    Default Re: Research: Parameters for commands & console commands

    According to The Mark, the following works:
    set_building_health [settlement] [building line] [health]

    Note that the building line possibly refers to the complex name rather than the individual building name.

    Many thanks to him.
    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

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

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

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

  8. #38
    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

  9. #39

    Default Re: Research: Parameters for commands & console commands

    Quote Originally Posted by Duke John
    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.
    I tried this to use this to see if I could make a banner take a settlement. Does this work for that or does it only work if the banner and the settlement belong to the same faction?
    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. #40
    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

    I have yet to test that. I am trying to clean up the map by moving all AI captains to a nearby settlement. It worked for the player faction, all of them moved and merged into the settlement. But when I use the move commmand for the AI the armies refuse to move. The command should work as it was used for the prologue. Do you know how to move AI armies?

    Edit: discovered that AI armies cannot merge into a settlement in the player's turn. They can still be moved to other tiles though.
    Last edited by Duke John; 08-31-2005 at 13:07.

  11. #41

    Default Re: Research: Parameters for commands & console commands

    Quote Originally Posted by Duke John
    Do you know how to move AI armies?
    Short of the move_character console command, no. And you can't use that to move armies into settlements, they don't appear in them properly.
    Last edited by Epistolary Richard; 08-31-2005 at 16:09.
    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

  12. #42
    aka AggonyAdherbal Member Lord Adherbal's Avatar
    Join Date
    Oct 2004
    Location
    Belgium
    Posts
    1,014

    Default Re: Research: Parameters for commands & console commands

    I posted something about giving money and settlements to factions here:
    https://forums.totalwar.org/vb/showthread.php?t=53365

    not sure if it was the right forum since it's about Scripting, but it is a sort of tutorial
    Member of The Lordz Games Studio:
    A new game development studio focusing on historical RTS games of the sword & musket era
    http://www.thelordzgamesstudio.com

    Member of The Lordz Modding Collective:
    Creators of Napoleonic Total War I & II
    http://www.thelordz.co.uk

  13. #43

    Default Re: Research: Parameters for commands & console commands

    Yep, that was the right forum for it.
    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

  14. #44

    Default Re: Research: Parameters for commands & console commands

    Updates, updates, working spawn_army from Jerome Grasdyke

    "Ok, i've had a quick look at spawn_army for you... the syntax you worked out above is essentially correct -- the command expects a sequence of "unit" commands followed by unit id's as phrases ... the following should work:

    spawn_army
    faction romans_julii
    character Foedus Chaerea, general, command 0, influence 0, management 0, subterfuge 0, age 20, x 89, y 80
    unit roman generals guard cavalry, soldiers 20 exp 9 armour 1 weapon_lvl 0
    unit roman legionary first cohort ii, soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman legionary cohort ii, soldiers 60 exp 0 armour 0 weapon_lvl 0
    unit roman praetorian cohort i, soldiers 60 exp 0 armour 0 weapon_lvl 0
    end

    The reason why unit and end appeared not to be recognised was because the data after and before (respectively) were incomplete.

    This error is typical; understanding the Rome descr parser could have helped some. Essentially it works by parsing Words, which are letter sequences ended by whitespace, Phrases, which are word sequences ended by comma's, and Lines, which are word and phrase sequences ended by newline characters. In this case, there had to be a phrase terminator (comma) after the unit id, because otherwise the parser couldn't know where the unit id ends as a unit id is a phrase - a sequence of arbitrary words.

    This is why some identifiers in the game use underscores and others not - internally some things are typed as Words and others as Phrases. If you look out for this kind of pattern it may help you spot wrongly-formed scripts... I'll see about getting you guys some docudemon files up-to-date for Barbarian Invasion."
    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

  15. #45

    Red face Re: Research: Parameters for commands & console commands

    hehehe that awsome... (misspelling =p)

    now in my historical addon for rtr i can make hannibal be summoned at the alps in the year of 218 spreading fear into the romans... =) MUAHAHAHAHA

    script if a nasty tool for the modders to spread their cruelty on innocent and good players hahahahah =) ok ok i´m not cruel, just pretending ahahhaha


    OMG now i can make hole armies been summoned into historical places to force some historical wars or conflicts =) like the first slave war for example... ghahah


    my historical information about the hannibal´s forces sadly are being taken out from the battle of cannae (http://www.roman-empire.net/army/cannae.html)

    Epistolary Richard tanks you very much about the help your givving me sometimes and for this great information but i wonder why the ""... this information was provided for someone not listed ? =) thanks again... hehe
    here is the code for the spawn army of hannibal... i´m gonna test it now

    hope it works

    script

    spawn_army
    faction carthage
    character Hannibal, general, command 7, influence 8, management 0, subterfuge 0, age 20, x 89, y 80
    unit carthaginian general's cavalry, soldiers 8 exp 7 armour 2 weapon_lvl 2
    unit carthaginian slinger, soldiers 40 exp 2 armour 1 weapon_lvl 0
    unit carthaginian slinger, soldiers 40 exp 1 armour 0 weapon_lvl 1
    unit libyan spearmen, soldiers 60 exp 2 armour 1 weapon_lvl 0
    unit libyan spearmen, soldiers 60 exp 0 armour 0 weapon_lvl 1
    unit libyan spearmen, soldiers 60 exp 1 armour 1 weapon_lvl 0
    unit aor spain infantry, soldiers 40 exp 3 armour 0 weapon_lvl 1
    unit aor spain infantry, soldiers 40 exp 0 armour 1 weapon_lvl 1
    unit aor spain infantry, soldiers 40 exp 4 armour 0 weapon_lvl 1
    unit aor gaul swordsmen, soldiers 40 exp 1 armour 1 weapon_lvl 0
    unit aor gaul swordsmen, soldiers 40 exp 0 armour 1 weapon_lvl 0
    unit punic cavalry, soldiers 24 exp 2 armour 0 weapon_lvl 1
    unit punic cavalry, soldiers 24 exp 1 armour 0 weapon_lvl 1
    unit carthaginian elephant forest, soldiers 6 exp 3 armour 2 weapon_lvl 2
    unit merc numidian cavalry, soldiers 24 exp 1 armour 0 weapon_lvl 1
    unit merc numidian cavalry, soldiers 24 exp 1 armour 0 weapon_lvl 1
    unit aor punic heavy cavalry, soldiers 20 exp 2 armour 1 weapon_lvl 0
    unit aor punic heavy cavalry, soldiers 20 exp 2 armour 1 weapon_lvl 0
    unit aor punic pikemen, soldiers 60 exp 3 armour 2 weapon_lvl 1
    unit aor punic pikemen, soldiers 60 exp 3 armour 2 weapon_lvl 1
    end

    end_script
    " Cool modders read and write tutorials
    Cool modders help each other out "

    by Epistolary Richard

  16. #46
    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

    Welcome to the forum Black Crow, that army should come as a nasty surprise...

  17. #47

    Lightbulb Re: Research: Parameters for commands & console commands

    a few corrections :
    if you wanna a family member put , named character

    okok everybody must know it... i confuse myself hahaha

    the new code :

    script

    spawn_army
    faction carthage
    character Hannibal, named character, command 7, influence 8, management 0, subterfuge 0, age 35, x 89, y 80
    unit carthaginian general's cavalry, soldiers 18 exp 6 armour 2 weapon_lvl 2
    unit carthaginian slinger, soldiers 120 exp 2 armour 1 weapon_lvl 0
    unit carthaginian slinger, soldiers 120 exp 1 armour 0 weapon_lvl 1
    unit libyan spearmen, soldiers 180 exp 2 armour 1 weapon_lvl 0
    unit libyan spearmen, soldiers 180 exp 0 armour 0 weapon_lvl 1
    unit libyan spearmen, soldiers 180 exp 1 armour 1 weapon_lvl 0
    unit aor spain infantry, soldiers 120 exp 3 armour 0 weapon_lvl 1
    unit aor spain infantry, soldiers 120 exp 0 armour 1 weapon_lvl 1
    unit aor spain infantry, soldiers 120 exp 4 armour 0 weapon_lvl 1
    unit aor gaul swordsmen, soldiers 120 exp 1 armour 1 weapon_lvl 0
    unit aor gaul swordsmen, soldiers 120 exp 0 armour 1 weapon_lvl 0
    unit punic cavalry, soldiers 72 exp 2 armour 0 weapon_lvl 1
    unit punic cavalry, soldiers 72 exp 1 armour 0 weapon_lvl 1
    unit carthaginian elephant forest, soldiers 18 exp 3 armour 2 weapon_lvl 2
    unit merc numidian cavalry, soldiers 72 exp 1 armour 0 weapon_lvl 1
    unit merc numidian cavalry, soldiers 72 exp 1 armour 0 weapon_lvl 1
    unit aor punic heavy cavalry, soldiers 60 exp 2 armour 1 weapon_lvl 0
    unit aor punic heavy cavalry, soldiers 60 exp 2 armour 1 weapon_lvl 0
    unit aor punic pikemen, soldiers 180 exp 3 armour 2 weapon_lvl 1
    unit aor punic pikemen, soldiers 180 exp 3 armour 2 weapon_lvl 1
    end

    end_script


    the inclusion of these 2 lines dont let the script to be executed... in my case the show me how button dont appears if i input those in the script...

    traits GoodAdministrator 2, GoodCommander 2, NaturalMilitarySkill 1
    ancillaries poet, chirurgeon, historian, oracle, orator

    this picture is a test of the old script just to test is it works and it works fine... the date, the age of hannibal, the location are all messed up, this will be corrected but it is just for tests... the picture is ...

    " Cool modders read and write tutorials
    Cool modders help each other out "

    by Epistolary Richard

  18. #48

    Default Re: Research: Parameters for commands & console commands

    ok the image doesnt work... lets try this other link at imageshack




    as i forguet to add in the other post, i´m working in a historical addon for rtr
    6.x that will lead the player trought the ancient wars of rome, and historical battles, and historical events... the system works on show_me script... so i accept help or sugestions =) thanks.
    =)

    ps. this is not a spawn i dont know how to edit a post... or i dont have permission to do it, so if a moderator could just mix these two posts ill be apreciated
    " Cool modders read and write tutorials
    Cool modders help each other out "

    by Epistolary Richard

  19. #49
    Member Member aleajactaest's Avatar
    Join Date
    Sep 2005
    Location
    France
    Posts
    10

    Default Re: Research: Parameters for commands & console commands

    In your script for Hannibal, under 'spawn_army', you can put other lines :
    'console_command give_trait Hannibal GoodCommander 2'
    'console_command give_trait Hannibal GoodAdministrator 2' eetc...
    It works. I made the same thing for Spartacus.

  20. #50

    Default Re: Research: Parameters for commands & console commands

    guys I've got a problem with the create_unit command, i don't know what to type nexte because the only thing all sites are saying is: create_unit {settlement/character_name} {unit_id} {opt: how many}{opt: exp/armour/weapon}
    can one of you guys post a pre made command for Armoured Hoplites because when i do it from all the sites examples my console says not reconising unit id

  21. #51
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Research: Parameters for commands & console commands

    Quote Originally Posted by scorpionsting View Post
    guys I've got a problem with the create_unit command, i don't know what to type nexte because the only thing all sites are saying is: create_unit {settlement/character_name} {unit_id} {opt: how many}{opt: exp/armour/weapon}
    can one of you guys post a pre made command for Armoured Hoplites because when i do it from all the sites examples my console says not reconising unit id
    The obvious problem, which the error is telling you, is that you have the wrong unit id. The command takes the unit type from EDU. Find that and you should be fine.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

Page 2 of 2 FirstFirst 12

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