Scripting Limitations in SP & MP

Discussion in 'Modding and Scripting Support' started by RunAwayScientist, May 25, 2010.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. RunAwayScientist

    RunAwayScientist Member

    Messages:
    229
    Likes Received:
    0
    Joined:
    Apr 20, 2003
    Per pure experimentation with sock monkey, there appear to be various limitations in the code which inhibit higher functions normally one would find in other languages such as C++ or even LUA.

    Thus far, I can conclude the following about SockMonkey:

    - The Goto command can be used up to a maximum of 249 times. Once it is used on the 250ith, it will summarily exit the script. If the script is re-activated, the old script appears to continue where it left off. Apparently this is a safe-guard against infinite loops.


    - The teleport command takes the most recent entry and only teleports the NPC upon that location. If one wishes to use the teleport command twice in the same script, they have to use a delay (And subsequently loose any local varaibles stored in memory).

    - There is no object == object functionality. Very annoying that.

    - Custom Sound schemes do not work in multiplayer. One would have to write scripts to play sound/music for them using the vals from snd_user.mes in order to do so.



    I'm curious, furthermore, as to what the limitations are (that have been discovered) in the scripting system besides those? The things that are not covered in WorldEd.doc that you have to experiment to uncover.



    Also, what are the dynamics for client v. server? If I execute a random and have a client carry out the decided random action, will the sever update to compensate? (say, a random that causes an NPC to move to a location. Will other clients/server see the movement as well? Or do I have to do things the old fashion way and force-feed the random variable to the server?)
     
  2. RunAwayScientist

    RunAwayScientist Member

    Messages:
    229
    Likes Received:
    0
    Joined:
    Apr 20, 2003
    I've discovered some interesting things in a multiplayer game using DrogTooth's cheat enabler .exe.


    Apparently, the accelerate time function works normally. Both server and client can see changes in time when pressing the H key. Quite exhilarating that, being able to fast forward in MP whereas you normally cannot with scripting.

    Using SHIFT+4 crashes all clients.

    Pressing Y to level up levels up both server and client characters in the server.

    There's also a wierd error that enables one to copy+paste bullets by attempting to drop all the bullets on the ground at once whilst naked. Haven't reproduced this bug yet, so the cause remains unknown.


    All commands were executed from server side. Not from any clients with the program. Will have to try that next.
     
  3. RunAwayScientist

    RunAwayScientist Member

    Messages:
    229
    Likes Received:
    0
    Joined:
    Apr 20, 2003
    Apparently ScriptEd 1.0 doesn't like more than 120-170 lines. It has a nasty tendency to DELETE half your script if you run up to say, 300-500 lines of code and then crash upon save/compile.
     
Our Host!