Getting started
These docs cover OPP 1.0.0. Changes between versions are in the changelog.
Requirements
| Version | ||
|---|---|---|
| OPP | 1.0.0 | |
| Minecraft | 1.20.1 | |
| Fabric Loader | 0.19.3 or newer | |
| Fabric API | any | |
| Origins | 1.10.0 or newer | includes Apoli and Calio, which OPP builds on |
| Java | 17 or newer | |
| Simple Voice Chat | any, optional | for the voice chat features (page 13) |
| Hardcore Revival | any, optional | for is_downed (page 2) |
| Styled Nicknames | 1.2.1+1.20, optional | to obfuscate nicknames along with usernames (page 6) |
Install OPP on the server and on every client. Clients need it for synced values, such as variables in HUD bars and the attributes.
Your first OPP power
An OPP type goes anywhere Origins accepts that kind of type, with the origins-powerful-powers: namespace.
data/mypack/powers/steady_aim.json: +20% damage while you stand still and your attack is fully charged.
{
"type": "origins:modify_damage_dealt",
"condition": {
"type": "origins:and",
"conditions": [
{
"type": "origins-powerful-powers:attack_cooldown_progress",
"comparison": ">=",
"compare_to": 1.0
},
{
"type": "origins-powerful-powers:sprint_ticks",
"comparison": "==",
"compare_to": 0
},
{
"type": "origins-powerful-powers:time_airborne",
"comparison": "==",
"compare_to": 0
}
]
},
"modifier": {
"operation": "multiply_total_multiplicative",
"value": 0.2
}
}Add the power to an origin ("powers": ["mypack:steady_aim"] in data/mypack/origins/<origin>.json), or grant it to test:
power grant @s mypack:steady_aimHow these docs are laid out
Each type gets a block like the Origins docs:
Sprint ticks
origins-powerful-powers:sprint_ticksentity conditionWhat it checks, in one or two sentences.
Field Type Default Description An example with an explanation.
- Field types use the Origins names: Comparison (
"<","<=",">",">=","==","!="), Integer, Float, Double, String, Identifier, and the Origins "type" data types, such as Bi-entity condition type. - Default: required means the field must be given.
- Enum fields (like
axisorcomponent) accept any capitalization. - Confidence notes. Descriptions come from the mod's source code. Unconfirmed behavior is listed under Suspected bugs at the end of the contents page.
Things that apply to every page
- Ticks. 20 ticks = 1 second, 1200 ticks = 1 minute.
- Bi-entity pairs. The actor is the first entity, usually the power holder (
self). The target is the second, the one being hit, looked at, and so on (other). This matches Origins. Tracked values live on the server and aren't saved. Several conditions read values OPP records as things happen: last damage, recent damage, knockback, attack reach, shield angle, time since last meal, airborne and sprint ticks, crouch depth, vibration cooldown, and the voice chat state. They are:
- kept in memory on the server, per entity
- reset when the server restarts
- forgotten when a non-player entity leaves the world by being killed, removed, or unloaded with its chunk. Changing dimension keeps them.
- kept for players through deaths and logouts, until the player has been offline longer than the gamerule
oppPlayerExpiryDays(real days, default30,0= never). The global store uses the same gamerule for keys bound to a player. - 0 / false on the client. A condition Origins checks on the client, such as a
hud_rendercondition, reads them as 0 or false. The attributes are synced to clients every tick, so useorigins:attributefor client-side checks.
- Player-only conditions are false for other entities. Each entry says so.