Jump to content

Recommended Posts

Hello dear big brain humans.

Don't Starve Mod Tools say modinfo.lua is not valid.

Can get into the game, but cannot tick this mod at mod menu.

Checked client_log.txt, says:

[00:00:17]: Error loading mod: workshop-2809373047!
 [string "../mods/workshop-2809373047/modinfo.lua"]:97: '}' expected (to close '{' at line 58) near 'ï'

Read my code line by line, found I do have a "}" ending the "{".

Added an extra "}" at the end, not work.

Restarted my pc, not work.

Deleted the game and re-downloaded, not work.

Attempeted to re-learn lua, not work, and brain hurts.

Why?

Help me please, humans.

-- This information tells other players more about the mod
name = "The Puppet Master - Edited by LoW"
author = "Lord Nhoebi / Noddharath"
modifier = "LoW"
version = "0.1.1"
description = "This mods goal is to make Maxwell a truly 'Puppet Master', with improved recipes, his normal sanity regen and  the dueslists will be able to last longer."

-- This is the URL name of the mod's thread on the forum; the part after the ? and before the first & in the url
forumthread = ""


-- This lets other players know if your mod is out of date, update it to match the current version in the game
api_version = 10

dst_compatible = true
dont_starve_compatible = false
reign_of_giants_compatible = false
all_clients_require_mod = true

icon_atlas = "modicon.xml"
icon = "modicon.tex"

server_filter_tags = {
"Maxwell",
"Puppet Master",
"Shadows Empowered",
} 

local scales = {
}

for i = 1, 20 do
	scales[i] = {description = "x"..i/10, data = i/10}
end

local pos = {
	[1] = {description = "Default", data = 0}
}

for i = 2, 15 do
	pos[i] = {description = "+"..i.."0", data = i*10}
end

local opt_Empty = {{description = "", data = 0}}

local function Title(title,hover)
	return {
		name=title,
		hover=hover,
		options=opt_Empty,
		default=0,
	}
end


local SEPARATOR = Title("")

configuration_options = 
{
	Title("Maxwell"),
	{
		name = "WAXWELLSANITY",
		label = "Maxwell Sanity",
		hover = "Maxwell Base Sanity regen, DS or DST Value.",
		options =
		{
			{description = "Don't Starve", data = 0.33, hover = "Don't Starve Default."},
			{description = "Don't Starve Together", data = 0.1083,hover = "Don't Starve Together Default."},
		},
		default = 0.1083,
	},

	Title("Shadow combat unit AI"),
	{
		name = "SHADOWDUELISTAI",
		label = "Shadow Duelist Tactics",
		options =
		{
			{description = "Always kite", data = 0, hover = "Vanilla behaviour"},
			{description = "Smart kiting", data = 1, hover = "Kite as normal, unless they've been given a helmet"},
			{description = "Never kite", data = 2, hover = "Stand still while fighting"},
		},
		default = 0,
	},

	{
		name = "SHADOWGUARDAI",
		label = "Shadow GUARD Tactics",
		options =
		{
			{description = "Always kite", data = 0, hover = "Vanilla behaviour"},
			{description = "Smart kiting", data = 1, hover = "Kite as normal, unless they've been given a helmet"},
			{description = "Never kite", data = 2, hover = "Stand still while fighting"},
		},
		default = 0,
	},

	Title("Defaule Shadows"),
	{
		name = "SHADOWWAXWELLHP",
		label = "Shadow Puppet HP",
		hover = "Maximum Health Points.",
		options =
		{
			{description = "75", data = 75},
			{description = "100", data = 100},
			{description = "150", data = 150},
		},
		default = 75,
	},

	{
		name = "SHADOWWAXWELLATK",
		label = "Shadow duelist Attack",
		hover = "Attack Damage.",
		options =
		{
			{description = "34", data = 34},
			{description = "51", data = 51},
			{description = "68", data = 68},
		},
		default = 34,
	},

	{
		name = "SHADOWWAXWELLARMOR",
		label = "Shadow Puppet Armor",
		hover = "Natural Damage absorption WITHOUT any EQUIPAMENT/ARMOR in head slot.",
		options =
		{
			{description = "0%", data = 0},
			{description = "45%", data = 45},
			{description = "50%", data = 50},
			{description = "55%", data = 55},
			{description = "95%", data = 95},
		},
		default = 0,
	},

	{
		name = "SHADOWWAXWELLHPREGEN",
		label = "Shadow Puppet HP Regen",
		hover = "Health Regeneration amount.",
		options =
		{
			{description = "Nul", data = 0},
			{description = "1hp", data = 1},
			{description = "3hp", data = 3},
		},
		default = 1,
	},

	{
		name = "SHADOWWAXWELLHPPERIOD",
		label = "Shadow Puppet HP Period",
		hover = "Time btw each Healing.",
		options =
		{
			{description = "Nul", data = 0},
			{description = "1 Sec", data = 1},
			{description = "2 Sec", data = 2},
			{description = "5 Sec", data = 5},
		},
		default = 2,
	},

	Title("Shadow Guard"),
	{
		name = "SHADOWWAXWELLHP_GUARD",
		label = "Shadow Guard HP",
		hover = "Maximum Health Points.",
		options =
		{
			{description = "20", data = 20},
			{description = "75", data = 75},
			{description = "100", data = 100},
			{description = "150", data = 150},
		},
		default = 20,
	},

	{
		name = "SHADOWWAXWELLATK_GUARD",
		label = "Shadow Guard Attack",
		hover = "Attack Damage.",
		options =
		{
			{description = "34", data = 34},
			{description = "51", data = 51},
			{description = "68", data = 68},
		},
		default = 68,
	},

	{
		name = "SHADOWWAXWELLARMOR_GUARD",
		label = "Shadow Guard Armor",
		hover = "Natural Damage absorption WITHOUT any EQUIPAMENT/ARMOR in head slot.",
		options =
		{
			{description = "0%", data = 0},
			{description = "45%", data = 45},
			{description = "50%", data = 50},
			{description = "55%", data = 55},
			{description = "95%", data = 95},
		},
		default = 95,
	},

	{
		name = "SHADOWWAXWELLHPREGEN_GUARD",
		label = "Shadow Guard HP Regen",
		hover = "Health Regeneration amount.",
		options =
		{
			{description = "Nul", data = 0},
			{description = "1hp", data = 1},
			{description = "3hp", data = 3},
		},
		default = 1,
	},

	{
		name = "SHADOWWAXWELLHPPERIOD_GUARD",
		label = "Shadow Guard HP Period",
		hover = "Time btw each Healing.",
		options =
		{
			{description = "Nul", data = 0},
			{description = "1 Sec", data = 1},
			{description = "2 Sec", data = 2},
			{description = "5 Sec", data = 5},
		},
		default = 5,
	},

	Title("Shadow Sanity Cost"),
	{
		name = "SHADOWWORKERSANITYPENALTY",
		label = "Worker Sanity Penalty",
		hover = "Percentage max sanity cost of creating a Shadow Worker of any type",
		options =
		{
			{description = "0%", data = 0},
			{description = "10%", data = 0.1},
			{description = "15%", data = 0.15},
			{description = "20%", data = 0.2},
			{description = "25%", data = 0.25},
			{description = "30%", data = 0.30},
			{description = "35%", data = 0.35},
			{description = "40%", data = 0.40},
		},
		default = 0.2,
	}, 

	{
		name = "SHADOWDUELISTSANITYPENALTY",
		label = "Duelist Sanity Penalty",
		hover = "Percentage max sanity cost of creating a Shadow Duelist",
		options =
		{
			{description = "0%", data = 0},
			{description = "10%", data = 0.1},
			{description = "15%", data = 0.15},
			{description = "20%", data = 0.2},
			{description = "25%", data = 0.25},
			{description = "30%", data = 0.30},
			{description = "35%", data = 0.35},
			{description = "40%", data = 0.40},
		},
		default = 0.35,
	},

	{
		name = "SHADOWDUELISTHEALTHPENALTY",
		label = "Duelist Health Penalty",
		hover = "Percentage max health cost of creating a Shadow Duelist",
		options =
		{
			{description = "0%", data = 0.0},
			{description = "10%", data = 0.1},
			{description = "15%", data = 0.15},
			{description = "20%", data = 0.2},
			{description = "25%", data = 0.25},
			{description = "30%", data = 0.30},
			{description = "35%", data = 0.35},
			{description = "40%", data = 0.40},
		},
		default = 0.0,
	},

	{
		name = "SHADOWDUELISTSANITYPENALTY_GUARD",
		label = "Guard Sanity Penalty",
		hover = "Percentage max sanity cost of creating a Shadow Guard",
		options =
		{
			{description = "0%", data = 0},
			{description = "10%", data = 0.1},
			{description = "15%", data = 0.15},
			{description = "20%", data = 0.2},
			{description = "25%", data = 0.25},
			{description = "30%", data = 0.30},
			{description = "35%", data = 0.35},
			{description = "40%", data = 0.40},
		},
		default = 0.35,
	},

	{
		name = "SHADOWDUELISTHEALTHPENALTY_GUARD",
		label = "Guard Health Penalty",
		hover = "Percentage max health cost of creating a Shadow Guard",
		options =
		{
			{description = "0%", data = 0},
			{description = "10%", data = 0.1},
			{description = "15%", data = 0.15},
			{description = "20%", data = 0.2},
			{description = "25%", data = 0.25},
			{description = "30%", data = 0.30},
			{description = "35%", data = 0.35},
			{description = "40%", data = 0.40},
			{description = "50%", data = 0.50},
		},
	default = 0.50,
	},
}

These code are stolen from another human, if you are the original owner, please contact my lawyer.

屏幕截图 2022-05-19 210853.png

Edited by Froggomancer
Add picture for more info
Link to comment
https://forums.kleientertainment.com/forums/topic/140355-help-with-missing/
Share on other sites

On 5/19/2022 at 5:04 AM, Froggomancer said:

Title("Defaule Shadows"),

Well this is a new one. Here on line 98 you are missing a comma, well, a real one that is. For some reason instead of a comma you have a Unicode Fullwidth Comma (U+FF0C). I am curious how you got that. The Lua lexer accepts single-byte ASCII commas that result from pressing "," on your keyboard to separate table entries.

  • Like 3
  • Thanks 1
14 hours ago, Friendly Grass said:

Well this is a new one. Here on line 98 you are missing a comma, well, a real one that is. For some reason instead of a comma you have a Unicode Fullwidth Comma (U+FF0C). I am curious how you got that. The Lua lexer accepts single-byte ASCII commas that result from pressing "," on your keyboard to separate table entries.

How did you find that

  • Wavey 1
17 hours ago, Friendly Grass said:

Well this is a new one. Here on line 98 you are missing a comma, well, a real one that is. For some reason instead of a comma you have a Unicode Fullwidth Comma (U+FF0C). I am curious how you got that. The Lua lexer accepts single-byte ASCII commas that result from pressing "," on your keyboard to separate table entries.

Thank you for your help. Your brain must be very big, and have a lot of brain cells. I am Chinese, and Chinese input method editor use full width comma. I probably forgot to switch it off after chatting with my friends. It is a very important experience for me, thank you!

  • Health 3

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
×
  • Create New...