Vampirism - Become a vampire!

Vampirism - Become a vampire!

16M Downloads

Rework creature blood (calculation)

maxanier opened this issue ยท 0 comments

commented

About

Calculate blood value for unknown creatures based on entity size

  • Upper and lower limit
  • Config to disable

Also add third party values provided by Tacusin https://gist.github.com/maxanier/d01d11260c5853706131bac3fae6d891

Values

On server side we need to collect and use values from (In order of rank (overwriting), preferential values last.

  • Vampirism integrated values available in preInit
  • Values added per API (should be combined with Vampirism ones) available in postInit
  • Saved (automatically calculated) values in world directory available on world load
  • Automatically calculated values (only if not already present) available during game Save on unload
  • Values from config directory (should override all) available in preInit

On client side we need to collect and use values from (In order of rank (overwriting), preferential values last.

  • Vampirism integrated values available in preInit
  • Values added per API (should be combined with Vampirism ones) available in postInit
  • Values from config directory (should override all) available in preInit
  • Values from server available on connect Reset on disconnect
  • Automatically calculated values (only if not already present) | Packet from server (even if already present) available during game Reset on disconnect

Implementation

Store values as BiteableEntry inside VampirismEntityRegistry.

Load values in Configs class.

Two collections:

  • Static (Loaded during init, Vampirism, API and config)
  • Dynamic (Copy of static + dynamic values (calculated or from server)

Server

Recreate dynamic from static on world load.
Load dynamic values from file in world directory
Save dynamic values (which or not in static) on stopping
Send values to client (only if not local) on connect as well as new values during game

Client

Recreate dynamic from static on connect
Receive update from server once connected
Forget after disconnect