Serious discussion on gun crafting

Please don’t implement anything following the tag method that computers use. Use an iexamine:: that gets associated with the tool, OR use the pseudo item crafting like the CVD machines. The computer code is in dire need of an update (which I have tried to give it twice now and never been able to finish).

As for making generators work, maybe we should examine making it possible for jumper cables to connect to furniture/terrain, then having pseudo item crafting able to detect the jumper cable->terrain connection, and then be able to drain battery charge from the connected vehicle?

Also, as far as raw materials go, I’d like to see more along the lines of extracting them using chemistry than just digging them out of the earth. Things like gathering bat guano for phosphates or methane gas from rotten food, etc.

I did actually know of the kinetic puller and repairing and such, however the method that is currently in play forces the player to steadily extinguish his/her supply of bullets and tools around their area extremely quick if they’re playing Static spawn (the version i personally prefer), and eventually you’ll be traveling miles in vehicles to find materials just to keep that sad little zip gun fed. Yes, you probably could last quite awhile ripping pullets and guns apart, as you go, but eventually you’ll lose everything and move to clubs/knives/grandma’s head on a chain. Now, the second part of what you said is essentially a better reasoning for this mod, because you’re right, things like sulfur, ammonia, and hell even bullet casings are either naturally occurring or fairly simple to make with the right machine. But again, the current method for “self-sufficiency” in the game when it comes to guns is to eventually have all guns die out. To some, that probably sounds great, because “hey, game balance, in real life guns really Would die out if SHTF.” I argue no, if you had the means to continue a supply of guns/firearms, who in their right mind would want to live in a post apocalyptic world of just humans, much less monsters and ghoulies and hallucinations of my mom (shudder you stupid old cow, i wanted that bb gun.) with just melee weapons left where it may be a 50/50 chance if you with a bat or the psycho with the crowbar dies?

Anyways, my stupid gun-owners rant aside, I really want to see how long I can survive on this once I get playing again, and the thought of firearms eventually drying up makes the game very ugly to me. So this will probably never become main and I get that, but I would still like the mod at least for my own game play.

[quote=“vache, post:41, topic:10605”]Please don’t implement anything following the tag method that computers use. Use an iexamine:: that gets associated with the tool, OR use the pseudo item crafting like the CVD machines. The computer code is in dire need of an update (which I have tried to give it twice now and never been able to finish).

As for making generators work, maybe we should examine making it possible for jumper cables to connect to furniture/terrain, then having pseudo item crafting able to detect the jumper cable->terrain connection, and then be able to drain battery charge from the connected vehicle?

Also, as far as raw materials go, I’d like to see more along the lines of extracting them using chemistry than just digging them out of the earth. Things like gathering bat guano for phosphates or methane gas from rotten food, etc. [/quote]

Yes, i took a much longer look at the computer code last night, and could figure out a single way to get rid of the hacking bit, regardless of turning the failure rate to 0, so looks like the examine function is really all I got from it.
I agree with the chemistry extraction bit, thats actually how real firearm materials are collected anyways, not this minecraft magical furnace junk. Maybe you can urinate into a plastic bottle and get potassium nitrate out of it or something too. Still, the machines are my focus and where I need the most help with the code so far, gathering the materials is for later.

First, I think you underestimate just how much ammo there is laying around. I can almost guarantee that in every 4-6 sized city, there’s at least one basement holding enough firepower to kill every zombie in the city.

Second, it would probably be better to go the crafting pseudo item route. Basically, this lets you implement your recipe as a normal recipe that just uses the terrain/furniture you create as a tool. Let’s say you have implemented a lathe as a furniture, and it is actually 2 furnitures, f_lathe_off, and f_lathe_on. If f_lathe_off is connected to a generator that is powered, you can examine it to turn it into f_lathe_on, and it will drain a set amount of battery from the generator per turn. Next, your crafting recipe is implemented to require the lathe pseudo item, which is provided by f_lathe_on. However long it takes to craft the item will cause the lathe to drain power from the generator, and then when it is done, you can check the lathe again to turn it off (and turn off the generator as well if you want).

The big things I see needing implementation with something like that are: connecting and disconnecting jumper cables to/from furniture (or terrain), making furniture drain power from a vehicle it is jumper cabled to, furniture transformation on/off, making the furniture turn off automatically if it loses power (and interrupting any crafting going on in the process), and preserving this state information across saves.

Alternately, the furniture on/off could be abstracted so that it requires powered generator connected to lathe, and then the recipe tells it how much charge it needs to drain, but I think the first way is more realistic, easier to implement recipes for, and probably easier to create balanced recipes from. If it was on a per recipe basis you could end up with a 4 hour process that uses up 80 battery in one recipe, and a 1 hour that uses up 1000 in another, and you would have to implement charges from pseudo items.

[quote=“vache, post:43, topic:10605”]First, I think you underestimate just how much ammo there is laying around. I can almost guarantee that in every 4-6 sized city, there’s at least one basement holding enough firepower to kill every zombie in the city.

Second, it would probably be better to go the crafting pseudo item route. Basically, this lets you implement your recipe as a normal recipe that just uses the terrain/furniture you create as a tool. Let’s say you have implemented a lathe as a furniture, and it is actually 2 furnitures, f_lathe_off, and f_lathe_on. If f_lathe_off is connected to a generator that is powered, you can examine it to turn it into f_lathe_on, and it will drain a set amount of battery from the generator per turn. Next, your crafting recipe is implemented to require the lathe pseudo item, which is provided by f_lathe_on. However long it takes to craft the item will cause the lathe to drain power from the generator, and then when it is done, you can check the lathe again to turn it off (and turn off the generator as well if you want).

The big things I see needing implementation with something like that are: connecting and disconnecting jumper cables to/from furniture (or terrain), making furniture drain power from a vehicle it is jumper cabled to, furniture transformation on/off, making the furniture turn off automatically if it loses power (and interrupting any crafting going on in the process), and preserving this state information across saves.

Alternately, the furniture on/off could be abstracted so that it requires powered generator connected to lathe, and then the recipe tells it how much charge it needs to drain, but I think the first way is more realistic, easier to implement recipes for, and probably easier to create balanced recipes from. If it was on a per recipe basis you could end up with a 4 hour process that uses up 80 battery in one recipe, and a 1 hour that uses up 1000 in another, and you would have to implement charges from pseudo items.[/quote]
Unjokingly, that was “still currently beyond my understanding”. However after seriously looking at the portions of the source code that involve the CVD, it makes amazing sense, and is yet again how I envisions the progress so far, or at least how Noctifer was directing things.
However what I am not finding/understanding from the source code is how the recipe “knows” the player is near the furniture or pseudo-item. I assume that is the hooks that were referred to before?

What happens is inventory::form_from_map() retrieves all the furniture in range and retrieves its crafting_pseudo_item_type() if any and adds it to an inventory object listing all the crafting supplies in range when the crafting menu is entered. So all you need to do is define the furniture correctly and it’ll sort itself out.

I think I may have accidentally done so in trying to make the press as a “furniture” in the first place. However simply cloning the CVD in the inventory json seems too simple, I’m sure I’m missing something.

I think I may have accidentally done so in trying to make the press as a “furniture” in the first place. However simply cloning the CVD in the inventory json seems too simple, I’m sure I’m missing something.[/quote]
my understanding is it is a coders job to make the code very modular and simplistic to use. Hopefully it is less you forgot something and more our ingenious coders did lots of things very right.