Eureka

Eureka

774k Downloads

Research improvements

Speiger opened this issue ยท 14 comments

commented

Hi AEnterprise. After looking into your research mechanic i saw a thing that "can" land in a problem.
You storing everything in the PlayerNBT which is ok. But,

first: It is really easy to hack and people can cheat without using creative mode. Just change their PlayerNBT.
second: It increases the packets that you use from begining. So everything that is there will be sended. Always as the player goes. That is not a trouble if you have small researches. But if you get into the size of Thaumcraft (or close to it) then you will may have trouble. (Always can happen and better preventing it as getting it)

So the idea is do let the player work on their researches. Let the server do it. And everything that got researched get send from server to player so player research finish he gets a key that says you have that finish.
That means less data to handle for packets in the PlayerData, also it make it more hackproof and also you can extend it easy without adding and adding new ways around it.

And i think the Eureka system will grow very quickly after it got finish on the basics.

commented

on the packets thing: it only sends a packet if you open the book, and it only sends one packet containing all that info at once

commented

thanks for the info, but for now i think i'll stick with the current system of pure blocking the usage, i think that in a way it is better to block the usage, this also prevents issues with autocrafting systems. if you use autocraftng from AE2 for example the player would be a fake player, thus research will not be valid and crafting will be blocked even if the player that made the request has the required knowledge

commented

Nope this system would be FakePlayer Proof. Because we can add a filter that says if there is no player asking for the result and the Item is a item that needs a research. Return the result null. Because matchCrafting inventory requires a container where you can not fake easy EntityPlayers. At least not without special code. So you dissable only the crafting you want. Because every player that opens a gui add himself to the crafters list^^" And fake players do not open guis.

commented

This is now another thing.
I figured a way out to prevent people to craft stuff. Even then if its a modded craftingGrid.
For that ASM is needed. There is the trouble.
I have no clue about that. But with that thing it is possible to fire a event that allow you to interact with the Function getCraftingResult(InventoryCrafting par1, World par2). The inventoryCrafting requires a Container which stores automaticly the Players as crafters when you open the Gui. (EntityPlayer implements ICrafting or something) that you can cast back to get the PlayerData. You can make it that only is that only one person is required/all persons need to have the research to get the result item.
If we can access the crafters then its really easy to finish. I hope that helped. It took me a few hours to figure out what is needed todo :/
Hope it helps @AEnterprise.

commented

But it is also ok if you do use blocking the blockPlacement.

commented

i think that is the best aproach, blocking block placement and/or interactions

once i'm done with the eureka stuff for BC i'm going to add a few events to the eureka api that other mods can fire and use as well instead of the interfaces if they want

commented

true

commented

but one improvement that could be made is some form of sharing knowledge, eighter by copying your notes and such and giving it to another player or by somehow 'teaching' that player the knowledge

commented

Jup. ^^" Also its a good backup if you need to wipe out player knowledge.
It would be funny (could be a config) when you get hurt to much you can forget a research. That would make the need of the books more important.
I mean it does not happen when you get fall damage. But like if you get basic punch damage or anvil damage or stuck in wall damage. Or when you die (then it has a extreme high chance) that you lose 1 research.

commented

better idea: when you die you have a random chanse to forget something

commented

my idea was:
Punch: 0,01% chance
AnvilDamage: 0,5%
StuckinWall: 1%
Drow: 1%
Die: 5-10%

commented

i think just forgetting by death is the best thing (random 15% i was thinking) punch and such are a bit to much i think

commented

I would say config. And everything else then death is dissabled by default. If death is only then it is 15% chance and else its max 10% so people can chose it itself/servers can choose how har research is.

commented

hard*