whosit reports: Exploration rewards: there are ... #474
Labels
No Label
1. kind/balancing
1. kind/breaking
1. kind/bug
1. kind/construction
1. kind/documentation
1. kind/enhancement
1. kind/griefing
1. kind/invalid
1. kind/meme
1. kind/node limit
1. kind/other
1. kind/protocol
2. prio/controversial
2. prio/critical
2. prio/elevated
2. prio/good first issue
2. prio/interesting
2. prio/low
3. source/art
3. source/client
3. source/engine
3. source/ingame
3. source/integration
3. source/lag
3. source/license
3. source/mod upstream
3. source/unknown
3. source/website
4. step/approved
4. step/at work
4. step/blocked
4. step/discussion
4. step/help wanted
4. step/needs confirmation
4. step/partially fixed
4. step/question
4. step/ready to deploy
4. step/ready to QA test
4. step/want approval
5. result/cannot reproduce
5. result/duplicate
5. result/fixed
5. result/maybe
5. result/wontfix
ugh/petz
ugh/QA main
ugh/QA NOK
ugh/QA OK
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: your-land/bugtracker#474
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
whosit reports a bug:
Player position:
Player look:
Player information:
Player meta:
Log identifier
Profiler save:
Status:
This can be done with the yl_quest API
cf. #2689 (possibly a dupe)
I've made this:
https://gitea.your-land.de/whosit/collectible_chest
Yes, I've seen flux makes one.
Yes, I know there are many other versions around.
I did this to compare different ways of storing the mod data - modstorage vs sql.
It's still WIP, but all basic functions work, if anyone wishes to try it.
to be fair, i never finished the version that i made.
Can I ask you what was the problem you encountered?
mostly i got tired of fighting w/ formspecs. a lot of my projects die for the same reason.
Did you have a good idea for storing player_took_from_this_chest flag?
Because that's my main problem with this. If the requirement is thousand of chests and thousands of players, then storing this in meta or k/v modstorage becomes a problem.
hm. i didn't really get that far, but i've got an idea.
give each reward chest a unique ID. the "next available ID" can be stored as a single value in mod storage. each reward chest can store its ID in its own metadata. if you want to set the chests up so that they can be re-used by staff w/out having to place/break the chest, you can assign it a new ID every time an item is added to or removed from the chest.
when a player first interacts w/ a chest, they will get the items in the chest, and then we can set a value in player metadata to indicate that they've received the reward. the key would be something like
string.format("reward_chest:%s", chest_id)
, and the value might just betrue
, or it could be a list of rewards from the chest that they have yet to claim.There ought to be a way to see how many reward chests the player has already found and how many are left.
Some kind of personal log would also be nice, although that comes with the danger that players would exchange/publish lists of locations - which would be rather bad.
Perhaps such chests ought to be placed only in newly added areas/buildings.
Those chests could also help in the tutorial. I like the idea to give all of them an ID and only store THAT in the meta, not the chest content itself.
What's the status on this issue?
Flux' mod seems to have suffered from formspec (very understandable, had to cobble plenty of virtual balrogs to death when writing the formspecs for the NPC).
Whosits' mod seems to work mostly. Sadly it's limited to one item per chest. Our problem is usually that we have more than one reward to hand out. Especially as quest rewards.
The original treasurechest mod by thefamilygrog66 can handle 8x4 items per treasure chest. That's much nicer to interact with as a player and feels much more like a chest. Drawback there is that it stores its data in map metadata. We don't really want that.
NPC also have trouble handing out more than one reward at a time. Alias mentionned yl_quest api? How's the status there?
Ideas/Wishes:
General data structure could be:
treasure_taken[treasure_inv_id][playername][treasure_inv_slot] = [amount_taken, time_when_last_taken]
One item per chest was a design decision to make storage simpler - basically just a flag per chest per player.
It works well for exploration rewards - you visit place once and take your treasure. If you really-really need two items, you could place 2 chests :) It seems simple and clean. It was also clean because I enforce a transaction of sorts - you either take all of your reward or none.
Of course, nothing really prevents us from having full inv for each chest and storing "leftover" inventory per chest. But what if you want to replace the contents? Soko's design decision is that you just can't. Other idea may be to store counts taken per slot.. With potential of turning 99 sticks into 98 diamonds or something, depending on implementation. The simplest idea could be just literally copying "master" inv for a specific player the moment they touch the chest and never change the copies, only master. Could slightly inflate the storage for chests with bad rewards people will never take...
I'm not sure "just a treasure chest you can find" is really the same chest that should be used for quests. Sure, some implementation details could be shared (efficient external storage for chest/quest to player mapping), but from the user standpoint, they should at least look different - so you know that one chest is just waiting for you to take stuff from it, and for other chest you need to fulfill some additional conditions...
Same with the global list - feels that just collectables and quests are kinda different, I would prefer having separate lists for them...
Maybe I should finish my original idea at least, then we can think if it fits or expands to more stuff....
(Soko loves big chests that can be filled with lots stuff... Maybe I should make this one microblock-sized to fit only one-slot inventory content)