Class: Mod

Mod


new Mod(id)

The mod class will let you handle everything you need to do.

Parameters:
Name Type Description
id string
Source:

Members


animation :AnimationManager

Type:
Source:

boss :BossManager

Type:
  • BossManager
Source:

client :ClientManager

Type:
Source:

clothes :ClothesManager

Type:
Source:

defaultQuest :QuestManager

The default QuestManager

Type:
Source:

dialogue :DialogueManager

Type:
Source:

girl :GirlManager

Type:
Source:

item :ItemManager

Type:
Source:

map :MapManager

Type:
Source:

quest :QuestManager

The QuestManager for this mod's quests

Type:
Source:

Methods


addGold(amount)

Gives gold to the player

Parameters:
Name Type Description
amount number
Source:
Example
myMod.addGold(1000);

boot()

This method is called when the user loads a save file. All of the variables you need to initialize should be here.

Source:

cumFlash()

Flashes the screen and returns back to normal

Source:

fade()

Fades the game to black and then returns back to game back to normal and resolves the Promise at the same time

Source:
Returns:

Promise

Example
myMod.fade().then(() => {console.log("After done fading.");});

getActiveQuests()

Returns all of the active quests for the game and searches through all of the mods

Source:
Returns:
Type
Array

getAllQuests()

Returns all of the quests for the game + all of the mods

Source:
Returns:
Type
Array

getDate()

Returns todays date, the same string in the HUD of the game

Source:
Returns:
Type
string

getDay()

Returns the current day as a number

Source:
Returns:
Type
number

getExp(level)

Returns the exp of a body part by the given level parameter

Parameters:
Name Type Description
level number
Source:
Returns:
Type
number

getGold()

Returns the amount of gold the player has

Source:
Returns:
Type
number

getLevel(exp)

Returns the level of a body part by the given exp parameter

Parameters:
Name Type Description
exp number
Source:
Returns:
Type
number

getOtherMod(modID)

Returns the given mod's class

Parameters:
Name Type Description
modID string
Source:
Returns:
Type
*

getUnlocked()

Returns an array of unlocked girls

Source:
Returns:
Type
Array

notify(text)

Displays a notification pop-up in the top left corner of the game and also puts it in the notifications menu

Parameters:
Name Type Description
text string

The text to send to the notifications

Source:
Example
myMod.notify("Hello!");

removeGold(amount)

Removes gold from the player

Parameters:
Name Type Description
amount number
Source:
Example
myMod.removeGold(1000);

save()

Saves the game

Source:

Sigmoid(skill, difficulty [, steepness] [, offset])

A Sigmoid function

Parameters:
Name Type Argument Default Description
skill number
difficulty number
steepness number <optional>
-10
offset number <optional>
5
Source:
Returns:
Type
number

updateMod()

This method is called after a save file is selected and before Mod#boot. It should be used to update any player data before the mod loads.

Source: