[WIP] GrimTK GUI Framework

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
JohnWordsworth
Posts: 1387
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JohnWordsworth » Thu Jan 01, 2015 5:15 pm

Quick preview video showing the latest changes;

https://drive.google.com/file/d/0B2rfBg ... sp=sharing

Just trying to hunt down a save issue with exported dungeons and got one or two more things to add, then V1 should be ready!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

User avatar
Drakkan
Posts: 1317
Joined: Mon Dec 31, 2012 12:25 am

Re: [WIP] GrimTK GUI Framework

Post by Drakkan » Thu Jan 01, 2015 11:10 pm

seems so cool ! If you can be so nice, please attach also following examples in future versions (I will probably find it myself, but this could help a lot I think)

- how to make GUI larger (not sure if there is some scroll button or you can just enlarge it somehow ?)
- I´d like to display the Gui only in case if you have champion named xxx and yyy for example in the party
- how to set picture position inside the GUI easily
- how to set some GUI button to trigger another script inside dungeon
- how to make some easy GUI conversation (something like "gamebook" principle, button A will display GUI2, button B GUI3, button C will close the GUI etc...)
- how to use this type box in your video to trigger something in case correct (defined) answer is given

- if there is possibility for GUI to re-trigger again (for example button A will close the GUI, but GUI could appera again, while button B will close this GUI forever)
- if possible that some GUI button will be hidden (or not clickable) till some conidtion fullfiled (for example party do not have some item)
Breath from the unpromising waters.
Eye of the Atlantis

User avatar
SnowyOwl47
Posts: 148
Joined: Fri Sep 12, 2014 10:41 pm

Re: [WIP] GrimTK GUI Framework

Post by SnowyOwl47 » Fri Jan 02, 2015 7:20 am

I'd be happy to test this out for you :lol:

I haven't been on the forums in a while but a lot has changed now and Im working on some new things and doing some other things you know.
But thats besides the point I'd love to do testing for you, I do coding in a good amount of coding languages, such as HTML, CSS, Java, Objective C, Swift, Lua. LOG2 doesn't have too good of a gui coding so its more complicated to use lots of coding required and of course you can't really use Lua's gui coding very easily either.

User avatar
akroma222
Posts: 1024
Joined: Thu Oct 04, 2012 10:08 am

Re: [WIP] GrimTK GUI Framework

Post by akroma222 » Fri Jan 02, 2015 8:37 am

JohnWordsworth wrote:Quick preview video showing the latest changes;

https://drive.google.com/file/d/0B2rfBg ... sp=sharing

Just trying to hunt down a save issue with exported dungeons and got one or two more things to add, then V1 should be ready!
Absolutely brilliant Sir Wordsworth!!
By the sounds of things, your V1 is a sort of beta version for now??
Also will you be able to provide a read me/ instructional guide thingy?

User avatar
TheStoryteller01
Posts: 20
Joined: Wed Dec 31, 2014 3:29 am
Contact:

Re: [WIP] GrimTK GUI Framework

Post by TheStoryteller01 » Fri Jan 02, 2015 7:59 pm

Your framework offers a lot of features I would dearly need for bringing the heroes party a bit to life in having them comment on the place/situation or even converse with each other.

I was just wondering if there will be a way to script a heroe's picture to be displayed. Afaik thats not even possible to manage with the vanilla cutscene system.

User avatar
JohnWordsworth
Posts: 1387
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JohnWordsworth » Sat Jan 03, 2015 12:22 am

@Drakkan: Thanks for the list of "useful examples". I will make sure there are examples of all of these things in the demos folder (assuming that they are all possible, which they should be :)). With regards to your other question - you use "createWindow" to make a widow, "hide/show" to hide them from view if you want to temporarily hide them or "removeWindow" to permanently destroy it.

@SnowyOwl: I intend to release a version in the next couple of days. It'll be "Beta" in the sense that the API might change in the short-term, but I think I've pretty much settled on the architecture now, so it shouldn't change much.

@Akroma222: Yup, "V1" will kind of be a "Beta" for a while. I'll then make changes based on feedback from you guys - add any features you need etc, and then release properly on the Nexus. Most of the instructions will simply be demo scripts you can drop into your dungeon (and then copy bits of). I hope that's helpful!

@TheStoryteller01: Unfortunately, I don't think it's possible to get a champion's portrait path for rendering in the GUI. :(. Maybe in a future update there will be a champion:getPortrait() that retrieves a value you can pass to the GUI.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

User avatar
Eleven Warrior
Posts: 726
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: [WIP] GrimTK GUI Framework

Post by Eleven Warrior » Sat Jan 03, 2015 9:11 am

Hi john. I am not sure this this will be any good for your GUI, but would it be possible to have a yes/no question dialog box added eg:

1 - Question: Do you really want to fight me?

2 - Answer_1: No sorry..
Answer_2: Yeah I am going to smash your face.
Answer_3: Maybe later you pig.

If they Choose 1 nothing happens.
If they choose 2 Then game on baby lol.
If they choose 3 Then something else.

Just asking if this possible because it was done in LOG 1 Grim widgets if I am correct. Thxs mate have fun cant wait to see GMT 2 :)

User avatar
JohnWordsworth
Posts: 1387
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JohnWordsworth » Sat Jan 03, 2015 1:08 pm

One of the first things I put on the list of extensions was a 'dialogue' system :). Not 100% how I will structure it yet, but it will be easy to use. Something like...

Code: Select all

callback = function(responseIndex)
  if ( responseIndex == 1 ) then
    print("Boo Yah")
  end
end

GTK.EXT.startDialogue(callback, "King Snail", "<Slurp>...You wanna fight?", "Yes", "No");
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

User avatar
Eleven Warrior
Posts: 726
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: [WIP] GrimTK GUI Framework

Post by Eleven Warrior » Sat Jan 03, 2015 9:59 pm

Now that's awesome John this will be great for Adventure mod for sure and others of course. The main thing it does allows players to interact more with NPC's or other things. I used this in my mod that was nearly finished until LOG 2 came out lol. Anyhow keep up the good work John :) errrr just asking but how long until GMT 2 comes out matey? No pressure it's I cant wait to use it lol thxs again :)

User avatar
JohnWordsworth
Posts: 1387
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimTK GUI Framework

Post by JohnWordsworth » Sun Jan 11, 2015 10:08 pm

First off - a video showing the latest progress...

GrimTK Demo Video 02

Secondly - a download link...

GrimTK Alpha 001

Please note that this is only really for testing purposes at the moment. The only built-in extensions at this point are the info messages and the message box. I am still working on the Notebook and the Dialogue system that will also be included with GrimTK when it's done. With that said, you can already make some pretty complicated UIs if you don't mind getting your hands dirty with the more advanced scripting side of things. Bear in mind though - somethings might change and somethings are a bit broken here and there.

Still, I just wanted to share the initial work to get it out there. Any feedback would be greatly appreciated. Also, if you have any ideas for things that could be packaged in as "easy-to-use" generic interfaces (like dialogue), then let me know (and link me a game that you like their implementation of too). Can't promise anything, but if I get the time, I will add them.

Next set of updates will likely come next weekend, when I hope to have the dialogue system working so that it's useful for people.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

Post Reply