Solved Levels / experience

Discussion in 'Plugin Requests' started by gaberiel, Dec 11, 2014.

  1. i know the one that made this :) he did an impressive job and a very well thought plugin.
    this is not just a simple arena plugin, it is a fully featured plugin with a fully configured event that can match any events.
    i was trying to make one but couldn't go all the way with it, too much things to think about and support.
    That person already made it for EchoValley's server on the experimental branch on oxide, but made it only for them. Maybe someone will have the courage to do such a plugin later on, but at the moment i'm not sure any one will be making such a complicated plugin, one of the main reason will be the support that you need to put behind it (with all the updates and the time needed for it).

    So i guess that you can't expect such a plugin to come around soon on oxide public.
     
  2. I'm working on a RPG System that will look like LES. Used its plugins in the past and loved it, so i'm recoding to oxide 2.
    Give a look in my WIP at my server [BR]TheRotAG.

    As soon as I finish the job, I will post it here.
     
  3. i would love something like this
     
  4. I've some issues in the plugin yet. But if you guys come to have good ideas of Skills to add just tell me and I will see what I can do ;)
     
  5. fly for temporary time
    warp forward backward left right
     
  6. I think that Fly is too overpowered, such as warp, since players could warp into others bases and raid easily.
     
  7. CHR

    CHR

    I would donate for it. Not for private use. Just to keep ur work up. I spend 30 euro to the dev team of this plugin.

    Maybe some more people wanna donate to get this done.

    I like to gather more resources for people that stay on ur server. Instead giving all the same x3 gather.

    My offer I pay 30 for Devs hope more people join!
     
  8. Its good to know that ppl is willing to help with that :)

    I'm not satisfied with my WIP as is, but if you guys want to test you are all welcome.
    My RPG (Work In Progress) plugin is running on "[BR]TheRotAG-ECONOMIA|TP|HOME|COORD|RAID|RPG". Test if and give me your opns.

    What I can tell about it:
    Experience is earnt by Gather and Killing. -- would add craft later, not sure if will do... I want to add Group XP bonus as well, but I didnt codeit yet...
    Titles are based on Top Player Skill, like HardSkin that gives you the title of "Iron Man".
    Reputation is based on your kills, so if you kill more bad guys (low reps) you get a good rep, and if you kill more neutral/good guys your rep will drop fast. Hero is the best rep and Villain the worse.

    Skills that I use actually:
    Weapons Skills that increase their dmg
    Melee - do more dmg with melee weps
    SMG - more dmg with Assault Rifle and Thompson
    Shotgun - +dmg for shotguns duh
    Rifle - +bolt dmg
    Bow - +bow dmg
    Pistol - +dmg with revolver and handcannon

    Defense skills:
    Shield - Absorb 1pt of damage for each skill point used here. Max lvl of 50 and the shield regen 1pt per 10seconds.
    Armor - Absorb 1% damage for each skill pt used. Max lvl of 50. Doesnt need to regen like Shield.
    HardSkin - you will NEVER bleed again. Can only be obtained after lvl 50 in Armor.
    Survivalist (in tests) - you are used to the harsh conditions of the new world, so you dont take rad damage anymore and when respawning you come with 100hp and 500 hunger/thirst. Needs to be lvl 50 in Shield and have HardSkin.

    Misc skills:
    Research - Lets you research a item in your inventory for a BluePrint like the old ResearchKit in a 50-50 chance. (Since my players missed the old Research Kit I coded this skill, so after Lv. 5 they can buy and use it. The chance of getting a blueprint from the choosen item is 50-50.)

    Any sugestions or critics are welcome :)
     
    Last edited by a moderator: Feb 17, 2015
  9. What language do you code in? I have experience with C# and I would like to help if you allow me. Do you have the plugin on Github?
     
  10. CHR

    CHR

    This seems to be really complex. I will follow this thread.
     
  11. I started coding on LUA due to the lack of support in the early OXIDE2 days. I'm really interested in convert everything to C#, but I need to fix some issues like being sure to create a good structure in a data file with C#.

    What I mean with good structure:
    {
    "PlayerData": {
    "7941336498513154": {
    "Name": "LoLPlayer",
    "Level": 10
    }
    },
    "GroupsData": {
    "LoLGroup": {
    "Leaders": [
    "SteamID": "7941336498513154",
    "Name": "LoLPlayer",
    ],
    "Members": [
    "LoLPlayer",
    "WTFPlayer",
    "DUHPlayer"
    ]
    }
    }
    }

    On my tests I couldn't create a data like data... only with a single Key (like PlayerData) and a some values inside it.
     
  12. In my projects (no Rust plugins yet, but other c# stuff ), i usually use Newtonsoft Json library to serialize and deserialize my objects.
    This is what i came up with using your sample

    The classes, POCOs
    Code:
        public class LevelExperiencePluginData
        {
            public LevelExperiencePluginData()
            {
                PlayersData = new List<PlayerData>();
                GroupsData = new List<GroupData>();
            }        public List<PlayerData> PlayersData { get; set; }
            public List<GroupData> GroupsData { get; set; }
        }    public class PlayerData
        {
            public string SteamID { get; set; }
            public string Name { get; set; }
            public int Level { get; set; }
        }    public class GroupData
        {
            public GroupData()
            {
                Leaders = new List<string>();
                Members = new List<string>();
            }        public string Name { get; set; }
            public List<string> Leaders { get; set; }
            public List<string> Members { get; set; }
        }
    
    The serialized JSON (this is the generated string using JsonConvert.SerializeObject)
    Code:
    {
        "PlayersData": [
            {
                "SteamID": "7941336498513154",
                "Name": "LoLPlayer",
                "Level": 10
            },
            {
                "SteamID": "7941336498513155",
                "Name": "WTFPLayer",
                "Level": 9
            },
            {
                "SteamID": "7941336498513156",
                "Name": "DUHPLayer",
                "Level": 3
            },
            {
                "SteamID": "7941336498513157",
                "Name": "OtherPLayer",
                "Level": 1
            }
        ],
        "GroupsData": [
            {
                "Name": "LoLGroup",
                "Leaders": [
                    "7941336498513154"
                ],
                "Members": [
                    "7941336498513154",
                    "7941336498513155",
                    "7941336498513156"
                ]
            },
            {
                "Name": "SomeGroup",
                "Leaders": [
                    "7941336498513157"
                ],
                "Members": [
                    "7941336498513157"
                ]
            }
        ]
    }
    
    This is my sample function which i used to test the serialization. in my case i used a unit test in Visual Studio for a quick setup. This is not code from a Rust plugin
    Code:
                var pluginData = new LevelExperiencePluginData();
                pluginData.PlayersData = new List<PlayerData>
                {
                    new PlayerData {Name = "LoLPlayer", SteamID = "7941336498513154", Level = 10},
                    new PlayerData {Name = "WTFPLayer", SteamID = "7941336498513155", Level = 9},
                    new PlayerData {Name = "DUHPLayer", SteamID = "7941336498513156", Level = 3},
                    new PlayerData {Name = "OtherPLayer", SteamID = "7941336498513157", Level = 1}
                };
                pluginData.GroupsData = new List<GroupData>
                {
                    new GroupData
                    {
                        Name = "LoLGroup",
                        Leaders = new List<string> {"7941336498513154"},
                        Members = new List<string> {"7941336498513154", "7941336498513155", "7941336498513156"}
                    },
                    new GroupData
                    {
                        Name = "SomeGroup",
                        Leaders = new List<string> {"7941336498513157"},
                        Members = new List<string> {"7941336498513157"}
                    },
                };            var serializedData = JsonConvert.SerializeObject(pluginData);            var deserializedData = JsonConvert.DeserializeObject<LevelExperiencePluginData>(serializedData);
    I did change some of the structure. Notice the class LevelExperiencePluginData. It is used as a single container for all the collections used by the plugin. it is not serialized, but if you would use JsonConvert.DeserializeObject<LevelExperiencePluginData>(serializedData); (serializedData is the json string) It ginves you an object of type LevelExperiencePluginData with all the data available for you to use.


    i do hope this all works as expected on dotNet 3.5. i tested the serialize and deserialize on dotNet 4.0. I do know that Newtonsoft Json is available from within a Rust plugin

    Just my 2 cents. I hope it helps in any way
     
    Last edited by a moderator: Feb 18, 2015
  13. Wulf

    Wulf Community Admin