Research
Research Tech Tree
Research: A tech tree api
Tech: An example plugin with simple mechanics.
Quick Description Research is an API plugin that implements technology trees in game. In config.yml the server owner defines what blocks and items they don't want players using. In tech.yml they define what they do want players to be able to make, break, place, and permissions for each technology. A default is provided. Players need the "research" permission node in order for the research plugin to work on them.
Research is just an API, other plugins need to provide the commands for players. A sample plugin called Tech has been provided that demonstrates giving each online player one technology point a minute. Players will need the "tech" permission node.
API: Link to use Research in your plugin
Justification: Many players enjoy the ability to jump right in minecraft and be able to build in diamond blocks right away. I am not one of those players. I get the most kick starting off restricted and developing new skills and abilities. RPG plugins do this for individual player actions, but I want to bring that kind of growth to the building and mining aspects. This plugin is for people who share my kind of play style.
The Basics: This plugin is intended to work alongside other permission and Towny/Faction type plugins, although it will include basic functionality to be usable on its own. The plugin contains an existing default technology tree based on Civilization V's, but the server owner is able to customize it or rewrite it from scratch. The plugin tracks if a player can place, destroy, or using spout craft items based on the technology they have learned. Permission nodes can also be attached to technology.
The Use Case: The best way for me to describe how this plugin works is through a use case.
ServerOwnerSue installs the plugin and decides to check out the default settings. In config.yml there are a number of lists for what a player can't do if they have no technology under their name: BlockIDs for cantPlace, cantBreak, cantCraft, and and any permission nodes they WANT their players to start with (although I might change this to nodes they want to make sure player's DONT have).
She then checks out techs.yml where she finds each tech has a description, costs, prerequisite technologies, fields for blockIDs under canPlace, canBreak, canCraft, as well as permission nodes. She decides to make a new technology called Teleportation which she adds to the bottom of the list
Teleportation: description: "Instant travel! Opens up personal home warps" cost: 10000 prereqs: ["Archery"] #Because that makes TOTAL sense! permissions: - commandbook.home - commandbook.sethome canPlace: - 122 canBreak: [122] canCraft: [] # Custom events not yet available. This is for situations like a tech giving a town 10 free bonus chunks or something that is plugin specific. customEvents: []
Once she tuned everything to her liking Sue became sad as no other plugins are set up to use Research. She download and installs TECH, a simple plugin that allows players to set their own personal research and earns one research point for every minute they play on her server.
Integration: An API is being developed to allow other plugins that utilize groups of players (Towny/Factions/chunkyVillage/etc) to optionally tap in to this gameplay feature. It is impossible for me to accommodate all the possible ways these groups are organized and implemented. As a result technology is tracked per player. It will be up to external plugins to decide how to handle a player leaving or joining a group.
For devs the API: http://dev.bukkit.org/server-mods/research/pages/research-api/
Features:
- Tech tree based on Civilization V's tree
- Manages block placing, breaking, and crafting events
- Basic permission manager
- Basic example plugin
Permission Nodes
- research (research restrictions and tracking active for player)
- tech (access Tech plugin commands)
I will probably take the source code and update it to 1.3.2-R0.2 if Croxis doesn't do it himself. EDIT: Disregard that, I just noticed that it's Spout dependant - I wouldn't touch it with a 10ft pole.
Can we expect an update for 1.3? Would be awesome.
This is a great idea. Please continue developing it so maybe we can get a version working for 1.3?
version 1.2?
Make sure the permission nodes are lower case
The best place for you to get specific help is through the issue tracker.
I don't use PEX (I personally prefer bPermissions) but I will do what I can.
@mtjaxter
Same for me, but only me. I'm the only OP, and nobody else can do /tech or is limited to researched techs.
I'm using PEX, and if you don't mind, please tell me what the actual permission nodes are for using this. "Research" and "Tech" don't work.
Hey man, Excellent diamond level plugin bro.
I would like to know if you are getting the learnable permissions to work successfully? i've installed countless other plugins in the past so i have my basics covered but i've tried for 2 days and i'm absolutely stumped. I've attempted it with P ex, with Bukkits permissions, and with just the Research.jar standalone (also removing all other plugins to avoid any conflicts) at no point during debugs do i get any indication that the A) default perms (of research and B) research gained perms are affecting my players. and this is including your default Iconomy permissions that are already on currency and banking.
Would you please please please pretty please..
A) confirm for me that this feature is even implemented fully :) ? (it's not easy to see from your sections of code (which are a bit above my head)
B) if it is working would you just copy pasta me at least a line of the codes from...
Even till i get this aspect working i still love the plugin ! . once i can sort out the upgradable perms, il give you cookies! Thanks again and in advance.
Awesome plugin! Anyway in Minecraft people were advancing too fast. I made some configurations to make nothing breakable/placeable/craftable at beginning and you have to research the basic dirt stuff and wood cutting. I don't think there is a command to research something though...
Actually I think its all messed up, the progress thing... because I set it back to default, 1/60, and it says crazy minutes like, -607.0 minutes when I researched writing lol, it researches it pretty fast, but, it has issues or something
Wanted to say... When doing the countdown process, it says 35.0000000004 seconds or wahtever, but it doesn't count down the seconds, it counts down the minutes though
EDIT: Correction... its at 32 minutes and it say, erh, weird... at 32.0 minutes it said just 32.0, now I did it again its like 31.000000002 minutes lol.
ALSO, in tech when displaying Enables: or Requires:, can we put , in between the techs? :)...
Another thing, if I set points to 1 per 1 second, it freaks the counter (progress), and goes to like 480 minutes, 340 minutes hehe, but it researches it fast like normal, I'm doin that for test purposes, but, yeah the minutes thing is displaying wrong in progress...
There is a long error about tech.jar and SQL Lite:
Caused by: java.sql.SQLException: [SQLITE_CONSTRAINT] Abort due to constraint violation (PRIMARY KEY must be unique) at org.sqlite.DB.newSQLException(DB.java:383) at org.sqlite.DB.newSQLException(DB.java:387) at org.sqlite.DB.execute(DB.java:342) at org.sqlite.DB.executeUpdate(DB.java:363) at org.sqlite.PrepStmt.executeUpdate(PrepStmt.java:85) at com.avaje.ebeaninternal.server.lib.sql.ExtendedPreparedStatement.executeUpdate(ExtendedPreparedStatement.java:164) at com.avaje.ebeaninternal.server.type.DataBind.executeUpdate(DataBind.java:74) at com.avaje.ebeaninternal.server.persist.dml.InsertHandler.execute(InsertHandler.java:155) at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105)
Its a lot longer but I thought the rest is the same.
Thank you.
Now there is!
ah, ok, I must have been quite confused... now I'd like to try it, is there a dev version that works with a 1.1 build of CB? :)
Now you are either trolling or you have serious reading comprehention issues. I made a plugin that does that. It is in the download page. It is called Tech. You use the /tech command.
I meant a plugin where you'd gain research points, and there'd be techs, which you can use a command to view which techs that are available to research, then you could type in a command, and research that particular tech ;)
Yes. Download the tech.jar plugin. I can't make it any more clear.
Yes, where you get points every 1 minute, and then users could use commands, to check how many points they have, and to research different techs. To also check what techs that are available to research for them.
You mean like the Tech plugin?
ah ok thanks ;)...
Croxis, is there any way you could implement this into a plugin? in the way that it is described? :)
That'd be so amazing to use on my server!
Tech points are gained, and things can be researched (which have permissions, and other things built in that you can set per those researches)...