GrimTK Problem Solved

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!
Post Reply
Echoplex
Posts: 63
Joined: Tue Nov 04, 2014 10:59 pm

GrimTK Problem Solved

Post by Echoplex »

Hello. I'm having an issue getting scripts to run/show with GrimTK within my current mod project. Using a pressure plate to activate a script that reads

Code: Select all

function message1()
	GTKGui.Basic.showInfoMessage("Welcome to the Test.");
end

What happens is nothing. No errors, doesn't come up. I tested this same scenario in a fresh test dungeon so something is conflicting. Let me described what I have done already:

1. Placed grimtk folder in mod_assets/ext/grimtk/
2. Mapped my init to import "mod_assets/ext/grimtk/init.lua"
3. Ensure nothing is named GTK
4. Placed the Grimtk script in the upperleft on the top most map.
5. Positioning the import "mod_assets/ext/grimtk/init.lua" at the beginning or end of the init.lua
6. Tested in fresh dungeon. It works here.

Current assets included:
1. Ctomb model/tilepack
2. Dungeon master pack
3. Sx_urban,town, SX winter
4. Minassets
5. A few custom defined monsters/items
6. A few LOG 1 monsters
7. Dark temple tileset from LOG

I have not begun shedding unused assets just yet but I suspect something there is causing a conflict. Or maybe I need to activate some sort of GUI option within the editor I don't know. Im hoping someone has had a similiar issue and overcome. On a related note the Search function on the forums has been kicking back the below error since this weekend. Not sure whats going on there if anyone else is having an issue. Switching browsers didn't help. Thanks for the read.
SpoilerShow
SQL ERROR [ mysqli ]

Table './forum/phpbb_search_wordmatch' is marked as crashed and last (automatic?) repair failed [144]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
Last edited by Echoplex on Tue Feb 23, 2016 10:43 pm, edited 1 time in total.
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: GrimTK Problem

Post by Eleven Warrior »

This is the code I have for a basic dialog box. Your code is missing a few lines so try this and see if it works. Also the Temple set is broken I thinks.

Code: Select all

function StormStart1A()
	local text = "PARTY: coughing....Whe...Where are we....coughing. ";
	local duration = 2.5;	
	GTKGui.Basic.showInfoMessage(text, duration);
end
1 - local duration = 2.5 --This is the amount of time the message is displayed.

Then if you want a second dialog box appear after the first one then do this:

Code: Select all

function StormStart1A()
	local text = "PARTY: coughing....Whe...Where are we....coughing. ";
	local duration = 2.5;	
	GTKGui.Basic.showInfoMessage(text, duration);
		delayedCall(self.go.id,2.5,"StormStart1B")
end

function StormStart1B()
	local text = "Crom: What happened? How did we......";
	local duration = 3.0;	
	GTKGui.Basic.showInfoMessage(text, duration);
end
2 - delayedCall(self.go.id,2.5,"StormStart1B") ---- calls the next box after 2.5 seconds.
Echoplex
Posts: 63
Joined: Tue Nov 04, 2014 10:59 pm

Re: GrimTK Problem

Post by Echoplex »

Thanks Eleven Warrior for responding. I'm still not having anything display while testing the map. Trigger has been checked, script looks good, loads fine still no text displayed. If you missed it, I was able to copy the sample script referenced earlier to a fresh, brand new dungeon and have it display no problem. Either something is hard conflicting or given that there are additional assets it needs special treatment in placement, I don't know.

As for temple, I haven't seen any issues just yet but ill keep an eye on it. Thanks
Echoplex
Posts: 63
Joined: Tue Nov 04, 2014 10:59 pm

Re: GrimTK Problem *Solved*

Post by Echoplex »

I have found the issue. It was conflicting with Skugs weather code I had in the init.
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: GrimTK Problem Solved

Post by Eleven Warrior »

Glad to be of some help. What was the issue with Skuggs weather problem in you init.lua file mate?
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: GrimTK Problem Solved

Post by minmay »

They didn't look at all the files they were importing before they imported them. Skuggasveinn's winter tileset init.lua overwrites the party definition (for no good reason), eliminating all the hooks that GrimTK relies on. You've got to be careful with these things; nobody has the time to test whether their asset pack integrates with every other asset pack, especially asset packs that don't exist yet.

And yes, the dark temple conversion is thoroughly broken, but I'll be releasing a non-broken version soon that you can replace it with.
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.
Echoplex
Posts: 63
Joined: Tue Nov 04, 2014 10:59 pm

Re: GrimTK Problem Solved

Post by Echoplex »

Yep I pulled the script to take a look at it and forgot to remove it. On another note is anyone else having issues with the forum search? It keeps giving a crazy error regardless of browser used?
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: GrimTK Problem Solved

Post by minmay »

Yeah that happens with phpBB occasionally. Just use Google search with site:grimrock.net for now.
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
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: GrimTK Problem Solved

Post by Eleven Warrior »

Thxs Minmay for doing the Temple conversion cant wait to see it :)
Post Reply