Jump to content

Crafting Nails Mod


Shivster

Recommended Posts

Ok so i'm new to this modding thing. And one thing that drives me mad is that i cant build the fort i wanted cuz of the scarcity of nails. So i made this little mob to fix one of my issues. I think in its current form it is very harsh. But like this game i like this mod for that reason. Big thanks to RobertJohnson & Robomat For the help with syntax.

Download:
https://www.dropbox.com/s/n8uw2swjgu3lc0b/Crafting%20Nails%201.4.rar
Just download, unzip, and drop the Folder into C:\Program Files (x86)\User\Your name\Zomboid\Mods.
v1.0.4

Things i will be adding later:
-need of a camp fire kit to forge nails(once i can get it to work). DONE thanks RoboMat!
-add Ingots to possible loot and as a item. Done Tyvm Kinyoshi and 7Roses!
-Make some tweeks to the amount of nails you get to make it more of a real return.
 
The mod is finished i have made one last change to make it mod loader ready.
Ok one last change added. You can now smelt Silverware to make ingots.
 
Here is a list of what you can make with this mod.

 
recipe Smelt Silverware 
Spoon/Fork/ButterKnife
Spoon/Fork/ButterKnife
Spoon/Fork/ButterKnife
keep campfirekit
Result:Ingot
 
recipe Make Ingot
Pot/Pan/RoastingPan/Kettle
CampfireKit
Result:Ingot
 
recipe Make Ingots
Shotgun/Pistol/Axe/Sledgehammer/ShotgunSawnoff/Crowbar
CampfireKit
Result:Ingot=2
 
recipe Make LogMold
Log,
Nails,
keep Screwdriver,
keep Hammer,
Result:LogMold,
 
recipe Forge Nails
LogMold,
Ingot,
CampfireKit,
Result:Nails=4(that = 20nails),
 

 

MODS_01.png

Link to comment
Share on other sites

can't you add a script so you don't need to overwrite?

 

something like

 

createNails.lua

require "Items/SuburbsDistribution";craftNails = {};craftNails.MOD_ID = "craftNails"; craftNails.distribution = function()  table.insert(SuburbsDistributions["all"]["crate"].items,"Nails.Ingot");  table.insert(SuburbsDistributions["all"]["crate"]["items"],1.1); -- the .items or ["items"] are equivalentend Events.onGameBoot.Add(craftNails.distribution);

this should let you add items to the table of SuburbsDistributions without the need to overwrite the file itself.

Link to comment
Share on other sites

can't you add a script so you don't need to overwrite?

 

something like

 

createNails.lua

require "Items/SuburbsDistribution";craftNails = {};craftNails.MOD_ID = "craftNails"; craftNails.distribution = function()  table.insert(SuburbsDistributions["all"]["crate"].items,"Nails.Ingot");  table.insert(SuburbsDistributions["all"]["crate"]["items"],1.1); -- the .items or ["items"] are equivalentend Events.onGameBoot.Add(craftNails.distribution);

this should let you add items to the table of SuburbsDistributions without the need to overwrite the file itself.

 

 

I'm using the format RoboMat and others use. Edit: Boy I sound rude :P

-- ================================================ ----     Crafting Nails Mod    ---- ================================================ -- require "Items/SuburbsDistributions"; CraftingNailsMod = {}CraftingNailsMod.version = "1.0.0";CraftingNailsMod.author = "7Roses";CraftingNailsMod.modName = "Crafting Nails Mod"; -- -------------------------------------------------- Functions-- ----------------------------------------------------- Prints out the mod info on startup.function CraftingNailsMod.init()print("Mod Loaded: " .. CraftingNailsMod.modName .. " by " .. CraftingNailsMod.author .. " (v" .. CraftingNailsMod.version ..")");end -- -------------------------------------------------- Item distribution-- ------------------------------------------------table.insert(SuburbsDistributions["all"]["crate"].items, "Nails.Ingot");table.insert(SuburbsDistributions["all"]["crate"].items, 10); -- -------------------------------------------------- Game hooks-- ------------------------------------------------Events.OnGameBoot.Add(CraftingNailsMod.init);
Link to comment
Share on other sites

:P it's the same format I discussed with them :)

only the difference with my format is that the init is changed into a load,

this because my PZMLoader and PZMLLittle search every modtabe to find that function and then execute it.

Link to comment
Share on other sites

Yep ill work on that now. Haven't had much time to look at forums lately  sorry about taking so much time to respond. Been working hard on my Jerky Mod been trying to make it cook the way i want it to. adding charcoal to the game and lots of ingredients and time is running out my goal it to have it done by 2.9.9.11 release.

Link to comment
Share on other sites

ok changed to a different file, so no more overwriting but since i have you here what do you think about the amount of nails? should i raise it lower it or leave it?

aa well I dont play PZ much (I'm terrible at it, much better at creating or aiding modders then playing :))

will try it out today

 

you actually already have a problem, the distribution file is a lua script, so the extension should be .lua not .txt (it isn't loaded at the moment..)

also can you change the directory for that file to /media/lua/mods/CraftNails/.. ? then its faster to find for deinstall/install or just for organizing what is from PZ and what are mods for PZ :)

Link to comment
Share on other sites

aa well I dont play PZ much (I'm terrible at it, much better at creating or aiding modders then playing :))

will try it out today

 

you actually already have a problem, the distribution file is a lua script, so the extension should be .lua not .txt (it isn't loaded at the moment..)

also can you change the directory for that file to /media/lua/mods/CraftNails/.. ? then its faster to find for deinstall/install or just for organizing what is from PZ and what are mods for PZ :)

 

Hehe i did that with my file just not the one in the folder will fix that and the directory as requested.

Link to comment
Share on other sites

Oh haha pardon me I'm new to the forums, could you point out where that info is so I may see it in the future? Also thanks for the response ill be using this mod with extreme happiness

This may seem like a stupid question but how do you make the camp fire kit ^.^

Link to comment
Share on other sites

the tag mostly are found right under the topic title,

most authors of mod topic place the tag that contains the version as different tag, this makes those tags found on the forum as a pre text of the topic itself

for exampl this topic should have been found on the Complete mods > wapons/items forum with next title:

 

[2.9.9.10] Crafting nails mod

 

as of your question of the campfire, try 3 wooden planks, not sure if you need anything else like a saw or so but at leas you need 3 planks of wood :)

Link to comment
Share on other sites

  • 3 months later...

I like the idea behind this mod, but is there any way we can smelt ingots with a campfire (and maybe a frying pan?) out of things like tin cans, busted hammers, knives, and most importantly SILVERWARE!  Lol.  Would be nice to have a use for all those spoons...

 

also, it seems that i cant download it from pzmods.net, says the file is gone from your dropbox :(

Link to comment
Share on other sites

  • 2 weeks later...

Smelting :cool:

 

 

EDIT: Now seriously:

recipe Make Ingot:
Pot/Pan/RoastingPan/Kettle,
CampfireKit,
Result:Ingot,
 
recipe Make Ingots:
Shotgun/Pistol/Axe/Sledgehammer/ShotgunSawnoff/Crowbar,
CampfireKit,
Result:Ingot=2,
 
recipe Make LogMold:
Log,
Nails,
keep Screwdriver,
keep Hammer,
Result:LogMold,
 
recipe Forge Nails:
LogMold,
Ingot,
CampfireKit,
Result:Nails=4,
 
 
Hope it helps :)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...