RoseWuffbug Posted October 24, 2020 Share Posted October 24, 2020 I want to change these stats, but I couldn't find a way to do it, does anyone here know how to? Link to comment Share on other sites More sharing options...
Yakuzashi Posted October 24, 2020 Share Posted October 24, 2020 Inside your [character's name].lua goes: (above master_postinit) (mod->prefabs->...) TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.[CHARACTERNAME] = { "item1", "item2" --- and so... } local start_inv = {} for k, v in pairs(TUNING.GAMEMODE_STARTING_ITEMS) do start_inv[string.lower(k)] = v.[CHARACTERNAME] end prefabs = FlattenTree({ prefabs, start_inv }, true) Swap "[CHARACTERNAME]" with "JIM", "MARK", "TONY" or whatever your char's name is. Part above is for starting items. This part below is for stats: (above master_postinit) (mod->prefabs->...) TUNING.[CHARACTERNAME]_HEALTH = 200 TUNING.[CHARACTERNAME]_HUNGER = 200 TUNING.[CHARACTERNAME]_SANITY = 150 and inside master_postinit: inst.components.health:SetMaxHealth(TUNING.[CHARACTERNAME]_HEALTH) inst.components.hunger:SetMax(TUNING.[CHARACTERNAME]_HUNGER) inst.components.sanity:SetMax(TUNING.[CHARACTERNAME]_SANITY) EXAMPLE: (Let's say your character is named Jim) TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.JIM = { "redgem", "pitchfork", "log", } local start_inv = {} for k, v in pairs(TUNING.GAMEMODE_STARTING_ITEMS) do start_inv[string.lower(k)] = v.JIM end prefabs = FlattenTree({ prefabs, start_inv }, true) TUNING.JIM_HEALTH = 200 TUNING.JIM_HUNGER = 200 TUNING.JIM_SANITY = 150 inst.components.health:SetMaxHealth(TUNING.JIM_HEALTH) inst.components.hunger:SetMax(TUNING.JIM_HUNGER) inst.components.sanity:SetMax(TUNING.JIM_SANITY) And that's all. Cheers! Link to comment Share on other sites More sharing options...
RoseWuffbug Posted October 25, 2020 Author Share Posted October 25, 2020 oh, thanks! Link to comment Share on other sites More sharing options...
RoseWuffbug Posted October 25, 2020 Author Share Posted October 25, 2020 On 10/24/2020 at 11:22 PM, Yakuzashi said: Inside your [character's name].lua goes: (above master_postinit) (mod->prefabs->...) TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.[CHARACTERNAME] = { "item1", "item2" --- and so... } local start_inv = {} for k, v in pairs(TUNING.GAMEMODE_STARTING_ITEMS) do start_inv[string.lower(k)] = v.[CHARACTERNAME] end prefabs = FlattenTree({ prefabs, start_inv }, true) Swap "[CHARACTERNAME]" with "JIM", "MARK", "TONY" or whatever your char's name is. Part above is for starting items. This part below is for stats: (above master_postinit) (mod->prefabs->...) TUNING.[CHARACTERNAME]_HEALTH = 200 TUNING.[CHARACTERNAME]_HUNGER = 200 TUNING.[CHARACTERNAME]_SANITY = 150 and inside master_postinit: inst.components.health:SetMaxHealth(TUNING.[CHARACTERNAME]_HEALTH) inst.components.hunger:SetMax(TUNING.[CHARACTERNAME]_HUNGER) inst.components.sanity:SetMax(TUNING.[CHARACTERNAME]_SANITY) EXAMPLE: (Let's say your character is named Jim) TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.JIM = { "redgem", "pitchfork", "log", } local start_inv = {} for k, v in pairs(TUNING.GAMEMODE_STARTING_ITEMS) do start_inv[string.lower(k)] = v.JIM end prefabs = FlattenTree({ prefabs, start_inv }, true) TUNING.JIM_HEALTH = 200 TUNING.JIM_HUNGER = 200 TUNING.JIM_SANITY = 150 inst.components.health:SetMaxHealth(TUNING.JIM_HEALTH) inst.components.hunger:SetMax(TUNING.JIM_HUNGER) inst.components.sanity:SetMax(TUNING.JIM_SANITY) And that's all. Cheers! just had the chance to try it, I added these, but nothing changed, and it doesn't add the items in the game anymore, I'm pretty sure I followed exactly how you said. no errors appeared too also, how about the "Odds of survival" thing? how can I change that? Link to comment Share on other sites More sharing options...
Yakuzashi Posted October 25, 2020 Share Posted October 25, 2020 I have used (inside modmain.lua) -- The character select screen lines STRINGS.CHARACTER_TITLES.ilya = "The Eye of Vengeance" STRINGS.CHARACTER_NAMES.ilya = "Ilya" STRINGS.CHARACTER_DESCRIPTIONS.ilya = "*Powerful firearms \n*Military grade equipment \n*Slower hunger rate" STRINGS.CHARACTER_QUOTES.ilya = "\"They will pay for it!\"" STRINGS.CHARACTER_SURVIVABILITY.ilya = "большой" You can type whatever you want in field required for "Odds of survival". Also you can DM your mod folder in .zip/.rar and I will take a look at it. Link to comment Share on other sites More sharing options...
Hiru315 Posted October 29, 2020 Share Posted October 29, 2020 Have the same problems. We changed the stats and inventory items in modmain.lua. It does appear in game but in character selection page it all shows as ? and nothing. 1 Link to comment Share on other sites More sharing options...
Yakuzashi Posted October 29, 2020 Share Posted October 29, 2020 @Hiru315 DM me your mod and I'll take a look 1 Link to comment Share on other sites More sharing options...
ammmm Posted May 30, 2022 Share Posted May 30, 2022 On 10/29/2020 at 10:06 PM, Hiru315 said: Have the same problems. We changed the stats and inventory items in modmain.lua. It does appear in game but in character selection page it all shows as ? and nothing. maybe is capital letter's problem do this like me -- Custom starting inventory TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.MAYUSHII = { "cave_banana", "cave_banana", "cave_banana", "cave_banana", "cave_banana", "drumstick", "drumstick", "drumstick", "drumstick", "drumstick", "mayushii_hat", } --you need to turn capital up then selectscreen will display your char statu data TUNING.MAYUSHII_HEALTH = 168 TUNING.MAYUSHII_HUNGER = 300 TUNING.MAYUSHII_SANITY = 168 and like that ,you should see your characters in selectscreen's statu & starting item icon 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