[RPG/MECH] sRPG v0.6 Preview - completely customizable RPG and Combat system [1185]

Discussion in 'Inactive/Unsupported Plugins' started by zaph34r, May 30, 2011.

  1. Offline

    zaph34r

    sRPG
    (yet )a(nother) very fully featured RPG plugin​

    This plugin is now moved to devbukkit, i will leave this thread as is, and may also update it, but for now the devbukkit page contains the most recent information. Discussion may continue here or on devbukkit, i will check both.


    Version: v0.6 Preview

    Note: Only use the current version on a live server if you can handle bugs. While the most severe are probably dealt with, there are still lots of smaller ones. Content also is not yet in a finished and complete state. Configuration files and database tables may still change, so you may have to drop those for a new version, losing some data.

    Short Summary:
    This plugin seeks to combine a rich suite of RPG-like mechanics (xp, skills, active abilities, ...) with a complete rebalance of the combat system (changed monster hp, damage, weapon damage, new mechanics,...) and on top of that make the whole package completely configurable for server admins (and when i say completely, i mean it)

    DOWNLOAD v0.6 Preview


    Requirements: SQLite or MySQL

    Additional downloads:
    Changelog:


    Version 0.6 Preview
    • initial release of the job system rewrite
    • basically everything changed, refer to the devbukkit page for more information

    Version 0.5 alpha 3
    • giant and ghast added to advanced config, have correct hp now
    • arrow damage fixed
    • ability to override tool damage for use with some other plugin added to advanced config
    • creepers deal damage according to config (value set in config is maximum damage)
    • plugin disables itself if it cannot establish initial database connection
    • groundwork for future additions
    Version 0.5 alpha 2

    • integrated quickfixes by MG127
    • added customizable block xp groups, you are now not limited to "common, uncommon, rare" but can create any number of groups
    • added database update routine for future changes in the database structure
    • major changes in the advanced configuration as part of planned additions, delete yours and let the plugin recreate it, or adjust by hand (defaults are on github for reference)
    • slimes and wolves use correct hp/damage/xp values now depending on size (slimes) and taming status (wolves)
    Version 0.5 alpha 1

    • Initial alpha release
    And finally, some thanks to


    nossr50, for the inspiration to do this, and the source to mcMMO that really helped me getting started, not to mention that his plugin is great
    sk89q, whose source of WorldGuard also was very enlightening, if sometimes slightly over my head
    various other plugin authors that made their stuff available, really a boon for beginners when you can look at how other people did some things
     
    GardenGnomer likes this.
  2. Offline

    zaph34r

    Was away for the weekend and am quite busy constructing a kitchen, so only a few short things i noticed while browsing the latest posts:

    • Damage should be identical no matter if you hit a player or a monster, but as crckdns correctly assumed, i haven't tested it on players yet
    • PvE/PvP damage distinction will probably be added as an option
    • As was mentioned, skill gains are cumulative, as are the boni you get from apprentice, expert, master. There is also a sort of undocumented extra skill bonus at every milestone, to reach a clean 25% with 11 points in a skill for most skill effects (using the current placeholder values for everything, balancing is still far in the future)
    • Holy crap, RB860 already? :eek:
    • To those with SQL problems: Listen to the people giving out info, they seem to have at the very least more clue than me :D
    • To those giving out SQL support: Thanks a lot :)
     
    krinsdeath likes this.
  3. Offline

    Zalastax

    What I mean with share is that the folder that we have all server files are located in dropbox. Only one person can run it at same time or chaos start and we need to revert files to dropbox backups.

    Are the servers configured for each database or does it just need to run and get calls to change in the database?

    Do we have the database in the server folder(synced)? If that's the case the database would automatically appear in every host persons server folder.

    Here's what happens:
    1. person A starts the server, when he closes it or a file gets saved dropbox will sync it to all computers immediately.
    2. person B gets all files and run the server, now person A gets files sent to his computer.
    3. The people joining asks who is the host and join that persons IP viewable in Hamachi.

    With MySQL it would look like this?
    1.person A runs batch to change settings to right for person A?
    2.person A start the MySQL server
    3 person A start the server, files get updated via dropbox.
    4. person A close the server and MySQL, SQL and server syncs to person B
    5.person B runs the batch for his profile.
    6.person B starts the MySQL server
    7.person B start the server
    8. The people joining asks who is the host and join that persons IP viewable in Hamachi.
     
  4. Offline

    krinsdeath

    @Zalastax
    Okay, in this case, it seems like you'll all have to have your own installations of MySQL on your PCs since you're using home computers for the server.

    The easiest setup (assuming you're all using Windows) is XAMPP. http://www.apachefriends.org/en/xampp.html
    It includes Apache (an httpd, which isn't technically needed, it just provides a gui interface to MySQL via phpMyAdmin), so you can technically disable Apache (which is an option when installing) if you think you don't need it (not recommended, but if resources are an issue it's probably a good idea. The command line interface is powerful and relatively easy to use).

    Alright, the fun part begins. During installation, you'll either have to all use the same user and password (not recommended, but seriously less complicated) for your MySQL daemon, or create a complicated set of batch files to swap your active configuration files for each person hosting the server.

    backup.bat
    Code:
    @echo OFF
    echo --- Starting MySQL database dump... ---
    REM - Change the path to your installation of XAMPP's mysql bin folder, by default it's C:\xampp\mysql\bin
    REM - Also, change the username, password and database to the relevant values.
    C:\xampp\mysql\bin\mysqldump --verbose --user=username --password=password --add-drop-table minecraft > minecraft.sql
    echo --- MySQL dump completed. ---
    pause
    
    startup.bat
    Code:
    @echo OFF
    echo --- Running SQL statements ---
    REM - Same as above, alter the relevant values
    C:\xampp\mysql\bin\mysql --verbose --user=username --password=password minecraft < minecraft.sql
    echo --- DB imported ---
    pause
    set BINDIR=%~dp0
    cd /D "%BINDIR%"
    REM - As above, alter this to the relevant path for your java installation
    "C:\Program Files (x86)\Java\jre6\bin\java.exe" -Xincgc -Xmx1G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    pause
    backup.bat
     
    edit:

    Just thought of something. Assuming you're all on Windows XP or later (most likely), you can create a symbolic link and store your DB in your minecraft directory. To do so (each one of the hosts will have to do this for it to work, but it may eliminate the need to sync your DB with a SQL backup)

    Open a command prompt (windows key+r, "cmd")
    cd C:\xampp\mysql\data (or relevant path)
    mklink /J minecraft C:\path\to\minecraft_server\sql_db
    exit
    Then, when you create your MySQL db (replace "minecraft" with whatever you call the DB in your conf files for the server), it'll store the files in that directory rather than in the standard installation for MySQL.

    edit #2:
    I'm not actually sure how MySQL would handle doing this. In theory it will work, but there are database schemas that aren't updated in this fashion so I'm not 100% sure how it will work out. I recommend running the batch files, but this might work too.
     
  5. Offline

    Zalastax

    We all will use MySQL only for this so usernames could be same.
    Syncing the databases should work but it all seems very risky because no one seems to know exactly how the databases work. I will wait until we can use SQLite.

    Thanks for all the help!
     
  6. Offline

    krinsdeath

    If you need help understanding something specific, I'm sure I can help. Again, send me a private convo or message me on my profile and I'll help you with whatever you need in regards to MySQL. I'm fairly competent with it.
     
  7. Offline

    crckdns

    Well, it was already answered somehow.. that it won't really work or/and is just to risky as mysql isn't made for such type of sharing ;) The best solution for your case would really be a flatfile-database like sqlite.
    As far as I know zap34r has mentioned to me to think about adding flatfile support in later versions, so just stay tuned for updates^^
     
  8. Offline

    RugRats

    Can't wait to use this plugin once the known issues are fixed :D
     
  9. Offline

    MG127

    could you please compile it with the latest worldguard? they use now dev builds (wg 5.0.0 #40)
    and the block-breaking event could not be passed to sRPG AND wg, so i have sRPG on the server it kicks wg too
    java.lang.NoSuchFieldError: opPermissions

    edit: ok there is an error from srpg, but the reason still seems to be worldugard :/
     
  10. Offline

    Toonking

    So today we got sRPG running on our Server, but whenever someone breaks a relevant block, this error occurs:


    Code:
    Could not pass event BLOCK_BREAK to sRPG
    java.lang.NullPointerException
        at com.behindthemirrors.minecraft.sRPG.PlayerData.addChargeTick(PlayerData.java:149)
        at com.behindthemirrors.minecraft.sRPG.BlockEventListener.onBlockBreak(BlockEventListener.java:40)
        at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.java:475)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
        at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:156)
        at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:118)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:462)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:217)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:401)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:311)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    We currently have no other plugin that uses a database. Can anyone help please^^
     
  11. Offline

    krinsdeath

    Do you have any other plugins that modify the behavior of blocks, or changes the way they react when destroyed or placed?

    Out of curiosity, do you use Permissions, or some other group manager? Which version if so? And what version of craftbukkit (plus relevant (or all) plugins)?
     
  12. Offline

    Toonking

    Okay so atm I'm using Permissions 3.I_don't_know, whatever it's the newest. Bukkit Build 818 with the following plugins:
    - sRPG
    - IConomyChestShop
    - Permissions
    - MobBounty
    - iConomy
    - FenceStack
    - WorldGuard
    - Stackable
    - LockChest
    - MobLoot
    - MultiInv
    - MultiVerse
    - SignLift
    - WorldEdit
    - MotherNature

    Oh now I get this error as well:


    Code:
    2011-06-18 00:20:49 [SEVERE] Could not pass event CREATURE_SPAWN to sRPG
    java.lang.ClassCastException: org.bukkit.craftbukkit.entity.CraftGhast cannot be cast to org.bukkit.entity.Creature
        at com.behindthemirrors.minecraft.sRPG.SpawnEventListener.onCreatureSpawn(SpawnEventListener.java:23)
        at org.bukkit.plugin.java.JavaPluginLoader$54.execute(JavaPluginLoader.java:619)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:228)
        at net.minecraft.server.World.addEntity(World.java:786)
        at net.minecraft.server.SpawnerCreature.spawnEntities(SourceFile:155)
        at net.minecraft.server.World.doTick(World.java:1552)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:391)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:311)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  13. Offline

    krinsdeath

    There appears to be a conflict with WorldGuard regarding the BLOCK_BREAK error. Does the error break the server in any way (ie do WorldGuard/sRPG both fail, or does the sRPG portion simply not work)?
    edit: the first BLOCK_BREAK error is occuring when the tool is checked for permissions and, upon success, attempts to add a charge to your tool. You should be able to fix that by removing all of the nodes "srpg.skills.*.active", which shouldn't impact gameplay at all since you can't use active skills anyway.
    As for the second error, is that happening inside the nether? Or is someone spawning Ghasts in the overworld? The nether is broken, so you'll probably see that error (without any significant impact on playability) a lot.
     
  14. Offline

    Toonking

    Well thank you for your help. The Server doesn't break in any way, it's just that one doesn't get ExP for destroying Blocks. I'll remove the active skills thingy immediatly and yes, the spawning error could be because of the nether, 'cause if nobody is in there the error doesn't occure. I'll report wether it worked or not.

    Okay this problem is fixed now, but now there is another little bug, everytime we break a block, it always pops up into two drops. Through that one could easily doublicate drops, which is not really what I want. I don't get any errors in the server logs but nevertheless it's a bit annoying.
     
  15. Offline

    krinsdeath

    edit: nvm

    Playing with the source to find out the problem.
     
  16. Offline

    MG127

    i found my problem with worldguard ... i had 2 of them, damn linux [creeper]
    worldguard.jar and
    WorldGuard.jar

    Q: i have 0 EP, nothing skilled yet, but i have 100% chance for double log drops with stone-axe, why?
    edit: its every resource with every item :/
    CB#860, permissions 3.1.5b

    suggestion:
    if you plan to add magic spells later: in defaultcommands there is a option for animating blood by temporary dropping red wool (not pickup-able), would be cool to use this for magic effects :D
    found @ DCEntityListener line 208+

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  17. Offline

    Toonking

    Same with me an recources, but it's completly unimportant which tool I use. I always get double drops if the block would drop something normally.
     
  18. Offline

    krinsdeath

    I think what's happening is that the event that's checking whether or not to drop additional blocks (in the case of a double/triple drop) is dropping a block regardless, and not halting the default behavior (which is to, in essence, drop a block). The result is that it's dropping two every time.

    zaph34r is indisposed and I'm not comfortable with updating his code (being woefully unfamiliar with Java), so you'll just have to wait. :(
     
  19. Offline

    jp_foxrocks

    Is this compatible with 860 build just making sure [cake]
     
  20. Offline

    MG127

    its compatible, but there is just the bug that you get double dropps on the ressources with items

    i think the
    player.getWorld().dropItemNaturally(event.getBlock().getLocation(), item);
    its maybe counts as an additional drop to the one processed in the event.
     
  21. Offline

    krinsdeath

    I think you misunderstood me. It's not dropping 2 blocks (with the same command), but rather the command to drop a block is being invoked twice (once by zaph34r's plugin, and again by the default behavior of the BLOCK_BREAK event).

    I'm too unfamiliar with Java (and bukkit in general) to know if this is actually the case.
     
  22. Offline

    MG127

    my quick debugging :
    Code:
                if (roll < tripleDropChance) {
                    amount *= 2;
                } else if (roll > tripleDropChance && roll < (tripleDropChance + doubleDropChance)) {
                    amount *= 1;
                }else return;
    
    @PassiveAbility.java line 110+

    SRPG.playerDataManager.get(player).addSkillpoint(skillname);
    changed to
    SRPG.playerDataManager.get(player).removeSkillpoint(skillname);
    @CommandListener.java line 73

    MessageParser.sendMessage(player, "skill-decreased");
    changed to
    MessageParser.sendMessage(player, "skill-decreased",skillname);
    @PlayerData.java line 120

    added
    if (cost==null) return;
    @MessageParser.java after line 18

    added
    if (SRPG.playerDataManager.get(player)==null) return;
    @PassiveAbility.java at the beginning of each trigger(...) function

    removed
    /check from the plugin.yml and SRPG.java line 58, its already used by ModTRS
    maybe zaph34r should use /srpg check instead

    download the quickfix (incl. source)
    fixed: doubledrop, skilldecreasing and some nullpointerexceptions


    i hope i imported all files correctly :confused:

    i think he should mention the lvl-titels per level on the main post
    0-3 Novice
    4-6 Apprentice
    7-10 Expert
    11+ Master

    and zaph34r, you should make more try{...}catch(Exception e){e.printStackTrace();} blocks. you don't know when the next unhandled Exception will hit ya :D
    but its at least better programmed than many other plugins are.
    for the config and database changes with updates, you could programm an updater, just write the versionnumber anywhere down or ask if a new field exists.
     
  23. Offline

    Toonking

    Uhm well, did I mention, that this bug only happens, if the user breaking the block has all permissions? When switching to "Default" user, I don't get double drops anymore (except through the mining skills).
     
  24. Offline

    MG127

    you mean "all permissions" like '*' or "- srpg.skills.*" ?
    i've tested both, and with both types of permissions i got doubledrops
    so what kind of permission nodes did you add for your default-group?
     
  25. Offline

    Hagon94

    What is MySQL, what is it for and how do i use it?
     
  26. Offline

    crckdns

    What?
    MySQL is just another database management system, widely used and is NOT related to MSSQL by Microsoft :)
    What for?
    This question.. well, read what I've said right now ;)
    How to?
    You install it at the _same_ machine like where your minecraft server is running, set up a user ..and voila, it's working~~(usually)

    AND you could also just use google before asking such stuff, or should I also explain what google is? ;)
    Any generic info (useful and useless) can be also found at wikipedia: http://en.wikipedia.org/wiki/MySQL
     
  27. Offline

    Goomboss

    is this still continued? Since I really like the passive part of this plugin. Currently I am running it along with demigods for a pvp based server and must say that I am really impressed by the dodge things and such. minor double drop issue as everything always double drops, but otherwise a great plugin.
     
  28. Offline

    crckdns

    Yep it is continued ^^ The only problem right now is that our admin (and the dev of this plugin) is fighting with his internet connection due to moving~ But hey, he was at least able to speak some words to me already, so he isn't completely offline :)
    I'm sure, he will be soon back in business :)
     
  29. Offline

    Goomboss

    Sorry one other question, I am getting alot of errors due to shared listeners and executing scripts between demigods and this plugin. anyway to prevent these and keep using both? for now I had to disable this as the errors removed saved data... Thanks for the quick respond earlier ^^
     
  30. Offline

    MG127

    as i mentioned on page 4, i fixed the doubledrop and the skilldecreasing is working now
    download

    and could you post some of the errors with demigod?
     
    crckdns likes this.
  31. Offline

    yakasuki

    mcmmo compatible please lol im trying to make a rpg server lol
     

Share This Page