Ask a simple question, get a simple answer

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

What spell?
User avatar
7Soul
Posts: 209
Joined: Sun Oct 19, 2014 1:56 am
Location: Brazil

Re: Ask a simple question, get a simple answer

Post by 7Soul »

Isaac wrote: Thu Oct 17, 2019 3:04 amWhat spell?
Any, even Light. This is annoying to test, since it takes 3 minutes to export (if it doesn't randomly fail) plus getting into game...

I tried finding any onSpellCast hooks and commented out all addTrait() instances but didn't help
Join the LoG discord server: https://discord.gg/ArgAgNN :D

My Mods
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

just a tip for exporting files,
put graphics on low before you start up the editor and export your mod

or simply install that 4 gb patch
User avatar
7Soul
Posts: 209
Joined: Sun Oct 19, 2014 1:56 am
Location: Brazil

Re: Ask a simple question, get a simple answer

Post by 7Soul »

Speaking of which, anyone else gets this sometimes?

Image

I've been working on this mod for nearly a year but this only started happening like 2~3 months ago
Join the LoG discord server: https://discord.gg/ArgAgNN :D

My Mods
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

No.

It would be helpful if you give more details.
Are you exporting while on "low graphics settings" This is important! Or at least using the 4 GB patch?

Have you used any of the available custom asset packs from other modders that might interfere?

Since you are using custom classes, are you taking the time to create a new custom party when testing out your .dat file?
When I introduced custom classes in my mod, using the default party to "quickly" test the newly created .dat file caused similar issues.
And I had to take the time to create a new party every time I wanted to test my new .dat file.
User avatar
7Soul
Posts: 209
Joined: Sun Oct 19, 2014 1:56 am
Location: Brazil

Re: Ask a simple question, get a simple answer

Post by 7Soul »

Pompidom wrote: Thu Oct 17, 2019 5:45 am No.

It would be helpful if you give more details.
Are you exporting while on "low graphics settings" This is important! Or at least using the 4 GB patch?

Have you used any of the available custom asset packs from other modders that might interfere?

Since you are using custom classes, are you taking the time to create a new custom party when testing out your .dat file?
When I introduced custom classes in my mod, using the default party to "quickly" test the newly created .dat file caused similar issues.
And I had to take the time to create a new party every time I wanted to test my new .dat file.
You might be on to something

Recently I started testing my mod with this function to quickly create a default test party (the goal is to work as a failsafe if the player chooses to not create a party or import one):
SpoilerShow

Code: Select all

function setDefaultParty()
	local champion = nil
	for c=1,4 do
		champion = party.party:getChampionByOrdinal(c)
		-- Reset Level
		champion:resetExp(0)
		-- Reset Skills
		for i=1,#skillNames do
			local s = champion:getSkillLevel(skillNames[i])
			champion:trainSkill(skillNames[i], s * -1, false)
		end
		-- Remove items
		for s=1,32 do champion:removeItemFromSlot(s) end		
	end

	champion = party.party:getChampionByOrdinal(1)
	champion:setRace("insectoid")
	champion:setClass("monk")
	champion:addTrait("persistence")
	champion:trainSkill("heavy_weapons_c", 1, false)
	champion:trainSkill("athletics", 1, false)

	champion = party.party:getChampionByOrdinal(2)
	champion:setRace("lizardman")
	champion:setClass("assassin_class")
	champion:addTrait("wide_vision")
	champion:trainSkill("light_weapons_c", 1, false)
	champion:trainSkill("critical", 1, false)

	champion = party.party:getChampionByOrdinal(3)
	champion:setRace("ratling")
	champion:setClass("corsair")
	champion:addTrait("rodent")
	champion:trainSkill("firearms", 1, false)
	champion:trainSkill("alchemy", 1, false)

	champion = party.party:getChampionByOrdinal(4)
	champion:setRace("human")
	champion:setClass("elementalist")
	champion:addTrait("lore_master")
	champion:trainSkill("elemental_magic", 1, false)
	champion:trainSkill("concentration", 1, false)

	for c=1,4 do
		champion = party.party:getChampionByOrdinal(c)
		champion:setHealth(champion:getMaxHealth() * 0.9)
		champion:setEnergy(champion:getMaxEnergy() * 0.9)
	end
end
It's the 4th champion that triggers the bug. I've made a human elementalist with lore master trait via character creation and it works, so now... to figure out why this breaks stuff
Join the LoG discord server: https://discord.gg/ArgAgNN :D

My Mods
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

7Soul wrote: Thu Oct 17, 2019 5:13 am Speaking of which, anyone else gets this sometimes?

Image

I've been working on this mod for nearly a year but this only started happening like 2~3 months ago
Does your mod produce a .dat file that is over 100 MB? The filesize limit for Steam Workshop is somewhere close to that.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
7Soul
Posts: 209
Joined: Sun Oct 19, 2014 1:56 am
Location: Brazil

Re: Ask a simple question, get a simple answer

Post by 7Soul »

minmay wrote: Thu Oct 17, 2019 9:23 am
7Soul wrote: Thu Oct 17, 2019 5:13 am Speaking of which, anyone else gets this sometimes?

Image

I've been working on this mod for nearly a year but this only started happening like 2~3 months ago
Does your mod produce a .dat file that is over 100 MB? The filesize limit for Steam Workshop is somewhere close to that.
101mb, but the error only happens some times
Join the LoG discord server: https://discord.gg/ArgAgNN :D

My Mods
User avatar
THOM
Posts: 1274
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

Can you do anything with the monstergroup component?

A code that I expect to be like

Code: Select all

twigroot_pair_1.monstergroup:getAIState()
results in a crash "attempt to index global "twigroot_pair_1" ( a nil value)" when twigroot_pair_1 absolutely exists.
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

That means twigroot_pair_1 does not exist. MonsterGroupComponent, upon first updating, spawns its monsters and destroys its GameObject.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Post Reply