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!
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: Ask a simple question, get a simple answer

Post by bongobeat »

Zo Kath Ra wrote: Wed Feb 19, 2020 10:46 pm
bongobeat wrote: Wed Feb 19, 2020 10:24 pm I'm not sure this will resolve the problem.

my condition works. If you do spawn it twice, you got directly a game crash. And it wasn't spawned twice, or the game would have crashed while I entered this level, exited it and come again from another entry.

Beside, I couldn't even re-trigger it, because I use invisible floor trigger, that auto destroy itself after use.

Here all was spawned, I play a few hours in other level, then save, then reload the next day, and I got the error mesage.
The error didn't even come from the level I was.

Could it be that spawning chest and making mimic of them is bad after the mod is loaded?
I mean, maybe all mimic has to be set at the first loading, chest placed in the editor?
If you could upload a savegame, we could look at it with the LoG2 savegame editor.
There must be a reference to LVL13chest_57 somewhere in the savegame.
We just need to find out where...
here is the savegame:
http://www.photo-graphix.fr/storephoto/ ... game01.sav
[URL edited by Zo Kath Ra to remove the http://www.grimrock.net/forum/ at the beginning]
How can you search something in the savegame editor? I didn't find any option to search.
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: Ask a simple question, get a simple answer

Post by bongobeat »

minmay wrote: Thu Feb 20, 2020 1:15 am Extremely unlikely. The items being stacked just means that a number in the ItemComponent is 3 instead of 1. A stack of 5000 bombs is still a single fire_bomb object with a single ItemComponent.

Mind you, my guess is also extremely unlikely (there are mimic chests with multiple items in Isle of Nex and we certainly would've heard of it if this ever happened there), which is why I suspect the pasted code doesn't provide the full story. For example, you could easily cause this error with a bad onRemoveItem hook.
I searched the chest id in the dungeon lua, and didn't find anything, then I did a search within the mod folder, nothing, except the lines I have already paste.

This is the full lines corresponding to this level:
I got it activated with a floor_trigger, connected to an external script, which search the file in the scripts folder. The file is called "level_not_directly_spawned.lua"
SpoilerShow

Code: Select all

isSPITEMLEVEL13Finished = false
function spItmlv13()
        if isSPITEMLEVEL13Finished == true then
            return
        end
spawn("pickaxe",13,9,2,0,0,"LVL13pickaxe_3")
spawn("chest",13,30,22,0,0,"LVL13chest_57")
LVL13chest_57.chest:setMimic(true)
spawn("fire_bomb",13,30,22,0,0,"LVL13fire_bomb_15")
LVL13fire_bomb_15.item:setStackSize(3)
LVL13chest_57.surface:addItem(LVL13fire_bomb_15.item)
spawn("meteorite",13,30,22,0,0,"LVL13meteorite_4")
LVL13chest_57.surface:addItem(LVL13meteorite_4.item)
spawn("meteorite",13,30,22,0,0,"LVL13meteorite_3")
LVL13chest_57.surface:addItem(LVL13meteorite_3.item)
spawn("note",13,18,3,2,0,"LVL13note_11")
LVL13note_11.scrollitem:setScrollText("I will never check these alcoves in the east.\
The ceilings suddenly crumble behind me and\
it seems I am stuck forever.\
")
spawn("mine_alcove",13,22,8,3,0,"LVL13mine_alcove_6")
spawn("weed_orb",13,22,8,3,0,"LVL13weed_orb_2")
LVL13mine_alcove_6.surface:addItem(LVL13weed_orb_2.item)
spawn("note",13,27,30,2,0,"LVL13note_13")
LVL13note_13.scrollitem:setScrollText("Mine journal note: 1278 - 06 - 10\
We have found some precious metal deposit in the meteor cavern.\
We just need to clear the way again, to get into this cave!\
Those ceilings are so unstable.\
Overseer Raslik.")
spawn("note",13,23,30,1,0,"LVL13note_14")
LVL13note_14.scrollitem:setScrollText("Mine journal note: 1278 - 06 - 11\
This wizard is very funny.\
Fear for any thief and play music at\
his time.\
Overseer Raslik.")
spawn("note",13,22,18,2,0,"LVL13note_15")
LVL13note_15.scrollitem:setScrollText("Mine journal note: 1278 - 06 - 08\
\
This mine is a mess!\
There is a toolbox that I can use\
in the eastern room, but that wizard\
protect it with a force field.\
Have to look at that, but maybe these\
4 weird notes have some utility about\
that. I shouldn't throw them away!\
\
Overseer Raslik.")
spawn("sack",13,19,12,1,0,"LVL13sack_5")
spawn("explosives",13,19,12,1,0,"LVL13explosives_11")
LVL13sack_5.containeritem:addItem(LVL13explosives_11.item)
spawn("tome_life",13,19,12,1,0,"LVL13tome_life_5")
LVL13sack_5.containeritem:addItem(LVL13tome_life_5.item)
spawn("note",13,15,9,2,0,"LVL13note_16")
LVL13note_16.scrollitem:setScrollText("Mine journal note: 1278 - 06 - 09\
What's going on with these machines?\
Someone has deliberately blocked the wheels!\
I have to check if I still have some toolbox to fix this.\
Overseer Raslik.")

isSPITEMLEVEL13Finished = true
delayedCall(self.go.id, 0.5, "spItmlv13B")
end
--------------------------------------------------------------
function spItmlv13B()
spawn("pickaxe",13,20,26,0,0,"LVL13pickaxe_7")
spawn("mine_alcove",13,17,20,2,0,"LVL13mine_alcove_7")
spawn("mine_key",13,17,20,2,0,"LVL13mine_key_1")
LVL13mine_alcove_7.surface:addItem(LVL13mine_key_1.item)
spawn("scale_1",13,16,18,3,0,"LVL13scale_1_1")
spawn("scale_4",13,16,18,3,0,"LVL13scale_4_1")
spawn("scale_7_fake",13,16,18,3,0,"LVL13scale_7_fake_1")
spawn("scale_5",13,16,18,3,0,"LVL13scale_5_4")
spawn("scale_3",13,16,18,3,0,"LVL13scale_3_2")
spawn("scale_2",13,16,18,3,0,"LVL13scale_2_2")
spawn("scale_6_fake",13,16,18,3,0,"LVL13scale_6_fake_3")
spawn("skull",13,18,3,3,0,"LVL13skull_3")
spawn("note",13,29,10,0,0,"LVL13note_12")
LVL13note_12.scrollitem:setScrollText("Mine journal note: 1278 - 06 - 09\
\
Some of these ceilings are not in a good shape,\
they blocked  the northeast exit.\
I have placed a chest with explosives\
to clear the way.\
I need only one more explosive to fill in\
and a torch to ignite the bomb.\
\
Must look in the western storeroom, if there is any left.\
\
Overseer Raslik.")
spawn("pickaxe",13,30,30,1,0,"LVL13pickaxe_11")
spawn("pickaxe",13,27,30,3,0,"LVL13pickaxe_12")
spawn("pickaxe",13,25,29,2,0,"LVL13pickaxe_13")
spawn("pickaxe",13,18,30,1,0,"LVL13pickaxe_15")
spawn("arquebus",13,7,12,1,-3,"LVL13arquebus_3")
spawn("baked_maggot",13,7,12,2,-3,"LVL13baked_maggot_3")
spawn("baked_maggot",13,7,12,0,-3,"LVL13baked_maggot_4")
spawn("scroll",13,24,6,3,0,"LVL13scroll_2")
LVL13scroll_2.scrollitem:setScrollText("weight test procedure:\
Precisely, N.2.7, 13.8, 6, 1.3\
\
Overseer Raslik.")
spawn("stone_topaze",13,18,3,2,0,"LVL13stone_topaze_2")
spawn("mine_pillar_crystal_altar_north_left",13,4,16,1,0,"LVL13mine_pillar_crystal_altar_north_left_9")
spawn("stone_topaze",13,4,16,1,0,"LVL13stone_topaze_1")
LVL13mine_pillar_crystal_altar_north_left_9.surface:addItem(LVL13stone_topaze_1.item)
LVL13mine_pillar_crystal_altar_north_left_9.surface:addConnector("onRemoveItem", "script_entity_143", "sound")
LVL13mine_pillar_crystal_altar_north_left_9.clickable:disable()
spawn("tome_water",13,5,15,1,0,"LVL13tome_water_4")
spawn("crossbow",13,5,15,3,0,"LVL13crossbow_2")
spawn("quarrel",13,5,15,2,0,"LVL13quarrel_11")
LVL13quarrel_11.item:setStackSize(3)
spawn("rat_shank",13,6,16,0,0,"LVL13rat_shank_23")
spawn("skull",13,5,15,0,0,"LVL13skull_12")
spawn("rope",13,29,30,2,0,"LVL13rope_1")
spawn("note",13,26,12,2,0,"LVL13important_note_28")
LVL13important_note_28.scrollitem:setScrollText("At this point you can count 4!")
spawn("note",13,17,15,0,0,"LVL13important_note_34")
LVL13important_note_34.scrollitem:setScrollText("Before the next moon,\
it is said that the werewolfs\
will come again and only come\
by 2.")
spawn("note",13,13,25,1,0,"LVL13important_note_37")
LVL13important_note_37.scrollitem:setScrollText("Arriving at the summit of the Ravanakul\
Urgruk the Ogre mage exlaimed himself:\
CHUPACABRAAA, another one!")
spawn("note",13,3,27,0,0,"LVL13important_note_45")
LVL13important_note_45.scrollitem:setScrollText("Count the number of sides\
of a square, obviously you will\
come to 4.")
spawn("pickaxe",13,29,26,1,0,"LVL13pickaxe_16")
spawn("pickaxe",13,29,26,0,0,"LVL13pickaxe_31")
spawn("pellet_box",13,7,12,3,-3,"LVL13pellet_box_14")
LVL13pellet_box_14.item:setStackSize(28)
spawn("potion_combined",13,18,3,0,0,"LVL13potion_combined_3")
spawn("dm_toolbox",13,26,11,3,0,"LVL13dm_toolbox_3")
spawn("mine_pillar_crystal_altar_north_left",13,2,28,1,0,"LVL13mine_pillar_crystal_altar_north_left_2")
spawn("stone_sapphire",13,2,28,1,0,"LVL13stone_sapphire_14")
LVL13mine_pillar_crystal_altar_north_left_2.surface:addItem(LVL13stone_sapphire_14.item)
spawn("stone_amethyst",13,2,28,1,0,"LVL13stone_amethyst_14")
LVL13mine_pillar_crystal_altar_north_left_2.surface:addItem(LVL13stone_amethyst_14.item)
LVL13mine_pillar_crystal_altar_north_left_2.surface:addConnector("onRemoveItem", "script_entity_143", "sound")
LVL13mine_pillar_crystal_altar_north_left_2.clickable:disable()
spawn("blooddrop_cap",13,20,11,2,0,"LVL13blooddrop_cap_20")
spawn("borra_food_only",13,18,13,2,0,"LVL13borra_food_only_2")
spawn("borra_food_only",13,9,16,1,0,"LVL13borra_food_only_3")
spawn("borra_food_only",13,4,28,1,0,"LVL13borra_food_only_4")
spawn("borra_food_only",13,5,19,1,0,"LVL13borra_food_only_5")
spawn("borra_food_only",13,30,13,0,0,"LVL13borra_food_only_6")
spawn("borra_food_only",13,27,27,0,0,"LVL13borra_food_only_7")
spawn("borra_food_only",13,17,7,0,0,"LVL13borra_food_only_8")
spawn("borra_food_only",13,17,15,3,0,"LVL13borra_food_only_9")
spawn("stealing_trickster_lvl2",13,7,1,3,0,"LVL13stealing_trickster_lvl2_2")
LVL13stealing_trickster_lvl2_2.monster:setAIState("guard")
spawn("mine_alcove",13,12,28,2,0,"LVL13mine_alcove_2")
spawn("scroll_meteor_storm",13,12,28,2,0,"LVL13scroll_meteor_storm_2")
LVL13mine_alcove_2.surface:addItem(LVL13scroll_meteor_storm_2.item)
spawn("note",13,21,26,2,0,"LVL13note_18")
LVL13note_18.scrollitem:setScrollText("Music notes: \
2, 3, ., ., .")
spawn("dm_coin_gor_silver",13,26,11,1,0,"LVL13dm_coin_gor_silver_28")
LVL13dm_coin_gor_silver_28.item:setStackSize(7)
spawn("note",13,27,12,0,0,"LVL13note_20")
LVL13note_20.scrollitem:setScrollText("Mine journal note: 1278 - 06 - 10\
\
I need to find those notes I've thrown away last day!\
The wizard finally tells me that their first letters and \
their last numbers can open that door.\
\
Overseer Raslik.")
spawn("potion_physical_transmutation",13,17,30,3,0,"LVL13potion_physical_transmutation_1")
spawn("tome_physicality",13,17,30,2,0,"LVL13tome_physicality_2")
spawn("stone_sapphire",13,11,20,1,0,"LVL13stone_sapphire_6")
spawn("scale_8_fake",13,16,18,3,0,"LVL13scale_8_fake_1")
spawn("mine_meteorite_deposit",13,13,23,0,0,"LVL13Bmine_meteorite_deposit_4")
spawn("mine_meteorite_deposit",13,9,19,3,0,"LVL13Bmine_meteorite_deposit_1")
spawn("mine_meteorite_deposit",13,6,21,0,0,"LVL13Bmine_meteorite_deposit_2")
end
and this is the full file:
http://www.photo-graphix.fr/storephoto/ ... pawned.lua
[URL edited by Zo Kath Ra to remove the http://www.grimrock.net/forum/ at the beginning]
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
SectionZ
Posts: 2
Joined: Sat Feb 22, 2020 1:29 pm

Re: Ask a simple question, get a simple answer

Post by SectionZ »

So I finally got around to registering to these forums because I can't sleep, and then ran into a stupid question that is now driving me crazy. After browsing through some of the Grimrock 2 mod asset pack files out of curiosity.

Enemy Immunity question: Meaning of ONLY Assassination immunity?

Slimes list immune to both "Assassination" and backstab. "...Wait, aren't both those things backstab?"

Summon stones list immunity to just Backstab. "Okay, seriously. What is the difference?"

Driving this home, was noting that the infamous Lindworm lists an immunity to Assassination, but not backstab. JUST, assassination (okay and a bunch of other status effects. But not backstab).

So... What does assassinate immunity even do then? It has been a while since I've played so not like I remember enough to make an educated guess by result.

Does assassinate immunity mean the enemy is immune to crits?

Does it mean they are immune to Rank 5 "Any light weapon" backstabs, but not rank 3 "With a dagger" backstabs?

Is it an obsolete keyword meant for Grimrock 1 that doesn't actually do anything in Grimrock 2?

If quick googles or forums searches did have the answer, I didn't notice any searching for both assassination and assassinate, at least.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

SectionZ wrote: Sat Feb 22, 2020 2:54 pmIs it an obsolete keyword meant for Grimrock 1 that doesn't actually do anything in Grimrock 2?
Yes.
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.
SectionZ
Posts: 2
Joined: Sat Feb 22, 2020 1:29 pm

Re: Ask a simple question, get a simple answer

Post by SectionZ »

minmay wrote: Sat Feb 22, 2020 10:48 pm
SectionZ wrote: Sat Feb 22, 2020 2:54 pmIs it an obsolete keyword meant for Grimrock 1 that doesn't actually do anything in Grimrock 2?
Yes.
Thanks. One stupid question down, and... I probably shouldn't think too hard about how many more I have to go.
User avatar
Lorial
Posts: 91
Joined: Sat Dec 29, 2018 12:27 pm

Re: Ask a simple question, get a simple answer

Post by Lorial »

How can you change the "openedBy" bit of a key lock via console command? I made a typo so the proper key doesn't fit.

Alternatively, can you "activate" the lock and all the connected triggers with a console command without using a key?

My guess it that is has to be similar to this line, but I can't seem to figure it out.
beach_lock_gold_2.lock:openedBy("gold_key")()

Thanks in advance.
User avatar
Zo Kath Ra
Posts: 937
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Ask a simple question, get a simple answer

Post by Zo Kath Ra »

Lorial wrote: Sat Feb 29, 2020 10:10 am How can you change the "openedBy" bit of a key lock via console command? I made a typo so the proper key doesn't fit.

Alternatively, can you "activate" the lock and all the connected triggers with a console command without using a key?

My guess it that is has to be similar to this line, but I can't seem to figure it out.
beach_lock_gold_2.lock:openedBy("gold_key")()

Thanks in advance.
> How can you change the "openedBy" bit of a key lock via console command?

lock_gear_1.lock:setOpenedBy("iron_key")
User avatar
Lorial
Posts: 91
Joined: Sat Dec 29, 2018 12:27 pm

Re: Ask a simple question, get a simple answer

Post by Lorial »

Zo Kath Ra wrote: Sat Feb 29, 2020 11:57 am lock_gear_1.lock:setOpenedBy("iron_key")
Of course, I needed to "set" it to something else... *facepalm*
Works like a charm, thanks a bunch.
User avatar
Zo Kath Ra
Posts: 937
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Ask a simple question, get a simple answer

Post by Zo Kath Ra »

Lorial wrote: Sat Feb 29, 2020 12:16 pm
Zo Kath Ra wrote: Sat Feb 29, 2020 11:57 am lock_gear_1.lock:setOpenedBy("iron_key")
Of course, I needed to "set" it to something else... *facepalm*
Works like a charm, thanks a bunch.
> Alternatively, can you "activate" the lock and all the connected triggers with a console command without using a key?

Code: Select all

for i = 1, lock_gear_1.lock:getConnectorCount() do 
	local hook, target, action = lock_gear_1.lock:getConnector(i) 
	--print(hook, target, action) 
	delayedCall(target, 0, action) 
end 
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Zo Kath Ra wrote: Sat Feb 29, 2020 12:29 pm > Alternatively, can you "activate" the lock and all the connected triggers with a console command without using a key?

Code: Select all

for i = 1, lock_gear_1.lock:getConnectorCount() do 
	local hook, target, action = lock_gear_1.lock:getConnector(i) 
	--print(hook, target, action) 
	delayedCall(target, 0, action) 
end 
This isn't quite right: it fails to pass the LockComponent to a target ScriptComponent, and it's delayed by a frame.
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