XxZeraphinexX Posted June 23, 2015 Share Posted June 23, 2015 Hi, just a short question.Where i have to look for the starter kit to change what you get and maybe a easy example how to change it.e.X. instead of a school bag a duffle bag and add some nails?Ty in advance Link to comment Share on other sites More sharing options...
Svarog Posted June 23, 2015 Share Posted June 23, 2015 The .lua file responsible for what's in starter kit is in Project Zomboid/media/lua/server/XPSystem and it's called XPUpdate.lua The piece of specific code is: xpUpdate.onNewGame = function(playerObj, square) if SandboxVars.StarterKit then local bag = playerObj:getInventory():AddItem("Base.Schoolbag"); local bat = bag:getItemContainer():AddItem("Base.BaseballBat"); bat:setCondition(7); local hammer = bag:getItemContainer():AddItem("Base.Hammer"); hammer:setCondition(5); playerObj:getInventory():AddItem("Base.WaterBottleFull"); playerObj:getInventory():AddItem("Base.Crisps"); playerObj:setClothingItem_Back(bag); endendIf you wanted to turn School Bag into a Duffelbag you'd have to modify this line local bag = playerObj:getInventory():AddItem("Base.Schoolbag"); to something like this local bag = playerObj:getInventory():AddItem("Base.Duffelbag"); if you wanted to add a saw and nails for example then directly below the line above you need to add this. bag:getItemContainer():AddItem("Base.Saw");bag:getItemContainer():AddItem("Base.Nails"); It will add 5 nails, for more you need to add another line like it below, each line will ad 5 nails, or if you want a Box of Nails then bag:getItemContainer():AddItem("Base.NailsBox"); For other item ID's check items.txt and newitems.txt in media/lua/scripts and if you want to spawn something directly in inventory just add something below the line playerObj:getInventory():AddItem("Base.Crisps"); For example Let's add a Spiffo to inventory playerObj:getInventory():AddItem("Base.Spiffo"); I hope it answers your question. If you're going to modify the game file remember keep the backup of the original! KorruptkSwades, willow512 and LeoIvanov 3 Link to comment Share on other sites More sharing options...
XxZeraphinexX Posted June 23, 2015 Author Share Posted June 23, 2015 Ty very much Link to comment Share on other sites More sharing options...
XxZeraphinexX Posted June 23, 2015 Author Share Posted June 23, 2015 A question to it, what i have to change if i wanna add items from a mod like hydrocraft? playerObj:getInventory():AddItem("Base.HCBeekeeperhat"); doesn´t work, so have i to change the base to something else? Link to comment Share on other sites More sharing options...
Svarog Posted June 23, 2015 Share Posted June 23, 2015 A question to it, what i have to change if i wanna add items from a mod like hydrocraft? playerObj:getInventory():AddItem("Base.HCBeekeeperhat"); doesn´t work, so have i to change the base to something else? playerObj:getInventory():AddItem("Hydrocraft.HCBeekeeperhat"); Base is the name of the Module the item belongs to, Hydrocraft Items use Hydrocraft as module if my memory serves. So you just replace Base with Hydrocraft and then give the item name, should work fine then.When you look at a mod's item script you will first see module ModuleNameIsHere{ Use whatever is in ModuleNameIsHere as replacement for Base if you want items from that particular mod. Link to comment Share on other sites More sharing options...
XxZeraphinexX Posted June 23, 2015 Author Share Posted June 23, 2015 Thanks i try that Link to comment Share on other sites More sharing options...
XxZeraphinexX Posted June 23, 2015 Author Share Posted June 23, 2015 So far most things work fine, only stuff like playerObj:getInventory():AddItem("Base.HandShovel"); or CarrotBagSeed So the only thing i can´t figure out is what went wrong with these all seed packs and Spade and Trowel doesn´t work, all other items like nails or saw works just fine. Link to comment Share on other sites More sharing options...
XxZeraphinexX Posted June 23, 2015 Author Share Posted June 23, 2015 looks like everythibg from the farming.txt doesn´t work so close to start a game out in the woods with just basics to play a wilderness survival Link to comment Share on other sites More sharing options...
Svarog Posted June 23, 2015 Share Posted June 23, 2015 module farming lower case is important here!playerObj:getInventory():AddItem("farming.HandShovel"); Module names must be EXACT, copy them from the script files if you have to Link to comment Share on other sites More sharing options...
XxZeraphinexX Posted June 23, 2015 Author Share Posted June 23, 2015 oh Thanks again Link to comment Share on other sites More sharing options...
Svarog Posted June 24, 2015 Share Posted June 24, 2015 oh Thanks again AnytimeAlso, if you could mark your original question as "Answered" it might help other people with similar issues. Link to comment Share on other sites More sharing options...
XxZeraphinexX Posted June 24, 2015 Author Share Posted June 24, 2015 Done hope others use it too 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