Moleon Posted April 20, 2016 Share Posted April 20, 2016 Howdy! I really want to make some mods, like a manga books, anime cds and more freak items. I dont know how i can start... where i can learn how the code works? What is the name of the programming lenguage? i really want to know the first step that i have to do. In the future i really want to contribute to the hydrocraft! Thank you very much! Link to comment Share on other sites More sharing options...
Svarog Posted April 21, 2016 Share Posted April 21, 2016 (edited) Well if you want to make items you don't need to code. Items are in the scripts ZomboidInstallDirectory\media\scripts and that's a bunch of txt files that define various variables like what icon it's going to have, what are the effects on use, is it food etc. You'll need a .lua file that will add the to the loot distribution though. Making those is really easy. Go to %HOMEPATH%\zomboid\mods and create a new folder there. A generic list of what stuff goes where is in spoiler Spoiler | mod.info | poster.png | \---media +---lua | +---client | | \---ISUI | | ModUI.lua | | | +---server | | | ModRecipeFunctions.lua | | | | | \---Items | | ModItemDistribution.lua | | | \---shared | \---Translate | \---PL | Items_PL.txt | +---scripts | ModItems.txt | ModRecipes.txt | +---sound | ModSound.wav | \---textures Item_IconName01.png Item_IconName02.png Item_IconName03.png mod.info File in necessary for the game to recognize that there is in fact a mod to be read. It's a .txt file with .info extension, can create and edit with notepad What it needs is this. Spoiler name=Mod Template poster=poster.png id=MODID000 description=Descritpion goes here. The rest of that tree show a generic folder structure within the mod folder itself along with what types of files should be dropped where. Now, creating an item is easy, the file that contains the item scripts in above tree is ModItems.txt (It can be named anything else) you can look at any mod or the game files themselves for examples. There is a link in my signature to a thread with all my mods, feel free to download some and experiment by changing it. It's a good way to learn I think. On the bottom of that post is also a link to another thread where I listed all Item variables that I knew off. Also, feel free to PM me if you need any help. Edited April 21, 2016 by Svarog Link to comment Share on other sites More sharing options...
Moleon Posted April 21, 2016 Author Share Posted April 21, 2016 Thank you so much Svarog!!! I'm gonna try this weekend to do something and i'll tell you my progress. I really want to contribute with something to the community, because i really love this game! Link to comment Share on other sites More sharing options...
Moleon Posted April 24, 2016 Author Share Posted April 24, 2016 (edited) Hi again Svarog! I have been seeing your littering mod, and now i try this: In "ProjectZomboid\mods\Mymod\media\scripts" Cervezas.txt -> Spoiler module Cervezas { imports { Base } item FullBeer { HungerChange = -5, Weight = 0.8, Type = Food, ThirstChange = -20, DisplayName = Beer, Alcoholic = TRUE, UnhappyChange = -10, ReplaceOnUse = BeerEmpy, Icon = Beer, CustomContextMenu = Drink, CustomEatSound = PZ_DrinkingFromBottle, AlcoholPower = 1, } item EmpyBeer { HungerChange = -5, Weight = 0.8, Type = Food, ThirstChange = -20, DisplayName = Beer Empy, Alcoholic = TRUE, UnhappyChange = -10, ReplaceOnUse = FullBeer, Icon = Beer, CustomContextMenu = Drink, CustomEatSound = PZ_DrinkingFromBottle, AlcoholPower = 1, } } "ProjectZomboid\mods\Mymod\media\lua\server\items" MymodDistribution.txt Spoiler require 'Items/SuburbsDistributions' ------------------------ CustomEdibles ------------------------ ------------------------ FullBeer ------------------------ table.insert(SuburbsDistributions["kitchen"]["counter"].items, "Cervezas.FullBeer"); table.insert(SuburbsDistributions["kitchen"]["counter"].items, 2); table.insert(SuburbsDistributions["all"]["fridge"].items, "Cervezas.FullBeer"); table.insert(SuburbsDistributions["all"]["fridge"].items, 3); table.insert(SuburbsDistributions["bar"]["counter"].items, "Cervezas.FullBeer"); table.insert(SuburbsDistributions["bar"]["counter"].items, 5); "ProjectZomboid\mods\Mymod\media\lua\client" EdiblesNecroForgePlugIn.txt -> Spoiler Events.OnGameStart.Add( function () print ("Adding Edibles Items to NecroForge"); if NecroList then if NecroList.Items.FullBeer then else NecroList.Items.FullBeer = {"Food", nil, nil, "Beer", "Cervezas.FullBeer", "Item_Beer", nil, nil, nil}; end end end) And the mod file: Spoiler name=Mymod poster=poster.png id=Mymod description=A mod for Freak stufffsssss!!! url= The url resides in your hearth! Can you tell me waht i do wrong? Thank you very much! Edited April 24, 2016 by Moleon 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