Skip to content

Script edits in a running module

Can you edit a script, compile it and add it to a running module?

Comments

  • dunahandunahan Member Posts: 139
    edited January 2022
    You must have at least the script within your module, that's what I think, and then you can use the development folder.
    But I wouldn't advise it for PWs, at least not for long. If you want to test something, really fast, that will work. Beware, includes don't work that way.
  • ProlericProleric Member Posts: 1,316
    That can work for a new script, too. Run it in game using [Ctrl][Shift]F12 > NwScript or ##dm_runscript.

    If you have to change an include, you can recompile all scripts that refer to it, and drop them in development.

    Useful for, say, fixing a single player module without changing the original.

    +1 for the PW comment, though.
  • WilliamDracoWilliamDraco Member Posts: 175
    It's perfectly usable for a PW to drop the ncs into the server's /dev folder. The only reason to clear it out from there is for organisation reasons to prevent confusion I.E. if you then make further changes to the module's version of the script, as the /dev version continues to win priority.

    You can do it while the server is live, but it obviously only affects new executions of the script. I believe you also need to avoid changing a script that's currently in-waiting with a DelayCommand.
  • TerrorbleTerrorble Member Posts: 183
    My reason for asking is I need a faster way to test changes to custom AI scripts.

    So I could fight/observe the creature. Kill it. Edit the custom AI script, recompile and drop the ncs in the development folder, then respawn it and repeat?
Sign In or Register to comment.