Difference between revisions of "Hostile Worlds - Invasions - Customizing"

From Coros.us Wiki
Jump to: navigation, search
(Created page with "This page is for customizing the existing invasion wave profiles or creating your own. == Getting setup == You'll need a good text editor, for windows, notepad++ should do,...")
 
Line 11: Line 11:
 
== Resetting files or updating CoroUtil ==
 
== Resetting files or updating CoroUtil ==
  
CoroUtil scans for changes in any file in config/CoroUtil/data/. If the folder is empty, or if there have been no changes to any file, it will overwrite the contents of everything in there, this is so when there is a new update to the json files, it can make sure anyone who had CoroUtil and HW-Invasions installed before will get the most up to date json files.
+
CoroUtil will overwrite the contents of config/CoroUtil/data/ every game run if:
 +
- The folder is empty, or
 +
- It detects zero file changes by comparing file contents against the info in filehashes.txt (leave this file alone or you might lose data)
  
This also means that if you make any changes to the files, your files wont be overwritten on each run of the game, but also if there was any json changes for a newer version of the mod, you wont have those either.
+
If you make changes to the json files, you should be safe from having files overwritten.
 +
 
 +
This is to make sure any new mod updates has the latest json on the filesystem unless files have been manually edited.
 +
 
 +
For updating the mods when you have custom files I would recommend backing up your json files, deleting the data folder, then let the mod generate the new files, you could then paste your files back in and see if things work out ok ingame, if not, decide on how to merge in your changes.
 +
 
 +
== JSON Structure ==
 +
 
 +
The default invasion setup is making use of 3 files: templates/action/mob_spawns.json, templates/cmods/invasions_cmods.json, and templates/conditions/invasions_stages.json.
 +
 
 +
Only mob_spawns.json is truely required, you can get away with using only it if you don't use templates at all, the default setup uses templates though, the other 2 files contain pre-made templates referenced in mob_spawns.json to keep down on the copying and pasting.
 +
 
 +
=== mob_spawns.json ===
 +
- Contains a list of potential spawn templates, defined in the "templates" list object
 +
- Each spawn template can have a list of conditions required to use the spawn profile, defined in the "conditions" list object, this list is optional
 +
- Each spawn template has a list of spawn profiles, defined in the "spawns" list object
 +
- the spawn profile defines a lot of things
 +
-- What to spawn
 +
-- How it spawns
 +
-- How many spawn
 +
-- What cmods to give them
 +
 
 +
=== Cmods ===
 +
 
 +
A Cmod is just short for the more corny term: Coro Modifier. They modify an entity in various ways, from things as simple as health to more complex things like preset AI routines.
 +
 
 +
=== Conditions ===
 +
 
 +
asdasdasd

Revision as of 18:12, 22 January 2019

This page is for customizing the existing invasion wave profiles or creating your own.

Getting setup

You'll need a good text editor, for windows, notepad++ should do, but something that can do syntax checking would help make sure things are formatted correctly, and editor like IntelliJ IDEA can do this. If you just use notepad++ you can find out if anything went wrong reading your json file later.

The first thing you'll need to do is run the game with coroutil and hw-invasions installed, this will generate the needed files in your minecraft config folder, you can leave the game open or close it at this point, doesn't matter. If you leave it open you can live edit and reload json files, to save from having to reload large modpacks.

The main file you will be working in is mob_spawns.json, once you have run the game, you can find it in config/CoroUtil/data/templates/actions/

Resetting files or updating CoroUtil

CoroUtil will overwrite the contents of config/CoroUtil/data/ every game run if: - The folder is empty, or - It detects zero file changes by comparing file contents against the info in filehashes.txt (leave this file alone or you might lose data)

If you make changes to the json files, you should be safe from having files overwritten.

This is to make sure any new mod updates has the latest json on the filesystem unless files have been manually edited.

For updating the mods when you have custom files I would recommend backing up your json files, deleting the data folder, then let the mod generate the new files, you could then paste your files back in and see if things work out ok ingame, if not, decide on how to merge in your changes.

JSON Structure

The default invasion setup is making use of 3 files: templates/action/mob_spawns.json, templates/cmods/invasions_cmods.json, and templates/conditions/invasions_stages.json.

Only mob_spawns.json is truely required, you can get away with using only it if you don't use templates at all, the default setup uses templates though, the other 2 files contain pre-made templates referenced in mob_spawns.json to keep down on the copying and pasting.

mob_spawns.json

- Contains a list of potential spawn templates, defined in the "templates" list object - Each spawn template can have a list of conditions required to use the spawn profile, defined in the "conditions" list object, this list is optional - Each spawn template has a list of spawn profiles, defined in the "spawns" list object - the spawn profile defines a lot of things -- What to spawn -- How it spawns -- How many spawn -- What cmods to give them

Cmods

A Cmod is just short for the more corny term: Coro Modifier. They modify an entity in various ways, from things as simple as health to more complex things like preset AI routines.

Conditions

asdasdasd