• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Custom house system - build your own house

Zothion

Veteran OT User
Joined
Apr 28, 2014
Messages
1,092
Reaction score
394
So I've worked a little bit on a system to allow players to actually build their own houses, like in minecraft.
Some examples:
https://zippy.gfycat.com/WarpedBrownChickadee.webm
-- doesnt seem like i can show the gif directly in the thread :(
I currently don't have any good program to capture a gif/video and I'm leaving very soon, this is the best gif for now, will update after the weekend when I'm back home, but you can see the basis of it. Using the hammer on the ground brings up a build option menu, or using the inkwell will mark positions and then allow you to build that entire area (probably only going to allow it for ground/wall to save time).
d534826cb477f8aa8facc8d3d419e9c4.png

example of the build option menu
58f581437aaaf8b9334b94d97119f1c2.png

example of the area build option menu
1e4edd96a12cbdffa8c851bfcd5853c4.png

successfully built
5c6545258ec29fae6def92eca206f899.png

you cant place walls in dumb spots, they have to make 'sense' (i went pretty lax on restrictions, current ones are that they have to connect to another wall, or door, and doors can be placed anywhere, you can also not place a wall next to another TYPE of wall/door, to prevent really dumb looking things)
f70f1240ddaf45f4364aa092c4150f88.png

example of an incredibly shitty house built by myself (wouldve built it more to the right but tiles dont exist there, so couldnt, but not an issue in a normal environment.)

currently the system works perfectly fine, it just has very things buildable things added
- material cost/check works
- building everything in build options menu work
- adding new items take about 15 seconds each
- saving the house works fine, can be saved by manually triggering it with !saveHouse (which will kick the player to prevent any kind of duping or w/e), or every server save it saves every house, or onLogout if the player has built something
- loading all custom houses on startup works without any issues

things i still need to do:
- add roofbuilding
- add most of the house walls/things you should be able to build/have in a house
- create sub-menus for walls/ground/doodads etc
- fix names/material formatting in build options menu

if anyone has any suggestions at all for improvements / things that should be added / things that you dont like / whatever please leave a post :)
 
Last edited:
Maybe don't show the needed materials, only pop-up a modal window if the player doesn't have the items and maybe add a button to check information about the item (you could use showTextDialog with the itemid of the option)
 
Maybe don't show the needed materials, only pop-up a modal window if the player doesn't have the items and maybe add a button to check information about the item (you could use showTextDialog with the itemid of the option)
edit: mkalo > me
im going to make the 'info' button popup a textDialog with materials needed / if the item has any special instructions (such as walls), and the modal window you came from that opens after you close it
if the player doesnt have items, it currently does a doPopupFYI window that says
materials needed
what materials you are missing
 
Back
Top