Jump to content

Recommended Posts

Ok so very VERY noob question. I have looked at other mods and have just about finished my own, but I need to know how to "prepare" the mod for being able to be installed either manually or via steam workshop. My main question is whether or not I need a modmain.lua file, and if so what goes in it.

This mod is very basic, it changes the telelocator focus so that the three gems are not destroyed when you use the telelocator staff (because lets face it, you already need 2 purple gems to get 5 uses out of the staff. That's expensive enough as it is, making it cost 3 purple gems PER USE to get back to your base is overkill). It modifies the telebase.lua and telebase_gemsocket.lua files by commenting out the DestroyGem function in the latter, and commenting out the call to that function in the former.

This mod is actually part of the SpiffyBackpack 0.4 mod pack. I have no need of the other mods included in that pack so I merely appropriated the necessary files from that mod. I've got the modinfo.lua as well as the directory structure for the data folder, but is that enough? AFAIK all of the mods that use modmain.lua are adding additional functionality to the game; but this one is merely removing existing functionality. Assuming I have the files in the proper positions they will need to be in to be overwritten is there anything else I need to do to ensure the mod installs and enables properly?

best way - when your mod dont overwrites anything directly, but by using "API" functions.

you dont need to know enabled your mod or not, id he running - mod enabled, enough to know.

you can print something in log to be sure

and look in mod samples or other mod, its pretty easy to understand their stucture

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...