turupawn
Hello,
Thank you for your feedback.
To publish a module, you can follow the same structure as:
https://github.com/RSamaium/RPG-JS/tree/v4/packages/plugins/title-screen
1) The config.json
file at the root indicates what the developer must (or can) put in rpg.toml
. You can then retrieve a configuration (server-side, client-side or both) from the module.
Example:
{
"namespace" : "web3",
"server" : {},
"client" : {
"type" : "objet",
"properties" : {
"provider" : {
"type" : "string"
}
},
"required" : [
"provider"
]
},
"*" : {}
}
So in rpg.toml
,
you can set
[web3]
provider = '...'
In code, you can find the configuration with: https://docs.rpgjs.dev/api/RpgClientEngine.html#globalconfig
2) When you publish to npm, publish it prefixed with rpgjs-
.the compiler will understand that it's a plugin.