Blockland Forums > Modification Help
Toggling Mods with Packages
(1/2) > >>
cucumberdude:
I understand the use of packages for modifying existing functions.

However, I've also notice that you can declare new functions within a package.

Is there any reason not to put the entire mod code inside a package and the activate/deactivate it in order to toggle on/off a mod?

As far as I can tell, it seems efficient and effective.
otto-san:
No, there's no reason not to.

There are some mods that are completely in packages for that reason.
MegaScientifical:
I'm sure using packages in such a way makes some floating data that is probably harder on the game than usual. Otherwise, this would be common advise. Also, you can't toggle variables from existing.
cucumberdude:

--- Quote from: MegaScientifical on June 19, 2011, 08:31:14 PM ---I'm sure using packages in such a way makes some floating data that is probably harder on the game than usual.

--- End quote ---
To a noticeable extent? If not, it seems like this is a pretty good way to pull this sort of thing off.


--- Quote from: MegaScientifical on June 19, 2011, 08:31:14 PM ---Also, you can't toggle variables from existing.

--- End quote ---
Well no stuff. But, you can toggle the functions that use them.
MegaScientifical:

--- Quote from: cucumberdude on June 19, 2011, 11:48:09 PM ---To a noticeable extent? If not, it seems like this is a pretty good way to pull this sort of thing off.

Well no stuff. But, you can toggle the functions that use them.

--- End quote ---

Well, try it. Run your game normally and check how much RAM, CPU, etc. is being used. Then make one of your Add-Ons run this way and check, then deactivate it and check again. Tell us what the stats are.

And yep, just checking.
Navigation
Message Index
Next page

Go to full version