Jump to content

Recommended Posts

Hi all, I'm working on a mod right now that makes drowning penalty configurable, similar to the mod I made a while back that makes the damage from Charlie configurable. Since I had done something similar before, I thought I knew what I was doing, but as it is right now, the mod does nothing even though it does not crash, and I was wondering if it could be that the modded component file isnt replacing the original game component.

Here are the files in question:

modinfo.lua

modmain.lua


drownable.lua

any suggestions or help would be appreciated

It looks like the drownable component is almost completely made up of public functions. Why not use the mod API to make it configurable by overriding specific functions, so other mods editing the drownable component in other ways don't get their code removed? It should never be your first choice to override an entire game component file. It makes your mod incompatible with any other mod using the same files. Unless you trust the priority system and that no mod loads before yours :)

We'd have to see a zip of the mod, since file structure matters in this case.

Edited by Ultroman

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...