Shade's Plugins [Reader]

Discussion in 'WIP and Development Status' started by Shade, Jan 7, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    smartaleq

    awesome, thanks very much for the details. my mod is kludgy as hell, yours looks like a work of art in comparison, i look forward to "release"
     
  2. Offline

    l5p4ngl312

    Having trouble with permissions. Don't seem to work right.
     
  3. Offline

    MarsGlorious

    This is a complex issue that may not be an issue. Correct me if I'm wrong.

    From how I understand it.
    Shouldn't the home block of your town only be capable of being unclaimed (during war) if the enemy players are in it's area above sea level? Otherwise, I can potentially see problems like tunneling or using mine-shafts deep down to access the home block when the all the players are defending above ground.

    Getting down there could be really inconvenient and it might mean you have to extend defenses underground.

    Like what if you lose your whole town without a fight because of this? It would be ultra lame.
     
  4. Offline

    Thijsbeer

    Hi

    From what I understand is that when the war ends because one of the two parties has captured the town block.
    That town will no longer exist.

    Is there a possibilty to make it so you can only plunder the bank account of a town.By capturing the townblock.
    To make sure there is something in the bank, the town that wants to go to war has to pay for this.
    Other towns than can except going to war and have to pay a certain amount to their bank.
    This amount will depend on how many residents the town has and if its more or less than the first town.
    If youre town has more residents it will cost more.Making it like a betting game.

    Just a tought
    Thijsbeer
     
  5. Offline

    jugglerrob

    Are town plots going to be set by the mayor?

    so the mayor uses something like /set town plot 16 and that set a town plot with the center being where he stands. So this would alow towns to build roads that can't be claimed by town residents.

    or are resident plots just going to be in a 16x16 grid?
     
  6. Offline

    FoolMeOnce

    Ah, I had already started porting this for my own use :D

    I enjoy developing plugins, and Towny has always been one that I fiddled with.
    In fact, I actually started on my own version.

    I was going to offer my services on a general thread but I've always been interested in your plugins, Shade.

    If you would like any assistance, or a partner, please let me know.
     
  7. Offline

    NEO

    A few suggestions of commands you could add to reader

    The examples assume your using people.txt

    /people list - lists each line in people.txt
    /people list n - lists each line beginning with n in people.txt
    /people add neo - adds neo on a new line in people.txt
    /people edit neo fred - changes the line neo to fred in people.txt
    /people del neo - removes the line neo" from people.txt
    /people delall n - removes all lines beginning with n from people.txt
     
  8. Offline

    Riot

    If your looking for input.
    I was thinking about a better more controlled territory system. If you know about cuboid; then sort of like a cuboid fill action except it claims the territory within the square. (right click two blocks; those coordinates become the two angles of a square which is filled with player territory). Also, The player should be able to control territory off borders (think England and new England before independance) and should also be able to create more than one town.
     
  9. Offline

    Shade

    Added a minimum height for war.
    Configuration is available in the latest build.
    War has no boons or effects. When a war starts, it remembers all the towns/nations/townblocks that are valid, then people affect that part of memory. When only one nation is left, then the score screen shows up. I'll do more work on that once I know the mechanics work (there should be scoring per town for capturing places).

    I haven't bothered with making this work with any permission plugins yet. The only real permissions needed are really for admins anyways. The only working commands for them are starting/stopping war, and reloading the settings.

    My PM to riot:


    @NEO:
    Theres a /reader [cmd] add [line] command to append stuff to a file. I never wanted to make Reader a Text editor in the first place however...

    @jugglerrob: Resident can claim anywhere in town right now with /resident claim. /town claim is used by mayors+assistants. There's no current way to prevent residents from claiming a specific spot, other than for the mayor to claim it for himself first (not exactly ideal).


    @FoolMeOnce: sure. Get in #towny on esper and we can talk n stuff.
     
  10. Offline

    l5p4ngl312

    How does a mayor set the plotprice?
     
  11. Offline

    Shade

    Havn't made a purchase price setting yet, but there's daily taxes.
    Mind you, you can't withdraw from the town/nation account yet
     
  12. Offline

    l5p4ngl312

    Ok thanks. I saw the option in the town.txt file but i didn't find an in-game command. This is coming along awesome! I already love it sooo much. iConomy support is a huge +
     
  13. Offline

    Shade

  14. Offline

    l5p4ngl312

    Sweet! i have been hoping for something like this. Didn't think i'd get it till release though.

    Also i have a question. Will the towny map be able to auto update again? That was really useful
     
  15. Offline

    Arisilde

    Any way you could create the option to create a town bank account via iConomy? Basically for collecting taxes and funding large projects. Maybe even with auto withdraw from they member's iConomy account? Also, is there a way to set players spawn point to be in the town they belong to? I could have sworn I read that somewhere, but I can't seem to find info on it.
     
  16. Offline

    Shade

    There is already taxes. Every day, anyone who owns a plot of land in a town pays the tax*(# plots owned) to the town bank. The nation will also be charging its own tax (forget if I've done that already). There's just no current way for a player to access the banks (yet).
    There's town spawns. The must be located within the home block.
     
  17. Offline

    Arisilde

    I was thinking more of a tax for every member, not just owners of plots.

    Can you please link me to documentation explaining how to use the town spawn? can't seem to find it.
     
  18. Offline

    Shade

    There is no docs yet. Basically you:

    /town set homeblock
    The homeblock was origionally set as the first townblock you claimed (where you started your town).
    /town set spawn
    Do this within that town block.

    Then people can use /town spawn.
     
  19. Offline

    Arisilde

    Will that cause them to warp to town when they die, or only via the chat command? I was more looking for respawning in town after death.
     
  20. Offline

    Shade

    there's no onDeath hook in bukkit yet.
     
  21. Offline

    Arisilde

    Ah ok. Well do you plan to add it when there is one? I guess that's what I'm asking, will there ever be this feature.
     
  22. Offline

    Shade

    Of course! Mind you, people will probably have to remind me if the hook has been updated. If anyone starts noticing onDeath plugins, tell me kay?

    Also, I changed the taxes variable to affect residents in the town. The old variable was changed to plottax. I also added /town withdraw [$] and a few other configurable stuff for nations. Mind you I havn't tested if anything works yet >.> Oh right, gotta do nation withdraw.

    Oh and I made the map show your plots in yellow.
     
  23. Offline

    Arisilde

    Very nice
     
  24. Offline

    fullwall

  25. Offline

    Shade

    There's a listener yes. However, Craftbukkit is not calling the event yet.
     
  26. Offline

    TOAST7312

    Question:
    I understand Towny is still in testing, but how functional would you say it is at this point? I ask because I've been reading up on it for use on my server, and have been meaning to test it, but I've noticed some very important(at least to me) commands, such as /town delete [town], aren't yet functional according to your master list.

    A tutorial would be nice as well, though I'm sure this has been mentioned before. I'm not entirely sure how setting up a town works, and without the ability to delete it I'm not sure I want to go with my tried and true 'trial and error' method if there's no way to fix it if I mess up.

    Can you enlighten me at all on this? If so, thank you.
     
  27. Offline

    l5p4ngl312

    Obviously I'm not Shade but I use the current build of towny on my server. It is functional enough for people to begin to make their towns. When towny is released I think the major upgrades from this build will be war and more features for town plot claiming, i.e. mayors restricting certain plots. I think Shade has mentioned before that he will have docs ready for release, but during development he just has some things like the master list ready and not full tutorials. I'll tell you what I know.

    Settings are pretty much self-explanatory but I'll let you know about the important ones.
    using-iconomy=true/false
    is obviously a big one. I use iConomy on my server and this plugin works really well with it. This setting enables features such as taxes and town costs.
    price_new_nation=
    and
    price_new_town=
    set the creation prices for towns and nations. I recommend a high price for towns and a higher one for nations.
    unclaimed_zone_build=
    unclaimed_zone_destroy=
    These settings decide whether people can build/destroy in the wilderness. The area that has no towns. I set both to true so that people have the ability to set up a base and start accumulating money to make a town before having to join one themselves.

    For a tutorial I'll just use an example scenario with the features currently available.
    Player 1 wants to make a town. I have set unclaimed_zone_build/destroy to true so he can set up a mining operation.
    He uses my SimpleShop plugin for iConomy to sell all of his materials for money.
    He gathers up 10,000 coins, which is my price_new_town value.
    He types /town new Townsville Player1 and makes a town that he is the mayor of which the homeblock on the town block he is currently on. Town blocks are a 16x16x128 cuboid of regular minecraft blocks.
    He decides how large he wants his town to be for now and types /town claim rect 5 to claim 5 town blocks in each direction from where he is standin.
    He builds a house on the homeblock and types /town set spawn so that his future residents can use /town spawn to teleport there.
    He adds a new resident, Player2 to his town by using /town add Player2
    He sets the board message of his town, the message that people see upon entering his town and logging in. He types /town set board Townsville is Awesome
    He sets up the permissions of his town vs. outsiders, residents, and allies.
    He makes residents able to build and destroy by typing /town set perm resident on
    He makes allies unable to destroy but able to build by typing /town set perm ally destroy off and /town set perm ally build on
    He gives outsiders no permissions by typing /town set perm outsiders off
    He decides pvp should be allowed in his town by typing /town set pvp on
    He sets the taxes for his residents because he needs money in order to buy diamonds to arm himself and his residents. He types /town set taxes 5
    Every day his residents will be charged 5 coins.
    He sets the plot price in his town so that his residents can buy private land within the town. /town set plotprice 500
    He sets the tax for owning a plot of land. /town set plottax 10

    I'm not going to go into war as I think it doesn't work right now. I'm also hoping for more plot options such as restricting plots, multiple owners for a plot that split taxes. I'm also a bit confused about plot permissions. I know that /resident set perm resident on will allow friends to build and that outsiders do not apply in this case. I guess allies are other people in the town who aren't friends?

    And @Shade will selling plots back to the town and selling plots to other residents be possible?
     
  28. Offline

    Shade

    There's alot of code I need to test. I went on a coding spree these last couple of days. Last I tested, the leaving/deleting algorithm may cause some errors. I really need to take a look at that. Same with wars and the crapload of things I just wrote. Towny works in theory.

    For a tutorial, I think I'll try and get a few videos going when I'm done coding.

    Block permissions algorithm is as such:
    Code:
    Yes if admin.
    Yes if plot owner.
    If wild:
        Check town's wild permission
    If wartime:
        Yes if resident has a nation, and it's not neutral, nor is the target area neutral
    If Plot Owner:
    	Yes if owner
    	if friend of owner:
    		Check 'resident' permission
    	else
    		No if resident denies allies
    		Continue to town permissions if he does allow allies
    No if town denies resident build
    If Ally:
    	Check town's ally permission
    Yes if resident
    if outsider:
    	Check town's outsider permission
    
    Currently I'm working on making the mayor be able to flag plots for sale. Which residents then buy. Residents can also flag it for sale and the price instead is transacted to the player.

    I also finished the map mode. /r set mode map (/r = /resident in the default config) will bring up the map each time you mode between chunks/townblocks. You can turn it off with /r set mode reset.

    I also worked on mob away and intown hp regen. Regen works, however mobs are failing terribly. Doesn't help that I had to use Craftbukkit as a library to get an entity list. >.>

    Actually, I think I fixed deletion. (My posts sometimes span periods of like an hour as I go an code n stuff). Here's my todo list:
    Code:
     * Commenting
     * Unclaim townblocks
     * flatfile-old data source and replace getDataSource() with a manager class
     * log nation/town chat
     * update cache when adding/removing people
     * replace "/resident" with settings.getFirstCommand(settings.getResidentCommands()) etc in help messages
     * deposit for town/nation
     * when a town/nation is detroyed. What happens to the money? (give to Shade :D jk)
     * When adding allying another nation, ask that nation and add this nation to their ally list.
     * Make the formatting/wording for [nation] .. [nation] etc, better.
    
    --- merged: Jan 30, 2011 7:22 AM ---
    Anyone using the latest, can they confirm /townyadmin works if you set up the node 'towny.admin'? I'm a newb to Niji's permissions >.>

    http://dl.dropbox.com/u/5094161/d/b/Towny.jar
     
  29. Offline

    BBFPaco

    Awesome! Installed and tested with a few of our members tonight. Glad to see you added the plot sales (did you update your website tonight? could have sworn I didn't see those commands earlier! lol), health regen, and map toggle (loved the map toggle with hmod).

    I will test the permissions tomorrow after I update it. I noticed some permission issues with other mods so far which are supposed to be using the permissions plugin.
     
  30. Offline

    TOAST7312

    I appreciate you answering this the way you did. It brought a whole new understanding of how this works to me. But now I have a few more questions:

    This is pretty straightforward to me, but my question is; if you allow building in the 'wilderness', doesn't that mean people are just going to build wherever they want and to hell with the towns? I mean, I understand that otherwise they wouldn't be able to build unless they immediately joined a town, but isn't that the point?

    You join a town, establish yourself to get money, then sell your property(be it to someone else or back to the town), then strike off on your own? That sounds ideal to me, because otherwise you'll just have people building wherever and little mining shafts will dot the landscape. I guess this is what settings are for.. :p

    Hmm. I understand that a chink is a 16x16c128 cuboid of blocks, but how exactly does mapping this out works? Is there any means by which one can visually chart the land without having to traverse each and every nook and cranny to measure? I ask because my establishment is spread out over a series of mountains, and charting is it something that would take in excess of a full day to do.

    And I'm guessing the 'rect' in '/town claim rect 5' stands for 'rectagle; the shape in which one wants to claim land around one-self.

    Which brings about another question: if chunks are 16x16x128 cuboids, an even number, then how does one find a center block to claim from? I'm trying to wrap my head around how accurately I can make the borders of this town and how much mapping I'm going to have to spend time doing.

    Perhaps in future incarnations of Towny it would be possible to insert a command to create visual representation of the town borders or the area one would be claiming if one entered such a command? I'm no good with coding, but this would probably take quite a bit to do. It's just a thought.

    So I'm to assume that the home block, aka he initial spot where you claimed town property from, is where one must set the spawn? Or can it be set elsewhere?

    The rest made sense to me. But do nations work in the same way? If I established my castle as a town, then established a nation, do they overlap, or is 'nation' merely a name given to a system which allows multiple cities to ally themselves together? Is there territory involved? So much to learn and so little time.. :p



    Excellent, that would be awesome if you could do such a thing. Establishing a town/nation/whatever seems to me, at this point, to be a monolithic task; something I don't want to step into without knowing what I'm doing first. ^_^

    So I'm to assume that Towny has it's own internal permissions system? I have the permissions plugin, but I've yet to do any serious tweaking with it myself due to not wishing to screw up the code. I'm, at this point, assuming all the plugins I've installed in my server that stated they 'supported Permissions' had their own permissions files set up by themselves so I haven't had any reason to change it.

    Would this conflict with mods in the client designed to create things like minimaps?

    Again, thank you both for all the help. ^_^
     
Thread Status:
Not open for further replies.

Share This Page