TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Page 1 of 2 12 LastLast
Results 1 to 25 of 28

Thread: TWScript v2.0.7 (2013-07-28) beta release

  1. #1
    Member
    Registered: May 2002
    Location: Between dreams and shadows...

    TWScript v2.0.7 (2013-07-28) beta release

    TWScript is a collection of scripts for NewDark Thief 2 (it may work with NewDark Thief 1 and System Shock 2, I have not tested it with either).

    Current Scripts:
    • TWTrapAIBreath - control a particle group attached to an AI to simulate breath clouds in cold areas.
    • TWTrapSetSpeed - modify the speed of moving terrain objects at game time.
    • TWTrapPhyStateCtrl - modify an object's location, orientation, velocity, and rotational velocity.

    These scripts are all beta (AIBreath should probably be considered alpha, really), expect oddness sometimes. The script package is under development and scripts are liable to change - please subscribe to this thread if you want to know about new released.

    Downloads:

    In order to use the demo mission, unpack the demo archive into the FMs directory in your editing install, make sure that NVScript is available to Dromed (either put nvscript.osm in the TWScriptDemo directory, or in the Thief2 directory. NVScript is not included with the demo mission), run Dromed and select the TWScript demo mission in FMsel, then load the demo mission.
    Last edited by The Watcher; 28th Jul 2013 at 19:14.

  2. #2
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Super! Thank you.

  3. #3
    Member
    Registered: Nov 2003
    Location: Earth
    Great!

    Also, ss there some functionality of NewDark related to FMSel that I'm missing? I'm just wondering if what you're explaining is any different that just unpacking the files into a subdirectory of thief2. Since the demo must use Dromed, I'm guessing it doesn't really matter, it's just the FMs/FMSel method is one way of doing it.

    Edit: Nevermind, I see exactly what you're talking about. Without FMSel, I would have had to extract everything into the thief directory, or modify my darkinst.cfg. This method is a lot simpler and I didn't even realize I could edit FMs through FMSel! Thanks.
    Last edited by sNeaksieGarrett; 22nd Jul 2013 at 14:37.

  4. #4
    Member
    Registered: May 2002
    Location: Between dreams and shadows...
    Updated to 2013-07-24 Version 2.0.5
    • Added support for `TWTrapAIBreathLinkType` to TWTrapAIBreath

  5. #5
    Member
    Registered: Apr 2006
    Location: France, Paris
    Wow, the simulate breath clouds look cool ! Just a little detail, it would be nice that the clouds have a little drag effect, would be more realistic.

  6. #6
    Member
    Registered: May 2003
    Is it possible to provide the demo also zip-packed to use with Darkloader as I am not using FmSel? It seems the 7zip-file can not be loaded. Thank you.

  7. #7
    Member
    Registered: Nov 2003
    Location: Earth
    Yeah, 7z is not compatible with darkloader.

    Also, it's very easy to set up FMSel if you want to try the demo. Afterwards, you can then disable FMSel. I think it would be possible to use with darkloader, but he'd have to create a .zip with a .mis/.gam rather than the provided .cow file. Also, I still haven't had a chance to learn the scripts or look at the latest demo since I'm working full time now. I'm going to see about checking it out this weekend and then report back.

  8. #8
    Member
    Registered: Nov 2003
    Location: Earth
    I recommend checking out my YouTube channel on using dromed, Albert. :P

    That said, to load up a script, you can do either of two things:

    1.) type script_load scriptname into the box in the bottom right of the dromed window, then hit enter.

    OR
    2.) Look in one of your menus for a load script command. I think by default dromed never had one, so you had to resort to typing in "script_load" all the time. However, if you're using one of the fancy custom menus for dromed then there should be a load script command somewhere. For example, in my copy of Dromed, there's a Script sub-menu under File in Dromed 2.

  9. #9
    Member
    Registered: May 2002
    Location: Between dreams and shadows...
    Quote Originally Posted by Albert View Post
    I didn't know how to call up either twscript or nvscript.
    First you'll need a silver ink gel pen, a summoning grid connector USB cable, a laptop, a goat, a small altar, and a sacrificial knife...

    Quote Originally Posted by Florian
    Is it possible to provide the demo also zip-packed to use with Darkloader
    I'll have a look at it this weekend; need to see if I have an install left that still has darkloader hooked up to it so I can test if it'll actually install.

  10. #10
    Member
    Registered: Nov 2003
    Location: Earth
    Had the day off so I've gotten a chance to check this out. I've discovered two "bugs" when testing this in my mission:

    1.) When the AI detects Garrett his breath occurs more frequently, but when he returns back to his patrol, his breath is permanently in a faster state than it was before having detected Garrett.

    2.) When the AI dies, even with TWTrapAIBreathStopOnKO="True"; the breath sticks around a bit longer than it should and you can see it appear in the wrong spot. I know you mentioned in the documentation that when they get KO'd, the particles can emit in the wrong spot, but I thought turning this on would completely eliminate it, however it still happens for like a second when the AI falls to the ground.

  11. #11
    Member
    Registered: Aug 2012
    Location: Seattle
    Quote Originally Posted by sNeaksieGarrett View Post
    2.) When the AI dies, even with TWTrapAIBreathStopOnKO="True"; the breath sticks around a bit longer than it should and you can see it appear in the wrong spot. I know you mentioned in the documentation that when they get KO'd, the particles can emit in the wrong spot, but I thought turning this on would completely eliminate it, however it still happens for like a second when the AI falls to the ground.
    Unfortunately, the notice to scripts of an AI's braindeath doesn't come until after the crumpling motion has finished playing. (This is also why AIs take a few extra seconds to stop attacking dead opponents.) I don't think there's any reliable way of responding earlier than that. (One could theoretically change the gamesys to send the Knockout and KOGas stims to scripts, but there have been prior discussions about those being unreliable indicators.)

  12. #12
    Member
    Registered: May 2002
    Location: Between dreams and shadows...
    Quote Originally Posted by sNeaksieGarrett View Post
    1.) When the AI detects Garrett his breath occurs more frequently, but when he returns back to his patrol, his breath is permanently in a faster state than it was before having detected Garrett.
    Well, the breathing rate is changed when the AI's alertness changes. I'll do some checking; I've also realised I didn't stick a debug message in there, so there's no monolog update when it changes, I'll see about fixing that.

    Quote Originally Posted by sNeaksieGarrett View Post
    2.) When the AI dies, even with TWTrapAIBreathStopOnKO="True"; the breath sticks around a bit longer than it should and you can see it appear in the wrong spot.
    As kdau says, that's an issue with the way the engine notifies of brain death (specifically, the script only gets the AIModeChange message sent to it after the crumple has completed, potentially a little after that point). That said, the 'ShutUpYerDead" script (that gets added when the knocked out metaprop is added) sends a "IgnorePotion" message to the AI on knockout may be the answer. I will investigate and see about an update later.

  13. #13
    Member
    Registered: May 2002
    Location: Between dreams and shadows...
    Updated to v.2.0.6. It looks like the IgnorePotion message is a good indicator for knockout, so I've set up the script to use that (and the AIModeChange message too, just in case) to stop the breath clouds when the AI is knocked out and TWTrapAIBreathStopOnKO is true. In testing, the instant you knock the AI out, the breath clouds stop, so hopefully that'll do what you need.

    As far as the rate issue is concerned, it does reduce - it just takes a lot longer than you might think. If you set TWTrapAIBreathDebug=true, alert the AI so that the breathing rate increases, and leave it for several minutes, you'll see the rate drop back down again. It's really just how long the AI stays at the higher alertness level that is the issue.

  14. #14
    Member
    Registered: Aug 2012
    Location: Seattle
    Quote Originally Posted by The Watcher View Post
    ...It looks like the IgnorePotion message is a good indicator for knockout...
    Thanks for finding that! I'll start using it too.

  15. #15
    Member
    Registered: Nov 2003
    Location: Earth
    Ah okay, thanks The Watcher. I will download the new package.

    I thought I saw it decrease after a bit while testing your demo, but when I looked at it in my mission and watched the guard it didn't seem to reduce. (Or most probably I didn't wait long enough.) Good to know though regardless. To be honest though, it'd be great if it returned to normal as soon as possible when he returns to his patrol. I dunno, maybe it's more realistic to have his breath higher because he was just running around moments earlier, but it looks kinda steam puffy to me when it goes that quick. (Ya know, more like a machine emitting something than a person breathing.)

    Sorry, I know I'm being a PITA. I guess it's your call, after all you are writing the script. Anyways, that's just me, other people may feel differently or not be as picky as I am being.

    Also, it's probably been said enough already but I want to thank you (and you too kdau) for writing scripts for us FM authors. It's great that we have folks like you extending/enhancing the life of the Thief games.

    Update/edit: Works just fine when I knock him out.
    Last edited by sNeaksieGarrett; 26th Jul 2013 at 21:20.

  16. #16
    Member
    Registered: Nov 2003
    Location: Earth
    Okay, I waited for a few minutes after he went back on his patrol, and mono reports an awareness change from 2 to 1 and the new rate is set to 1500. (which previously had change from 3 to 2 with rate 1000.) After that, I don't see any new rate changes. Shouldn't it return to 3000? Am I not waiting long enough?

  17. #17
    Member
    Registered: May 2002
    Location: Between dreams and shadows...
    It should drop to the base rate eventually, as far as I know, but it could take a long time. Perhaps a better option is for me to replace the simple division calculation currently used with separate per-level rate controls, with Rate0 being taken from the tweq as currently, and the rest auto-calculated unless set in the design note:
    Code:
    TWTrapAIBreathRate1 = 3000; // Rate when alertness is Low (1)
    TWTrapAIBreathRate2 = 2300; // Rate when alertness is Medium (2)
    TWTrapAIBreathRate3 = 1200; // Rate when alertness is High (3)
    As for the 'dropping the rate down as soon as the AI goes back on patrol', that's a lot trickier as no messages get sent to the AI when it switches from investigation back to patrol. There is an 'AIInvest' link added to the AI when it is investigating/attacking and I think that could potentially be used as a means of indicating whether to use the current AI alertness or one level below it (ie: if the AI is on high alert, and has an AIInvest link, use the High breathing rate, if the AI is on high but does not have an AIInvest link, use Medium instead). I'll fiddle with it and see what can be done.

  18. #18
    Member
    Registered: Nov 2003
    Location: Earth
    Great, thanks. If you can't get the breathing rate to return quickly after the guard goes back to patrol, or it turns out to be a large pain, don't worry about it. Now, it definitely should return back to 3000 eventually though. That new way you suggested for the rates instead of the division sounds good to me.

  19. #19
    Member
    Registered: May 2002
    Location: Between dreams and shadows...
    Okay, updated to 2.0.7 - I've made a Somewhat Significant change, in that the initial value you set for the Flicker Tweq is ignored (you still need the flicker tweq as specified in the instructions, but the rate you set is not used). Instead, it has been replaced by four new parameters (all of which are optional and fall back on defaults):

    • TWTrapAIBreathRate0 - replaces the flicker tweq rate as the base breathing rate, defaults to 3000 if you do not set it.
    • TWTrapAIBreathRate1 - sets the breathing rate when the AI is at alertness 1 (low), defaults to the value set for Rate0.
    • TWTrapAIBreathRate2 - sets the breathing rate when the AI is at alertness 2 (medium), defaults to the value set for Rate0 divided by 2.
    • TWTrapAIBreathRate3 - sets the breathing rate when the AI is at alertness 3 (high), defaults to the value set for Rate0 divided by 3.

    In addition to these new settings, if the AI is at high alertness (so it would normally used Rate3), but is not actively searching for, pursuing, or attacking the player, the script will use the Rate2 breathing rate instead. This means that, if a guard is alerted, once it finishes searching and returns to patrol, the breathing rate will drop to the medium rate even if the AI's alertness is high.

  20. #20
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements

  21. #21
    Member
    Registered: Nov 2003
    Location: Earth
    Indeed, Larry, indeed.

  22. #22
    Member
    Registered: Nov 2003
    Location: Earth
    Just curious, since part of the title of this thread has "beta," does this mean you're going to release another version again sometime down the road?

  23. #23
    Member
    Registered: May 2002
    Location: Between dreams and shadows...
    That depends on what you mean by "new version".

    From a strictly pedantic point of view, yes there will be new versions; I've got work-in-progress implementations of TWTrapAIEcology and TWTrigVersion to go into a release soon.

    If you mean "will there be a new version with the same functionality without the 'beta' label", no there won't be. The beta label is there as an indicator that it "works for me, seems to work for others, may still have problems in there", and because there are situations where the script has not been as thoroughly tested as I'd prefer (and probably won't be for months, if ever). It also applies to all the scripts in the .osm, not just the breath one, so if you're sat waiting on a non-beta version before you release your mission, don't - it seems to be good enough to do the job.

  24. #24
    Member
    Registered: Nov 2003
    Location: Earth
    Yes, I was wondering if there was going to be a non "beta" version of the script. When I think of beta I think of incomplete software that is still being worked on, so I wanted to see if you were indeed still working on it, or if it was just going to sit as a beta. And no, I'm not waiting for a non beta version (although thanks for the reassurance) but if a new version of the script came out that improved anything (such as the problem in which the AI breath doesn't follow his or her mouth properly when turning sometimes) then I'd jump right on it.

    Interesting, as for the new things you just mentioned, I assume ecology has to do with respawning but I'm not sure what TrigVersion is about.

  25. #25
    Member
    Registered: May 2002
    Location: Between dreams and shadows...
    Quote Originally Posted by sNeaksieGarrett View Post
    And no, I'm not waiting for a non beta version (although thanks for the reassurance) but if a new version of the script came out that improved anything (such as the problem in which the AI breath doesn't follow his or her mouth properly when turning sometimes) then I'd jump right on it.
    Yeah, there's really pretty much nothing I can do about that unfortunately: unless you have the particle group set to "trailing object", the particle locations are simulated relative to the particle group. Rotate the particle group, and all the currently emitted particles all move with it, rather than remaining where they are. "Trailing object" appears to simulate the particles in world space rather than relative to the particle group, but the emitter does not appear to change its orientation (at least, not as far as I can tell). Unless there are some significant changes to the way the particle system works, I've done all I can.

    Quote Originally Posted by sNeaksieGarrett View Post
    Interesting, as for the new things you just mentioned, I assume ecology has to do with respawning but I'm not sure what TrigVersion is about.
    TWTrigVersion is a new version of the 'VersionCheck' script in version.osm (partly because I want something easier to use/actually documented, partly so I have an impetus to get my TWBaseTrigger class done, which it nearly is now). TWTrapAIEcology is a script for respawns, yes. Does things like:

    • Maintain count of number of AIs currently spawned
    • (Re)spawn one AI every X seconds (where X is set by the author) until the desired population has been reached.
    • The AI archetype to spawn is set using a script params link. If multiple AI archetypes are linked to, each time an AI is spawned the script chooses which archetype to use at random (and if you set integer weights in the script params link data, you can can control how often a given AI archetype is chosen rather than the others).
    • Multiple spawn locations can be used by linking the controller to the spawn points via script params links. They can either be used in order, or a spawn point chosen at random (with optional weighting using the data in the script params link data). AIs are only spawned at points that are off-screen at the time.
    • Allow for in-place respawns (in which case, dead AIs are despawned and replaced with a new copy of the AI, or a replacement AI archetype - so if you kill a guard, the script can replace the guard with new copy of the guard... or a zombie guard). Despawm/respawn only happens off-screen, probably, unless I can work out a good effect to hide it.
    • A bunch of other things I'm keeping under wraps until I confirm they work properly.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •