Resources for modders?

help
mod

#1

I’ve been diving into the files and trying to mod my game, and I’ve come across a few functions that I would like a better understanding of what they do. Is there a list of functions used in fetish master and how they work?

Some are pretty self-explanatory, such as addStat, doAction, etc., but others I’m not quite as sure. For example, what the calculations are for LustShame or updateEffect, or the differences between GetFlag and PerGetFlag. I’m sure there are plenty more that I can’t remember or just have encountered yet.

If there is information out there that would give me a better understanding of the tools available in the code, I would be very appreciative.


#2

H.Coder has released some documentation and a partial source code on his website. So you can take a look at that. But mostly I’ve taught myself about specific syntaxes the game uses.

Lustshame essentially gives a proxy a mood hit if their lewdness is below the number you specify.

UpdateEffect does as it says, it updates the properties of an effect. I literally have never used it, so i can’t give many details.

As for GetFlag, and GetPerFlag. they both use the same syntax, but Flags are global, and PerFlags are linked to specific characters(per = personal)

Other than that feel free to ask anymore questions!


#3

There used to be a handful of basic engine guides on the FM blog, but the links to download them seem to be dead. I’m not sure whether they’d really have answered all your questions in the first place.

Most of what I’ve learned, I’ve learned either through looking at other mods or through the game’s source code itself. The source code for 0.99 is available on GitGud. Most of what gets called in user-scripted stuff can be found in ScriptVarsIntegrator.java (in /src/fetishmaster/engine/scripts/), but you’ll also have to dig into the actual methods for Creature and even RNAGene to get a full picture.

In response to your specific questions, GetFlag refers to a global flag, while PerGetFlag/GetPerFlag refers to a personal flag tied to a specific character. Calling a character’s GetFlag (proxy.GetFlag(“flag”), for example) also refers to a personal flag rather than a global one.

updateEffect generally takes two strings and an int - the stat name, the name of the effect, and the value of the effect (a modifier to the named stat). If the stat already has an effect with the same name, the value of that effect is updated with whatever it was just given; otherwise, a new effect is applied with that value. You can also add a fourth value, time, to adjust how long that effect lasts, and in conjunction with it a fifth value, a string to be printed when the effect expires.

LustShame requires a bit more code-hopping to see the full logic of it, as it calls a couple other methods and references stats that really never get used. Essentially, it takes a creature, a lust value, and a shame value as input. Shame is adjusted to generally equal lewdness - shame (or zero if lewdness > shame), arousal is adjusted by, essentially, (lust - adjusted shame) times (libido/10), and mood is adjusted as usual based on original shame amount. There are other factors here that modify all that, but I don’t actually know that they’re used in the base game.


#4

Thanks. I will definitely be taking a look at the source code. It might help me get some ideas too.


#5

Thanks. Is there any way to raise one number to the power of another? I’ve tried both pow(x,y) and math.pow(x,y). Much appreciated.


#6

You’ll want Math.pow - the upper-case M is important.


#7

Thanks, it’s working now.