Hitting moving distant targets with arrows should give more XP #6080

Open
opened 2024-01-26 01:45:07 +00:00 by whosit · 7 comments
Member
No description provided.
whosit added the
1. kind/enhancement
label 2024-01-26 01:45:07 +00:00
AliasAlreadyTaken added the
1. kind/balancing
label 2024-01-26 01:58:47 +00:00
Member

hm. there's not an easy path to implement this currently via y_bows/ballistics - it's coded so that the target is punched by the player who shot the arrow, so xp_redo would have no idea that the source was an arrow.

hm. there's not an easy path to implement this currently via y_bows/ballistics - it's coded so that the target is `punch`ed by the player who shot the arrow, so xp_redo would have no idea that the source was an arrow.

If we ever want to do different types (pierce, slash, blunt, magic, ... or a combination thereof) of damage, we need a way to tell the receiver what they were damaged with. Is that some similar thing or am I offtopic?

If we ever want to do different types (pierce, slash, blunt, magic, ... or a combination thereof) of damage, we need a way to tell the receiver what they were damaged with. Is that some similar thing or am I offtopic?
Member

If we ever want to do different types (pierce, slash, blunt, magic, ... or a combination thereof) of damage, we need a way to tell the receiver what they were damaged with. Is that some similar thing or am I offtopic?

i figure arrows would do piercing (or "piercey", to follow minetest conventions) damage, and that'd be handled by the tool_capabilities. but there's no way to distinguish that from other sources of piercing damage (spears, whatever else). per the documentation, on_player_hpchange callbacks can have additional values provided by a mod, but there's no way to use the game's existing API (object:punch(...)) to supply such values, at least currently. ballistics could override all the on_player_hpchange and on_dieplayer callbacks and supply the relevant information, but that's pretty hacky.

if the "puncher" object was instead the arrow's object, we could determine that the source of the damage was an arrow, but we'd lose out on the automatic integration with pvp_plus and possibly some other things.

> If we ever want to do different types (pierce, slash, blunt, magic, ... or a combination thereof) of damage, we need a way to tell the receiver what they were damaged with. Is that some similar thing or am I offtopic? i figure arrows would do piercing (or "piercey", to follow minetest conventions) damage, and that'd be handled by the `tool_capabilities`. but there's no way to distinguish that from other sources of piercing damage (spears, whatever else). [per the documentation](https://github.com/minetest/minetest/blob/40bf88ac7483084c3ba9b77004c36c6f62ed05ca/doc/lua_api.md?plain=1#L5620), `on_player_hpchange` callbacks can have additional values provided by a mod, but there's no way to use the game's existing API (`object:punch(...)`) to supply such values, at least currently. ballistics could override all the `on_player_hpchange` and `on_dieplayer` callbacks and supply the relevant information, but that's pretty hacky. if the "puncher" object was instead the arrow's object, we could determine that the source of the damage was an arrow, but we'd lose out on the automatic integration with pvp_plus and possibly some other things.

Can one hit do two punches?

Can one hit do two punches?
Member

Can one hit do two punches?

like, one as the arrow, and one as the source player? if the first punch did 0 damage, on_player_hpchange wouldn't get called, and if didn't do 0 damage, it'd get ignored by pvp_plus. or am i misunderstanding?

> Can one hit do two punches? like, one as the arrow, and one as the source player? if the first punch did 0 damage, `on_player_hpchange` wouldn't get called, and if didn't do 0 damage, it'd get ignored by pvp_plus. or am i misunderstanding?

Yes. Would have been a makeshift group damage/multisource thing.

Yes. Would have been a makeshift group damage/multisource thing.
Member

Yes. Would have been a makeshift group damage/multisource thing.

that's also very hacky. honestly i'd prefer to do the "override all on_player_hpchange and on_dieplayer" thing - after thinking about it a bit more, i don't see any clear ways that it'd break when other mods change their behavior, if we tag the new parameters properly.

> Yes. Would have been a makeshift group damage/multisource thing. that's also very hacky. honestly i'd prefer to do the "override all `on_player_hpchange` and `on_dieplayer`" thing - after thinking about it a bit more, i don't see any clear ways that it'd break when other mods change their behavior, if we tag the new parameters properly.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#6080
No description provided.