Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LM4 / Entity Experiences Modifier #456

Open
UltimaOath opened this issue Jun 8, 2023 · 2 comments
Open

LM4 / Entity Experiences Modifier #456

UltimaOath opened this issue Jun 8, 2023 · 2 comments
Labels
status: thoughts wanted Thoughts from the community are desired status: unconfirmed Needs confirmation status: waiting for approval Waiting for approval from maintainers type: improvement Add or adjust a feature
Milestone

Comments

@UltimaOath
Copy link
Collaborator

UltimaOath commented Jun 8, 2023

TLDR A modifier tag similar to %mob-gainedexp% which is populated by an internal value on each entity.

I imagined a system which when configured would give an entity 'internal experience points' for certain configured events which a rule is listening for. A few suggested events to start would be 'when an entity has remaining health' ( formula: '(%entity-max-health-rounded% - %entity-health-rounded%) * 0.1' ) , 'when an entity has damaged a player' ( formula: 'SQRT(%damage-output%)' ), and 'when an entity killed a player' ( formula: '%players-killed-by-entity%' ). This would necessitate the creation of the tags %damage-output% which simply reflects the last amount of damage which successfully output from the entity, stored on the same entity; as well as %players-killed-by-entity% which reflects the number of players the entity has killed, starting with zero and increasing by one for each kill attributed to the specified entity stored on the same entity.

Using the conditions above, when an entity comes into contact with a player and is engaged, if any of the configured events occur, the entity will store the internal experience gained by events such as entity damaging or killing a player; the remaining health would not need to be factored at this time. With this information saved during it's interaction with players, it does nothing to adjust the modifier value present on the entity (all of whom start with a modifier of zero). Assuming the entity is still alive at this stage, once a player has left the area of an entity which has interacted with them (once the entity has returned to it's neutral state when not hostile), and gained experience from that interaction OR their health points have reduced from their maximum, their modifier value is to be calculated. Whatever stored internal experience will be added to the modifier value and the stored experience is wiped. Then the output of the 'remaining health' is calculated and also added to the modifier value. With the new modifier value complete the entities' attributes can be recalculated using the adjusted modifier value in the form of the %mob-gainedexp% placeholder tag. This does not change the entities' level, but it would potentially change their stat values based on how the player incorporates the optional tag.

The reason I suggest considering the separate mechanic of checking the health is because it is meant to be a consequence of a player choosing to knock entities down into pits and the like so they need not deal with them; but if the entity survives the fall it gains a boost to their stats from it and down the road will be a bigger hassle for the player to manage since they didn't handle the issue before. The same argument is said for when entities successfully hit a player or kill them and they survive the encounter; the entity is rewarded by a configured boost in it's stats.
While a cap mechanic would prevent this, should a user not wish to use a cap, this system could lead to funny intentionally over-buffed entities that are used for interesting purposes like protecting a home with a zombie trained via the modifier to be like a 1ko. But as said this is resolved with associated caps either per-check or for the modifier generally.

@lokka30
Copy link
Member

lokka30 commented Jun 9, 2023

Sounds like a great feature from the get-go, though I'll need to set aside some time to look into what this feature will require of us. Cheers

@lokka30 lokka30 added type: improvement Add or adjust a feature status: unconfirmed Needs confirmation status: thoughts wanted Thoughts from the community are desired status: waiting for approval Waiting for approval from maintainers labels Jun 9, 2023
@lokka30 lokka30 added this to the v4.0 milestone Jun 9, 2023
@UltimaOath
Copy link
Collaborator Author

UltimaOath commented Aug 18, 2023

Autonomous Global Experience Database (AGED System)

Short summary of concept: Entities are able to gain experience based on established and listened for events. This experience is applied to the entity in the form of modifier placeholders which can be included in an entities' stat processing. An entities' stats are updated when there is an AGED update concerning that specific entity.

I imagine a system which would allow entities to gain experience points based on a variety of listened to events. This can be useful for both wild entities which face off against players and gain experience as well as tamed pets which battle hostile mobs protecting the player, amongst any other variety of options.

A few suggested events which the AGED system could be actively listening for and storing the data on the respective entity:

Total Damage Received %aged-damage-received%
Total Damage Output %aged-damage-output%
Total Players Killed %aged-players-killed%
Total Health Restored %aged-health-restored%
Total Mobs Killed %aged-mobs-killed%
Total Time Alive %aged-time-alive%
Total Time Tamed %aged-time-tamed%

There could likely be other options available down the road. These internal-only placeholders would be populated from the mobs' own stored AGED dataset. With LM4's listening system it would need to include a listener for 'AGED Updated Data' and when the listener discovered updated data it would need to be able to re-process the entities' multiplier formula (which would likely include one of the above mentioned new internal placeholders) with new values for those placeholders which had been updated. Essentially a re-levelling of the entity without changing the actual level or anything not specified in the listeners executed tasks/rules.

I've provided some more fleshed examples in my original posting but this is just a cleaner reading of essentially the same idea with a bit more flesh to the concept.

The two initial examples that come to mind are wild entities which survive encounters with players and are given experience points for doing so, or for a tamed pet entity like a wolf being able to level-up by being a good protector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: thoughts wanted Thoughts from the community are desired status: unconfirmed Needs confirmation status: waiting for approval Waiting for approval from maintainers type: improvement Add or adjust a feature
Projects
None yet
Development

No branches or pull requests

2 participants