Closed luiz-otavio closed 2 years ago
That's pretty awesome! I was looking for a similar solution <3
Hi @luiz-otavio Are you part of the CustomNPC+ Discord? I'd like to discuss these changes.
Code: bfGkEZ9T9h
Yea, I didn't notify you guys cause I was so busy. It's my IGN: Wizard#7240
Closed until further correction or analysis
Few days ago, I found that CNPC+ Storage Strategy is saving any playerdata inside JSON files with their own encoder/decoder. Many people found spike lags and large files inside their storage, so basically I updated it to use Zstd and then I got a big difference between 2 files:
The first one, is a
dat
file compressed with Zstd and the another one is the regular file which is stored with JSON. It show for us94%
of disk optimization for justplayer data
. There are many things which is stored with JSON, but for now I just updated it to useplayer data
.I think it's a good idea if we could make some forge events to listen to usual custom-npc functions. I ensure I had tested it in my local machine and seems it's really working.
I make some implementations such as:
PlayerCompleteQuestEvent
- Listened before each quest complete from a player;NPCDeathEvent
- Listened on each NPC death event. I guess you think about this as useless event due to scripting mechanics, but for server-side mods it would be used as a good utility;FactionGainPointsEvent
- Listened on each increase factions points;PlayerInteractAtNPCEvent
- Listened on each interact from player to a NPC;NPCKillEntityEvent
- Listened on each NPC kill.