So developing for Fetish Master can be a bit tricky and really falls into two different categories: do you want to add content to the game, or do you want to modify the game engine itself?
If all you want to do is mod the game - add characters, events, etc. - using the in-engine dev tools is unfortunately your best choice. The syntax used for modding is much less strict than actual Java, and has some abstractions to make it easier for modders to use without knowing the gameâs actual structure, but trying to rewrite the editors to function as mini-IDEs that could show you when something doesnât work would be a massive, if not impossible, undertaking.
The best advice I can offer for modding - other than digging through other events/templates/items/etc. to get a feel for the syntax - is to first write events and templates in a manner that lets you quickly check whether their contents work - set up their flags and add a direct link to them from the base or debug areas, rather than try to run through your quest only to find that somethingâs broken. Once youâre satisfied that the event or template works as it should, you can set up the proper links and activation conditions. The best advice I can really give for syntax is to take a peek at events and templates that do similar things to what you want to do, or dig into the source code to see what functions actually exist.
The source code of the game is available - for h.coderâs unreleased 0.99 version, for my Legacy version that more closely emulates the released 0.98 versions, and for my heavily customized build, which adds some new features to take advantage of but might be outright broken. Once downloaded, you can open the folders in your Java IDE of choice, including IntelliJ, and poke around at the source files to get a better idea of the available functions and how they work - for most modders, src/fetishmaster/engine/scripts/ScriptVarsIntegrator.java is probably the most important, with src/fetishmaster/bio/Creature.java and related files also providing a good idea about setting up or applying actions to characters.
Normal IDE functions such as warnings and corrections should function on the downloaded source code as well, although the syntax will be different from how event files and such traditionally work; to get a feel for the differences, load up an organ in the in-game organ editor and compare it to the closest similar file in src/fetishmaster/bio/organs. Additionally, if you want to build the game engine from source, the included build files are designed to work for NetBeans - IntelliJ doesnât seem to have a problem building the various classes, but by default it wonât build a complete JAR file for the game.
Note that using an IDE wonât really help with creating in-engine stuff like events, templates, items, whatever. Aside from syntax stuff, the game has a number of objects assigned during running that youâd need to redefine in the IDE to avoid errors, and your IDE wonât export to the XML format that in-engine files use anyways. At best, itâll help you to get a feel for what functions are valid and what sort of input they expect or output they give.
Realistically, I should probably set up a wiki that documents the functions in ScriptVarsIntegrator and other common scripting functions, if nothing else; the documentation for the engine in general is pretty sparse and âlook at other eventsâ is the best advice that can usually be offered. Unfortunately thatâs a rather time-consuming undertaking and I really havenât had any motivation to work on Fetish Master related stuff recently.
Lastly, since I have a penchant for over-complicating things, I like to recommend setting up Git inside your game folder if youâre going to be modding. Even if youâre not using it for version control, a simple git init inside a folder makes it so much easier to track when files have been added or modified inside that folder. This will hopefully make it a lot easier to pick and choose files later, whether youâre ready to release or just want to move your mod out of a sandbox into another modded install, rather than just copying the entire gamedata folder.