Ok, so I have 2 of every weapon laid out underneath my counter, ready to hand it out to whoever comes by. So, I save, log out for the night, and when I come back, all the weapons are dismantled. Is there any way to stop that happening? Because I really don't want to remake all my weapons on every restart.
Weapons dismantled upon restart
Yeah, it was pretty annoying. A customer came in and asked for a greatsword, I grab the greatsword, and it leaves behind the handle and guard xD
I can see how that solution could work. I would have to potentially rewrite the system I currently have to make it work that way. Which is scary but is necessary. I'll look into it. Hopefully I can find a way to implement it without changing to much. Thank you!!
Ya I thought of doing that but when I eventually add in the butt load of parts. Creating different combinations for each will be a nightmare not to mention the file size will increase exponentially. I won't be able to send the files to Itch.com if it exceeds 500mb.
But not ruling this idea out. If all else fails, I might have to consider it.
Maybe you could get it hosted on GameJolt. 1GB and you can get more if you demonstrate that your game actually needs it to the admins.
Hi, I'm a big fan of the game and a hobby programmer so I won't pretend to know the specifics of what language or environment you develop in but would it not be possible to theoretically have an array of "attached parts" where each group of attached parts is an object with a constructor method containing parameters for grip, guard, and metalwork? You may need separate constructor methods if you want to make 2 specific parts mandatory in all the possible combinations, but the point being that you would take finished weapons out of this array when disassembled on the anvil or sold.
I have no idea what system you're using currently to attach and detach weapons but it is the most catching feature of this game (in my eyes) so I understand if it's a complex subject. I would love to see a post on the subject if you ever felt like writing about the systems you use to track that part of the game!
By no means would I consider myself a programmer so my knowledge of the field is very limited. What I am doing is very basic and what you outlined, from what I understand is in fact what i'm doing. The "Attached parts are being added to an array" once they are dissassembled, they automatically leave the array. Let me know if I missed something from what you said. The issue comes where I'm doing boolean checks to make sure certain conditions are fullfilled before connection or disconnections. Sometimes the booleans don't fire or I didnt set it up properly so there would be conflicting logic that null a command.
What I use, mainly, is Unreal Engine 4's blueprint system. I don't write any "code" per say. Not yet. I'm still learning C++.
Thanks for the reply, that's really cool it seems we both sought a similar solution! If it's an issue of when those booleans are being checked, perhaps you can dedicate some resources at the beginning of a day or when a save is loaded to a "loading screen" where these finished weapon values can be thoroughly checked before the player loads in? Even if it took a while, I think most players would take that tradeoff gladly.
I've also noticed that around 50% of the time a weapon constructed the day before (or earlier) will not be recognized as a complete weapon and you'll need to disassemble/reassemble it for a customer to take it - perhaps that's a similar situation.