Hardcore Questing Mode [FORGE/FABRIC]

Hardcore Questing Mode [FORGE/FABRIC]

16M Downloads

Alternative Saving

knoxz opened this issue ยท 6 comments

commented

Hi there,

as we had issues with corrupt questdata on our servers from time to time where we had to delete all the questprogress, I implemented an alternative saveing method to your work.
Basically I made every object that stores the quest data, serializable (with getters, setters and constructors) and saved the QuestingData object via java fileoutput.
If for some reason the players.dat file gets corrupt in some way and player questbooks are stopping to work, we would just delete the players.dat file. Restart the server and as soon as players log in that havent logged in before, it would load their questprogress from the player.questdata file and put it in the hashmap.
This was the easiest way I could think of, making files per player.
It took me quite a long time to make it work and I had several issues with teams.
Your saving mechanism is really sophisticated.. It took me quite some time to understand.

could you maybe quickly sum up what you changed in terms of saveing / loading or anything related.
It was working before the hqm update on regrowth to 4.3.2

Link to fork: https://github.com/knoxz/HQM
Link to compare: master...knoxz:master

It was working with 4.2.4 clientside and I think I forked the 4.3.2 version. I only backdated the version.

Any help would be really appreciated.

commented

It is loading the Object correctly
Little Debug:

[20:32:44] [Server thread/INFO] [STDOUT]: [hardcorequesting.QuestingData:getQuestingData:403]: HQM DEBUG: loading playerfile from: knoxz
[20:32:44] [Server thread/INFO] [STDOUT]: [hardcorequesting.QuestingData:getQuestingData:404]: LOADED QUESTDATA BEFORE VOID:
[20:32:44] [Server thread/INFO] [STDOUT]: [hardcorequesting.QuestingData:getQuestingData:405]: [Completed: true  claimed: true, Completed: true  claimed: true, Completed: true  claimed: true, Completed: true  claimed: true, Completed: true  claimed: false, Completed: true  claimed: false, Completed: false  claimed: false, Completed: false  claimed: false,......
commented

Ok fixed it to the state it was before. It was actually my mistake I did when I tried to be more server friendly. ;(

commented

You are welcome to use this space as your rubber duck.

Rubber Ducking :

Sometimes, you just have to talk a problem out. I used to go to my boss and talk about something and he'd listen and then I'd just answer my own question and walk out without him saying a thing. I read about someone that put a rubber duck on their monitor so they could talk to it, so rubberducking is talking your way through a problem.

commented

commented

Yeah yeah... :-p
Here something to make it worth your while.

There is an issue with duplicating items with a botania setup:
With the an upgraded manapool you can duplicate items for mana. Lets say somebody has 5 pools and throws a stack of quartz in in the pool and blocks of the sides so items cant land next to it.
It will duplicate that one stack until it the pools are out of mana. At that point there are thousands of items on the ground. Player inventory is full and the server times out because your method

countItems(event.entityPlayer, event.item.getEntityItem());

is called way to often I assuem

this is a "dirty" fix, but it does the trick.
https://github.com/knoxz/HQM/blob/master/src/main/java/hardcorequesting/quests/QuestTaskItemsDetect.java
timeout the call on the method for 3sec if called too often ;)
no more server timeouts even with 10000 items and full inventory.

commented

PR it.