Repository navigation
Releases: FLDebug10/Opoli-Fork
Release list
1.97.0: On Change
I think an example works for now:
{
"type": "apoli:resource",
"min": 0,
"max": 10,
"on_change": [
{
"entity_action": {
<any action>
},
"values": [0, "1"] <- list of expressions, ints or both
"value": 0 || "1" <- either int or expression
}
]
}Value and Values can be present at the same time, any of the values has to match it. all applicable actions are ran
1.97.0: Macros
btw the jar has contents from latest github (version 1.97.0) but was compiled so it works with latest modrinth origins release
Doc
The Macros are defined as a power for the sake of convenience yet they aren't powers. They can be used in apoli:multiple and stuff but can never be granted or anything. They are read once and then removed internally.
The power (type is "apoli:macro")
This is where you define a Macro to use it later, Fields:
Field | Type | Description | Default
"parameters" | List of Strings | Parameters used by the macro (same as function basically) | All used ones
"value" | ANY Json | The json template to use for the macro | Required
Example:
"type": "apoli:macro",
"parameters" : [
"a"
],
"value": {
"type": "apoli:print",
"text": "A macro with one parameter, [a]!"
}The usage (type also is "apoli:macro")
This is how to use the macros, instead of any object you can use a macro call, Fields:
Field | Type | Description | Default
"macro" | Identifier | The identifier of the macro 'power' | Required
"arguments" | Object that contains the arguments (see example) | The values to insert into the macro | Optional (Defaults to empty)
Example:
{
"type": "apoli:action_over_time",
"interval": 20,
"entity_action": {
"type": "apoli:macro",
"macro": "test:macro",
"arguments": {
"a": "Greetings"
}
}
}Notes
The macros can be used recursively (well not really): You can do A -> B -> C -> D and so on as long as you want, you can't loop tho: A -> B -> A is invalid!
1.89.0-CustomEffects
Stuff
JS.0.8.0
This is the first prototype of the Script Action Type using Rhino as optional compat (if you want to use this you have to install rhino seperately!). There are still many things that should be changed about this and there are barely any security features yet!