Results 1 to 30 of 102

Thread: A Beginner's Guide to Scripting & Scripting "How To"s

Hybrid View

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

    Default Re: How to: spawn an army

    Quote Originally Posted by Epistolary Richard
    How to: Spawn an Army
    Code:
    script
    spawn_army
    faction romans_julii
    character Flavius Julius, 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
    end_script
    If you are playing as the Julii this will create an army banner with the relevant captain/family member as you define. Most of the syntax is the same as in descr_strat, however the missing clue was the positioning of the commas after the unit names as discovered here

    Family members who are spawned, however, do not appear to join that faction's family tree.
    Do you know if this can be randomized like the Marian Reforms? How would you set the date for the event if possible?
    PatWest the 'Intermediate Level Modder'

  2. #2

    Default Re: A Beginner's Guide to Scripting & Scripting "How To"s

    im trying to spawn an army but im lost what must i change in the advice thread for the spawn army not the mo money. im a noob modder

  3. #3
    is not a senior Member Meneldil's Avatar
    Join Date
    Aug 2004
    Location
    France
    Posts
    3,074

    Default Re : A Beginner's Guide to Scripting & Scripting "How To"s

    Hum, another issue there. I'm trying to make a simple campaing map perfect spy script.

    I edited export descr advice (both in the data and bi/data)
    ;------------------------------------------
    AdviceThread Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
    GameArea Campaign

    Item Help_Campaign_Keyboard_Shortcuts_Scroll_Text_01
    Uninhibitable
    Verbosity 0
    Threshold 1
    Attitude Normal
    Presentation Default
    Title Help_Campaign_Keyboard_Shortcuts_Scroll_Text_01_Title
    Script scripts\show_me\spy.txt
    Text Help_Campaign_Keyboard_Shortcuts_Scroll_Text_01_Text1
    I added the spy.txt file in the correct folder (in fact, since I wasn't sure where to put it, I made a spy.txt for data/scripts/show_me/ and one for bi/data/scripts/show_me/

    The campaign works fine, but if I press F1 and click on the advice button ('?'), the advisor appears, but the game freezes.
    Any idea about what's going on ?

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

    Default Re: A Beginner's Guide to Scripting & Scripting "How To"s

    @Meneldil

    I think that your problem is in the script. Something similar happened also to me when there were errors in the script.
    It would be better if you post it here, or look for the help of the "scripting Gods".

  5. #5
    is not a senior Member Meneldil's Avatar
    Join Date
    Aug 2004
    Location
    France
    Posts
    3,074

    Default Re : A Beginner's Guide to Scripting & Scripting "How To"s

    Well, I don't think so actually.
    With BI, the shortcut advisor apparently doesn't work (there are commas that prevent the script from working) : if you click on the advice button, nothing will happen.
    I deleted the commas, both before the trigger and before the advisor thread, and I did not add any script. I launched the campaign, and clicked on '?' in the shortcut panel, and the game stopped aswell.

    Edit : Oddly, the script will work with another advisor help request command.
    Last edited by Meneldil; 12-06-2005 at 22:35.

  6. #6

    Default Re: A Beginner's Guide to Scripting & Scripting "How To"s

    I have a little (though annoying problem) regaring this script. Maybe I did it wrong way but here it goes.

    In my Imperator mod, I added the spawn army script to make Phyrrus army reappeared in summer 275 BC. I edited base on the 4TPY script. Everything goes fine, the years came and the army 'arrived' and I had another great but difficult battle with the Greeks when I thought that Phyrrus has finally been banished from Italy.

    The problem came after the event has passed. Everytime I restarted the game, after save and reloading, everytime I started the 4TPY script the army reappears , even when the Greek Cities has been eliminated. Didn't cause CTD or anything, and the game can goes on with no problem at all (except the battle with Phyrrus with his elephant army again... )

    Do note however, this only happened 'after' restarting the game If reload a save game from already on going game this 'bug' wont appear. What I always did is reload again and the spawn thing didn't appear anymore.

    I'm at lost....
    Say: O unbelievers, I serve not what you serve, nor do you serve what I serve, nor shall I serve what you are serving, nor shall you be serving what I serve.
    To you your religion, and to me my religion.

  7. #7

    Default Re: A Beginner's Guide to Scripting & Scripting "How To"s

    Are you using a background script or an event script?

    Post the bits of your scripting files relevant to this event and we'll have a look.
    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