[FUN/MECH] Outposts v2.2 - War Economy Plugin [1060]

Discussion in 'Inactive/Unsupported Plugins' started by dkramer, Aug 16, 2011.

  1. Offline


    Outposts, A Capture the Points Economy System.
    Version: 2.2


    (You need iConomy, BOSEconomy, Essentials, or Multicurrency for this to work). Players can create groups that gain money over time based on the worth of the outposts they create. They can also capture other groups' outposts for a profit. An outpost is a 4x4 square of bedrock spawned when the /ocreateoutpost command is called that is filled with a block (smelted cobblestone by default). To capture an outpost that another group holds (make sure your active group is set to the group you want to get the outpost first), mine out the blocks already in the outpost and place the same kind back into the 2x2 area inside the 4x4 ring (smelted cobblestone by default). This graph explains how much money is earned per outpost on every timer tick (the timer length can also be customized), and the 3 variables in OutpostsSettings.yml can be changed:


    Here's a quick video about the plugin:

    This video is a bit out of date: now you can appoint others as founders if you are the group "leader". The person that creates the group is the leader. Also, some codes have been changed around, so check the changelog. Also, the text colors are better :3


    None right now. They will come soon.


    Show Spoiler
    Show Spoiler


    description: Relays command codes so you don't have to memorize them or look on this thread.​

    /ocreategroup <name>
    description: Creates an outpost group if this player has enough money.​

    /oplayer <name>
    description: Checks what groups a player is in.​

    /ocreateoutpost <group>
    description: Create an outpost for this group.​

    /ogroup <group>
    description: See information about this group.​

    /oaddplayer <player> <group>
    description: Adds this player to this group if you are the founder of the group.​

    /oremoveplayer <player> <group>
    description: Removes this player from this group if you are the founder of the group.​

    /oaddfounder <player> <group>
    description: Adds this player as a founder of this group if you are the leader of the group.​

    /oremovefounder <player> <group>
    description: Removes this player from this group's founder list if you are the leader of the group.​

    /osetactivegroup <group>
    description: Sets this as your group for taking over points.​

    description: Returns the distance and group for the closest outpost for a fee that can be changed.​


    Source Code: http://dl.dropbox.com/u/36326695/OutpostsSource.zip

    2.2 http://dl.dropbox.com/u/36326695/OutpostsV2.2.zip
    2.1 http://dl.dropbox.com/u/36326695/Outpostsv2.1.zip
    2.01 http://dl.dropbox.com/u/36326695/Outpostsv2.01.zip
    2.0 http://dl.dropbox.com/u/36326695/Outpostsv2.0.zip


    Extract Outposts.zip. Insert Outposts.jar into your plugins folder.


    OutpostsSettings.yml is where all of your customizing will take place. It is created after you start up the server and is updated whenever you install a newer version and start the server.

    This is an explanation of the variables in it:

    Show Spoiler
    Show Spoiler
    Show Spoiler
    Show Spoiler

    allblockscanfill: can any block fill the 2x2 area?​
    moneytimerminutes: length (in minutes) of the timer ticks for group money​
    rangeofdecay: explained in the graph above^^​
    outpostcost: How much it costs to make an outpost​
    maximumnumberofoutpostspergroup: self explanatory​
    minimumoutpostdistance: minimum distance an outpost can be from another one. I recommend no less than 5​
    getclosest: can people use /ogetclosest?​
    fillblock: what block should fill in the outposts?​
    maxmoney: explained in the graph above^^
    minmoney: explained in the graph above^^
    costtocreategroup: How much it costs to create a group​
    buildcap: Maximum amount of outposts that can be built in a group (the rest needs to be captured)​
    getclosestcost: how much it costs to use the /ogetclosest command​

    • Find bugs
    2.2: Might have fixed the wrong block placement issue and others
      • You do not need new .ymls anymore since it will automatically add in new variables
      • Added in a build cap to the .yml. This is the maximum amount of outposts that people can build, the rest will need to be captured. It defaults to your maximum number of outposts per group
      • ogetclosestcost added to the yml. It defaults to 1.
      • changed ogetclosest so it returns the distance to the closest outpost that is not controlled by a group of yours for a fee of ogetclosestcost in the .yml
      • fixed a small text error with ogroup
      • cleaned up some text colors
      • Message to your group members when your group takes over a point
    2.01: Changed something that may help with a certain error that may or may not come up... just to be safe

    Show Spoiler

      • right click an outpost block to get information (you need to have nothing in your hand and right click a block inside the 2x2 area)
      • fixed onblockplace and onblockbreak null pointer exception errors
      • fixed a small configuration error
      • fixed it saying you lost an outpost at x:0 y:0 z:0
      • made it more efficient
      • made allblockscanfill in the .yml. Set it to true to allow any block to fill the 2x2 area.
      • made it easier to read
      • first one to make the outpost is now the leader. leaders can set and remove people as "founders". These founders can add and remove players from a group.
      • getclosest is now in the .yml and I have removed the one permission to make it easier. Set it to true for the players to be able to use the /ogetclosest command. It's true by default.
      • changed /oaddtogroup to /oaddplayer
      • changed /oremovefromgroup to /oremoveplayer
      • added /oaddfounder for the leader of a group to use
      • added /oremovefounder for the leader of a group to use
    1.6: fixed money being split to only online players
    1.55: Fixed /oaddtogroup and /oremovefromgroup errors.
      • Fixed an onBlockPlace error that wouldn't let you get to your true maximum number of outposts
      • updated economies to support iconomy, boseconomy, essentials, multicurrency
      • money is only split between players online now
      • message when a outpost's block is destroyed
      • message when a group takes over a point of yours
      • fixed another /ogroup error, this time about how much money it earns
      • when using /ogroup on a group you are in, it tells you the locations of outposts your group controls
    1.25: Really fixed the /ogroup error this time. Silly .equals().
    1.24: Fixed an /ogroup error not displaying how many outposts that group has
    1.2: Fixed 1.1 errors... that's what you get for not waiting to release an update
    • cleaned up some code
    • /ogroup tells how much the group earns total now
    • tells you how much the outpost is worth when you make one
    1.0: Release

    cadwal, olimoli123 and Zothen like this.
  2. Sounds interesting. But dont forget to keep things as open and configurable as possible - economy systems can vary a lot and not everybody might want that!

    If you dont mind I would like to suggest to add a toggleable limit that can restrict the construction of new outposts (buildcap). E.G. you can have a max of 5 outposts total and a build cap of 3 - it would mean that you can only capture outpost 4+5 to reach the limit!
  3. Offline


    Oooh, good idea. I'll see what I can do.
  4. Offline


    My server is always open for testing your plugins!
  5. Offline


    Awesome! Message me the IP if you don't mind.

    I updated to 2.1. The main deal is waaay better backwards-compatibility with older versions, meaning that you do not need to insert a new .yml and edit it again, it automatically adds any new variables whenever you start up the server.
    @Zothen I also added a build cap. If you are coming from an older version, outposts in your data file default to "not built" because there is no way to tell through code if they were built or captured before this update.
  6. Offline


    I've done just about everything I wanted with this plugin, so I have released the source code. Have at it!
    This also means that I will be working on a top secret plugin (that came to my thoughts from a night of insomnia) in the meantime.
  7. Offline


    So permissions are not coming fast? :(
  8. Offline


    It'd be cool if the outpost groups could be permissions groups. It'd be easier for admin to control it.
  9. Hi @dkramer , I had a talk with Elgar, the towny dev, and he said its possible to hook into the towns and use them as groups!! *drool*
  10. Offline


    Hey, that's pretty neat. I'll have to chat with him and see how to do that.
  11. Just fyi, hes online on IRC quite often - theres a link to the channel on the towny thread.
  12. Offline



    And SimpleClans also has an API ( @phaed ) which you maybe could hook into? I love the plugin, we simply dont want to create new groups besides our exisiting clans....
    Defiant_Blob likes this.
  13. Offline


    Looking into supporting it now. I'll probably have the update later today.
    Defiant_Blob and GmK like this.
  14. Offline


  15. Offline


  16. Offline


    That would play nicely with a pvp server.
  17. I getting the following error, can you help me?
    2011-09-08 17:37:39 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'o' in plugin Outposts v2.1
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:478)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NumberFormatException: For input string: "1250,00"
        at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
        at java.lang.Double.parseDouble(Unknown Source)
        at me.dalton.outposts.Outposts.format(Outposts.java:219)
        at me.dalton.outposts.Outposts.onCommand(Outposts.java:385)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 13 more
  18. Offline


    @luuky19 you have to change "1250,00" to "1250.00" or just simply "1250".

    @others, I've had so much work for the past few days, so I haven't been able to work on implementing SimpleClans yet :[
  19. if my config it is 1250 and not 1250,00
  20. Offline


    That was my intention! Some sort of chaos/pvp/roleplaying server I was thinking.

    That is certainly odd... have you tried it using 1250.00? I have no clue what the problem is.
  21. Offline


    How does this work if people put this in a build protected area such as a Towny town? Would others be able to invade the town and destroy the blocks to replace em if the Town is build protected from others?
  22. Offline


    It doesn't work like that how it is now... I'm not sure how I would get that to work :[
  23. Offline


    That is the biggest bummer and I totally understand how it may not be possible. What we are going to do is only let mods build outposts and have players able to create groups/guilds to take them over. However permissions support would make this a lot easier. Right now we just have it set so outposts cost $1,000,000.
  24. A minimal distance setting between Outposts help at least a bit, so you can only place a single outpost on protected land! Depending on how may outposts max/min and how you weight money gain this works quite well!
  25. Offline


    @excalibr23 @Zothen
    I will see if it has some sort of API and go from there.
  26. Offline


    Could it be with color coded groups instead of smooth stone???
    Something like the CaptureThePoints. That would be easier to identify each group. And problably see everyone using their group color would be funny.

    Anyway having it set up to give money just by existing and be near another outpost I think doesnt make it valuable.
    Im looking more into using this as a kind of city thing, so people would need to defend their cities really.

    For the next suggestion some features would need to be added such:
    - Setting on which outpost you are living in.
    - Make an outpost(city) be protected (with world guard for example) until an attack is declared so some zones get unprotected allowing an actack.
    - Protected area bought by a price (using world guard protection).
    - Attacks be declared. ( by high ranks in the group. Having not only the leader maybe??)

    I think some formula using for example: number of people living in that outpost, the number of attacks, size, etc

    I could go on and on, but I dont know what you think of it so far. I would like to ear some feedback.

    NOTE: I havent tried it yet. I may do it tomorow or so when I have time.

  27. Offline


    Color coded groups would be difficult to add in at this point and are more of a luxury, really :(

    My line of thinking was that if you controlled two points that were close together, it would be easier taking over one and quickly grabbing the next for your enemies.

    I've pretty much discontinued my work on this project, so if someone wants to take over and add your other suggestions in, they can go ahead.
  28. Offline


    If outposts is set to only be capped by smoothstone, people can cap with smoothstone then break the stone they placed and replace it with obsidian. The outpost is still then captured for them. This needs fixed asap!
  29. Offline


    I'll look into it.

    hmm... I don't see a coding issue,but there may be one. Do you have "allblockscanfill" to true?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 18, 2016
  30. Offline


    I do not.
    Nope, I check that too. However, I am on the Dev build of CB 1152. It's 1.8.1 server. Would this have any effect?
  31. Offline


    I do not think so. I'll look over the code tomorrow, sorry :(

Share This Page