SvenKayser / JMOD

The Javascript MOD Loader
Other
9 stars 4 forks source link

[Documentation] Sample project #3

Closed helkarakse closed 8 years ago

helkarakse commented 8 years ago

Do you have a sample project file or a short description on where to put the JS files necessary to be picked up and run as a mod?

ghost commented 8 years ago

An example is here, in which JMOD is used as the basis for most of the custom features for an upcoming version of Survival Industry.

Note that the beginning script to be read is identified by the mod.json file, and that script then uses the JavaScript load() command in order to load up the rest of the scripts.

Once you have all the scripts written, zip them up, along with the assets folder (you know, for textures and language), and change .zip to .jmod

Once you have customscripts.jmod (or whatever you decided to name it), simply put it in the mods folder, and it will be loaded as if it were a regular Forge mod... as long as you have JMOD itself already installed. It will even show up in the Forge mods list in the main menu.

ghost commented 8 years ago

I just finished three sample projects that can be used directly:

You simply place them in the mods folder with JMOD, and that's it. If you want to alter them, simply unzip them and edit the JavaScript files. Then zip them back up, change ".zip" to ".jmod", and plop them back into the mods folder.

helkarakse commented 8 years ago

Hi reteo, thanks for putting together the files, but I realise now that this is not actually along the lines of what I was looking at. I was under the impression that this mod would function similar to something like Sponge Javascript, permitting you to write simple mods that hooked into Forge. It appears that the functionality is closer to Minetweaker. I'm sorry for the trouble.