More Awesome Than You!

TS2: Burnination => The Podium => Topic started by: jrd on 2006 October 02, 15:11:52



Title: Enabling repair option for repairmen
Post by: jrd on 2006 October 02, 15:11:52
I have a custom object which can break, and is repair-able by my playables. However the repairman ignores it when he is on the lot.

I thought just adding the repair BHAV to the OBJF resource should do it, however it still does not work: the repairman claims nothing is broken.
Is there something else I need to do to enable the function?

The object in question is Shaklin's central heating from Shaklin's page (http://shaklin.net/xoops/modules/PDdownloads/viewcat.php?cid=1). I have unfortunately not gotten a reply from Shaklin on this, so I'm asking the experts in the community. I wish to know this anyway, as I may run in to the issue in future content.


Title: Re: Enabling repair option for repairmen
Post by: syberspunk on 2006 October 02, 17:23:11
You might wanna ask Josh of djssims since he has a global hack that enables the repairman to fix broken toy robots (http://www.djssims.com/index.php?id=308#comments).

Maybe you could take a look at that hack or ask/pm him. :)

Ste


Title: Re: Enabling repair option for repairmen
Post by: jrd on 2006 October 02, 17:52:40
That's where I stoleĤĤĤĤĤgot the idea from… as far as I can tell all that hack does is add the repair function to the resource.
This also seems to be how other base game objects work…

Can't hurt though.


Title: Re: Enabling repair option for repairmen
Post by: twojeffs on 2006 October 02, 21:38:41
I was going to post the answer earlier, but the site was being a PITA and wouldn't stay connected long enough.

The heater isn't coded properly to be usable by the repairman. When broken is only sets an attribute on the object itself. In order for the repairman to 'see' it as repairable, it must have the repair functions defined in the OBJF (which you obviously knew already) and when broken it must set it's repair level (data 0x0F) to non-zero.


Title: Re: Enabling repair option for repairmen
Post by: jrd on 2006 October 02, 21:44:55
Ah, that second one would be it. Thanks!
And the site /was/ a PITA…


Title: Re: Enabling repair option for repairmen
Post by: jfade on 2006 October 02, 21:50:59
Heh, I just tried it myself and it didn't work, so I was about to reply and guess that was the reason why, but I wasn't for sure, so thanks for the information twojeffs, that's useful stuff to know! :)


Title: Re: Enabling repair option for repairmen
Post by: jrd on 2006 October 02, 22:15:34
Fix attempt #1 failed. But now I know what to look for… I'm going to fix this yet ;)

Perhaps it is easier to just replace the custom break and repair functions with those of the sink.


Title: Re: Enabling repair option for repairmen
Post by: twojeffs on 2006 October 03, 00:50:45
Worked for me.

Are you using the debug 'kaput' to break the heater? That uses a separate bhav that you'd also have to mod to set the repair level.


Title: Re: Enabling repair option for repairmen
Post by: jrd on 2006 October 03, 07:15:03
Heh... of course, that's it. I forgot to set the debug option.

//Yup, that did it. Thanks again twojeffs. *Goes to add the break and repair function to several other objects*


Title: Re: Enabling repair option for repairmen
Post by: jrd on 2006 October 06, 12:53:58
Hmmm... the Malaysia piracy move deleted the fixed versions.

If anyone wants them, let me know.