blank screen (technical question)

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
hamrkveldulfr
Halfling
Posts: 84
Joined: Wed Apr 13, 2011 6:43 pm

blank screen (technical question)

#1 Post by hamrkveldulfr »

So i have been playing around with LUA and thought i plugged in everything i needed to make a brand new race of characters.
they are labeled homonculus. to keep things simple i copied everything from higher, and just replaced the words.
i put them under construct, added the newbirthoption header
now when i start tome the screen is blank. what did i do wrong?

bricks
Sher'Tul
Posts: 1262
Joined: Mon Jun 13, 2011 4:10 pm

Re: blank screen (technical question)

#2 Post by bricks »

Literally everything is blank, or just the game window? If it's the former, you have some sort of error in the module. For me it's typically forgetting commas.
Sorry about all the parentheses (sometimes I like to clarify things).

hamrkveldulfr
Halfling
Posts: 84
Joined: Wed Apr 13, 2011 6:43 pm

Re: blank screen (technical question)

#3 Post by hamrkveldulfr »

the game window, when i go to new game it loads, then stays black. the mouse is visible roving around though.

hamrkveldulfr
Halfling
Posts: 84
Joined: Wed Apr 13, 2011 6:43 pm

Re: blank screen (technical question)

#4 Post by hamrkveldulfr »

I went and removed the offending code and the game starts up as normal.
I will post it here, hopefully someone can tell me what the problem is

Code: Select all

newBirthDescriptor
{
	type = "subrace",
	name = "Homunculus",
	desc = {
		"Creatures created by magic to fight it's effects.",
		"They have strange abilities even they cannot understand.",
		"They possess an unnatural intelligence and their presence is uncomfortable for every race in Maj 'Eyal",
		"#GOLD#Stat modifiers:",
		"#LIGHT_BLUE# * +1 Strength, +1 Dexterity, +0 Constitution",
		"#LIGHT_BLUE# * -1 Magic, +1 Willpower, +0 Cunning",
		"#GOLD#Life per level:#LIGHT_BLUE# 11",
		"#GOLD#Experience penalty:#LIGHT_BLUE# 15%",
	},
	inc_stats = { str=1, mag=-1, dex=1, wil=1 },
	experience = 1.00,
	talents_types = { ["wild-gift/antimagic""]={true, 0} },
	talents = {
		[ActorTalents.Resolve]=1,
	},
	copy = {
		moddable_tile = "human_#sex#",
		moddable_tile_base = "base_higher_01.png",
		life_rating = 11,
		default_wilderness = {"playerpop", "allied"},
		starting_zone = "trollmire",
		starting_quest = "start-allied",
		starting_intro = "higher",
	},
}

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: blank screen (technical question)

#5 Post by lukep »

Could be the extra quotation mark here.
hamrkveldulfr wrote: talents_types = { ["wild-gift/antimagic""]={true, 0} },
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

hamrkveldulfr
Halfling
Posts: 84
Joined: Wed Apr 13, 2011 6:43 pm

Re: blank screen (technical question)

#6 Post by hamrkveldulfr »

Lukep and bricks, i appreciate your help immensely.
I looked into the quotation mark and that caused me to notice several other problems as well, so i went ahead and repaired them.
unfortunately the problem persists.
so i dump the line again, maybe i am missing some redundancies or conflicts

Code: Select all

---------------------------------------------------------
--                      Constructs                     --
---------------------------------------------------------
newBirthDescriptor{
	type = "race",
	name = "Construct",
	locked = function() return profile.mod.allow_build.construct and true or "hide" end,
	locked_desc = "",
	desc = {
		"Constructs are not natural creatures.",
		"The most usual contructs are golems, but they can vary in shape, form and abilities.",
	},
	descriptor_choices =
	{
		subrace =
		{
			__ALL__ = "disallow",
			["Runic Golem"] = "allow",
			["Homunculus"] = "allow",
		},
	},
	random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 5}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"reknor", 1, 1}, },
}

newBirthDescriptor
{
	type = "subrace",
	name = "Runic Golem",
	locked = function() return profile.mod.allow_build.construct_runic_golem and true or "hide" end,
	locked_desc = "",
	desc = {
		"Runic Golems are creatures made of solid rock and animated using arcane forces.",
		"They cannot be of any class, but they have many intrinsic abilities.",
		"#GOLD#Stat modifiers:",
		"#LIGHT_BLUE# * +3 Strength, -2 Dexterity, +3 Constitution",
		"#LIGHT_BLUE# * +2 Magic, +2 Willpower, -5 Cunning",
		"#GOLD#Life per level:#LIGHT_BLUE# 13",
		"#GOLD#Experience penalty:#LIGHT_BLUE# 50%",
	},
	descriptor_choices =
	{
		sex =
		{
			__ALL__ = "disallow",
			Male = "allow",
		},
		class =
		{
			__ALL__ = "allow",
			None = "allow",
		},
		subclass =
		{
			__ALL__ = "allow",
		},
	},
	inc_stats = { str=300, con=300, wil=200, mag=200, dex=200, cun=500 },
	talents_types = {
		["psionic/finer-energy-manipulations"]={true, 0.3},
		["golem/fighting"]={true, 0.3},
	},
	talents = {
		[ActorTalents.T_MANA_POOL]=1,
		[ActorTalents.T_STAMINA_POOL]=1,
	},
	copy = {
		resolvers.generic(function(e) e.descriptor.class = "Golem" e.descriptor.subclass = "Golem" end),
		resolvers.genericlast(function(e) e.faction = "undead" end),
		default_wilderness = {"playerpop", "allied"},
		starting_zone = "ruins-kor-pul",
		starting_quest = "start-allied",
		blood_color = colors.GREY,
		resolvers.inventory{ id=true, {defined="ORB_SCRYING"} },
		resolvers.generic(function(e) e.hotkey[10] = {"inventory", "Orb of Scrying"} end),

		mana_regen = 0.5,
		mana_rating = 7,
		inscription_restrictions = { ["inscriptions/runes"] = true, },
		resolvers.inscription("RUNE:_MANASURGE", {cooldown=25, dur=10, mana=620}),
		resolvers.inscription("RUNE:_SHIELDING", {cooldown=14, dur=5, power=100}),
		resolvers.inscription("RUNE:_PHASE_DOOR", {cooldown=7, range=10}),

		type = "construct", subtype="golem", image = "npc/alchemist_golem.png",
		starting_intro = "ghoul",
		life_rating=13,
		poison_immune = 1,
		cut_immune = 1,
		stun_immune = 1,
		fear_immune = 1,
		construct = 1,

		moddable_tile = "runic_golem",
		moddable_tile_nude = true,
	},
	experience = 0.5,
}

newBirthDescriptor
{
	type = "subrace",
	name = "Homunculus",
	desc = {
		"Creatures created by magic to fight it's effects.",
		"They have strange abilities even they cannot understand.",
		"They possess an unnatural intelligence and their presence is uncomfortable for every race in Maj 'Eyal",
		"#GOLD#Stat modifiers:",
		"#LIGHT_BLUE# * +1 Strength, +1 Dexterity, +0 Constitution",
		"#LIGHT_BLUE# * -1 Magic, +1 Willpower, +0 Cunning",
		"#GOLD#Life per level:#LIGHT_BLUE# 11",
		"#GOLD#Experience penalty:#LIGHT_BLUE# 15%",
	},
	descriptor_choices =
	{
		sex =
		{
			__ALL__ = "disallow",
			Male = "allow",
		},
		class =
		{
			__ALL__ = "allow",
			None = "allow",
		},
		subclass =
		{
			__ALL__ = "allow",
		},
	},
	inc_stats = { str=1, mag=-1, dex=1, wil=1 },
	experience = 1.00,
	talents_types = { ["wild-gift/antimagic"]={true, 0} },
	talents = {
		[ActorTalents.Resolve]=1,
	},
	copy = {
		moddable_tile = "human_#sex#",
		moddable_tile_base = "base_higher_01.png",
		life_rating = 11,
		default_wilderness = {"playerpop", "allied"},
		starting_zone = "trollmire",
		starting_quest = "start-allied",
		starting_intro = "higher",
	},
}
That is everything directly south of Darkgod's disclaimer

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: blank screen (technical question)

#7 Post by lukep »

Don't notice anything here, my usual way of making something new is to change one line at a time from an existing thing (not copy/pasted to a new one, at least at first), so it's much easier to tell where you went wrong.
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: blank screen (technical question)

#8 Post by edge2054 »

Talent names need to be capatilized so [ActorTalents.Resolve]=1, should be [ActorTalents.RESOLVE]=1,

Also, though I don't think this would cause an error, birth names only need to be in brackets if it's two words, so "Homunculus" would be fine rather then ["Homunculus"].

Next time it does the black screen on you though you'll want to exit (or crash) the game and check the log file before rebooting. It should flush to stdout on exit and tell you what kinda error it's throwing.

If you don't know how to read the errors post that in this thread and we'll walk you through it.

hamrkveldulfr
Halfling
Posts: 84
Joined: Wed Apr 13, 2011 6:43 pm

Re: blank screen (technical question)

#9 Post by hamrkveldulfr »

Alright, loaded it up again with those tweaks, still getting the lonely cursor.
I checked STDout and it is completely empty, the log itself is very long, and i am unsure of what constitutes regular running and what is flawed programs.
I will attach it, or if you know what i should be looking for i have no problem hunting myself
Attachments
te4_log.txt
(93.95 KiB) Downloaded 214 times

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: blank screen (technical question)

#10 Post by edge2054 »

Sorry, the log is right. What you're looking for is a lua error. It should be offset a bit.

Something like...

Code: Select all

stack traceback:
	/engine/utils.lua:1139: in function </engine/utils.lua:1138>
	[C]: ?
	[C]: in function 'xpcall'
	/engine/utils.lua:1138: in function 'require_first'
	/engine/interface/ActorInventory.lua:23: in main chunk
	[C]: in function 'require'
	/mod/load.lua:38: in main chunk
	[C]: in function 'require'
	/engine/Module.lua:138: in function 'load'
	/engine/Module.lua:293: in function 'instanciate'
	/engine/utils.lua:1070: in function 'showMainMenu'
	/engine/init.lua:114: in main chunk
	[C]: in function 'dofile'
	/loader/init.lua:137: in main chunk
But starting with a lua error. Generally it'll be the last thing you see.

Was this log taken after the program was exited or before?

hamrkveldulfr
Halfling
Posts: 84
Joined: Wed Apr 13, 2011 6:43 pm

Re: blank screen (technical question)

#11 Post by hamrkveldulfr »

I thank you all for your help, i think i found my problem! seems construct is set for only one race and by adding a second race it was causing the game to misfire.
i added my homunculus to the human tree and it works fine.
again, thank you all, i will find the problem eventually and post it once i find

Post Reply