Aller au contenu

Photo

Certain scripts that resist alteration?


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

#1
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
I recall back in NWN 1 having problems with a specific spell script. No matter what alteration I made to it, it refused to prioritize the new script. I recall quite clearly it was a script which controlled many functions added in the expansions, notably Firebrand/Missile Storms (via the DoMissileStorm command) and Camoflage/Mass Camoflage. (via the DoCamoflage command) "x0_i0_spells" specifically.

All I did to this script back then was change the bonus from Camoflage from 10 to 4. Very simple, compiled fine, couldn't be easier. Yet when testing, it simply refused to use my new scripting. I noticed this happen with different moudules I worked on over the years, meaning it must have been something consistent within NWN.

In NWN 2 I've ran into this again in similar circumstances. This time it's the script that controls the myriad functions for the Warlock's various Eldritch Blasts combinations. Instead of DoCamoflage telling me to screw off it's DoEldritchBlast. Nothing seems to have any effect when changed in this script; it merely falls back on the default script regardless of everything else.

Needless to say I've compiled, re-compiled, double compiled and ultra compiled everything, yet the changes will not register. I've checked for any oddities such as multiple scripts and nothing seems to be amiss. "nw_i0_invocatns" is the offender this time.

Does any one know what the issue is here? I'm thinking I can simply copy the script, save it under a different name, and change the #includes if all else fails. But if there's a simple reason I'm missing here it would be good to know.

#2
MasterChanger

MasterChanger
  • Members
  • 686 messages
 Have you re-compiled the scripts that call the changed functions in that #include? From what I've heard, this is necessary or the referencing scripts will keep calling the old version of the referenced functions.

#3
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
Only scripts with a main function create a ncs file, you obviously are not understanding how that works and are changing the include files and not recompiling the actual camouflage implementation scripts. Pretty common issue for those who are just learning things.

The scripts which "implement" camouflage are denoted in spells.2da in the "ImpactScript" column, but any change to an include file will affect ANY file that includes it.  This means "x0_s0_camo.nss" and "x0_s0_masscamo.nss" and "X2_S0_VineMCam.nss", not to mention any scripts with similar names for AOE effects ( A B and C ), and it means you need the ".NCS" compiled file to be available next to the ".nss" file. ( GUI and convo scripts actually require the nss and all the includes, while most scripts just use the ncs files, you need to make sure there is not some conflict created by having more than one ncs file as well )

I have a batch file i use which recompiles "All" of the scripts in their entirety. I also use my own naming scheme - ie i don't use the same names as the default scripts nor do i use any engine libraries which ensures there won't be conflicts. I also have every spell and feat implemented as a new script with it's own name, which allows me to change how things work globally, then just do a global recompile and know my changes are in effect.

This seems like a lot of work, but it's actually laziness on my part, and the knowledge that if you just do many minor modifications it's almost impossible to keep track of everything which needs to be recompiled, it quickly ends up being everything.

Modifié par painofdungeoneternal, 09 juillet 2011 - 09:15 .


#4
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
There's a compile all scripts button in the toolset, doesn't take too long.

#5
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages

Lugaid of the Red Stripes wrote...

There's a compile all scripts button in the toolset, doesn't take too long.


This assumes all the scripts are in the module, which they are not by default - it won't compile them unless they are in the open module, those in the game zips are ignored. To get all the scripts which use a particular include file into the module to be re-compiled would require quite a bit of research and effort, you'd have to make sure a copy of all the scripts i listed are in the active module.

To recompile all the scripts in the game can take an hour, with the PRC Compiler ( which skywing maintains now by the way and for which there is a toolset plugin ) it takes about 20 - 30 minutes.