Safari
Plugin-Information
Think of safaris as hunting-jouneys
Each safari may be configured like this:
- specific mob-types which count for the safari progress
- specific day/night time hours during which mob-kills are valid
- required safari-points to start the safari (number of previously completed safaris)
- the kind of drops the player is rewarded upon completing his current safari
Rules
- Each player may enlist for one Safari at a time
- The Safari is persisted and does not require the player to complete it within one online-session
Commands
Player commands
The following commands are accessible for all players:
- /safari list - List all available safaris
- /safari info - See your current safari and your safari points/statistics
- /safari start <safariname> - Start the specified safari
- /safari stop - Cancel your current safari
- /safari showrecords - display current safari-record times (hours:minutes) and who accomplished this record
Administration-Commands
(only accessible for players with special permission or from the Minecraft server-console)
There are 2 admin-commands to de-/activate the Safaris for given worlds:
- /safari add_world <worldname> - to activate Safaris for this world
- /safari remove_world <worldname> - to deactivate Safaris for this world
Console-Commands
This command:
- /safari showrecords <playerName> May be used from the servers console in order to enable signs which might trigger console-commands. This is done in order to setup signs (or maybe areas) which send the current records to a given player (who is currently online)
Configuration
Server-Admins may configure the available safaris like this (all safaris are direct keys inside the "safaris" section:
- safaris:
- <safariname> (e.g.: harmless):
- description: <safari description> (e.g.Kill Mobs which are harmless (Cows, Chicken, Pig, Sheep))
- name: <some name>
- required_points: <how many points does the player need to gather to start this safari; at least 1 safari with 0 points should be available>
- mobs_to_kill: <how many mobs does the player need to kill to complete this safari
- types_of_mobs_to_kill: <list of mobs which are taken into account for kill-counter>
- see: http://jd.bukkit.org/apidocs/org/bukkit/entity/EntityType.html for details
- CHICKEN
- COW
- PIG
- SHEEP
- addDrops: <list of drops which should be added to the final kill drop>
- see: http://www.minecraftwiki.net/wiki/Data_values#Item_IDs for item-ids
- and http://dev.bukkit.org/server-mods/lessfood/ for configuration-syntax options
- '289': 2 20
- addRecordDrops: <list of drops which should be added to the final kill drop if the player achieved a new time-record for completing this safari>
- see: http://www.minecraftwiki.net/wiki/Data_values#Item_IDs for item-ids
- and http://dev.bukkit.org/server-mods/lessfood/ for configuration-syntax options
- '289': 2 20
- <safariname> (e.g.: harmless):
Installation
Pretty easy:
- Download the latest safari.jar file
- put it into your $MINECRAFTSERVER/plugins directory
- start your Minecraft-Server
Done :-)
Think about additional setup-steps:
- enabling/disabling safaris on given worlds (depends on your server-setup)
- configuring the supplied safari-configuration (adding/removing some or adjusting the drops/points limits)
Technical information
Changelog
Version 3.1
- Finished record-time stuff (new command "showrecords", which is also callable via Console like: safari showrecords toSomePlayer which will send the records to this player... might be usefull if you would setup signs which can then send console-commands)
- some formatting of messages (now with colors ;) )
- verified Plugin to be compatible with Bukkit 1.3.1 R1.0 (compiled it, started the server and did some safaris)
- start of team-safaris
Version 3
- fixed bug regarding mob-kills not counted
- initial "competition" feature implementation
- added configuration-support for "addRecordDrops" which will be used for rewarding a player if/when he/she creates a new record for a safari
- some syntax corrections and formatting
Version 2
- updated to craftbukkit-1.2.5-R5.0 (no real changes, just re-compile and test)
- Existing config.yml gets not overwritten anymore; fixes: https://github.com/FeaRiTail/Safari/issues/1
- added feedback about safari-progress; fixes: https://github.com/FeaRiTail/Safari/issues/2
- removed unnecessary build-command from build.xml
Version 1
- tested addDrops-configuration
- added some defaults for safari-drops upon completion
- translated the last german expressions to english
- added message when trying to enlist for non-existing safari
Version 0.1
- Releasing initial beta-version
Source Code
The complete source-code is available on github:
@fealritail Excellent, thank you for taking the idea! it would be interesting that the plugin can operate autonomously. For example, one can choose a time of renewal (every 4 hours) the plugin checks if a quest is not already being completed. if the search is complete, he takes one at random and active, if not, the quest continues ongoing.
If a player completes quests, it is complete for everyone.
this principle can operate independently and without the presence of an admin, this function can be enabled or not in the file "plugin.yml"
it would be interesting also to add an abbreviation of "/ safari" with "/ sf"
players will be very excited and want to wait the arrival of new quests!
@Sevennemesis
Heya,
thanks for the feedback and the new idea, it sounds really nice.
I can imagine something like:
Admin: /safari submit_challenge <challenge-safariname> (must be configured/exist in the config.yml)
Players: /safari accept_challenge
The configured "challenge-safari" would be configured with the "allowed time to complete" so that it may be checked upon each kill if the challenge is fulfilled (within or outside the challenge time) and then the plugin could end the challenge for all participating players...
Sounds like a real nice one. I will file a github-enhancement and keep track of the idea. Currently I am working on the group-safari stuff.. so this one may take another few days/weeks to come ;)
Cheers,
Fea
Update: Filed #8: https://github.com/FeaRiTail/Safari/issues/8
would it be possible to add a function (random) time that a randomly chosen a quest to achieve. it is proposing in the chat, and gamers who like to make confrime with one command. the first to complete the quest wins the booty. it would be important to also choose a time to complete the quest. thank you very much
@FeaRiTail
This is turning from an amazing plugin to a Must-Have!!
These added features are outstanding!
I hate to say it, but I had another idea... This time it would require another Mod..
I was playing this last night and thought to myself:
"How awesome would this be if it was somehow linked to the MoCreatures Mod!"
This would of course require a little research (I will post my findings asap) to find out if MoCreatures can be linked or if it is even a plugin yet...
Regardless, being able to go out on Safari for Lions, Elephants, Bear, ect. would be a PERFECT step forward...
EDIT: I was able to find this plugin. It would be perfect! I've also found THIS thread about integration with CraftBukkit and MoCreatures..
...
@GOHpsycho
Heya,
thanks for the feedback and the new ideas. Filed them on github, to keep track of them: https://github.com/FeaRiTail/Safari/issues?state=open
Cheers
Still testing and so far, no bugs at all! Great job!
I had an idea for the next build...
Could you have it hook with Vault so at the end of each Safari it could give $ payouts?
It could also be very useful for giving $ payouts for taking 1st Place in time stats.
I love your idea of having the ability to spawn a "boss", and it would be great to have Team Safari mode, with big $ payouts :)
@FeaRiTail
I just did a test run on Release 3 and it seems to work flawlessly!!!
Great work and excellent competition add-on!
Hey guys,
thanks for the feedback! I got the problem isolated and I am working on a bugfix (BTW: you are probably too young, but do you know where the naming "a bug in a program" comes from?)
The problem is/was that upon registering for a safari, the "mobs_to_kill" number was not transferred to the playerData.yml... now it´s present...
First test seems to work, so I will upload a new version soon.
Cheers,
Fea
UPDATE: New file added (Version 3)
I just noticed a couple grammatical errors.
Both of these are in the SafariCommandExecutor.class file:
First:
Line 45 - private String SAFARI_PLAYER_CURRENT_SAFARI = "You are currently registerd for the safari \"?1\".";
should be changed to...
Line 45 - private String SAFARI_PLAYER_CURRENT_SAFARI = "You are currently registered for the safari \"?1\".";
Second:
Line 46 - private String SAFARI_PLAYER_KILL_PROGRESS = "You have killed ?1/?2 mobs sofar.";
should be changed to:
Line 46 - private String SAFARI_PLAYER_KILL_PROGRESS = "You have killed ?1/?2 mobs so far.";
Next, I noticed a possible reason why mobs_to_kill count may be bugging:
In the playerData.yml it shows as follows...
registered_players:
GOHpsycho:
safari: sheep2
mobs_killed: 19
mobs_t_kill: 20
current_safari_points: 1
...but in the config.yml it shows:
safaris:
sheep2:
description: Kill 20 Sheep
name: Sheep Herder
required_points: 1
mobs_to_kill: 20
I found this code in the SafariCommandExecutor.class file;
Lines 86 - 91:
get current safari-status for player
if (args != null && args.length == 1 && "info".equals(args[0]) && sender instanceof Player ) {
String currentSafari = playerConfig.getString("registered_players."+ sender.getName() + ".safari");
Integer currentSafariMobsToKill = playerConfig.getInt("registered_players."+sender.getName()+".mobs_to_kill");
if ( currentSafariMobsToKill == null ) {
currentSafariMobsToKill = 0;
Somehow, mobs_t_kill is being written to the config.yml instead...
I hope this helps. I have been testing the plugin quite a bit.
Hi Fea,
I'm getting the same config bug...
here is the playerData.yml :
registered_players:
GOHpsycho:
safari: sheep1
mobs_killed: 0
I also manually typed in what should be in the config like so:
registered_players:
GOHpsycho:
safari: sheep1
mobs_killed: 0
mobs_t_kill: 10
current_safari_points: 0
It will then count kills like this x/10, and even let the safari finish at 10/10.
The problem is, if I enter a different safari, example:
safari: sheep2 and kills set to 20,
the console will display x/10, and finish at 10/10 although the safari is set to 20 kills...
I hope this helps.
BTW, love the counter!
Great job so far, just a few small bugs to work out :)
I am also going to attach my custom config.yml in case you would like to check it out :) others can probably copy/paste the code into their config.
-- Just make sure to change the world settings to match your own. --
I completely support this awesome plugin, it adds much needed life to the game...
@mojo4567
Hi mojo,
hmm... this sounds like a buggy safari-config. For what safari did you enlist and what does your "config.yml" look like?
Cheers,
Fea
Ok I installed this, but whenever anybody starts a safari and kills the animals it says something like you have killed 1/0 animals and no matter how many you kill it still says its out of zero animals, so you can never finish the safari, even if you get the requirted amount it'll say like 5/0
Looks really promising... Ill give it a try
This seems a well thought out plugin, looking forward to release.