psykikk Posted December 22, 2019 Share Posted December 22, 2019 some are probably already annoyed by me, as I am constantly writing about the same crap.. anyways : I am stilll trying to make it so that self fabricated metal barrels can be used as water collectors, PLUS act like world objects (being blocks you cannot move through). much like those... except witrh the added funcitonality of the mentioned collector barrels. I found a metal Drum in the recipes.txt and newitems.txt. I also found several lua scripts, mainly SMetalDrumSystem.lua, SMetalDrumGlobalObject.lua, ISMetalDrum.lua, CMetalDrumGlobalObject.lua, CMetalDrumSystem.lua I suck at lua and have no clue, but it seemed to me those functionalities are already in the scripts. only thing blocking us using those is the fact that the recipoy requires blacksmithing, which is not in the game (yet ? ) so I though heck, lets try it out. I changed the recipe to a welding one. added some stuff, subtracted some stuff. and it works. kind of. the object is created, YET it cannot be placed int he world. and it cannot be created via GUI. it certainly does not have the right attributes... it inherited all icons and weight and such. but it simply is not a world object but just somethign on the floor. so if anyone is actually reading down to here, PLEASE, help me out here. what am I missing ? thank you guys so much in advance ATPHHe 1 Link to comment Share on other sites More sharing options...
cerati Posted February 29, 2020 Share Posted February 29, 2020 I'm new to modding in lua and haven't revisited my amateur Java skills but you might have to call a method that tracks the coords of your mouse, call a method to return those coords to a variable and then send those coords into another function that calls methods to make it an item you can place and collide with. You really might have to decompile the source code and track down the mthods that allow you to do the things you want to do. I hope this helps. ATPHHe 1 Link to comment Share on other sites More sharing options...
ATPHHe Posted March 5, 2020 Share Posted March 5, 2020 (edited) I found this thread that talks about creating and manipulating world objects. I have no experiences on world objects but if I find more resources, I'll link them here. https://theindiestone.com/forums/index.php?/topic/8249-tutorial-world-objects/ Edited March 5, 2020 by ATPHHe Link to comment Share on other sites More sharing options...
ATPHHe Posted March 5, 2020 Share Posted March 5, 2020 Found another thread related to world objects. https://theindiestone.com/forums/index.php?/topic/7910-isoobject-making-my-own-isoobjects-onfillworldobjectcontextmenu-affecting-the-world/&tab=comments#comment-103942 Link to comment Share on other sites More sharing options...
ATPHHe Posted March 5, 2020 Share Posted March 5, 2020 Hmm, I can test this out and play around with lua code to spawn in a metal drum barrel now that I figured out how to do the recipe modifications you did. I'll post back if I have any results. Link to comment Share on other sites More sharing options...
ATPHHe Posted March 5, 2020 Share Posted March 5, 2020 (edited) There we go, after playing around with the lua coding for a bit, I managed to get the Metal Drum to spawn and be placed down. They can be interacted with. They can also be disassembled. (Disassembling the Drums will put them back in your inventory or on the ground) I'll PM you the mod folder which contains all of the recipes and lua scripts. If you have any questions about the mod, feel free to ask me. Here's some screenshots: Edited March 5, 2020 by ATPHHe cerati 1 Link to comment Share on other sites More sharing options...
ATPHHe Posted March 6, 2020 Share Posted March 6, 2020 (edited) Had to add this in because build 40 doesn't show the water percentage inside the metal drums. Other images: Edited March 6, 2020 by ATPHHe Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now