fredi-68 / luswca

Remember to put full project title here
GNU General Public License v3.0
0 stars 0 forks source link

Using consumables / packs #19

Open fredi-68 opened 6 years ago

fredi-68 commented 6 years ago

Some consumables are working now that we have the relevant behavior IDs implemented. However, there are still loads of glitches and unimplemented behaviors (like the BBQ hot dog bug). These will have to wait until after the skill system rewrite. Also currently consumables aren't removed from a players inventory if their skill was cast successfully. The problem here is that the client seems to send the related game messages regardless whether or not the action was successful. Need more information here.

fredi-68 commented 5 years ago

After the skill system rewrite almost all consumables are working properly now, with the few exceptions being taken care of as I slowly implement the missing behaviors. This means we can now look at removing consumables from the inventory when used. In regards to packs I am still trying to figure out how to handle RNG. The server currently assigns each player a RNG seed that is saved with the chardata, which serves to ensure the amount of items a player gets from a pack is consistent throughout multiple subsequent attempts to open it (which can happen for instance if there wasn't enough inventory space to accommodate all the additional items). However, this means a player may still be able to manipulate the amount of items they receive from a certain pack by looking at how many slots it needs and then opening other packs to reroll the RNG seed. To prevent this, we would have to assign an RNG seed to each pack individually. This could in theory be done by just using the item ID as the seed but since item IDs are per player and redistributed on each load this would not work either. I am unsure how the original server handled these cases. Thus I will assume that only one seed was kept per player and the possibility of players manipulating the RNG was tolerated as a result.

fredi-68 commented 5 years ago

Item Packages are implemented on a very basic level now. Opening packs works as long as there is enough inventory space and the pack is automatically removed upon success. If opening the pack fails, the client is notified and a message is displayed.

This is what is left to do:

fredi-68 commented 5 years ago

sometimes packages can be used up despite there not being enough space to open them, investigate

EDIT: Sometimes packages can't be opened despite there being enough space to open them. Investigate harder.