🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

Weapons dismantled upon restart

A topic by Sharayde created 178 days ago Views: 379 Replies: 13
Viewing posts 1 to 6

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.

that sound like a real pain. I could just feel the confusion going through when that happens

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

Developer

Hey guys,

because of the way weapons are combine, it's very difficult to have their connections saved. I'm working on a solution but it won't be ready for the next update. A temporary solution is leave your completed creations on the workbench. Sometimes they reconnect when the game is loaded.

(Edited 2 times)

I think I have a solution. Things are saved by there position correct?

So when you log back the items are still there but they are just detached.

So what about creating an I'd to each new item. Like the current Id for this item is 1. If you buy a new item that new item's Id will become 2. This makes each item unique.

The ids will work as a group connection Id. Like 1:2:3

1 is the blade. 2 is the guard. And 3 is the handle. The semicolon acts as that attachment between two ids.

Basically when the game saves the ids. If you load back in the game. The gamewill automatically attach those ids based on your save file. Fixing the issue that your having.

Developer

Hey Eprosync,

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!!

you can destroy the parts and create a complete weapon when the weapon is made. one single object for the whole weapon. if you break a weapon in the anvil, it destroy the weapon and creates the itens again. if you don't atach the pieces, but destroy the parts and creates a whole object as the weapon it may work better.

Like, if I atach a guard to a grip, it destroy both itens and creates a new piece. You would have to create every combination, one hand guard and fancy grip, one hand guard and normal grip...

Developer

Hey Micahmoraes,

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.

Thank you!!

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!

Developer

Hey Mackelsaur,

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.

Now we have to deal with another problem... The blades got heat when you load a save file. the only reason my shop did not burn is because every thing is fireproof lol.

I have the same issue, and on top of that every blade/hammer is heated. It looks pretty badass having a bunch of glowing red weapons lying around, but impractical when trying to move or sell them.. as they fall apart.