[Mod] Player Monoids [player_monoids]

Byakuren
Member
 
Posts: 809
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

[Mod] Player Monoids [player_monoids]

by Byakuren » Mon Jun 13, 2016 05:30

This is a library for managing player status. It acts as a layer between mods and raw player state (e.g. physics overrides, player object properties), by keeping track of what changes have been made and combining them. It is essentially the "combining" and "state management" distilled out of monoidal_effects so that it can be used separately. player_monoids and playereffects can achieve the main goal of monoidal_effects when used together, so this mod deprecates monoidal_effects.

This mod could be used as a standalone library if you renamed init.lua and removed the dofile calls, if you really wanted.

Check out the readme for a usage introduction.

Download:
master

Also available on Minetest Bower (as player_monoids).

Source: https://github.com/minetest-mods/player_monoids
License: Apache 2.0 (No non-code assets)
Dependencies: None
API: https://github.com/minetest-mods/player ... ter/API.md

Mods that support player_monoids (mention any that aren't already in the list):
Last edited by Byakuren on Wed Jul 12, 2017 00:59, edited 8 times in total.
Every time a mod API is left undocumented, a koala dies.
 

drkwv
Member
 
Posts: 81
Joined: Thu Jun 28, 2012 13:48
 

Byakuren
Member
 
Posts: 809
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Player Monoids [player_monoids]

by Byakuren » Mon Jun 13, 2016 05:55

drkwv wrote:API link points to error page.

Sorry, fixed.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7434
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

Byakuren
Member
 
Posts: 809
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Player Monoids [player_monoids]

by Byakuren » Tue Jun 14, 2016 22:45

Added to Minetest Bower.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
texmex
Member
 
Posts: 977
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Player Monoids [player_monoids]

by texmex » Tue Apr 11, 2017 13:48

Byakuren wrote:It acts as a layer between mods and raw player state (e.g. physics overrides, player object properties), by keeping track of what changes have been made and combining them.



Does this mean I can use playereffects and a sprint mod at the same time?
 

Byakuren
Member
 
Posts: 809
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Player Monoids [player_monoids]

by Byakuren » Tue Apr 11, 2017 19:22

texmex wrote:
Byakuren wrote:It acts as a layer between mods and raw player state (e.g. physics overrides, player object properties), by keeping track of what changes have been made and combining them.



Does this mean I can use playereffects and a sprint mod at the same time?


Only if both the sprint mod and the playereffects effects you are using implement player_monoids support. I'm pretty sure sprint mod does not, but when you make an effect in playereffects you can program it to use player_monoids instead of directly setting overrides.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
texmex
Member
 
Posts: 977
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Player Monoids [player_monoids]

by texmex » Wed Apr 12, 2017 05:48

Byakuren wrote:Only if both the sprint mod and the playereffects effects you are using implement player_monoids support. I'm pretty sure sprint mod does not, but when you make an effect in playereffects you can program it to use player_monoids instead of directly setting overrides.


Okay! I thought it somehow automatically acted as an intermediate layer.
 

Byakuren
Member
 
Posts: 809
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Player Monoids [player_monoids]

by Byakuren » Wed Apr 12, 2017 21:35

It would be nice if it could, but even if I could override set_physics_override I still would have no way of knowing which mod it came from, which means I wouldn't know whether to cancel out a previous change.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
texmex
Member
 
Posts: 977
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Player Monoids [player_monoids]

by texmex » Thu Apr 13, 2017 09:55

Got it. Is there any mod apart from 3d_armor that supports this mod currently?
 

Byakuren
Member
 
Posts: 809
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Player Monoids [player_monoids]

by Byakuren » Thu Apr 13, 2017 14:34

Some of the magic stuff I haven't worked on in a while uses it, but nothing that's both complete and not abandoned.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
texmex
Member
 
Posts: 977
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex
 


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 8 guests