Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Inventor
Original Poster
#1 Old 16th Jan 2015 at 11:08 PM Last edited by Arsil : 7th Jun 2015 at 4:29 PM.
Default FireproofFireplacesAndCo
Hello,
This is a pure scripting mod that should take care of making fireproof all
- fireplaces
- firepits
- stoves
- grills
- bonefires
- [did I forget something?]

This can't conflict with any XML override mod, but it will override the common tunings
(those about setting sims on fire).

It's XML tunable, you can choose which categories of objects to make fireproof and also
fine tune the single settings for every category. All default values are "0" (meaning 0%)
so if all works correctly there should be no chance at all that the objects start a fire.

I'd like some help to test if it works as it's supposed to do. I'm clumsy and I've used a lot
of copy/pasting, I could have made some mistakes or missed something, so having
someone else doing a double check would be nice.

This is the XML tuning file, please check if I forgot a tag/field that can start a fire.


Sourcecode (based on Buzzler's Same Energy Gain For Every Bed, with his permission)


EDIT: The code applies the settings only to regularly bought items, those placed while
in Edit Town Mode won't be affected until the game is saved and reloaded. This could
be fixed though. As soon as I recover the solution I'll update this message.

EDIT2: One possible solution, suggested by Sims_MX, is to use OnObjectPlacedInLotEventHandler.


The script in the package still uses the first version,
I quoted the alternate solution only for learning purposes.

EDIT3: I've updated the mod, now the settings are always applied to "new" objects.
Attached files:
File Type: zip  Arsil_FireProofFireplacesAndCo.package.zip (3.4 KB, 16 downloads) - View custom content
Advertisement
#2 Old 19th Jan 2015 at 2:54 AM
Just a thought but is the spell Fire Blast involved in setting fires on objects/sims?
Inventor
Original Poster
#3 Old 19th Jan 2015 at 9:01 AM
I don't have Supernaturals and I've found no clear answer with a quick search. Let me check the code...

There are other factors and side effects (like removing the frozen and cold moodlets) to keep into
consideration, but it will take me too much time to list every condition and consequence, let's focus
on catching fire and death hazard.

If used on sims:
* if the cast doesn't fail, there's a 25% chance (XML tunable) that the targeted sims will catch on fire,
otherwise they will be singed. If the spell epic-fails then the caster will be singed.

If used on statue of frozen sims:
* If the spell doesn't fail, there's a 1% chance (XML tunable) that the targeted sims will catch on fire

If used on terrain:
if the spell doesn't fail, the spot where the spell was cast is set on fire and sims and objects are in
jeopardy to catch fire following the general fire spreading/catching rules of the game.
Back to top