Thank you. All the enhancements look to be great!
Download:
NVScript on GitHub
(Older versions are attached to this post.)
Changelog
1.3.0
- Source code now on GitHub.
- A few minor bugfixes and documentation updates.
1.2.9
- Added full source code.
1.2.8
- Fixed a bug where the script state (such as activation counts, capacitors, and timer handles) of multiple scripts on the same object could get scrambled upon save/load. This changes the way all scripts store their state, and so may cause glitches in saved games made in earlier versions of NVScript, as saved script state will be lost.
- Fixed a bug with NVKeyringKey where the keyring would not be selected in inventory upon picking up a key.
1.2.7
- Fixed a bug with the ^ identifier used to refer to the closest object of a specified type not working if no minimum distance was specified.
1.2.6
- Added the following scripts to the Thief 1 / Gold module. (Note that they will only work when running NewDark):
- NVMapTrap
- NVCameraTrap
- NVShakePlayer
1.2.5
- Re-added the missing NVPhantomRenderInvisible and NVPhantomRenderType parameters to NVPhantomTrap. (These were accidentally removed in v.1.2.0.
- Added the ability to specify a specific trigger archetype for NVTrigOBB, and also added sending of messages to the triggering object. Finally, fixed a bug where the exit trigger functionality did not work correctly in System Shock 2.
1.2.4
- Various fixes.
- Fixed several bugs in NVSafeDoor
- The "source" target will now use the stim source for scripts activated via Send to Scripts receptrons.
- New script: NVAlertMessages
- New script: NVWatchMeTrap
- New script: NVWakePhysicsTrap
- Fixed a bug where NVConvEnhancer's StopFollowing action was not correctly removing links created by the Follow action.
- Fixed an error in the documentation for NVConvEnhancer.
- Added an option to disable player controls and an automatic return timer to NVCameraTrap.
- Added an option to modify an existing link to NVLinkBuilder.
1.2.3
- New script: NVJointControl
- NVConvEnhancer: Added SetQVar action.
- Fixed a bug in NVGenericScalarTrap which would make it never reach 0.00 in a property.
- Fixed several bugs in NVTrigQVar, including one where the " operator was not working, and one where quest variable lookup was not working for quest variables with names starting with the letter 'r'.
- Updated the documentation to reflect the fact that NVLinkBuilder supports multiple versions.
1.2.2
- Major overhaul of NVTrapSetQVar to allow the use of complex mathematical expressions in place of the numerical argument.
- Fixed a bug where NVTrigQVar might not work properly between reloads.
- Fixed a bug in a content-getting function used by NVInvAssembly, NVHolyH2OHack, NVSwapSword, and NVStackOrDropTrap, which ought to have been causing a crash, but wasn't for some reason.
- Added documentation for NVCameraTrap. Also updated it to better support SS2.
1.2.1 (bugfix release)
- Fixed a bug in NVRelayTrap where it would not fall back to <kbd>NVRelayDelayMax</kbd> if a specific maximum delay for on or off was not specified. The order is now: <kbd>NVRelayTrapOnDelayMax</kbd>, then <kbd>NVRelayTrapDelayMax</kbd>, and finally <kbd>NVRelayDelayMax</kbd>. The last variant will obviously not work with the multiple script feature.
- Added documentation for NVMachine.
- Fixed some errors in the documentation.
- Removed a debug message accidentally left in NVGenericScalarTrap.
- Fixed a bug in NVGenericScalarTrap which could make it go slightly above the max or slightly below the min before stopping.
1.2.0
- Implemented a new targeting system for the following scripts:
- NVMetaTrap
- NVDeleteTrap
- NVGibTrap
- NVParticleGroup
- NVPhantomTrap
- NVStackTrap
- NVSuspiciousTrap
- NVGenericScalarTrap
- NVGlowTrap
- NVWatchMe
- New script: NVGenericScalarTrap
- NVPhantomTrap and NVGlowTrap are now subtypes of this script.
- New script: NVWatchMe
- New script: NVVisibilityToQVar
- New script: NVTranslucentTextTrap
- New script: NVShakeStim
- Add difficulty levels and text colours to NVGhostingMessages.
- Added Renderer->Self Illumination feature to NVGlowTrap
- Added r operator to NVTrapSetQVar
- Added m operator and <kbd>NVTrigQVarAllowRepeats</kbd> param to NVTrigQVar
- Fixed a crash bug.
Last edited by Nameless Voice; 8th Nov 2022 at 19:46.
Thank you. All the enhancements look to be great!
The target feature should make things simpler.
NVShakePlayer seems very exciting (by the way it is named NVShakeStim at some places in the documentation by mistake).
As mentioned in the documentation, it's a copy of a script from SS2. It was used in the TAC mission "Falling Down" by TF.
(I fixed the typo, but I don't think it's worth re-uploading for.)
Is it possible to directly control the duration of the shake too?
No, it's 6 shakes over the course of 250ms. You can send more stims if you want the effect to last longer.
Fantastic! Always happy to see an update
I just couldn't get by without these scripts!
I noticed that the new GenericScalar was somewhat inaccurate - with certain min/max/increment values, it could go slightly above the Max or slightly below the Min. The same problem was always present with PhantomTrap and GlowTrap, but didn't really matter in those cases.
It's a minor issue, but I've fixed it and updated the files in the first post.
For extra confusion, I don't think it's worth changing the version number for.
Also, is it possible for NVShakePlayer to give the player a random orientation after the shaking is complete? I understand giving the player a small random location offset is probably too difficult (due to the possibility of moving out of the world), but a random orientation could be handy and adds realism.
Typo in NVRandomPropertyTrap description which is kinda important:
" ... The property to modify is specified via the NVRandomPropertyTrap."
should be
"... The property to modify is specified via the NVRandomPropertyTrapProperty.
Hmm, yes, I'll have to fix that.
I mirrored this at jasonotto.net on the resource page. keeps me from having to look too far for the things i need.
Why no source file? You don't want people dicking around with it? Come on, quit ignoring me and answer the question. If you're going to be stubborn, then will you at least help Tos make NVScript work with multiplayer better? (Without the source he can't do anything obviously.)
Perhaps he has you on his ignore list, genius.
It did seem rather rude. I don't see a prior polite request anywhere in this thread ... ?
I think I have found a problem with NVGlowTrap. I have a flat switch with a CD link to a custom light object. The light object has:
- Editor > Design Note: NVGlowIllumMax=1.0; NVGlowIllumMin=0.0; NVGlowFadeOn=6300; NVGlowFadeOff=6300
- Renderer > Self Illumination: 1.0
- Renderer > Anim Light: {smoothly brighten; 6300 ; 6300; 175.00; 0.00; 45.00; 30.00; TRUE; 0, 0, 0; FALSE; 0; FALSE}
- S > Scripts: {AnimLight; NVGlowTrap; NVSpy; ; FALSE}
The switch has Tweq > JointState: {On; [None]; [None}; ...; [None]}
I can see a "TurnOn" getting received by the light as I enter Game Mode, but I do not see a "GlowOn" response, and the light is not self-illuminated. When I flip the switch, I see a "TurnOff" followed by a "GlowOff", but since the light is not illuminated, nothing happens with respect to the self-illumination (the light does switch off). If I flip it again, the "TurnOn" is received but no "GlowOn" and the light is not illuminated, but the light turns on.
If I set the switch to The switch has Tweq > JointState: {[None]; [None]; [None}; ...; [None]} then the light is illuminated at the beginning. The first flip sends a "TurnOn" instead of a "TurnOff" but the self-illumination then gets turned off!
So either I don't understand what is supposed to be happening and have this set up wrong, or it isn't working correctly, or both.
The main purpose of that script is to change the dynamic light, so you also need to specify NVGlowMin and NVGlowMax parameters. It seems that the smallest value the max parameter accepts is 5. Any lower and the fade out isn't very smooth.
NVGenericScalarTrap sounds like a better script to use, but the fade off seems to get overruled by the AnimLight script.
... yes, that was exactly what I was about to say.
I tried NVGenericScalarTrap with NVGenericScalarTrapPropName="SelfIllum", and that, at least, affects the the property, however it is just an on / off: no fading. I'm doing a complete processing at the moment, but as soon as it is done, I'll try adding NVGlowMin and GlowMax to the mix. The thing is, the setup I posted above used to work with the prior release ...
That's strange, I don't think I changed that code, just moved it around. I even copied the rather odd default of NVGlowMin=100, NVGlowMax=100, which means that the script won't even do much unless you specify a min. I should probably set that min to 0 instead, as that's a far more reasonable default.
The level of self illumination is directly linked to the current level of dynamic light, though. Considering that the script will add the dynamic light property to the object if it doesn't have it, and there's a (rather low) limit to the number of dynamic lights you can have in a mission, using it for this purpose isn't really a good idea either way. You should definitely use NVGenericScalar.
In any case, the AnimLight script is controlling the self illumination property itself anyway, so it will undoubtedly interfere with this. As soon as you turn the light off, the AnimLight script will set the Self Illumination to 0.00, so the script will see that it has nothing to do and not slide it down, because it's already at the min.
What seems to work best is
NVGlowIllumMax=1.0;NVGlowIllumMin=0.0;NVGlowFadeOn=475;NVGlowFadeOff=425; NVGlowMin=0; NVGlowMax=50
with
Renderer > Anim Light: {smoothly brighten; 500 ; 500; 175.00; 0.00; 45.00; 30.00; TRUE; 0, 0, 0; FALSE; 0; FALSE}
That gives the effect of decreasing the self-illumination of the bulb as the light dims. Due to timing issues, I suppose, to get the dimming of the self-illumination to synch with the dimming of the light, I had to set the time values so that NVGlowTrap fades faster than AnimLight.
For whatever reason, NVGenericScalar does not seem to play nice with AnimLight. A replacement for AnimLight which handles fading properly is probably the best solution, but until then, NVGlowTrap with both glow and illum set seems to be a working alternative.
As to it working before, that's my memory and I'm sticking with it.![]()
Since NVGenericScalarTrap was added, child scripts seem to display a message saying Not null on [script name]!
E.g. All of my NVPhantomTraps show that message. At first I thought it was because I only specified FadeOn and left everything else at the default setting, but but even after setting FadeOff, Min and Max alpha, the message is still displayed. Could it be that this script is inheriting the need to set a parameter that is only relevant to NVGenericScalarTrap?
The sequence of events in this case is:
Object has transparency property set to 0
In game, object turned on: No message.
Object turned off: No message
From then on, the message is shown when turned on, but not turned off.
Last edited by R Soul; 12th Jan 2011 at 12:41.
Ooops, looks like a debug message I forgot to take out.
I think it's time for NVScript 1.2.1.