Results 1 to 9 of 9

Thread: Basic Scripting Setup Question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    The Border Reiver's Avatar Artifex
    Patrician

    Join Date
    Feb 2006
    Location
    Australia
    Posts
    3,703

    Default Basic Scripting Setup Question

    Hey Guys, this is really driving me to distraction. I can usually spawn characters until my heart is content on the campaign script, so the basics of scripting are fine for me.

    I've been trying to create a new script from nothing to go into my custom campaign folder. Now I know my custom campaign folder is set up correctly, the game runs and there are no ctd's, and when I test I delete the map.rwm.

    However, no matter what I add to the campaign script, nothing will work, absolutely nothing. Not even proven scripts from my original mod or from vanilla.

    Can someone please confirm that this is the absolute minimum required on the campaign script:

    script

    wait_monitors
    end_script
    And that to actually get the campaign script to run the descr_strat must have this entry at the bottom:

    script
    campaign_script.txt
    Can anybody think of a reason why this would not work? Or have a suggestion of a basic scripting command that I can simply copy and paste to test it?

    Any help here would really be great

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Basic Scripting Setup Question

    You also need an error free descr_strat for the campaign_script to start at all.

    To test that, I usually add the "restrict_strat_radar false" to the end* of my script. And the "console_command toggle_fow" to the beginning.

    The FoW is gone = descr_strat is OK
    The radar restriction is gone = script is OK (spelling wise, working wise is another matter)

    *this will check as well if the script works.










  3. #3
    The Border Reiver's Avatar Artifex
    Patrician

    Join Date
    Feb 2006
    Location
    Australia
    Posts
    3,703

    Default Re: Basic Scripting Setup Question

    Ah I see, I never knew that, thanks Gigantus.

    That means I have to get rid of the 35 or so errors recorded on the system log before I can test the scripting I've done Once I've achieved that I'll report back.

    Thanks for your help...again!

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Basic Scripting Setup Question

    One is glad to be of service....again










  5. #5
    The Border Reiver's Avatar Artifex
    Patrician

    Join Date
    Feb 2006
    Location
    Australia
    Posts
    3,703

    Default Re: Basic Scripting Setup Question

    Brilliant job Gigantus, you were right on the money here with your instructions. Firstly, I had to fix all the errors on the system log, but it still didn't work.

    I then ran Geomod and found plenty of others and now it's working. I appreciate your help with this, as now I have found Geomod, this will be the last time I create a DS by hand.

    Rep for this my friend.

    Just one curious oddity regarding the console_command toggle_fow. It fires on every second start of the the game, even though the script is firing each time?? Have you experienced that?

  6. #6
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Basic Scripting Setup Question

    Quote Originally Posted by The Border Reiver View Post
    Just one curious oddity regarding the console_command toggle_fow. It fires on every second start of the the game, even though the script is firing each time?? Have you experienced that?
    It is working like a switch. toggle_fow turns fow on and off, and even turns it on when it is already activated by game start. The same is with toggle_perfect_spy.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Basic Scripting Setup Question

    Just one curious oddity regarding the console_command toggle_fow. It fires on every second start of the the game, even though the script is firing each time?? Have you experienced that?
    It is an oddity that it doesn't fire every now and then, and I am not sure why. When I come across it, I make sure whether the radar restriction is gone. After that I usually start the game again to see if it remains covered (before I try hunting for errors).










  8. #8

    Default Re: Basic Scripting Setup Question

    Another good way to test scripting is this :

    Code:
    console_command add_money 1
    If you don't get 1 extra florin at the start of the game, your script isn't readed

  9. #9
    The Border Reiver's Avatar Artifex
    Patrician

    Join Date
    Feb 2006
    Location
    Australia
    Posts
    3,703

    Default Re: Basic Scripting Setup Question

    Good tips all round, thanks guys.

Posting Permissions

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