Don't Starve

Don't Starve

155 ratings
Replace PigGuard Torches [abandoned]
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
27.270 KB
16 Nov, 2018 @ 12:47pm
1 Change Note ( view )
You need DLC to use this item.

Subscribe to download
Replace PigGuard Torches [abandoned]

Description
This replaces the torches of the royal guards with candlehats so those stupid oinks don't burn the city or your base.

Disclaimer: Right now this mod reloads the whole citypigbrain.lua and pigman_city.lua with modified files.

THIS MOD SHOULD BE ENABLED DURING WORLD GENERATION ALREADY.

To avoid currently known bugs, please use this only in worlds you generate after enabling this mod and don't disable this mod in these worlds.
I will try to fix those issues later, so this mod can also be used in previously existing worlds without any sideeffects.
If you used this mod since world generation and really don't like it, then you can turn it off ONCE but you should NOT turn it on for said world again. The best time to disable this mod is when it is full daylight, so the guards are wearing their helmets. If you disable it during dusk or night, the guards might appear without helmets, as the default files dont hide or show them.

Again: Please don't use in worlds which had any amount of time passed without this mod.

It would be more elegant and better for compatibility with updates and other mods to just change to necessary function with AddComponentPostInits, but I couldnt figure out how to apply that for the guards. If you want to improve this, just comment. Your help is welcome.
64 Comments
J.C. Menton 19 Dec, 2024 @ 3:19am 
damn... sounds hellish. i didnt know.
Kain Morgen  [author] 15 Dec, 2024 @ 3:13pm 
@J.C. Menton:
The correct way to do this Mod would be to write AddComponentPostInit functions which effect only the pig guards, whose code is a fraction of citypigbrain.lua and pigman_city.lua

I couldn't figure out how to in reasonable time, so instead my quick and dirty workaround was to Always copy the latest versions of those files, add the Same changes and replace those original files as a whole.

This means any official game update to pigs or pig cities would be rollbacked by this mod in the best case or might cause crashes worst case until I copied the latest files again, reapplied my changes and reuploaded the latest Mod version.
=> Too much hassle for me in the long run.
Especially since Hamlet was still in active development at the initial release of this Mod.
And don't get me started about incompatibilities with other mods changing pig behaviour or pig city logic.
J.C. Menton 5 Dec, 2024 @ 1:01pm 
question. how much does a code change? my only modding experience that i have is payday 2 and minecraft. i have no idea how this works at the slightest. Thats why abandoning a mod seems sureal to me. (i still respect your choice i am just curious)
Guide_The_Guide 3 Sep, 2023 @ 8:27pm 
I still love this idea, but I"ll have to learn a lot about lua files to try to mod this myself. I wish that Klei had officially done this as I think it's a brilliant idea!
Kain Morgen  [author] 27 Oct, 2020 @ 1:11pm 
@tengsiti: Please check the meaning of the word 'abandoned'.

I don't update this mod any more.
If other modders pick this mod up an update and improve it then I am ok with that.
伯乐快递 先马后寄 27 Oct, 2020 @ 4:35am 
I can't use it. it cause the game to crash.
珍珍 10 Apr, 2020 @ 3:34am 
it is useless to my DLC or it break down some times:steamsad:
TroglodyteHogwash 21 Apr, 2019 @ 6:37am 
Mabe it would be more practical to replace torches with morningglories/ nightsticks.
FreyaMaluk 10 Apr, 2019 @ 4:53pm 
@Kain Morgen if you are not supporting the mod pls add an "[Abandoned]" indication at the end of the mod's title... Maybe another modder would fix it and take care of future updates
Kain Morgen  [author] 20 Mar, 2019 @ 8:25am 
@-=bd=- : That is because this mod replaces the whole file of pigvillage, etc. with a modified older version of those files. At this time there was no tinker shop, so that is missing then. I could just get the new file and copy paste the changes, but then again every time something new is added, this mod will crash again.

I dont have the time to fix this now and probably just dont want to do so later because priorities.

There is another mod that makes pig guard torches not burn stuff called 'Pig Guard Fire Safety'. Use this instead. I mean, you wont get the amazing candlehats from pig guards, but otherwise it does mostly the same.

Or feel free, to dig into the code and fix all of the conceptual bugs yourself if you can and then upload the fix into the workshop. I would appreciate that.