-
Notifications
You must be signed in to change notification settings - Fork 22
Alpha Release: Loot Predicates, The Last Events before Mixins, and Tweaks
This is the eighth alpha and brings a ton more changes.
Here is everything in this release:
- Added Interact Events
- Added Shield Block Event
- Added Anvil Repair Event
- Added Player Tick Handler and events (Sprinting, Swimming, Riding, etc)
- Version bump to 1.18.2
- Update Config Skill Maps
- Added Loot Predicates
- Made tooltips disappear if the player meets the req
- Finalized Default Fireworks in pmmo-perks.toml
Events for ACTIVATE_ITEM
, ACTIVATE_BLOCK
, and HIT_BLOCK
implemented. standard event triggers, perks, and XP apply.
Xp is based on the shield item itself. No context is given. this may be updated later for perks.
gives xp based on the output item when repaired
Events added
BREATH_CHANGE triggers any time the player breath changes up or down.
HEALTH_CHANGE triggers any time the player health changes up or down.
RIDING triggers every 10th tick while riding in a vehicle (the vehicle entity has the xp value for the datapack)
SPRINTING triggers every 10th tick while sprinting on land
SUBMERGED triggers while underwater, but not moving in any direction
SWIMMING triggers while not submerged but moving in water. surface swimming or waterfall climbing
DIVING triggers while submerged and sinking
SURFACING triggers while submerged and surfacing
SWIM_SPRINTING triggers while submerged and sprinting
In the damage events the xp gained is controlled by values in the server config. That config was updated to use a map instead of two separate config entries. it used to be a modifier and a single skill. Now you can set multiple skills with their own modifiers. The tick events use this same format, for those that it applies to.
This is by far the biggest and coolest part of this update. This essentially ports the "extra chance", "rare mob drops", "rare fish loot", and "treasure" features. You now have 3 new PMMO-related conditions you can use in loot tables to define drops. Loot tables are far more versatile than any system for any of the above features, so I strongly recommend you look into them if you are not familiar. In short though, these conditions let you set specific drops for an entity or block to be conditional on a player skill. The most basic conditions are pmmo:skill_level
and pmmo:skill_level_kill
. The latter works for kills, while the former works on everything else, including chest loot. That's right, you can now make chests give different loot based on a player's skills. the format for this condition in the loot table is:
{"type":"pmmo:skill_level",
"skill":"skillname", //required
"level_min": 10, //optional
"level_max": 20 //optional
}
leaving out both optional keys is pointless since the condition will always be true in that case.
The third condition is pmmo:highest_skill
which returns true only if the target skill is the highest of those it's compared to.
{"type":"pmmo:highest_skill",
"target_skill":"skillname",
"comparable_skills": ["skill1", "skill2"]
}
All keys are required. The comparable skills are those that the target skill is compared against. if the target skill has the highest level of all the comparables, the condition will return true. You can use this to give different items based on a player's highest skill. for example a strong bow for an archer, but a strong sword to a combatant.
instead of changing color or striking-through when a req is met, the req will now stop displaying. Only unmet reqs will appear in a tooltip now. If all reqs are met, the requirement section itself will disappear. This design was to help in keeping tooltips as minimal as possible.
All the default PMMO skills are now generated in the default pmmo-perks.toml with fireworks entries. You now get fireworks on all default skills. This is mostly in preparation for auto-values which is the next feature to be implemented.
- Loot Tables. Loot Tables. Loot Tables. check fishing, chests, mobs, everything. They should all work just fine so this is mostly for you to have fun with it by doing ridiculous things.
- Event Testing. Not a lot was done to test behavior and situations where things might be cheese-able or work oddly. Strange behaviors are expected. Please report any oddities.
- Have fun. we are getting very close to a final version.