Page 14 of 15
Re: [WIP] GrimTK GUI Framework
Posted: Fri Oct 14, 2016 6:03 pm
by Cashpwns
zimberzimber wrote:I may be wrong, but I assume the reason behind the crashes is in the following segment (inside showDialogue) -
Code: Select all
id = "show_wares",
speakerName = storeKeeperName,
speakerMessage = "I require an item if you wish to pass, I need a new shield, named the Vanguard. Get it for me and you can pass. Its in Zeonguard Cave.",
responses = {
{ text = items.uiName, onSelect=self.go.id..".script.buyItem" },
{ text = "Alright, I will get the shield for you. <Walk Away>" },
{ text = items.uiName, onSelect=self.go.id..".script.buyItem" }, calls the buyItem function, but it doesn't give it any data.
function buyItem(index) expects to receive data, but it doesn't.
Again, I may be wrong.
minmay wrote:I suggest that you review what commas and parentheses mean in Lua. Because this block:
Code: Select all
items = { name="lightning_blade", uiName="Here is the Vanguard.", cost=1
},
function ()countInventoryItem(name)
does NOT do what you wanted it to do. You wanted:
Code: Select all
items = { name="lightning_blade", uiName="Here is the Vanguard.", cost=1
}
function countInventoryItem(name)
Thanks for helping me on this! Both of you were right, I fixed my commas and parentheses, and the buyItem doesnt receive data and the script does not give out any data. Now I just have to find out how to make the script send data, and make myself learn how to not use heavily coded samples.
Re: [WIP] GrimTK GUI Framework
Posted: Sun Nov 06, 2016 9:58 pm
by Duncan1246
I test some scripts to display several texts on screen.
This works well if I use a string in showText, but fails if I do it with a variable with a string value.
EDIT: the issue wasn't due to the string variable itself but apparently to its lenght.
Now I am trying to change the background image, but "no valid image to show" is the only thing I get (image in dds format)
Some help?
Re: [WIP] GrimTK GUI Framework
Posted: Sat Nov 26, 2016 12:34 pm
by ColdDeadStone
Hello! Guess i found a bug! First, sorry for my English, i try to explain as good as possible. Download "GrimTK Alpha 008-23-0-0-007" and open the Sample Dungeon "GrimTK.dungeon_editor" and then export the Dungeon. Start a new game with the exported dungeon. Go to the "Text Input Section" and save the game! (quicksave for example)
Try to solve the Password. Its Working! Wrong Password do what it should and the Right Password is working too...
BUT if you now LOAD the game and try to click on the "Text Entry Box" to start typing the game crashes! Restarting the game and loading the savegame and trying again make it crash again... So, you cant save the game and still have a working "Text Input Box"!
Heres the Error from the "grimrock.log":
Loading dungeon GrimTK-Alpha-008-Test by John Wordsworth
Game loaded
=== Software Failure ===
mod_assets/ext/grimtk/scripts/gtk/input.lua:280: bad argument #1 to 'keyDown' (string expected, got nil)
stack traceback:
[C]: in function 'error'
[string "ScriptInterface.lua"]: in function 'checkArg'
[string "Gui.lua"]: in function 'keyDown'
mod_assets/ext/grimtk/scripts/gtk/input.lua:280: in function 'isKeyDown'
mod_assets/ext/grimtk/scripts/gtk/input.lua:245: in function 'commit'
mod_assets/ext/grimtk/scripts/gtk/core.lua:847: in function 'update'
mod_assets/ext/grimtk/scripts/hook.lua:2: in function <mod_assets/ext/grimtk/scripts/hook.lua:1>
[string "Script.lua"]: in function 'sendMessage'
[string "Component.lua"]: in function 'triggerConnectors'
[string "Component.lua"]: in function 'callHook'
[string "Gui.lua"]: in function 'draw'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk
Any idea how to fix this? Btw. this also crashes in my own dungeon not only in the sample one!
Thanks for reading!
Re: [WIP] GrimTK GUI Framework
Posted: Sun Nov 27, 2016 7:11 am
by ColdDeadStone
Still didnt find a fix for the Problem! But for a quick workaround you can "comment out" line 280 in the input.lua script which looks like this:
--self.current.keys[key] = self._context:keyDown(key);
With this a working "Text Input Box" after Saveing and Loading the game is possible BUT you lose the ability to use your Shift key for Special Characters! and CAPITALS. In my case its not a good solution but if the author cant fix it or nobody else find a way to fix it i have to use it that way, still better than crashing to Desktop.
Alright, thanks for reading and a nice day!
Re: [WIP] GrimTK GUI Framework
Posted: Sun Nov 27, 2016 7:13 am
by Isaac
ColdDeadStone wrote:Still didnt find a fix for the Problem! But for a quick workaround you can "comment out" line 280 in the input.lua script which looks like this:
--self.current.keys[key] = self._context:keyDown(key);
With this a working "Text Input Box" after Saveing and Loading the game is possible BUT you lose the ability to use your Shift key for Special Characters! and CAPITALS. In my case its not a good solution but if the author cant fix it or nobody else find a way to fix it i have to use it that way, still better than crashing to Desktop.
Alright, thanks for reading and a nice day!
I sent him the link to your post. No word if he's read it yet; but he's still active.
Re: [WIP] GrimTK GUI Framework
Posted: Wed Aug 30, 2017 10:27 pm
by Xardas
Time to bring new life back here.
How can i make a shop with more items than in the Dialog.04? I tried it with multiple pages, but the onSelect hook always Counts the index from 1 to 4 dependent on the item clicked, because i have only space for max. 4 items on one page and i can´t add more. Maybe it´s possible to give the function a fourth Parameter for making distinctions in the buy function.
Re: [WIP] GrimTK GUI Framework
Posted: Sun Dec 09, 2018 1:32 pm
by Zo Kath Ra
GrimTK uses assets/textures/gui/gui_items.tga
This file isn't in the LoG 2 asset pack.
How can I extract it from grimrock2.dat ?
The file is made up of many different graphics.
What are their coordinates?
Re: [WIP] GrimTK GUI Framework
Posted: Sun Dec 09, 2018 9:33 pm
by minmay
Re: [WIP] GrimTK GUI Framework
Posted: Sat Dec 22, 2018 11:08 am
by Zo Kath Ra
Main Menu -> Custom Dungeon
Can I use the font of the window title ("Choose Dungeon") with GrimTK?
Re: [WIP] GrimTK GUI Framework
Posted: Mon Aug 19, 2019 6:01 pm
by akroma222
grimtk based Question, (re clicking through windows/widgets) posted in simple Q simple A thread
viewtopic.php?f=22&t=7951&p=120714#p120714
Akroma
EDIT: Nevermind, found a suitable workaround