Auto-Rank System.

Auto-Rank System.

Postby Leeizazombie » 13 Feb 2014, 23:37

Not something you could work on straight away but you could possibly add an auto-rank system to the properties in Zombie Survival. I have made my own custom Auto-Ranking system, here's some of the code:
Spoiler:

It would be handy for people to have a more friendly user version in the settings like where it checks how many levels that were added to the text file, then show drop down menus to select the level and then the rank that level will give players, also to take note of all the custom ranks added by the player.
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Re: Auto-Rank System.

Postby dzienny » 14 Feb 2014, 00:22

Well, it's not that easy to make a good auto-ranking system, but it's possible via a custom command/plugin and it's a good exercise in coding ;)

Here are my notes about the code, and possible improvements:
http://www.coderemarks.com/review/gIUenj5034rYaqOl
Spoiler:
User avatar
dzienny
Administrator
 
Posts: 1181
Joined: 23 Jan 2011, 14:27

Re: Auto-Rank System.

Postby Leeizazombie » 15 Feb 2014, 15:38

Thanks for those notes! :)
Updated:
Spoiler:


I was wondering how it would be possible to keep running the code as the server is on to check it on every player, my only ideas are to set a Boolean in a text file and the code can run under a while statement and make the player use the command, I also tried chat filter, that everytime they chat, it will check the code, but that isn't the best either, any suggestions?
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Re: Auto-Rank System.

Postby HelloWorldCool » 16 Feb 2014, 23:28

Leeizazombie wrote:...
I was wondering how it would be possible to keep running the code as the server is on to check it on every player, my only ideas are to set a Boolean in a text file and the code can run under a while statement and make the player use the command, I also tried chat filter, that everytime they chat, it will check the code, but that isn't the best either, any suggestions?


Hmm...well I'm sure that it is not easy for the system to perfectly "match" up times to players.
You may want to adjust the level "numbers."
Like making them 5, 10, 15, 20, 25, etc. Just so they follow a mathematical pattern.


Anyway here are some way(s) to go about it:
> Time: run code every 10 min (nobody wants to wait too long)
> Time: run after every zb round(or beginning of a new one)

Pro: This would be easy to add in.
Pro: Timed intervals are stable usually.
Con: Server may experience lag if too many people.


====================================================================================================

> Points: (Player's points) / (points for 1 tier) = Level y
Ex: 3000 / 500 = Level 6
Add rule: Run code after every y levels gained. (If we use 5x tier levels, y = 5)

Pro: Safer than timed intervals, lag is random but is reduced AND spread out
Pro: Stable because of the low likelihood of all players surviving.
Pro: Better for large servers with lots of players.
Con: Hard to add into the code, involves player's points, etc.


====================================================================================================

> Command: /rankup (course that means this ranking system is not completely auto)
Run code when player uses /rankup

Pro: None
Con: A Player has to do it.
Con: Random Lag ... guaranteed :geek:



So...those are my ideas.
Hope it kinda helped.

Good Luck,
HelloWorldCool
Download fCraft maps! - viewtopic.php?f=25&t=3012!



Note: The Developer(s) of MCDzienny have resigned and the software is no longer supported.
Errors are bound to occur and Mojang has not attempted to resolve them.
User avatar
HelloWorldCool
 
Posts: 867
Joined: 18 Oct 2011, 00:19
Location: MCDzienny Forums, HelloWorldCool Forums

Re: Auto-Rank System.

Postby dzienny » 17 Feb 2014, 15:43

HelloWorldCool brought up some good points in his post.

I would recommend you the option that involves doing a check when a zombie round starts.
You would have to hook your "auto-ranks" method to the event:
Code: Select all
EventHandler<RoundStartEventArgs> InfectionSystem.InfectionSystem.RoundStart

So your method would have to be:
Code: Select all
void OnZombieRoundStart(object source, RoundStartEventArgs e)
{
    // Do something.
}


And you would have to register this method to the event.
Code: Select all
InfectionSystem.InfectionSystem.RoundStart += OnZombieRoundStart;


Also, the code looks better now! :)
User avatar
dzienny
Administrator
 
Posts: 1181
Joined: 23 Jan 2011, 14:27

Re: Auto-Rank System.

Postby Leeizazombie » 17 Feb 2014, 15:58

Perfect, thank you! : :)
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Re: Auto-Rank System.

Postby Leeizazombie » 17 Feb 2014, 17:08

Actually, under the void OnZombieRoundStart(object source, RoundStartEventArgs e) method, I cannot use certain things like, p.name / Player.name / e.Player.name, how do I go around this.
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Re: Auto-Rank System.

Postby Marvy » 13 Mar 2014, 22:37

I like the sound of this- and I think if you get enough experience with coding- you could make the autorank levels customizable in a text file, something like this:

rankName : rankRequired : expRequired
etc.

This would then allow the server owners to add/delete autoranks so that the owner is not confined to a set number of ranks and rank names and will allow them to adjust the difficulty/effort required to get this rank.

I certainly could help with this, so if you want any help I am always willing :D

Of course- I have little experience with the ins and outs of MCDzienny's structure, so I would therefore need to have some practice first ;)
Marvy
 
Posts: 1
Joined: 13 Mar 2014, 22:19


Return to Zombie Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron