New Scripts: tnhScript 2.1 [final] Public Scripts 2.1 [second test] - by Telliamed
Telliamed on 4/3/2009 at 23:42
tnhScript 2.1
Final "It's About Taffin' Time" Release(
http://whoopdedo.org/projects.php?scripts#tnhScript)
Mirror:(
http://thiefmissions.com/telliamed/tnhscript21.zip)
Demo: (
http://whoopdedo.org/projects.php?fm#tnhdemo)
Mirrors will be linked as they become available.
tnhScript 2.1 is ready for use in new and old fan-missions. All in-progress FMs should upgrade now. Existing FMs that included the OSM in the archive may want to consider upgrading.
Full documentation for the scripts is hosted on (
http://whoopdedo.org/doku/tnhscript/index) The Dromesday Book. Editors, of course, can rewrite the descriptions to be more helpful. But I'm also allowing open-submission of comments on each page. So you can add extra messages such as tips and recipes for how to use the scripts. You don't need to be logged in to add comments. Bug reports and feature requests should be sent to me here on the forum, or by email.
Public Scripts 2.1
pre-release(
http://whoopdedo.org/projects.php?scripts#PublicScripts)
Second test has been uploaded. The demo COW has been built for Thief 1 as well. I remembered the books this time. If nothing comes up in the next two weeks, I'll make an official release of it. Please everyone try out the COW at least once. Bonus cookies if you can manage to break something. (Have fun with the Hammerite at the end.)
Documentation at (
http://whoopdedo.org/doku/public_scripts/index) the wiki as always.
R Soul on 5/3/2009 at 00:34
As a Dromeder who's always implementing things I'd like to say thanks for your efforts :thumb:
No slow gas arrows hitting banners in my missions.
PoliteVOTrap: Is it intentional that the VO won't play if there was an AIInvest link which has since been removed (e.g. the investigating AI was snuffed out)?
I'll look at the others tomorrow.
Nameless Voice on 5/3/2009 at 00:40
Most excellent. :D
(Though I've got to the dangerous point where I'll generally sooner write my own script than find out how to use someone else's...)
Telliamed on 5/3/2009 at 08:13
Demo mission uploaded.
Isn't Dark supposed to kill the AIInvest links when the mode changes to "dead"? Or that could just be AIAwareness. I'll see what I can do.
Found a nasty bug that affects OnScreenText. Don't press the button on the south wall of the tiled-ceiling room!
For NV: IProperty::GetSimple sometimes gives a NULL string property even when IsSimplyRelevant was true. Always check your pointers. (GetObjectParamsNoInherit)
Yandros on 5/3/2009 at 16:03
This is wonderful, Tom. What made you decide to go back to working on it?
I'll try it out tonight, I've had zero Dromed time all week but tonight is looking good. I assume you've fixed the crash in OnScreenText in Win9x and 2k?
Telliamed on 5/3/2009 at 23:23
Quote:
This is wonderful, Tom. What made you decide to go back to working on it?
That tnh1.5 was utter crap that no one should ever be allowed to pollute their hard drive with.
I never really stopped. cosas2.osm is basically tnh2 with the extra conversation mask stuff.
Quote:
I'll try it out tonight, I've had zero Dromed time all week but tonight is looking good. I assume you've fixed the crash in OnScreenText in Win9x and 2k?
What you're thinking of, most likely. It now crashes for a completely different reason. (see above)
Fun thing you can do with
TrapFreezePlayer thanks to the new
arcontrol receptron interface. I call it the "time dilation field". You have the trap emit a "GravityStim" over the affected area from 0.0-1.0. The Player responds by sending back a "PlayerPingStim" after multiplying by -1. So the trap gets a PlayerPingStim of 0 when the player is at the outer edge of the field, and -1 at the center. The trap has stacked receptrons for PlayerPingStim. The final result is to send the stim to the script, which has arcontrol=PlayerPingStim in the design note. But first you multiply+add the receptron. The multiplier can be whatever you want for scaling, then add 1.0 so the script gets 1.0 at the edge of the field and 0.0 at the center. And so the player moves increasingly slower the closer he gets to the trap.
Want to be really evil? Make it so the speed gets slower as you move away from the trap.
Also, what do you think happens when the speed goes below zero?
One last thing. You should stick a bounds trigger where the player leaves the area that sends "TurnOff" to the trap so all that mucking-about with speed is reset.
Yandros on 6/3/2009 at 03:23
Oh my god, that sounds deliciously evil. :devil:
R Soul on 6/3/2009 at 14:27
I noticed TrapFadeOut now expects the design note to be in a different format. Would it be possible to provide backwards compatibility so that existing FMs using the previous version can still have their fade out effects?
Telliamed on 6/3/2009 at 18:41
What was it before? Do you mean this...
Quote Posted by tnhScript 1.5.4 Documentation
When the script is turned on, it first looks for the parameter ''on''. If it doesn't exist then
GenericScale will consider the whole parameter.
...
Using an entire design note as the parameter for a generic script will be removed in tnhScript 2. Please only use explicit ''on'' and ''off'' parameters.You were warned.
For finding objects with scripts there's ''hilight_by_prop_direct Scripts'' (And next time create archetypes for traps you use a lot.)
Or if you have Python...
Code:
import sys
from struct import unpack
from StringIO import StringIO
from DarkDB import DarkDB
def ns(s):
n = nm.find('\0')
if n != -1:
s = s[:n]
return s
db = DarkDB(file(sys.argv[1], 'rb'))
prop = StringIO(db['P$Scripts'])
while prop.tell() < prop.len:
(objid,proplen) = unpack('2l', prop.read(8))
scripts = unpack('32s32s32s32s4x', prop.read(132))
for s in map(nm,scripts):
if s.lower() == 'trapfadeout':
print objid
Other than that, I try to avoid doing anything that would break existing missions.
R Soul on 6/3/2009 at 23:16
In an ideal world everyone would read all instructions and ensure they understood them. However...
Interestingly I just had a look at how I used TrapFadeOut in All Torc, and found that I'd used on="some number". I must have asked you how to use it, because I can't see how I would have made the connection between that quoted text and the description for using that specific script.