justsomemusicguy on 13/4/2018 at 11:39
Hi everyone!
I have a question about a weird side-effect my object's reaction to a WaterStim is causing. I've created a 'lit candle' using the candle1l.bin original model, with my own custom candle flame on top of it. I've based this object on the existing candle object. Of course, I want this candle to be extinguishable and re-lightable with water and fire arrows respectively. So what I've done is:
1. I've given the object Shape > Model Name: candle1l
2. I've added S > Scripts > Extinguishable
3. Of course I've given the candle the appropriate AnimLight properties and all that
4. I've added 2 WaterStim effects. The first one has the effect 'Send to scripts', same thing that a standard torch uses. The second one has the effect 'Change object model', changing the model to candle1. Same thing with FireStim, but that changes it back to candle1l.
And this actually works! It removes the light, removes the lit candle and replaces it with the unlit one. And you can re-light the thing, too! BUT: one weird thing happens. When I douse the candle with a water arrow, the object actually shifts down a little! And when I use more water arrows, the candle keeps sinking a little further every time! When I re-light the candle, (or when it's already lit but I use a fire arrow on it anyway) it doesn't shift. It only does it when I use the water arrows. I can't really figure out why this happens, and it's really annoying. Both models (candle1 and candle1l) have the same dimensions. Is there something I'm missing here? Does anyone here have an idea as to why this might be happening?
Any help would be greatly appreciated :) I've searched this forum but couldn't (yet) find a similar issue.
Unna Oertdottir on 13/4/2018 at 11:51
In DromEd, type
set game_mode_backup 0
then douse the torch. Back in DromEd, you can see if the torch has shifted (and why).
Don't save after this. Restart DromEd to be sure.
Yandros on 13/4/2018 at 12:37
In Thief 1 this happened on torches and I believe it had to do with the object model not being centered. Nameless Voice or R Soul would probably know for sure. So that might be the problem here with your candle model.
justsomemusicguy on 13/4/2018 at 13:00
Quote Posted by Unna Oertdottir
set game_mode_backup 0
Thanks! I haven't used that mode before. However, after dousing the candles and going back to DromEd the only properties that have changed are the Z values in Position and Shape, and of course the AnimLight set to zero brightness. Can't find anything else, so I'm not sure how I can use this mode to see
why the candle has moved downwards.
Quote Posted by Yandros
I believe it had to do with the object model not being centered.
Thanks for your reply! Do you know how I should go about centering the model? Is that something that should be changed in the .bin? I use candle1l.bin for the model, an unused model from TMA.
Unna Oertdottir on 13/4/2018 at 13:25
Load the model in question (or set game_mode_backup 0 again) and type in DromEd
show_phys_models
you'll see if that object collision models (blue boxes).
To center the object, you need the 3ds model of that object. Maybe it's already fixed by someone.
3ds to bin tool can center it (most likely)
I just tried it in DromEd. Same setup. My candle don't shift.
I've Tfix installed. You might try the candles in patches/obj.crf
justsomemusicguy on 13/4/2018 at 14:30
Quote Posted by Unna Oertdottir
I just tried it in DromEd. Same setup. My candle don't shift.
I've Tfix installed. You might try the candles in patches/obj.crf
I'm using the model from Thief 2 obj.crf. I've used Tafferpatcher but there doesn't seem to be a 'fixed' or new patched model for the candles. I also have Thief Gold with TFix but there unfortunately doesn't seem to be a fixed one in patches/obj.crf either. Both the models from Thief 1 and 2 yield the same results for me... :(
So now I'm kind of curious as to why your setup works and mine doesn't :cheeky: Or where you got your candle models from ;)
Unna Oertdottir on 13/4/2018 at 15:02
Also tried it in T2.
You added the extinguishable script (I didn't). Try it without that script. What happens? The object shouldn't shift.
Then delete the receptron for the water stim (Tweq--Models) and put the extinguishable script on the object again. Remember that the tweq halts at Model 5.
Quote:
Extinguishable<dd>gen.osm 1/G/2</dd>A derivative of <code>(
http://www.thiefmissions.com/telliamed/scripts.html#animlight) AnimLight</code>. Manages a model tweq that is active when the light is on, and halts at <code>Model 5</code> when turned off. Makes the object suspicious or not accordingly. Responds to <code>WaterStim</code> and <code>KOGas</code> by turning off the light. <code>FireStim</code> will turn the light on.
justsomemusicguy on 13/4/2018 at 16:06
Alright, I've made some progress. Thanks for your help so far, Unna Oertdottir! Here's what I've done:
- I first got rid of the Extinguishable script, and the receptrons.
- I've added Tweq > Models. (Halt: Continue, AnimC: Wrap, Model0: candle1l and Model5: candle1.)
- After that, I added the Extinguishable script again.
That worked. The object responds to water and fire arrows, and the candle doesn't shift downwards anymore! So that problem is solved. :)
However: every first time I douse the candle with a water arrow, it still moves ever so slightly in the same direction as the arrow that hit it. If I keep hitting it with water arrows, it doesn't move any further, just the one time. So luckily this isn't as bad as the previous issue. But: when I re-light the torch with a fire arrow, and douse it again with another water arrow, it moves again. Very slightly, but it still moves. I'm still wondering why this persists... It's so weird.
At least it doesn't move downwards anymore, which I think is way worse. And the candle only keeps moving if you keep dousing it, instead of it moving after every water arrow.
Unna Oertdottir on 13/4/2018 at 16:25
In Tweq > Models, also write candle1 in Model1-4.
justsomemusicguy on 13/4/2018 at 17:00
Quote Posted by Unna Oertdottir
In Tweq > Models, also write candle1 in Model1-4.
As far as I know that doesn't fix it. Two weird things are happening with this candle.
1. The water arrow seems to (still) somehow push this candle forward. On one instance the candle even slightly moved
upwards when I fired a water arrow at the base.
2. If I enter the model name in Tweq > Models > Model0-Model4, the candle has a weird, jittery, glitchy animation somehow. (Using only Model0 and selecting 'wrap' under AnimC seems to sort of fix this...)