Aller au contenu

Photo

How to edit script ?


  • Veuillez vous connecter pour répondre
11 réponses à ce sujet

#1
olnorton

olnorton
  • Members
  • 572 messages


WLACP3r.jpg

How do I edit the script cp_a_spawn_companion ?
I want to reverse the Tancred and Verona lines

#2
kevL

kevL
  • Members
  • 4 057 messages
figure out where the script is on your hardrive (it's probably in the module or campaign folder for MGS)

open it with the toolset, File|Open Conversation or Script ...

switch the lines


Compile and check it says successful.


Note. If it's in the module-folder, changes won't take effect during a current game. Unless the .nss/ncs are copied to /Override.

PS. If the script is inside of a .Mod file, I'd first open it in the toolset, copy the body of the script, create a new .nss in the Campaign folder (or /Override), and compile it from there ...

else you could open the .Mod and script in the toolset, Compile it there and then Save module. (but that's... risky)



( tbh. if the module is in a .Mod file, the first thing I'd do is use Tani's Packer and unpack it to a directory. This can also be done with the toolset but that's... risky. )
  • olnorton aime ceci

#3
olnorton

olnorton
  • Members
  • 572 messages

figure out where the script is on your hardrive (it's probably in the module or campaign folder for MGS)

open it with the toolset, File|Open Conversation or Script ...

switch the lines


Compile and check it says successful.


Note. If it's in the module-folder, changes won't take effect during a current game. Unless the .nss/ncs are copied to /Override


Thanks Kev, I got around it last night by making a new script, copy & pasting the cp_a_spawn_companion script to it and then editing that. Then changing the action in the conversation to use script1.
It worked and I finished the module with only Verona spawning.

The script was in the campaign folder, but I couldn't open it.
When I used the toolset, File|Open Conversation or Script ... I got this:

r1SrKki.jpg

There is nowhere to browse to the campaign folder.

I copied the nss & ncs to the override folder and I could edit the nss from there, and then copied them back to the campaign folder.

If I understand your note: Had I done this last night, I could have continued a saved game from before the spawn and it would have shown up.

As it was, with my making a new script1 method, I had to replay from the start of the module. Although putting the two edited conversations that used the script into the override folder may have worked.

Anyway, Thanks again, I'm learning a little bit each time.

#4
Tchos

Tchos
  • Members
  • 5 053 messages

I actually don't know how the vanilla toolset handles it, since I've almost always been using two toolset plugins that I consider indispensable -- PowerBar and Grinning Fool's Usability Tools.  I think it's PowerBar that adds the script opening dialogue that I use.  That one allows you to filter scripts by Campaign, Module, or Global.  I'd recommend trying out those plugins if you plan to spend a lot of time in the toolset.


  • olnorton aime ceci

#5
olnorton

olnorton
  • Members
  • 572 messages
I got version 1.22 of PowerBar from the new vault, but it doesn't work.
I see it didn't work for GCoyote either. I can't ask if he got the same error message as me, because I've never been able to register there.

4WWu871.jpg



Edit: The Grinning Fool's Usability Tools allow me to see and edit scripts in the campaign directory.
Thanks Tchos

#6
kevL

kevL
  • Members
  • 4 057 messages

The script was in the campaign folder, but I couldn't open it.


sry. I wasn't comprehensive (spaghetti -> wall )

The script would've become available if the module were open, i imagine. There are many ways to get the job done -- i'm always using a 3rd party texteditor w/ Skywing's standalone compiler, eg.


hint: Don't use filenames like "script1", really. A good method instead is tack your initials on: "cp_a_spawn_companion_oln" (32-char max, i believe)



re. plug-ins, Did you turn the option to use plug-ins TRUE in toolset options?

#7
olnorton

olnorton
  • Members
  • 572 messages



re. plug-ins, Did you turn the option to use plug-ins TRUE in toolset options?


You can see in the pic in my first post, I have the spellchecker plugin by the same author.
The Powerbar zip file on the new vault is only a single .dll, should there be anything else with it?

#8
Tchos

Tchos
  • Members
  • 5 053 messages

The error may mean it was made for a previous version of the toolset.  It's been so long since I installed it, I don't remember if it's one of the plugins that never received an update, or received one in a pack by someone else (I remember there was a batch of updated plugins from various users posted by one other user) but you can get around the "old version" error with the "de-frus" mod.



#9
olnorton

olnorton
  • Members
  • 572 messages

I don't actually use the toolset enough to need that PowerBar plugin anyway but...
How do you install that mod?
With that NWN2ToolsetLauncher.exe.config file in the installation directory, the toolset crashes on startup without an error code.

#10
Tchos

Tchos
  • Members
  • 5 053 messages

It does go in the installation directory, but this is what mine looks like:

<?xml version="1.0"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="OEIShared" publicKeyToken="6bb96f3d82daa243" />
        <publisherPolicy apply="yes" />
        <bindingRedirect oldVersion="0.0.0.0-9999.9999.9999.9999" newVersion="1.0.1765.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="SandBar" publicKeyToken="75b7ec17dd7c14c3" />
        <publisherPolicy apply="yes" />
        <bindingRedirect oldVersion="0.0.0.0-9999.9999.9999.9999" newVersion="1.3.4.1" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="NWN2Toolset" publicKeyToken="6bb96f3d82daa243" />
        <publisherPolicy apply="yes" />
        <bindingRedirect oldVersion="0.0.0.0-9999.9999.9999.9999" newVersion="1.0.1765.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

I can't recall if I edited any of the numbers in mine.  I guess I did, because the "newVersion" is higher than the one on the Vault says it works for.


  • olnorton aime ceci

#11
olnorton

olnorton
  • Members
  • 572 messages
Thanks Tchos, I copied yours and now the powerbar plugin works.

#12
Tchos

Tchos
  • Members
  • 5 053 messages

Good, I hope you find it useful.  I suppose the De-frus mod needs to be updated on the Vault, or else I'll just upload my version with a name more obvious to its purpose.