User Tools

Site Tools


template:global-mod-script-functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
template:global-mod-script-functions [2023/06/07 11:10]
54.179.242.196 old revision restored (2022/08/06 05:42)
template:global-mod-script-functions [2023/10/18 10:11] (current)
xifanie old revision restored (2023/09/10 03:45)
Line 1: Line 1:
-this is a test+===== Global ===== 
 + 
 +<code>this.game.includeMod(modName, callFunction = null, args = [])</code> 
 + 
 +Includes another mod of the same game. ''modName'' must match the directory name of the mod. You may call specific function with arguments immediately, or you can interest with the object class as you desire through ''this.game.mods[modName]'' once it executes. 
 + 
 +For example, the following 3 blocks of code are equivalent: 
 +  - ''this.game.includeMod('test', 'patch');'' 
 +  - ''this.game.includeMod('test'); this.game.mods['test'].patch();'' 
 +  - ''let testMod = this.game.includeMod('test'); testMod.patch();''
template/global-mod-script-functions.1686136246.txt.gz · Last modified: 2023/06/07 11:10 by 54.179.242.196