[ECON/FUN] HeavenActivity v0.3.1 - Activity based iConomy income [1000]

Discussion in 'Inactive/Unsupported Plugins' started by Sevenos, May 5, 2011.

  1. Offline

    Sevenos

    HeavenActivity
    Track player activity and give iConomy income based on it.

    Download:
    v0.3.1 (iConomy 5): HeavenActivity.zip (including annotated config) or jar only
    v0.1-beta (iConomy 4.6): HeavenActivity.jar
    Source: GitHub

    HeavenActivity tracks the player's activity of the last minutes (default: 15) by tracking block place/break, movement, chat and command usage. Everything is configurable (points per event, delays, timeframe, notification cycle etc).
    It can give iConomy income based on activity AND player balance.

    Features:
    • Track player activity by block place/break, movement, chat and command usage
    • Extremely configurable
    • Individual activity modifiers per group/player (optional)
    • Give players iConomy income based on activity (optional)
    Commands:
    Code:
    /activity <target> - Your or <target>'s current activity ("activity.view.other" permission to show <target>'s activity)
    /activity list - Shows activity of all online players ("activity.view.list" permission)
    /activity admin <stats|reload|resetstats> - Admin commands to see stats, reload config or
     reset the stats ("activity.admin" permission)
    Dependencies:
    • iConomy 5
    • Permissions (optional, 2.7.2 - 3.1.6 should work)
    How does it work?

    The tracking is based on sequences, those sequences have a configurable length (in seconds) and a configurable max amount. By default, there are 15 sequences with a length of 60 seconds each. This results in tracked activity for the last 15 minutes. Each tracked event is added to the current sequence, the activity is the average point value of all available sequences. One sequence can have more than 100 points, but the average activity is capped at 100 points/percent.

    How does the income work?

    Let me just give the actual calculation for now, feel free to ask if you have questions (and remember +- = -):
    Code:
    base_value
    + (((ACTIVITY - target_activity) / activity_modifier) * base_value)
    + (PLAYER_BALANCE * balance_multiplier)
    Config Examples (open)

    Default: 50% activity = 100% of base_value, 1% activity = 35% of base_value, 100% activity = 135% of base_value
    target_activity: 50
    activity_modifier: 75
    Linear income: 50% activity = 50% of base_value, 1% activity = 1% of base_value, 100% activity = 100% of base_value
    target_activity: 100
    activity_modifier: 100

    Complete annotated config.yml (included in zip download) (open)

    Code:
    # The comments will be gone after first reload/disable of the plugin
    general:
        # The time (in seconds) one sequence lasts
        sequence_interval: 60
        # Multiplier for all points, if you want more activity for all activities, rise this
        point_multiplier: 1.0
        # Sequence(s) in which the income is given
        # (max_sequences % income_sequence == 0)
        income_sequence: 15
        # Sequence(s) in which the players are notified about their activity, 6 means in sequence 6, 12(, ...)
        # (max_sequences % notification_sequence == 0)
        notification_sequence: 6
        # Max sequences which are stored, default 15 * 60 = 15 minutes
        max_sequences: 15
    income:
        # iConomy income enabled?
        enabled: true
        # Minimum activity to get income
        min_activity: 1
        # Allow negative income? (e.g. because of a negative balance_multiplier)
        allow_negative: true
        # Multiplies the current balance of the players and adds/subtracts it to/from the income
        balance_multiplier: 0.0
        # How much the activity affects the income, less is more (read documentation!)
        activity_modifier: 75
        # Base income value, this is the value the players get at target_activity
        base_value: 8.0
        # Target activity for the base_value, everything above will give more income
        # everything below will give less income
        target_activity: 50
    block:
        # Enable tracking of block break/place events?
        tracking: true
        # Points per tracked broken block event
        break_points: 1.95
        # Points per tracked placed block event
        place_points: 3.75
        # Minimum delay between 2 tracked block place/break events (ms)
        delay: 950
    move:
        # Enable tracking of move events?
        tracking: true
        # Points per tracked move event
        points: 0.58
        # Minimum delay between 2 tracked move events (ms)
        delay: 1100
    chat:
        # Enable tracking of chat?
        tracking: true
        # Points per character on chat
        char_points: 0.49
        # Points per chat use (adds on the char value)
        points: 1.0
    command:
        # Enable tracking of commands?
        tracking: true
        # Points per character on commands
        char_points: 0.53
        # Points per command use (adds on the char value)
        points: 1.0
    # This tree is just used for statistic and doesn't affect anything
    stats:
        move_points: 0.0
        block_break_points: 0.0
        chat_points: 0.0
        chat_char_points: 0.0
        command_char_points: 0.0
        block_place_points: 0.0
        command_points: 0.0


    Group/Player multipliers:

    You can set individual multipliers for each group/player using the Permissions "info" node. The following example would give 20% more activity for breaking blocks and 20% less activity for chatting:
    Code:
    info:
        # prefix etc is here too
        activity:
            multiplier:
                block_break: 1.2
                block_place: 1.0
                move: 1.0
                chat_char: 0.8
                command_char: 1.0
    How it looks ingame:
    This may look spammy, but it's normally split to about 50 minutes. Messages and colors will get configurable at some point.
    [​IMG]

    Changelog:
    v0.3.1:
    • Fixed a bug which caused only one player to get income, please update if you use the income feature!
    v0.3.0:
    • Added configurable minimum activity to get income (config node income.min_activity, default: 1)
    • Added config node to (dis)allow negative income (income.allow_negative, default: true)
    • Added config nodes to disable specific trackings (e.g. move.tracking, by default all are enabled)
    • Refactored permission handling, Permissions plugin is now optional (OP always has all permissions, admin commands OP only without Permissions plugin)
    • No longer ignore every y changing move events, instead check if x and z have changed
    • Changed default config to enable income and disable balance_multiplier (0.0)
    • Added ability to log commands to console (config node general.log_commands, default: false)
    • Some refactoring
    Old versions (open)

    v0.2.0:
    • Fixed config overwrite on reload/stop and only adding most important config nodes if they aren't set (no more auto-generation of all config nodes)
    • Fixed iConomy error on startup (skipping income on startup)
    • Added permission nodes "activity.view.list" and "activity.view.other"
    • Reformatted list of online players' activity (now it's only one row for all players)
    v0.1.1:
    • Upgraded iConomy support to 5.0 (just use the "older" Version if you're still on iConomy 4.6)
    • Better method to hook into Permissions and iConomy (ServerListener)
    v0.1-beta:
    • First public release
     
    Rollese and Phaedrus like this.
  2. Offline

    Sevenos

    No, thats not the point of the plugin. However, I may add activity based on pve/pvp.

    There was a serious bug in 0.3.0 which only let one player get income, 0.3.1 was released to fix it, please update!

    There is also a little bug with commands used from console which will probably be fixed in 0.3.2
     
  3. Offline

    gexwing

    Hey

    I realy like where you are going with this plugin, i'm using it for some time now on my server.
    It would be nice if there was a permission node to tell who's going to be affected (or excluded) by the plugin
    as we got a no-buildrights default group on our Server, and i'd like to not spam people as soon as they join us.

    Thanks in advance, i hope you consider it!
     
  4. Offline

    Sevenos

    Hmm there are multiple ways:
    1. Exclude permission, would add overhead to tracking and suck for admins (wildcard permissions)
    2. Include permission, would add overhead to tracking and I think excluded ppl will always be the minority
    3. Permissions like activity.notify and activity.income for the notifications and income (+ notification), it would still track the activity for everyone (which I think is always wanted, I have connected my online list to activity for example) and only a small overhead as they aren't checked that often

    Will think about that and include it in some way, suggestions welcome.
     
  5. Offline

    Daniel Heppner

    I don't understand what the target_activity and base_value does. Could someone explain these?
     
  6. Offline

    Retricide

    Is there a way to give different groups a different percentage of their money.
    Like, could I do:
    Code:
    AGroupName:
        info:
            activity
                multiplier:
                    balance_multiplier: 1.2
    and that would give the specified group a 20% multiplier?
     
  7. Offline

    Sevenos

    You get base_value if you have target_activity if you use the default values. There are examples and the actual calculation in the OP.

    Not yet, but I like the idea and will implement it.

    BTW: The next version will be quite a big rewrite and drop those permission info values, because Superperms don't support them and Permissions has no inheritance. I will replace them with custom "bonus trees" you can specify in the config and give permission nodes to your players/groups which should get them.
    Also, it's planned to have dynamic points for the events, so you just specify how they should be weighted (like, block place weights double as move) and it will automatically select points per event based on statistics (which means more statistics too).
     
  8. Offline

    goldseed

    Thanks, thanks, thanks...
    I think this is good plugin for every server..

    but I use iconomy 4.-;

    -;
     
  9. Offline

    exapid

    Fantastic plugin, Keep up the work
     
  10. Offline

    Retricide

    Any news/progress on the update? Can't wait for it :D !
     
  11. Offline

    Sevenos

    Sadly not, there was something which took 100% of my time for 2 weeks and now I slowly begin to get back to normal :/

    But this project is definately NOT dead, just takes some time to improve.

    @goldseed: I see no reason to use iConomy 4 any more, why don't you upgrade?
     
  12. Offline

    Moe041991

    Code:
    2011-08-11 02:06:34 [SEVERE] Could not pass event PLAYER_MOVE to HeavenActivity
    java.lang.NullPointerException
    	at net.blockheaven.kaipr.heavenactivity.HeavenActivity.addActivity(HeavenActivity.java:180)
    	at net.blockheaven.kaipr.heavenactivity.HeavenActivityPlayerListener.onPlayerMove(HeavenActivityPlayerListener.java:47)
    	at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:286)
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:164)
    	at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:491)
    	at net.minecraft.server.Packet10Flying.a(SourceFile:126)
    	at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-08-11 02:06:34 [SEVERE] Could not pass event PLAYER_MOVE to HeavenActivity
    java.lang.NullPointerException
    	at net.blockheaven.kaipr.heavenactivity.HeavenActivity.addActivity(HeavenActivity.java:180)
    	at net.blockheaven.kaipr.heavenactivity.HeavenActivityPlayerListener.onPlayerMove(HeavenActivityPlayerListener.java:47)
    	at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:286)
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:164)
    	at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:491)
    	at net.minecraft.server.Packet10Flying.a(SourceFile:126)
    	at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-08-11 02:06:34 [SEVERE] Could not pass event PLAYER_MOVE to HeavenActivity
    java.lang.NullPointerException
    	at net.blockheaven.kaipr.heavenactivity.HeavenActivity.addActivity(HeavenActivity.java:180)
    	at net.blockheaven.kaipr.heavenactivity.HeavenActivityPlayerListener.onPlayerMove(HeavenActivityPlayerListener.java:47)
    	at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:286)
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:164)
    	at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:491)
    	at net.minecraft.server.Packet10Flying.a(SourceFile:126)
    	at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    CB1000
    permissions 4.7.4
     
  13. Offline

    RTRD

    Essentials Eco support? :)
     
  14. Offline

    Mercury

    @Sevenos
    Can you please support PermissionsBukkit
     
  15. Offline

    fugos

    Why not add Register support (makes all economies compatible)
     
  16. Offline

    Sevenos

    Permissions 4? Whut?

    Thought about it but noone asked for any other than iConomy yet.

    Will be in next version, which should be out in the next days (later than expected I know :p )
     
  17. Offline

    RTRD

    So....Are you gonna do it?
     
  18. Offline

    Sevenos

    At least I will take another look at it and probably integrate it. No clue if it will be in the next version tho.

    Next version will be out until monday btw.
     
  19. Offline

    RTRD

    Ok, cool! :)
     
  20. Offline

    Retricide

    Yay!
    *Jumps for joy*
     
  21. Offline

    Sevenos

    Version 1.0.0 will be nearly a complete rewrite, so I have to move the release out a bit more. All I can give now is a compiled version of the current dev state which I already run on my server. However, I can't really document it (probably tomorrow).

    In short the biggest changes:
    - Superperms support (take a look at plugin.yml)
    - info-based activity multipliers are removed and replaced by multiplier sets in config
    - Register support (all major economy plugins)
    - Income is now calculated based on a expression, no more vague config options and ALOT more flexible (old config gets migrated)
    - Activity calculation does now happen when activity value is requested instead of when it gets added (completely new data backend)
    - Sequences do now count on, so if you have the default of 15 sequences and notify every 6 sequences, it notifies at sequence 6,12,18,24, ... instead of 6,12,21,27, ... (I may rethink this until 1.0.0 final)
    - Alot more stuff...

    You will have to know a bit java and take a look at the github repository to fully understand it, I will add documentation and detailed changelog the next days when the final is out (want to remake commands and make some messages configurable for example).

    Anyway, here is the development snapshot: http://blockheaven.net/plugins/HeavenActivity.jar

    BTW: If you are curious about performance try "/activity admin benchmark", on my macbook 1.000.000 addActivity take 19-123ms, 100.000 getActivity about 63-373ms (running in parallel). It's really simplified, but gives you a rough overview.
     
  22. Offline

    Retricide

    Can't wait for the official build, but I'm definitely trying the Dev build out tonight. I've been waiting for this update for so long, glad it's finally come!
    Many thanks @Sevenos for this fantastic Plugin!
     
  23. Offline

    patriotdow

    Any progress on 1.0?

    I tried installing the dev snapshot and I get activity messages but it never seems to payout. I noticed that no configuration file is created so I thought maybe I need to use one similar to the .3 version? However, I was afraid to do that since you said so much has changed.

    Any ideas?
     
  24. Offline

    Retricide

    Looks like @Sevenos is inactive.
    Is anyone looking into continuing this, or a plugin like it?
    I really don't want to see HeavenActivity die.
     
    JoePrime likes this.
  25. Offline

    Mike Geitz

    Not working with latest CB rec. build for 1.8.1 (1185) :(
     
  26. Offline

    JoePrime

    Seconded - I really enjoy being able to have my server auto-reward players for playing. Looking forward to this getting revived, or a new plugin coming out to replace it. Hopefully Essentials Economy could be added as well. :p
     
  27. Offline

    Mike Geitz

    I miss this plugin :(
     
  28. Offline

    matjam

    Sevenos, I created a Github pull request. I only changed the bare minimum to get it working with cb1185, superperms and iConomy 6.

    CB1240 has been released, I've not tested it, but unless they changed something drastic it should work.
     
  29. Offline

    Rollese

    Could we get a .jar ?
     
  30. Offline

    matjam

    Sure. I did want to give Sevenos a chance to update the plugin before I started pushing out modified versions. I guess it can't hurt so in the meantime you can use my build of it.

    Unofficial 0.3.2 build: http://www.creeperparty.net/files/HeavenActivity.jar
     
  31. Offline

    Rollese


    Ah, I haven't noticed that it seems to not be backwards compatible with iConomy5 :/
     

Share This Page