Tovath Posted April 30, 2015 Share Posted April 30, 2015 As the title says, I am looking for a Mod that can announce when some things are set on fire; and by whom. I want try to track players greifing constantly setting the base camp etc on fire and destroying everything. I can do a bit of coding, but I'm not sure where to look for more info on how to execute this, and while I haven't found a Mod that does this yet, doesn't mean there isn't one. Link to comment https://forums.kleientertainment.com/forums/topic/53381-mod-looking-for-a-mod-to-trackannounce-fire-players-greifing/ Share on other sites More sharing options...
DarkXero Posted April 30, 2015 Share Posted April 30, 2015 I don't think there are any specific mods like that. There are mods for fire (and structure) protection.http://steamcommunity.com/sharedfiles/filedetails/?id=400409675http://steamcommunity.com/sharedfiles/filedetails/?id=360823660http://steamcommunity.com/sharedfiles/filedetails/?id=404161345 Making a tracker for fires caused by propagation caused by players is a bit complicated. You can use this:local old = GLOBAL.ACTIONS.LIGHT.fnGLOBAL.ACTIONS.LIGHT.fn = function(act) if act.invobject and act.invobject.components.lighter then if act.doer and act.target then print(act.doer.prefab, act.doer.userid, act.doer.name, "lighted up", act.target.prefab, "with", act.invobject.prefab) end end return old(act)endAddPrefabPostInit("firestaff", function(inst) local oldon = inst.components.weapon.onattack inst.components.weapon.onattack = function(weapon, attacker, target) if attacker and target then print(attacker.prefab, attacker.userid, attacker.name, "lighted up", target.prefab, "with", "firestaff") end return oldon(weapon, attacker, target) endend)to track people using a torch, lighter, or firestaff to light up a thing. But then again, if fire propagates, you don't know.People can bypass this by using a campfire, fuel it to max near berry bushes, and they will heat up. Link to comment https://forums.kleientertainment.com/forums/topic/53381-mod-looking-for-a-mod-to-trackannounce-fire-players-greifing/#findComment-633512 Share on other sites More sharing options...
Isosurface Posted May 1, 2015 Share Posted May 1, 2015 (edited) To track fire propagation initiated by players torch or lighter, modify GLOBAL.ACTIONS.LIGHT.fn by tagging target with the doer's user ID and a custom fire tag (if user ID exists of course). Then modify Propagator:OnUpdate(dt), so if self.inst has a custom fire tag, tag all surrounding entities, ents, with the user ID tag as well as the custom fire tag. If you want to track fire propagation caused by camp fire, firedarts, fire staff, the end is nigh, gunpowder and slurtleslime, you have to add custom fire tag and user ID when all respective functions are executed. Edited May 1, 2015 by Isosurface Link to comment https://forums.kleientertainment.com/forums/topic/53381-mod-looking-for-a-mod-to-trackannounce-fire-players-greifing/#findComment-633631 Share on other sites More sharing options...
_Q_ Posted May 1, 2015 Share Posted May 1, 2015 Or you can just make all things regrow if burned down. Link to comment https://forums.kleientertainment.com/forums/topic/53381-mod-looking-for-a-mod-to-trackannounce-fire-players-greifing/#findComment-633634 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now