Giter Site home page Giter Site logo

eureka's Introduction

Eureka

The Eureka mod introduces a new knowledge system to modded minecraft: "Learning as you go". With this system the intention is that there is no borring mini-game, no need to craft alot of additional items and 'sacrifice' those items to be able to make new ones. With this the idea is that the player progresses through the tech try by using the machine or making items that involve that type of tech while playing. Like as if the player is crafting/using stuff and then suddenly thinks: 'There might be a better way to do this'. But until they realise that knowledge the are unable to use the higher tiers. The player will still be able to craft those items/blocks but the eureka mod prevent using the item and block the interaction with the block. If a player tries it the item/block will fall appart

An example of that is my own mod 'Buildcraft Additions' (i wrote this system for that mod but others can us it to). To unlock the kinetic tools you need to make 10 tools. As 10 tools isnt' that much (since the first wooden and stone tools get replaced easy and pickaxes break during mining) the player will unlock it while playing as he goes without having to do additional crafting to unlock it.

How to implement the mod

This is how to implement the eureka stuff in your own mod

Registering you categories

To show your keys you need to fist make a category for where your keys will be, this is done by registering a new category in the registery

EurekaRegistry.registerCategory(<category name>, <displaystack>);

The displaystack is the itemstack show in the engineering diary to represent the category

Registering your keys

For the eureka system to succesfully track the progress of a player you need to register 'keys'. These keys are also used for the localizations of the eureka moments and the text in the book. In the registration you also have to tell the eureka system how many times progress has to be made and in what increments. You register like this:

EurekaRegistry.registerKey(<key>, <EurekaInformation>);

The second argument there is a class that should extend EurekaInformation that contains all info about the specified entry (There is a class EurekaInfo you can use for a basic implementation).

then you need to register the drops for the key like so:

EurekaRegistry.registerDrops(<key>, itemstack1, itemstack2, ...);

you can specify as much itemstacks to drop as you want as long as it's at least 1.

and finaly you bind the item/block to the key so eureka knows to track it

EurekaRegistry.bindToKey(<item/block>, <key>);

The Eureka knowledge

As the Eureka system isn't all knowing you have to tell it when a player makes progress like so:

EurekaKnowledge.makeProgress(player, key, amount)

note that the amount can also be negative

If you want to know if a player has finished the tier and got the knowledge for the next one

EurekaKnowledge.isFinished(<player to check>, <key to check>);

WARNING: The eureka stuff is all saved and handled on the server side. Every time the player opens the book, the knowledge is also coppied to the client side so it all shows up in the gui. So the data on the client side will be outdated most of the time!

Using the progress options provided by eureka

To have eureka take care of making progress for you you just add the key to the right progresslist. In the EurekaRegistry there is are functions to add keys to the right hashmap for that, the names should speak for themselfs but if you are not sure about what the right one to use is take a look at the eventhandeler, in there you can see what each list is used for and when it's trigered

Using your own methods for making progress

Do whatever you want to make progress and conditions to make progress, to make progress you call the function as specified above:

EurekaKnowledge.makeProgress(player, key, amount)

as long as your block/item is bound to the key eureka will make sure the block can't be interacted with, placed or broken until the player has the required knowledge

eureka's People

Contributors

aenterprise avatar crafteverywhere avatar juput avatar soleksak avatar speiger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

eureka's Issues

[Eureka 3.01] I can not unlock the Portable Laser

I crafting a BC-Laser and place it on an Kinesis-Pipe. But the counter in the Engeneering Diary stands always by 0/4.


Installed Mods:

appliedenergistics2-rv2-beta-28
bamsgrave-1.7.2-1.4.2_01
bspkrsCore-universal-6.16
buildcraft-6.4.8
buildcraft-compat-6.4.2
BuildcraftAdditions-1.7.10-2.1.1
ChickenChunks-1.7.10-1.3.4.19-universal
CodeChickenCore-1.7.10-1.0.4.35-universal (1)
CodeChickenLib-1.7.10-1.1.3.127-universal
EnderIO-1.7.10-2.2.8.344
EnderStorage-1.7.10-1.4.5.29-universal
Eureka-1.7.10-3.0.1
extrautilities-1.2.2
ForgeMultipart-1.7.10-1.1.1.326-universal
NotEnoughItems-1.7.10-1.0.4.94-universal
OpenEye-0.6-1.7.10
QuarryPlus-1.7.10-2.1.0
simplefluidtanks-1.7.10-1.2.0.5
Telepads-1.7.2_1.7
Treecapitator-universal-2.0.4
Waila-1.5.10_1.7.10

As requested on IRC

Ok, so you're making it far too complicated. You have a Container, why? You don't have any Items! As such the GuiHandler system is not the right choice either. Send a custom packet when you want to open the Gui, that packet should contain all the data the client needs to display the Gui correctly.

crash when killing a mob

14:22] <+big_Xplosion> at eureka.core.PlayerResearch.makeProgress(PlayerResearch.java:78)
[14:22] <+big_Xplosion> 10:11 chilm: at eureka.core.EurekaAPIImplementation.makeProgress(EurekaAPIImplementation.java:100)
[14:22] <+big_Xplosion> 10:11 chilm: at buildcraftAdditions.core.EventListener$Forge.onGettingAchievement(EventListener.java:95)

java.lang.NullPointerException: Ticking memory connection

When I open world with the latest Eureka 1.2 and follow these steps I get a crash:

  • open the Eureka book
  • close Eureka book
  • open the Eureka book again
  • CRASH

Description: Ticking memory connection

java.lang.NullPointerException: Ticking memory connection
at net.minecraft.network.NetHandlerPlayServer.func_147346_a(NetHandlerPlayServer.java:615)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:60)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:9)
at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212)
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

Here is the complete crash log:
http://pastebin.com/5WYTM82W

Research improvements

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.

Eureka spam in chat and crash after attempting to open book

Here is the report. Using Eureka 3.0 downloaded from Curseforge. The crash happened on server. In single player world it does not crash but the pages are empty and the book is not working as it used to. Will be posting pictures as soon as I get them on dropbox.

EDIT: I digress a bit. The book seams to be working fine on the last four tabs, it's only the first two tabs that are empty, not sure if this was intentional.
https://www.dropbox.com/s/4yv78k37rovcmvk/2015-04-02_15.55.49.png?dl=0
https://www.dropbox.com/s/y7sotguw1fd3ytc/2015-04-02_15.55.51.png?dl=0

Crashlog:http://pastebin.com/iJNjCFaq

opening the Eureka book kicks client from server

When facing towards the air and opening the book, the client kicks the user from the server. When the book is opened towards a nearby block (and the block is within clickable range), the book opens with no issues. This looks to be a server related issue as seen by the Server log since the client log contains nothing about the issue. Server is a home server running Windows 7, Java 1.8.0v45. I don't think it is a specific java issue because the Eureka book opens fine when "used" on a nearby block.

Eureka version: EUREKA-1.7.10-3.0.2
ModPack: AT Launcher Resonant Rise 3.2.6.3

Server Log at the time of disconnect::
[20:49:22 WARN]: Failed to handle packet for /192.168.0.200:63395
java.lang.NullPointerException
at net.minecraft.network.NetHandlerPlayServer.func_147346_a(NetHandlerPlayServer.java:918) ~[nh.class:?]
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:60) ~[jo.class:?]
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:9) ~[jo.class:?]
at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:244) ~[ej.class:?]
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:173) [nc.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:980) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:430) [lt.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:798) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:658) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]

Client log results at the time of disconnect:
[27/5/2015 20:49:22 PM] [20:49:22] [Netty Client IO #0/INFO] [THAUMCRAFT]: Restoring client configs.
[27/5/2015 20:49:22 PM] [20:49:22] [Netty Client IO #0/INFO] [simplyjetpacks]: Loading configuration files
[27/5/2015 20:49:22 PM] [Client thread/INFO] [journeymap]: Mapping halted in USERSDIR\Instances\TestPack\journeymap\data\mp\LocalHost\DIM0
[27/5/2015 20:49:22 PM] [Client thread/INFO] [FML]: Applying holder lookups
[27/5/2015 20:49:22 PM] [Client thread/WARN] [FML]: Unable to lookup CompactMachines:interfaceblock for public static org.dave.CompactMachines.block.BlockCM org.dave.CompactMachines.init.ModBlocks.interfaceblock. Is there something wrong with the registry?
[27/5/2015 20:49:22 PM] [Client thread/WARN] [FML]: Unable to lookup chisel:cobblestoneWall for public static com.cricketcraft.chisel.block.BlockMarbleWall com.cricketcraft.chisel.init.ChiselBlocks.cobblestoneWall. Is there something wrong with the registry?
[27/5/2015 20:49:22 PM] [Client thread/WARN] [FML]: Unable to lookup chisel:obsidian2 for public static com.cricketcraft.chisel.block.BlockCarvable com.cricketcraft.chisel.init.ChiselBlocks.obsidian2. Is there something wrong with the registry?
[27/5/2015 20:49:22 PM] [Client thread/INFO] [FML]: Holder lookups applied
[27/5/2015 20:49:26 PM] [Client thread/INFO] [Mekanism]: VoiceServer: Stopping client connection...
[27/5/2015 20:49:26 PM] [Client thread/INFO] [Mekanism]: Finished loading Cardboard Box blacklist (loaded 0 entries)
[27/5/2015 20:49:26 PM] [Client thread/INFO] [Mekanism]: Reloaded config.

Internal server error

I get a internal server error when rightclicking with the book on something that's not a solid block like air.

A error in the console

[23:46:36] [Client thread/ERROR] [Eureka]: Error while registering a category (Eureka): The a category with that name is already registered

Thank you!

-Crunk

Null Pointer Spam

[30/3/2015 12:47:02 PM] [Server thread/ERROR] [FML]: Failed to save extended properties for EurekaPlayerResearch. This is a mod issue.
[30/3/2015 12:47:02 PM] [12:47:02] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.NullPointerException
[30/3/2015 12:47:02 PM] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at eureka.core.PlayerResearch.saveNBTData(PlayerResearch.java:47)
[30/3/2015 12:47:02 PM] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.entity.Entity.func_70109_d(Entity.java:1333)
[30/3/2015 12:47:02 PM] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.world.storage.SaveHandler.func_75753_a(SaveHandler.java:246)
[30/3/2015 12:47:02 PM] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.management.ServerConfigurationManager.func_72391_b(ServerConfigurationManager.java:273)
[30/3/2015 12:47:02 PM] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.integrated.IntegratedPlayerList.func_72391_b(SourceFile:26)
[30/3/2015 12:47:02 PM] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.management.ServerConfigurationManager.func_72389_g(ServerConfigurationManager.java:886)
[30/3/2015 12:47:02 PM] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:105)
[30/3/2015 12:47:02 PM] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
[30/3/2015 12:47:02 PM] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

Eureka 3.0, Latest Buildcraft and Buildcraft Additions.

en_US update

It seems that you are still busy with the en_US.lang, so I am not doing a PR for this one.
The text seem the same, so updating to fix some stuff is an easy copy and paste from the BCA file.

crash

This might be real or I might be dumb. anyhow I go into creative mode on single payer and click the arrow that countesses the mods and as soon as I do my game crashes. Plz help me out here.

Eureka 3.0.1 server issue

Hi,
during the last days I tried to get the newsest Eureka (3.0.1) and BcA updates running.
Unfortunately I always get this error message when I start the forge server:
http://pastebin.com/S1yNuvTM

I would be thankful if you could help me with this one.
Btw I really enjoy playing your mods. :)
Greetings Seb

[Eureka 3.0.1] Portable Laser disapears when fired in survivalmode AND its in the Diary not unlocked

If I fire the laser, it disappears rather than its individual parts to fall apart.


Installed Mods:

appliedenergistics2-rv2-beta-28
bamsgrave-1.7.2-1.4.2_01
bspkrsCore-universal-6.16
buildcraft-6.4.8
buildcraft-compat-6.4.2
BuildcraftAdditions-1.7.10-2.1.1
ChickenChunks-1.7.10-1.3.4.19-universal
CodeChickenCore-1.7.10-1.0.4.35-universal (1)
CodeChickenLib-1.7.10-1.1.3.127-universal
EnderIO-1.7.10-2.2.8.344
EnderStorage-1.7.10-1.4.5.29-universal
Eureka-1.7.10-3.0.1
extrautilities-1.2.2
ForgeMultipart-1.7.10-1.1.1.326-universal
NotEnoughItems-1.7.10-1.0.4.94-universal
OpenEye-0.6-1.7.10
QuarryPlus-1.7.10-2.1.0
simplefluidtanks-1.7.10-1.2.0.5
Telepads-1.7.2_1.7
Treecapitator-universal-2.0.4
Waila-1.5.10_1.7.10

Eureka book won't go on bibliocraft shelves

Started my personal modpack and it spawned several books from several mods, and I was able to put all of them on my Bibliocraft bookshelf except for the "Engineering Diary" set up by Eureka. I don't have any other Eureka books so I don't know if it's universal.

[Eureka 3.0.1] The Diary is "textless"

[WARNING! This text was translated by Google]

After the update to v.3.0.1, I've noticed that only the portals to the searches are provided with text in the diary. When I completed a research, instead of the story, a blank page is displayed.


Installed Mods:

appliedenergistics2-rv2-beta-28
bamsgrave-1.7.2-1.4.2_01
bspkrsCore-universal-6.16
buildcraft-6.4.8
buildcraft-compat-6.4.2
BuildcraftAdditions-1.7.10-2.1.1
ChickenChunks-1.7.10-1.3.4.19-universal
CodeChickenCore-1.7.10-1.0.4.35-universal (1)
CodeChickenLib-1.7.10-1.1.3.127-universal
EnderIO-1.7.10-2.2.8.344
EnderStorage-1.7.10-1.4.5.29-universal
Eureka-1.7.10-3.0.1
extrautilities-1.2.2
ForgeMultipart-1.7.10-1.1.1.326-universal
NotEnoughItems-1.7.10-1.0.4.94-universal
OpenEye-0.6-1.7.10
QuarryPlus-1.7.10-2.1.0
simplefluidtanks-1.7.10-1.2.0.5
Telepads-1.7.2_1.7
Treecapitator-universal-2.0.4
Waila-1.5.10_1.7.10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.