[PvP/ECON] Wool Wars - Team Territories w/ Econ Rewards

Discussion in 'WIP and Development Status' started by CrossBread216, Aug 2, 2011.

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

    CrossBread216

    I've been developing a plugin called Wool Wars based on a request from @Statharas on this thread. Since development is underway and it's been through a few rounds of testing thanks to @dak393 , I thought it would be a good time to move the discussion over to the WIP thread.

    Basic Fundamentals:
    • Teams capture territory in a large arena made of wool that changes to their team color.
    • Players bank econ system $ after an elapsed time period based on area of territory controlled.
    • Supports 15 teams.
    Comments/suggestions/testers welcome. (I.e. please try to break my stuff.) :)

    Details:
    • Players capture wool by walking over it.
    • $ will be awarded based on area, not volume. (Only one $ per column)
    • Permissions will allow team captains to invite new players to join their team.
    • Players can only build on blocks owned by their team.
    • Supports iConomy.
    • Wool is fire proof (yeah, nice try pyro.)
     

    Attached Files:

  2. Offline

    dak393

    Looking good maybe add some more details on the specifics (players walk over wool to "capture it", changing it to their team color.)
     
  3. Offline

    CrossBread216

    I was considering that, but it occurred to me that if you have any cliffs much taller than 10 blocks (the depth we were thinking) then you would have 10 wool, 1 bedrock, and then dirt or whatever was there before and you could end up under the bedrock of the arena. You could continue bedrock all the way down, but then why not just spawn wool all the way down in the first place?

    I've never run a server, so I don't have a feel for how big of a deal restarting it is, but right now, I'm leaning towards setting the arena parameters in a config file and having the server replace the white-listed materials from sky to bedrock all on start up. I suppose a floor could be imposed at something below sea level like Y=45 and bedrock would be placed there. You could also set a floor above sea level like Y=90 and say that air below the floor will also be replaced along with any of the normal materials above the floor. Then you would have an elevated arena with ~natural terrain from tall mountains, but mostly a flat plane of wool to work with. It would also be very clear where the boundaries are. You could even generate ladders all the way around.

    Thoughts?
     
  4. Offline

    dak393

    Well what I was saying is that you wouldn't generate it down a number of blocks but instead to a depth (like you say y=45). I would steer away from converting the whole world so that players have the option of running it in a world with other stuff although an option like that for a separate world would be interesting later on (would probably work better by just using a modified terrain generator so that new chunks are wool as well). In minecraft 1.7 there is a low point for land and a high point (1.8 will introduce chasms) so by using these natural limits say from sky to a little below sea level (and changing ANYTHING under that last block to bedrock). BTW generating ladders can be tricky sometimes as they like to be very finicky.

    EDIT: Thanks for the mention ^^
     
  5. Offline

    CrossBread216

    I didn't make it very clear, but I was thinking the floor/ceiling would only apply within the arena bounds.

    That's a useful piece of info. I'll have to track that value down.

    Thanks for the heads-up.

    Thanks for the testing and feedback. :)
     
  6. Offline

    dak393

    Ah ok perfect :)
    No problem glad to help :)
     
  7. Offline

    CrossBread216

    @Statharas I just thought of an argument for either 1) not capturing a whole column when one block changes color, or 2) only capturing the block you are on instead of a 3x3 grid. If a team tries to build a fortress with walls made of stone or something, enemy players could easily place ladders up the side, or just build a stair case up the wall. If they build the fortress out of wool (so they can prevent enemies from building on any surface) and the enemy can capture a 3x3 grid and all the blocks above and below it, then all they have to do is walk up to it and suddenly the wall is theirs. Actually if this was coordinated, a bunker could become a prison. If they only capture the block they stand on, they still have to build their way over the wall before they can take it. I personally would move for removing the 3x3 capture area.

    Also, instead of bedrock, I think I'll just make wool indestructible below a certain level if it is in the arena. That way, someone will always be paid for the square. Thought this might be nice since you said cannons might be involved. Unless you want players to be able to destroy the ability to gain resources from certain areas.

    Hmm, so what do you guys think. Should a player be able to break blocks from another team? A reason not to would be that it would be really easy to dig straight through a defensive wall if you can. (You could probably still allow cannons to do their thing.) A reason for it is that if we do the single-block-capture and you can't break the enemy block, you would need to get on top of an enemy block before being able to destroy it. (Although it would now be yours.)

    Here's the update for today. Maybe @dak393 will have a chance to poke at these.

    New features:
    • Players may now only build on blocks of their color in the arena. (Worth testing edge cases like standing outside while trying to build inside.
    • Wool placed inside the arena automatically takes the color of the player IF capture is turned on.
    • Wool in the arena is fireproof.
    • Added command /ww arena <lengthX> <lengthZ> <Floor> where floor is the lowest Y value that wool will spawn.
    • Added command /ww arena <X> <Z> <lengthX> <lengthZ> <Floor>
    • By default /ww arena <lengthX> <lengthZ> now sets floor to player's Y - 10
    • By default /ww arena <X> <Z> <lengthX> <lengthZ> sets floor to 64
    • At Y=Floor, wool should replace any block type unless Floor = 0 (leave the bedrock)
    Upcoming Features:
    • Wool captures translates to team points.
    • Be able to set up from config file
    • Periodically convert team points to iConomy $
    • Set up permissions
    Thanks for any feedback!
     

    Attached Files:

    Last edited by a moderator: May 18, 2016
  8. What about this: A player can't convert a block unless that block is not 3 blocks away from an enemy team's block. Also, doors can be used only by the ones that control the wool underneath it, but can be broken.


    Found a bug. The 5th parameter (Y) doesn't work, instead it spawns until bedrock.

    Find a way to limit the spawn on Y and then make the last layer of wool unbreakable.

    Also, wool still burns.

    [​IMG]





    Also, I have another request for you, on this mod. Can you make it that a map will show different wool colors and ONLY team members? For a specified map of course.
     
  9. Offline

    dak393

    Testing now ^^ expect edits to this post.
    EDIT_1:
    ...nope XD even with flint and steel. It does seem like something is happing as there is sometimes invisible fire but its still eating away and burning =/
    Tried generating a 1000 by 1000 block arena and it going ok so far (would suggest progress updates) the console said it was skipping lighting updates (due to the large amount of blocks) then java used no cpu (well like .5% of 1 core). after about a minute of inactivity cpu usage jumped up and maxed out. (To be expected of this much processing, and btw I was obviously booted from the server just for imputing the command). Well just checked again and it listed this:
    Code:
    07:29:29 [INFO] -- Reclaiming Arena --
    07:29:29 [INFO] Restoring 0 blocks...
    07:29:29 [INFO] Restored 0 blocks!
    07:29:41 [INFO] -- Spawning Arena - Start(-500, -500) xMax:500 zMax:500
    07:30:26 [INFO] More than 1000000 updates, aborting lighting updates
    07:34:22 [INFO] More than 1000000 updates, aborting lighting updates
    
    Edit_2: Think I broke the generator =/
    Code:
    07:29:29 [INFO] -- Reclaiming Arena --
    07:29:29 [INFO] Restoring 0 blocks...
    07:29:29 [INFO] Restored 0 blocks!
    07:29:41 [INFO] -- Spawning Arena - Start(-500, -500) xMax:500 zMax:500
    07:30:26 [INFO] More than 1000000 updates, aborting lighting updates
    07:34:22 [INFO] More than 1000000 updates, aborting lighting updates
    07:47:39 [INFO] More than 1000000 updates, aborting lighting updates
    
    Edit_3 sending a i/o log to you had to force quit java as the server was unresponsive and even once closed java continued running seemingly stuck in a loop.

    EDIT_4: Well it seems that the replacement worked and the depth worked! (I left depth blank btw) I set the arena again (so that I could capture) and that all worked. You can NOT place blocks from outside the zone (good), you can NOT place wool on white (unclaimed) wool (perfect), you CAN place wool on other blocks (such as the trees and outside the arena, not good) blocks you place DO update to your team color btw and stats seems to be working :) The one error is that there is no bottom layer, bedrock in this case and the wool stops 1 above sea level.
    I did get spam in the consol that caused me to disconnect :)( , sent that to you as well)
    I can run my server at any time just tell me when you are on / going to be on and we can get some multiplayer tests going :)

    EDIT_5: Seems to cause lag even with one player =/ this could be due to the hundreds of seed and flower items dropped by your arena generation (turn them into air before changing the block under). Players placing blocks anywhere outside the arena have the blocks turned to their color but if you place a block on the side of an owned block you can build into the arena with your color without controlling the area and build bridges across the wool (The highest block is counted right so skybridges will steal the money even if another team controls the ground.) So if I build off a tree, my own color, or from outside I can place blocks above the white wool. Maybe instead of checking what block you clicked on check the block below (if air keep checking) ect...

    EDIT_6: Ok well while exploring found... a random pink wool item... :confused: no idea where it came from... Was just sitting on the ground at the edge of an arena. Anyways more bugs. You can change wool to your color outside of the arena (found my old tests and they changed while being outside the arena). The wool change event is being called way too often there has to be a better way. I take one step and it runs about 10 times even while trapped in a box the OnPlayerMove event fires so many times XD. I've got a bunch of pics as well if you want them :) miniedit: O almost forgot snow has some strange effects... trying to traverse it was very difficult and got me stuck a couple times (jitter in place for a while)
     
  10. Offline

    CrossBread216

    That would solve the wall issue, but make it impossible for a team to ever lose territory to another unless each individual block of wool was destroyed, or wool was placed 3 blocks above the territory and then captured.

    That might be possible, I'll have to look into it.

    Just tested and it worked fine for me. Y= the level of the floor, not how many down to go. So if you used 10, then wool spawns from Y=10 to the ceiling, Y=127 (on white-listed blocks.)

    That's exactly what I tried to do. I think my inequality is off by one, so the last layer (which would be unbreakable) does not spawn.

    Yes, yes it does. Apparently I had the luck to only test it on wool whose color did not match my team and so I was not able to "build" fire on the block. I should be able to cancel it from spreading to the wool though.

    I have absolutely no idea. I haven't played with maps at all. Once other functionality is in place, I'll have to revisit this.

    Again, thanks for the feedback.

    @dak393 Thanks for the awesome feedback and detail. I read through it once earlier, but I didn't have time tonight to reply in detail or to look at a lot of the issues you raised in detail. I think spawning a large area of wool will wither have to be done based on config on server start up so that the wool is simply part of the map download, or if it need's to be dynamic and done at runtime, I'll segment them into chunks of 10,000 blocks or something and schedule them to be applied 1 second apart. Actually, 1600 x 1600 x 10 is ~25 million blocks. That would still take 250 seconds if they were spaced 0.1 sec apart. So basically, large spawns will have to be on startup. The only runtime alternative I see is to just put a "blanket" of wool across an area. So, one wool on top of everything in the arena. If that wool is ever destroyed, THEN the next non-air block below it will become wool. Any wool blocks at the floor Y value of the arena would just be unbreakable.

    @Statharas
    I fiddled with fire/wool a bit and here's what I decided/discovered.
    Discovered:
    1. I suck and forgot to register the fire related listeners with their respective events which is why nothing worked.
    2. When a block "ignites" it's actually the block of air next to the block that becomes flame.
    3. Same for when it spreads.
    4. Wool seems to take damage from adjacent fire, before the block ever "ignites"
    Decided:
    1. The player cannot place "fire" (which you shouldn't have anyway) on a wool block in the arena. (side, top, whatever)
    2. The player cannot light a block of wool on fire in the arena.
    3. Fire cannot spread to air blocks directly above wool in the arena.
    4. Fire CAN spread along the sides of wool in the arena.
    5. Fire cannot spread to wool blocks in the arena.
    6. Wool cannot be destroyed by fire (even if it is on fire) in the arena.
    7. Fire CAN spread across the arena boundaries.
    #4 above is because in the instance where you have [Wool][Air][Leaves] or something similar, and fire is trying to spread to the air, the wool block should not prevent the leaves block from catching on fire. This also means that fire could spread to a wool wall and will eventually light the whole outside of the wall on fire. This could either be intentional to create a stronger defense, or this could be offensive to hinder the owners building near the wall. Either way, any player can "pat out" a block that's on fire if they want it to go away.

    The attached SNAPSHOT jar had the new fire behavior.
     

    Attached Files:

    Last edited by a moderator: May 18, 2016
  11. Cool, what about the Y limit?
     
  12. Offline

    dak393

    @CrossBread216
    Well what I figured was that it was stuck in a loop because it took WAY too long for the area it was changing not to mention ram and cpu were pretty constant. Also when I loaded up the world it had done its job and filled in the entire arena so its not like I stopped it midway through. The notice of the lighting not being updated coming up multiple times makes it seem that way as well unless you programmed it to run that many times.
    @Statharas
    You still on? I could throw up the test server and see how it plays with multiple people :)
     
  13. Offline

    CrossBread216

    Actually, that lighting message isn't mine, it's from bukkit or the MC server or something. if you just did a /ww arena 1000 1000, then the implied Y value was 10 below you. So with the off-by-one bug, you spawned 9 million blocks in ONE event. I think you'll have another lighting message for every million blocks sent. Heck, the server might be segmenting the updates and just giving you one for every group it processed.
     
  14. Offline

    dak393

    Ah ok XD although the arena generated fine... ? Want me to put the server up and we can test?
    Well did some more testing and it seems that what ever player move event you are using is wrong (correct me if I'm wrong but I believe there are multiple) the server is running a block change check every time a player moves their mouse. :(
    Well snow is still buggy. So much so that if you place a wool block on snow with the correct conditions you make a SNOW SLAB!!! (you can walk up them it becomes solid) but ya it still freaks out when move vertically on snow (I think ww sees it as a potential block to change or something strange) For checking to see if a block is placable you should do a check under to see if its your teams wool (ran into some more bugs with the way it is now) this would also prevent money stealing sky bridges :) Gonna take the server down now as it looks like no one is on
    Here is the snow block pic :)
     
  15. Offline

    CrossBread216

    Alrighty, took a little vacation, but I'm back. @dak393 , I'll look through all your recent bug reports an see how far I can get today. I'll post a new jar if I get to a point worth testing.
     
  16. Offline

    dak393

    OK sounds good :) how was your break?
    EDIT: O and BTW change the first post to have the correct file and maybe add a changelog ;)
    EDIT2: Found a bug while testing with a friend (looking good with 2 people though I suspect it will slow down with a full server) when walking near the edge of water the water is replaced with air (or possibly flowing water (8) instead of being left alone (or replaced with still water (9))) (Parentheception)
     
  17. Offline

    CrossBread216

    I don't know if I would consider this a bad thing. It seems ok to me to walk out of the arena to go do something else and come back later. I didn't want to prevent anyone from building something in their home, just because they are part of a Wool Wars team.

    As far as on trees and stuff. I think once a player lays down material on top of woo they own, building on it should be fair game. If they want to construct a wall of wood, I wouldn't want to prevent them from building steps on it.

    Does that sound reasonable, or do you have an argument for alternate behavior?

    [edit 1]
    That's a good point. The problem with that check is that you could get around it by having a skybridge 2 blocks thick (although that would be difficult to do.) Maybe it is a flaw in the game mechanic that should be reconsidered (as far as how $ is calculated). One option would be for $ to only be awarded for wool controlled between certain Y values. Or, that a skybridge is fine, that just means you'll need to go capture that area back from a team mate resourceful enough to build one of any significant size.

    [edit 2]
    I do try to exit that method immediately if there is no reason to think we might place wool. I believe I had an output statement that would tell me what I was standing on all the time in onPlayerMove though. I don't see any other way to detect wool should change color than onPlayerMove (which sucks for performance). An alternative would be requiring the player to use an item (maybe wool?) and check the ground below them whenever they click (or hold possibly). There would be a lot of clicking, but at least it would be easier on the server.
     
  18. Offline

    dak393

    No that makes sense I wouldn't want to prevent wool use outside of the arena idk maybe if they turn off wool wars to build idk was thinking players would just be in the arena while the match is going on or they could leave (with a command) XD
    Well first off if you did a check for the first wool block under you couldn't build sky bridges at all without owning all the other blocks below 2 thick or not :)
    Ya still don't know any other options, it will have to do for now =/
     
  19. @CrossBread216

    Any new updates? It's close to being finished :D
     
  20. Offline

    CrossBread216

    @Statharas , @dak393
    Crazy work week. No new updates. I did grab everyone's feedback and create work tickets out of them to make sure I can get to all of it. Now that most of the basic wool capturing functionality is worked out, what I'd really like to focus on is getting all the features needed to start having fun at a basic level, even if they're a little buggy. Then, I'll go back and work over the bugs. Basically, I'd like to get on with something playable so we can see how real users try to abuse the system instead of getting bogged down trying to code in safe guards against whatever tricks we can dream up that might be used.
     
  21. Offline

    dak393

    sounds good looking forward to testing :)
     
  22. A 10 barrel TNT gun to destroy a huge base with only one person guarding it. EPIC. :D
     
  23. Offline

    dak393

    update?
     
  24. Offline

    CrossBread216

    @dak393
    I've only had time for some minor changes. Teams now have a score based on wool captured. I need to make it so that the team doesn't get a point for every wool in the stack. I don't really want to just check and see if it is the top wool in the stack because the player would have no feedback on what parts of their wool do and don't matter. I was thinking of giving any team with wool in the given x,z column credit for 1 point.

    In the grand scheme of things though, I've been thinking a lot about the general design of this plugin, and there are a lot of areas that could use a drastic overhaul. So, after I get this first version into playable condition, I will probably try to re-write most of it and make the gameplay/setup much cleaner and leverage other plugins to make it easier to code.

    Basically, for now I'll aim at the version custom tailored to this request for this specific server with its requirements. Later, I'd like to go back and do it the way I would have if there were no requirements and see what you guys think of that version.
     
  25. Offline

    dak393

    ok :) if you are checking per column maybe it should be majority control. (although if teams hide wool tunnels onder they could gain lots of cash XD) anyways if you wanted world has a couple functions:
    Code:
    Block     getHighestBlockAt (Location location)
         Gets the highest non-empty block at the given coordinates.
    Block     getHighestBlockAt (int x, int z)
         Gets the highest non-empty block at the given coordinates.
    int     getHighestBlockYAt (int x, int z)
         Gets the highest non-air coordinate at the given coordinates.
    int     getHighestBlockYAt (Location location)
         Gets the highest non-air coordinate at the given Location. 
    Hope that helps :) (I'm working on a plugin with another developer now so I'm kind of busy but if you have anything to test I'll do it when I get a chance :) )
     
  26. Offline

    CrossBread216

    @dak393 I forgot that those were there, thanks for the suggestion! I'll have to see if that ends up being a little more efficient.

    I'll let you know when I get a build with enough to be worth testing, thanks.
     
  27. Offline

    dak393

    no problem :)
     
  28. So guys, fill me in, i've been away :D
     
Thread Status:
Not open for further replies.

Share This Page