Inactive [FUN/RPG] Tent v0.05 - create a quick house quickly [1060]

Discussion in 'Inactive/Unsupported Plugins' started by ashtheking, Jul 17, 2011.

  1. Offline

    ashtheking

    Tent
    by Ashtheking

    Did you ever need a shelter quickly? You are far away from the nearest server city, the sun is setting, and you have nothing but some wood. You have to dig a tiny hole in the ground or in a mountain and stay the night. And when you leave the next day, there's a ugly hole in the side of the mountain or in the ground. Well, this is the plugin for you. Simply place your specified block, a sign with the first line as "[TENT]" by default, and right click it. (Specify in the config file [/plugins/tent/tent.config]). You get an instant Wool house, containing a torch and a bed. [Size specifiable in the config]. Break any block inside this cuboid, and the entire thing disappears. Don't worry, you regain your sign / custom block. Tents are saved on disable, and loaded on enable, so server resets don't give the player free wool.

    Permissions:

    Bugs:
    --Drops a torch on removal. Fixed​
    --Changing sizes creates problems when removing the tent.
    Please email ag4ce@hotmail.com OR post here with any bugs NOT in this list.


    TODO:
    Changelog:
    Show Spoiler

    • Version 0.05:
      • Modified generation code to add a hole for a door, amongst other things
      • Fixed this nasty little removal bug
    • Version 0.04:
      • Changed shape of tent @_GWG_SheepKiller and others
      • moved workbench / chest / furnace to a per tent basis, but have not implemented a way to set them yet.
    • Version 0.03:
      • Major overhaul
      • Fixed generation failure
      • Fixed duplication and saving bugs @feildmaster
      • Added customizable block for tent (default is WOOL)
      • Added workbench / chest / furnace generating. On removal, chest items drop.
      • HUGE THANKS to @feildmaster
    • Version 0.02:
      • Added config file
      • Added Bed and Changeable Activation Block and Sizes
    • Version 0.01:
      • Created Plugin


    Images (Default Settings):
    [​IMG]
    [​IMG]
     
  2. Offline

    nausir

    Im gonna try this right now
     
  3. Offline

    ashtheking

    added pictures.
     
  4. Offline

    Plague

    please update to latest recommended, new one came out today
     
  5. Offline

    ashtheking

    Oh, sorry, i was using a base title thing. It's compatible.
     
  6. Offline

    noahwhygodwhy

    maybe a new feature, a config to control if a bed is included, or maybe how many torches...or maybe the size, just asking for more options when determining the look of the tent...
     
  7. Offline

    fuzzycut

    Was this based on tentthis? Either way, AWESOME! Mayhaps you could add custom tents? And a custom starter block so you can use something other than signs. Make the tents a little bit harder to come by, and more of a reward.
     
  8. Offline

    Zerafas

    looks awesome, sounds useful for servers with armies on the constant march. For ideas, maybe places a bed, maybe make a cost to create a temporary tent, with certain items, customizable sizes (aka put a 2 or higher for larger sizes under [Tent] with 1 being the default), as already said by noahwhygodwhy.
     
  9. Offline

    maetthew

    Haha this is epic! Will try out ASAP
     
  10. Offline

    ashtheking

    No, i thought of this by myself. I'll see what i can do for the size, bed, and cost. Perhaps using my multicurrency. It needs X <currency>, as set in the config, to create a tent.
     
  11. Offline

    DivineKyuuji

    How about being able to select an area in-game and using a command to set it as the default tent. That way we could build the tent that players will use.
     
  12. Offline

    ashtheking

    That would mean i would have to pretty much rewrite all my code. What i have right now is basically world generation. It's radically different from copying and rewriting a section of blocks.

    Added a few of your suggested features. @Zerafas @fuzzycut @noahwhygodwhy

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

    noahwhygodwhy

    hmm, sorry about the code rewrite, didn't think about that, but thanks for adding the size feature.
     
  14. Offline

    ashtheking

    Oh, that was to Divinekyuuji.
     
  15. Offline

    Dr0iDzz

    Great!
     
  16. Offline

    fuzzycut

    @ashtheking
    Thanks for adding that! Question though. With the custom size, is that just like a radius type thing, or can you make your own custom tents? Cool though, thank you.
     
  17. Offline

    ashtheking

    It's a multiplier for the size. Size 2 means it's 2 times as large. I really don't have a better way to have custom sizes.
     
  18. Offline

    EdTheLoon

    For custom tents I can only think of two options:
    • Build a tent and then use a command to 'save' it and then you can later load it again as a tent.
    • Use some sort of external model file - this is probably not going to happen
     
  19. Offline

    Zerafas

    Will the tent disappear after sleeping or going out of a certain range of the tent? and is it also possible to make the tent look a little more 'tentish'? =p. But thankyou for the previous update, appreciate the commitment.
     
  20. Offline

    Bronski

    There should be the noise of something being inflated upon use :p
     
  21. Offline

    ashtheking

    No, it doesn't disappear a certain distance away. I tried to make it viable, but small, so it couldn't pass for a legit house. 2 rows of space, with a bed in the center. It provides enough room so at daybreak, you spawn inside it, and there's room for you to place a workbench or something. Then you remove the generated stuff by breaking either the torch, the bed or the wall. You then pick up your sign / custom block, and any blocks you placed inside the tent, and be on your merry way. So i really can't make it look more tenty without making it suffocate the player when he wakes up, you see.
     
  22. How about you make the tents look like this.
    [air]
     

    Attached Files:

    • tent.png
      tent.png
      File size:
      228.8 KB
      Views:
      23
  23. Offline

    ashtheking

    Well, perhaps. I'll see what i can do, i'm busy today.
     
  24. Offline

    Shooty

    I have some ideas :

    • Add workbench & furnace & bed in the tent only if the players had them in their inventory.
    • Add iconomy support (players don't need to have the shape for make the tent)
    • Add folding feature (right click in a special block in the tent ?)

    Thx :)

    (And sorry for bad english i'm french)
     
  25. Offline

    ashtheking

    Francais? Comment ca va? Also, there is a bed in there, i'll add an option in the config for taking it from the inventory, as well as the workbench and furnace. If you break any block in that cuboid, it "folds" the tent, and gives you back the sign / custom block. I'll see about iConomy support, i'm leaning more to my own money plugin. This is a RPG plugin, no? My RPG money plugin would be good for this. I realize that iConomy is popular, so i'll add that after MultiCurrency.
     
  26. Offline

    Shooty

    Merci ├ža va bien :) !

    Thanks a lot for add these features, can't wait :) !
     
  27. Offline

    ashtheking

    Moi Aussi! I'm glad to add features. Suggestions help the plugin grow, and make it better.
     
  28. Offline

    feildmaster Retired Staff

    Alright, So I've gotten some interest in this plugin.

    Bug: Roof is not protected (standard tent) Fix in code:
    Code:
    array.add(new Tent(uniqueId++, locX-(2*m), locY, locZ, locX+(2*m),locY+(4*m),locZ+(4*m)));
    The back-left-corner doesn't get processed, and the roof doesn't make a complete square... (Was this intentional?)
     
  29. Offline

    ashtheking

    No, i must have mistaken it. Thanks!
     
  30. Offline

    feildmaster Retired Staff

    That code might actually fix one other bug too now that i think about it.. ;)

    A few things:
    1. To fix the torch bug, remove furniture before removing the walls.
    2. /size conflicts with other plugins, suggest rename to /tent-size or /tent size
      • You shouldn't be pre-processing this command...
    3. Your imports are RIDICULOUS. Even if it looks nicer, it doesn't mean you should just import the entirety of bukkit/java/what-say-you.
    4. You aren't multiplying the "check" radius.
    5. placement of torch/bed are wrong...
    6. check had a typo...
    7. Just take this new source. Please. It'd make me happy, and you can study it. (I didn't fix ALL your errors... just most.)
    8. Also... Why? if(b.getWorld().hasStorm()) b.getWorld().setStorm(false);
    Suggestion: Add a door, Cover other blocks.
    #2: Save "size" in "tent"

    Now: If you look at my code, you'll notice that the torch STILL DUPES if you break it!
    Why does this happen? Because you do not set "setCancelled" until AFTER the tent is removed.

    What should you do?
    - Check if the block is part of the tent​
    - If it IS, cancel the event​
    - THEN remove the tent.​

    I hope this helps you, it sure has been a learning experience for me! And I'm sorry if I come off as mean/bossy/knowitall ish.
     

    Attached Files:

    Last edited by a moderator: May 18, 2016

Share This Page