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
THOM
Posts: 1280
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

"immune" means the attack does no harm to the monster
"absorb" means the attack does no harm and the damage points are added to the monster-health
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
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 »

ok, thank you!
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Ask a simple question, get a simple answer

Post by akroma222 »

Hey Bongobeat,
in this thread is a good listing of all 5 monster resistance types
viewtopic.php?f=22&t=13017&p=103844&hil ... rb#p103844

(there is also code for a demo poison cloud that will drop a monsters resistance level/type down through these 5 levels when it hits
-Its from a year ago, but i just tested it and works all fine ... cast on a poison immune monster like a big herder)
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 »

Hey Akroma,
thanks for the link!

well, I've learned that there is a"vulnerable" parameter! That 's nice!
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
User avatar
Doryann34
Posts: 19
Joined: Sun Oct 02, 2016 11:45 am
Location: Montpellier, France
Contact:

Re: Ask a simple question, get a simple answer

Post by Doryann34 »

Hi everybody
Has anyone already used the GrimTK textbox toolkit?
It is very promising... but I can't get the dialogue function to work in my dungeon... :?
I connect a trigger to a lua script targetting an external dialogue file (as the one in the sample dungeon called dialogue_02.txt)
Note that I just changed the dialogue lines from the sample file - keeping the rest as it is.
When testing the game and triggering the script, I get following error message:
attempt to call field 'startDialogue' (a nil value)
Does anybody know what I am doing wrong?
Thanks a million!
Doryann
User avatar
Zo Kath Ra
Posts: 940
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Ask a simple question, get a simple answer

Post by Zo Kath Ra »

Doryann34 wrote:Hi everybody
Has anyone already used the GrimTK textbox toolkit?
It is very promising... but I can't get the dialogue function to work in my dungeon... :?
I connect a trigger to a lua script targetting an external dialogue file (as the one in the sample dungeon called dialogue_02.txt)
Note that I just changed the dialogue lines from the sample file - keeping the rest as it is.
When testing the game and triggering the script, I get following error message:
attempt to call field 'startDialogue' (a nil value)
Does anybody know what I am doing wrong?
Thanks a million!
Doryann
Can you upload your dungeon?
I've built a small test dungeon and everything works fine.
User avatar
Doryann34
Posts: 19
Joined: Sun Oct 02, 2016 11:45 am
Location: Montpellier, France
Contact:

Re: Ask a simple question, get a simple answer

Post by Doryann34 »

Zo Kath Ra wrote: Can you upload your dungeon?
I've built a small test dungeon and everything works fine.
Hi Zo Kath Ra

I've made a few additionnal tests before surrendering... and in fact, everything works fine when creating a new dungeon. So, "why does my previous dungeon crash?", I asked myself.
The only difference between the 2 cases was, in my main project I put the "grimtk" script in the map I'm currently working on (which is not the first map of my dungeon), whereas in the test dungeon the grimtk object was located in the primary area (being a 1-map dungeon, I didn't have the choice).
So, I've reloaded my main project and I moved the grimtk object to the 1rst map of the dungeon.
...and EUREKA: it works!

So, it's a small bug and most of the mod creators won't even be bothered with it, since they are likely to put the grimtk script in their first map... but it might be worth updating the README file of the mod (right now it reads:
Open your dungeon in the Dungeon Editor (or reload it) and find the object "grimtk" in the asset browser. Add a single instance of this to your dungeon (anywhere)
If the creator of the mod reads this, I have another suggestion to make: the command line one must ad to one's dungeon init script should be:
import "mod_assets/ext/grimtk/init.lua"
Right now the install instructions read:
import "mod_assets/grimtk/init.lua"
It's a small difference but it's essential to get the mod to work 8-)

If somebody knows the author (John Wordsworth), maybe he/she could send him an email. Or give me his contact and I can write to him.

Anyway, this mod ROCKS, I'm so happy to be able to use it now!

Thx for your help Zo Kath Ra

Doryann
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

On just the off chance (for anyone else, I guess), I'll mention this... If you disable a level while editing, those scripts will disappear from the environment when previewed.

As for being on the first level, it makes sense. The levels are loaded linearly, as they appear in the script. Anything calling grimtk will have to have had it already loaded.
Badgert
Posts: 258
Joined: Sun Jan 29, 2017 6:14 pm

Re: Ask a simple question, get a simple answer

Post by Badgert »

Good afternoon!
Please tell me how to write a script for the following conditions:
There are 2 altars - altar-1 and altar-2
There are 2 items - item-1 and item-2
There is a secret door
It is necessary that the door is opened when both objects lie on the altars
Thank you
Torquemada
Posts: 25
Joined: Fri Apr 05, 2013 10:52 pm

Re: Ask a simple question, get a simple answer

Post by Torquemada »

Badgert wrote:Good afternoon!
Please tell me how to write a script for the following conditions:
There are 2 altars - altar-1 and altar-2
There are 2 items - item-1 and item-2
There is a secret door
It is necessary that the door is opened when both objects lie on the altars
Thank you
Assuming that item_1 must be placed on altar_1 and item_2 on altar_2 and it doesn't matter if other items are placed there aswell
Link to this script onInsertItem trigger on the altars:

Code: Select all

item1_placed = false
item2_placed = false

function checkAltar(altar, item)
	if altar.go == altar_1 and item.go == item_1 then
		item1_placed = true
	else
		if altar.go == altar_2 and item.go == item_2 then
			item2_placed = true
		end
	end
	
	if item1_placed == true and item2_placed == true then
		dungeon_secret_door_1.door:open()
	end
end
Post Reply