Jump to content

Starting inventory mod


Recommended Posts

Hello, I am trying to make a simple server-side mod that changes what items some characters start with. For context, this is my first DST mod (I successfully did a Civilization VI mod before, so I'm not a complete noob at this).

So what I did is this : I copied a character's (woodie) lua into my mod's scripts folder. In my woodie.lua copy, I changed this : 

local start_inv =
{
    default =
    {
        "lucy",
        "redgem",
    },
}

When I boot the game and turn on the server mod, and choose woodie as my character, he keeps on spawning with only Lucy. I figured I would try updating the original woodie.lua file, but that too did not work.

Anyone has any clue of what I'm doing wrong?

Thanks a lot!

Link to comment
Share on other sites

I just learned something interesting by looking at the woodie prefab file. There appears to be a list in the tuning.lua file that contains the starting items for each character. You could add a line in the modmain that looks like this:

GLOBAL.TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.WOODIE = {"lucy", "redgem"}

Also, if you're going to change game files, there's a thing you have to do first. There's a scripts_readme.txt in the data folder of the game. You have to unzip the game files, move them to data, and then rename the original zipped folder so your version of the files runs instead.

  • Like 1
Link to comment
Share on other sites

8 hours ago, rawii22 said:

I just learned something interesting by looking at the woodie prefab file. There appears to be a list in the tuning.lua file that contains the starting items for each character. You could add a line in the modmain that looks like this:

GLOBAL.TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.WOODIE = {"lucy", "redgem"}

Also, if you're going to change game files, there's a thing you have to do first. There's a scripts_readme.txt in the data folder of the game. You have to unzip the game files, move them to data, and then rename the original zipped folder so your version of the files runs instead.

I believe the tuning business is simply for the character selection menu, it's not the real starter items.

Link to comment
Share on other sites

@rawii22 Thanks for the help!

I'm trying to do what you're saying, but it doesn't seem to work. Could that be related to the fat that my mod changes more than just the scripts?

It also feels weird that I have to change the basic script files to make my mod work...

Edited by xovoxx
Link to comment
Share on other sites

Put this in your modmain.lua, you can edit anything you want with this:

TUNING.GAMEMODE_STARTING_ITEMS = {
		DEFAULT = {
			WILSON = {}, -- Just add or remove what you want
			WILLOW = {"lighter", "bernie_inactive"},
			WENDY = {"abigail_flower"},
			WOLFGANG = {},
			WX78 = {},
			WICKERBOTTOM = {"papyrus", "papyrus"},
			WES = {"balloons_empty"},
			WAXWELL = {"waxwelljournal", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel"},
			WOODIE = {"lucy"},
			WATHGRITHR = {"spear_wathgrithr", "wathgrithrhat", "meat", "meat", "meat", "meat"},
			WEBBER = {"spidereggsack", "monstermeat", "monstermeat"},
			WINONA = {"sewing_tape", "sewing_tape", "sewing_tape"},
			WORTOX = {"wortox_soul", "wortox_soul", "wortox_soul", "wortox_soul", "wortox_soul", "wortox_soul"},
			WORMWOOD = {},
			WARLY = {"portablecookpot_item", "potato", "potato", "garlic"},
			WURT = {},
			WALTER = {"walterhat", "slingshot", "slingshotammo_rock", "slingshotammo_rock", "slingshotammo_rock", "slingshotammo_rock", "slingshotammo_rock", "slingshotammo_rock", "slingshotammo_rock", "slingshotammo_rock", "slingshotammo_rock", "slingshotammo_rock"},
		},

 

Edited by IThatGuyI
  • Like 1
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
 Share

×
×
  • Create New...