You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 8, 2024. It is now read-only.
Modding (modifying) the game is currently possible using the dynamic plugin system. Simply use Reflection to inject your custom code into the game.
There are some limitations, for example, it is impossible to override module functions.
(warning: pseudo-code below)
// moduleexportfunctiontest(){return'a'}
// plugin/customimport{test}from'module'// This will just rename testtest=()=>'b'// Also won't workObject.assign(test,()=>'b')// Event after completely destroying test...Object.setPrototypeOf(test,null)for(constkofObject.getOwnPropertyNames(test)){test[k]=undefineddeletetest[k]}// And ensuring its completely destroyed...Object.getPrototypeOf(test)// nullObject.getOwnPropertyNames(test)// ['arguments', 'caller', 'prototype']test.arguments// nulltest.caller// nulltest.prototype// undefined// It still works...test()// 'a'
The DX is also not great since all your code needs to be files inside the src[/public]/plugin (for ease of sharing and avoiding conflicts).
You also can not modify any non-code files without doing Reflection on the loaders themselves or using the node:fs module.
All that makes for a horrible, horrendous, impractical way of doing anything even slightly complex.
Modding (modifying) the game is currently possible using the dynamic plugin system. Simply use Reflection to inject your custom code into the game.
There are some limitations, for example, it is impossible to override module functions.
(warning: pseudo-code below)
The DX is also not great since all your code needs to be files inside the src[/public]/plugin (for ease of sharing and avoiding conflicts).
You also can not modify any non-code files without doing Reflection on the loaders themselves or using the
node:fsmodule.All that makes for a horrible, horrendous, impractical way of doing anything even slightly complex.