[REQ] President Plugin

Discussion in 'Archived: Plugin Requests' started by Dimbula, Sep 26, 2011.

  1. Offline

    Dimbula

    Hey,

    i need a plugin for my server requested by community.
    They want a president plugin with the following key features:
    • president voting
      • maybe configuable time (in hours/minutes/day or something)
    • taxes
    • a cashbox for the state, maybe with iConomy money
      • the cashbox should finance building projects for the town (for example: City Hall)
    • admin and president should be able to take out money (Maybe with permissions.)
    • maybe some commands for the president to manage world/users (Not the server, be creative)
    • maybe iConomy support or permissions (I use PermissionsEx!)
    If you like my idea answer me in this thread and contact me over PN. (If you want over Skype too!) Looking forward to a great plugin.

    Regards,
    Dimbula
     
  2. Offline

    Kohle

    Hmm.... this doesn't sound too complicated, I might take this up (at least try to) but I am not going to guarentee that it will work. I will start working on it on Friday :)
     
  3. Offline

    SygnusX1

    I've been wanting the same kind of plugin, actually. If you do take it up, Kohle, thanks!
     
  4. Offline

    Kohle

    Yes, I will most likely work on this ASAP, which would be this weekend :) It isn't too hard to do, though.

    So, this is how I think the plugin will turn out:

    1) Admins/ops can enter a command to select who is running for 'president'.
    2) Users can vote for one person, only once for each election.
    3) President/people with the right permission can withdrawl money from the cashbox, which will be hooked into iConomy.
    4) At scheduled intervals, a customized amount of money will be taken from each player's iConomy account and added to the cashbox, as taxes.

    Anything important that I am missing?
     
  5. Offline

    Dimbula

    Yeah, this is the main idea and the most important part.
    If you do that I would be pleased, but I maybe have a request.
    Maybe after completing this Request and you like to go on developing on it,
    I have lots of ideas, that the president does not get boring.
    You just could contact me (over PN or this thread) , if you want to continue work after completion or if you want I post it.
     
  6. Offline

    acuddlyheadcrab

    Did you consider towny?

    Kohle seems like he's on it already though, so i'm just wondering.
     
  7. Offline

    Kohle

    @Dimbula After I complete the basic version, I will most definitely be keeping up on it :)

    @acuddlyheadcrab I dun like crabs on my head. Anyways, what would Towny have for a part in a plugin like this?
     
  8. Offline

    acuddlyheadcrab

    At a glance, it's similar to the request. I was just making sure that you/Dimbula knew that. That's all :)
     
  9. Offline

    Kohle

    Oh, I see. I kind of read your post wrong ;)
     
  10. Offline

    Dimbula

    I readed the features of Towny, it seems to be something like my request, but missing the elections.
    In my view, I see Towny as a plugin whose main task is the town/nation feature.
    Maybe we could differentiate ourselves, if we focus on president and features for managing world (many features ^^) or do you think the plugin doesn't make sense anymore.
    There are hundred of Permissions Plugins for example, each with focus on something different.
    And as I said I come up with features managing the world if the basics are done and if you like continue.
     
  11. Offline

    Kohle

    Okay, now you have me lost.
     
  12. Offline

    tuckismad

    a president plugin would be awesome!
     
  13. Offline

    Cyrusc

    Grammar.
    It was unable to locate Dimbula's post.
     
  14. Offline

    Kohle

    I know grammar is important, but please don't post just to point out that somebody has grammar errors in their posts. If you do not have anything to say about this WIP plugin, please do not post here anymore.

    I'm glad someone else is excited for this!

    What sort of world managing features are you thinkin of? Besides being able to become the president and have access to the world(s'('s)) cashbox, what other things could the President do?
     
  15. Offline

    Cyrusc

    My apologies,
    However I would also like to say I am highly interested in the development of this idea. I was wondering if anything like this existed a few days ago and I am quite happy to see that a plugin developer such as yourself has taken a interest in it.


    EDIT: And that Dimbula has brought fourth the idea to the forums

    With Regards,
    [​IMG]
     
  16. Offline

    Dimbula

    Sorry, about my English, it isn't my native language.
    I hope you understand my English well.

    Yeah world editing features for example raising taxes or lower taxes by a fixed maximum and minimum by SA
    or maybe setting different taxes (building tax, income tax or unemployment benefits), setting a vice-president.
    But I think not every feature of this is useful.
     
  17. Offline

    Cyrusc

    Is there any update in this?
    I am extremely interested in it now.
     
  18. Offline

    Kohle

    I need a clear destiption of the plugin so I can continue.
     
  19. Offline

    Father Of Time

    I am just a passer by reading this request, but as Kohle stated above what exactly does the president do? You've made one thing clear, that there will be a tax system that collects into a financial pool that a president has control over, but that is about all I see that isn't extremely vague.

    Don't get me wrong, I see other statements like "Building taxes" and so on, but as I said that is extremely vague. How is "building" going to be taxes? are you using a region system that you can charge a person per day for owning, do you want to charge a person a tax per block they place, etc.

    I could break down each proposed idea, but rather than doing them individually I think It would be more beneficial to just leave you with a concept. When making plug-ins, or even programming in general you need to keep in mind that most things are "event" triggered. What this means is that when certain actions happen in game it triggers an event, and from that event we can execute custom code.

    So when you say "tax" players you need to decide when taxes are collected. Do you tax them when they earn it like an income tax, do you tax them when they spend it like a sales tax, do you just tax them on a set time interval, etc.

    Big picture ideas are great for the initial brainstorming phase of development, but once you get into the nitty gritty of actually making the plug-in function you need to take those big picture idea and break them down into their logical components.

    I hope my aimless rambling hasn't confused the original poster. If it has made sense and you would like help with further breaking down your idea into an executable project let me know.

    Take care!
     
    Kohle likes this.
  20. Offline

    Dimbula

    I don't know what specific information you need.
     
  21. Offline

    Kohle

    How people get taxed, what features presidents have, etc.
     
  22. Offline

    Dimbula

    How people get taxes?

    I would say the president get the taxes of the players by command!
    or
    He can buy materials from taxes.
    The player should pay taxes defined by a command or a config.
    It would be better if there is a command, because defining taxes is the work of president.

    What the president do:
    (Maybe)
    • raising or lower taxes (by fixed amount in config)
    • withdraw taxes
    or​
    • buy materials from taxes
    • setting a vice-president
    I will think on more features.
     
  23. Offline

    Kohle

    Yeah, those are pretty good for taxes, but what about world editing/changes commands?
     
  24. Offline

    Father Of Time

    Okay, it's my personal opinion that you are stuck in the "Big Picture" phase, so if you don't mind I am going to help you break this down a little bit. I am going to break down a single aspect of the system, and from that you will hopefully be able to look at how I did it and handle the remaining aspects of the system yourself.

    I am going to start with the taxing because that seems to be a vital aspect to this system. So we need to figure out a few things here, will the taxes be on a timer and handled automatically on set intervals or will it be manually executed by a President via a /command. Personally I would lean towards the automatic timer because allowing the President to execute a /collecttax command would open up a lot of other issues, like spamming the command over and over to claim infinite taxes and so on. By putting it on an automatic timer you disable a players abilities to abuse the command and eliminate the need for a lot of sanity checks.

    Is the tax a flat rate (every player is taxes the same) or is it scaling depending on other variables (like the size of regions they own). I recall you stating that the President would be able to set the tax rate; so will that flat rate be used against all players bank balances

    0.06[President tax] * BankBalance

    Or will it be applied to other variables too. Personally I would advise thinking of a few other variables to throw into the tax formula to make the system more dynamic and interesting, making consequences for owning more land mass, so like…

    0.06[PresidentTax] * ( Regions.Block.Count * 0.0001 ) * BankBalance

    These examples are pseudo code and will not work, but are presented to give you a visual of what I am speaking about. Also, are all players on the server going to be taxes by the President, or do some players have the ability to reject the government system and go tax free at the cost of losing a few plug-in features?

    This is only a small break down of one aspect of your proposed plug-in; however there is still a lot that is still to be decided. When working on a project that has many aspects it’s important to not get confused by the big picture. I’ve often found that as I look at the project as a whole I jump to different aspects of the system causing confusion with the entire project. Instead I’ve found it to be WAY simpler to focus only on a single aspect of the system and develop it as fully as possible and once you have that aspect working extend the project off that foundation.

    So specific to your system, I would start be making the Presidential voting process because everything revolves around the President. You will need the ability to store candidates, a method to allow players to vote for candidates, a method to verify that each player has only voted once, a method to determine when the election starts and ends, and a method for calculating the election winner. There is no point even thinking about anything past this part of the system because it’s impossible for anything else to function until this part has been completed. Once you have the ability to vote a president into power then I would advise you to begin brainstorming what additional functionality you want to add to the plug-in

    I’ve rambled for long enough, but hopefully this will help you better define your request.
     
  25. Offline

    Dimbula

    Hmm, he's right, but anyway I haven't got many ideas about world editing features, except managing terrain. For example where people could build and just like Father of Time said taxes which interact with taxes.
     
  26. Offline

    Father Of Time

    Personally I wouldn't attempt to re-invent the wheel… By that I mean why bother create certain functionality when it already exists within other plug-ins. What I would do instead would be to create the president aspects of your system, then tap into the API of existing plug-ins to manage other parts of the system.

    So for example, you could define regions using WorldEdit/WorldGuard and then use the WorldGuard API to tap into its regions to give your system functionality.

    So for instance, you could get your president system working, and give your president the ability to set taxes which will be based on the Block Count of ALL WorldGuard regions owned by the player. So in this example a player with a small WorldGuard region would pay less taxes than someone with a giant one.

    These are only high level concepts, but I feel the need to point out that not everything needs to be done from scratch.
     
    Kohle likes this.
  27. Offline

    Perichor

    Maybe it would be easier to implement plugins that are already there rather than reinventing the wheel like Father of Time said. For instance, I have a tax plugin that might fit your needs - then you only really need to write code to handle elections and voting. When the election outcome is counted the person who wins is just given the permission nodes needed to control the tax system.
     
  28. Offline

    Kohle

    But then I would have to include dependicies. This is where developing gets fun and complicated :)
     
  29. Offline

    Perichor

    But maybe it's better to use several simple plugins than try to create one complex, maybe slightly too large plugin. It's an interesting dilemma. Plugin idea is really cool btw. :)
     

Share This Page