ElMilojita Posted January 21, 2021 Share Posted January 21, 2021 Hi guys I am trying to add the idols as starting items for woodie, but it doesn't work, it does not show up as images either when picking the character. I think it has something to do with inventory gamemode? I inserted the whole woodie lua. . local start_inv = { default = { "lucy", "wereitem_beaver", "wereitem_goose", "wereitem_moose", }, } woodie.lua Link to comment https://forums.kleientertainment.com/forums/topic/126328-new-starting-items-do-not-appear/ Share on other sites More sharing options...
FurryEskimo Posted January 28, 2021 Share Posted January 28, 2021 (edited) @ColombianCam I never really understood the code, but this is in my character's prefab file: -- Defines starting inventory if startinginventory == 1 then TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.FURRYESKIMO = { --Nothing } elseif startinginventory == 2 then TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.FURRYESKIMO = { "heatrock", } elseif startinginventory == 3 then TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.FURRYESKIMO = { "icepack", --Probably overpowered. } elseif startinginventory == 4 then --Default TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.FURRYESKIMO = { "blueamulet", --May be overpowered, but intended to help if player spawns in summer. "nightmarefuel", "nightmarefuel", "nightmarefuel", } elseif startinginventory == 5 then TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.FURRYESKIMO = { "houndwhistle", } else TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.FURRYESKIMO = { "blueamulet", "nightmarefuel", "nightmarefuel", "nightmarefuel", "houndwhistle", } end --Involved in assigning starting inventory(?) local start_inv = {} for k, v in pairs(TUNING.GAMEMODE_STARTING_ITEMS) do start_inv[string.lower(k)] = v.FURRYESKIMO end local prefabs = FlattenTree(start_inv, true) -and this is in the character's prefab file too, but in the master_postinit section: --Sets starting inventory. inst.starting_inventory = start_inv[TheNet:GetServerGameMode()] or start_inv.default Hope this helps!! Edited January 28, 2021 by FurryEskimo Link to comment https://forums.kleientertainment.com/forums/topic/126328-new-starting-items-do-not-appear/#findComment-1422393 Share on other sites More sharing options...
Serpens Posted January 28, 2021 Share Posted January 28, 2021 (edited) do not alter gamefiles directly. Always search for a way to achieve your goal with new files or within modmain.lua. But you can use game files to inform yourself how things work. So in the original woode.lua you will find this code: local start_inv = {} for k, v in pairs(TUNING.GAMEMODE_STARTING_ITEMS) do start_inv[string.lower(k)] = v.WOODIE end This means, that the start inventory is used from TUNING. Which means all you need to do is changing the TUNING value within your modmain.lua. Open the tuning.lua from the gamefiles. Search for GAMEMODE_STARTING_ITEMS and WOODIE (in the DEFAULT section, if you want it for normal games). Now you see how this looks and what is in there (currently only lucy). TUNING is an array/list and it is globally accessable (it is a convention that global variables are writte in capital letters). That means you can access and change it within your modmain.lua. So the following simple line in your modmain.lua should do it: TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.WOODIE = {"lucy","wereitem_beaver","wereitem_goose","wereitem_moose"} -- or even better, use only the following line: GLOBAL.ArrayUnion( TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.WOODIE , {"wereitem_beaver","wereitem_goose","wereitem_moose"} ) The first line directly overwrites the old list with the new list. The other line with ArrayUnion is merging the old list with your new list. The second way is more compatible to changes by the devs, eg. if they decide to add another start item to woodie. Edited January 28, 2021 by Serpens Link to comment https://forums.kleientertainment.com/forums/topic/126328-new-starting-items-do-not-appear/#findComment-1422670 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