Aller au contenu

Photo

What is the correct way to override core scripts?


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
Emmental

Emmental
  • Members
  • 37 messages
I'm making some modifications to one of the core scripts to change some of the AI behaviour. I have successfully done this, resulting in a .ncs file which I can use by dropping it into an override directory.

However, I'm a little unclear on the correct way to create this in the first place. I've found 2 ways so far:

1. Open a "local copy" of the script in the toolset and make changes there. When the toolset is closed the changes disappear.

2. "Check out" the script and modify that version (without checking it back in). This results in the changes being kept, but they are changed globally for the toolset, regardless of which module I load. In fact, creating a module at all seems to be unnecessary for this.

I'm not sure if this is possible, but I was hoping this could be created as a module (addon?) which would only reflect my changes when that module was loaded in the toolset. Currently the only way I can save my work in the toolset is using method 2.

I'm also not sure how best to distribute this. The only way I've found so far is to simply zip the script file and include instructions on where to put it (which is what others seem to be doing as well). I've tried the "builder to player" option in the toolset and left only the changed script checked, but that doesn't seem to work (I installed through DAModder). I had my module properties set to extend core game resources.

So for now I'm just going with checked out copies and will distribute the .ncs in a zip file, but is there a more correct way I should be doing all this?

#2
Sensorie

Sensorie
  • Members
  • 404 messages
I assume you're checking out by right clicking and selecting Check Out. Have you tried creating a duplicate of the script instead? Within your own module of course.

As for distribution, I suspect for module properties you'd have to extend Single Player. I personally have no problem with merely placing a single file in the override, although .dazips are probably the correct way considering its integration with the game's interface.

Modifié par Sensory, 15 décembre 2009 - 01:44 .