Hiring party member(s) script - 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!
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: Huge script request - new party member(s)

Post by Batty »

Mysterious wrote:Jkos good work man :) 10 Kudos??? What is a Kudo if you don't mind me asking? I guess that's the scoring system here? I think I just asked a stupid question, but ill stick my neck out lol.
Image
Interesting that it's from Greek, didn't know that. :) Maybe each secret solved = 10 kudos?
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Huge script request - new party member(s)

Post by JKos »

New version: https://github.com/JKos/log2doc/archive/master.zip
- New larger GUI (modified from the party generation screen)
- Support for champion description
- Support for items
- onRecruit-hook
- onDrawStats-hook

champions.lua contains a plenty of useful functions, like drawItem, if someone want's to create for example a shop/trade GUI.
Let's hope that there are no bugs :)

Screenshot
Image
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Huge script request - new party member(s)

Post by Drakkan »

JKos wrote:New version: https://github.com/JKos/log2doc/archive/master.zip
- New larger GUI (modified from the party generation screen)
- Support for champion description
- Support for items
- onRecruit-hook
- onDrawStats-hook

champions.lua contains a plenty of useful functions, like drawItem, if someone want's to create for example a shop/trade GUI.
and NOW I wonder how many cudos you deserve :shock:
really wonderfull and not just from visual side. thanks

EDIT: small request - is there some function that could be added that if GUI is displayed, game is "freezed" ? means you cannot move till closing GUI manualy or making some option.
Ps: observation - in case there is more items than could fit in gui they are automaticly droped before party when starting editor. I do not mind as I do not plan to give more than like 10 items to new party member
Breath from the unpromising waters.
Eye of the Atlantis
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Huge script request - new party member(s)

Post by JKos »

Freeze world is possible, but I solved the problem so that if the party moves the gui is automatically closed.
Items are stored in a dynamically created ContainerItem-component and it's default capacity is 9, I think that it should be possible to allow more items by changing the type of the container. But they wont fit to the GUI, so I think 9 is good.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Huge script request - new party member(s)

Post by Eleven Warrior »

By god Jkos that is super awesome. Soon you will have Kudos coming out your ears, ill give 2 x 10 for this :) Are you going to make this GUI into a shop? Buy item sell items. I reckon you can do it although it's big ask ahy. LOG 2 Needs a Shop like Allios made for LOG 1.

Once again awesome work mate big pat on the back :o
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Huge script request - new party member(s)

Post by Drakkan »

Hi Jkos, I have following problem - in case I set any custom portrait to champion script (in part

portrait='assets/textures/portraits/human_female_04.tga',

editor crash when I try to display champions portrait in displayed GUI (just hover with mouse over name of the champion). DO need that picture have something special ? It was working for previous version of your GUI system.
Image
Breath from the unpromising waters.
Eye of the Atlantis
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Huge script request - new party member(s)

Post by Eleven Warrior »

Hmmmm Is it the size of your picture Drakkan - I must get back to the editor and check this out thxs for the tip :)
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Huge script request - new party member(s)

Post by Drakkan »

Eleven Warrior wrote:Hmmmm Is it the size of your picture Drakkan - I must get back to the editor and check this out thxs for the tip :)
tried default 128x128 tga format,aslo 75x75 but neither is working. THere are no clues what is the correct size :/
Breath from the unpromising waters.
Eye of the Atlantis
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Huge script request - new party member(s)

Post by JKos »

There is nothing special in my script when drawing champions, I just use context.drawImage(filepath,x,y) method, so there must be something wrong with your image format or filepath. Sorry but I can't help you more with this.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
User avatar
Isaac
Posts: 3190
Joined: Fri Mar 02, 2012 10:02 pm

Re: Huge script request - new party member(s)

Post by Isaac »

Drakkan wrote:Hi Jkos, I have following problem - in case I set any custom portrait to champion script (in part

portrait='assets/textures/portraits/human_female_04.tga',

editor crash when I try to display champions portrait in displayed GUI (just hover with mouse over name of the champion). DO need that picture have something special ? It was working for previous version of your GUI system.
Image
** I think that Xanathar may have run into the same problem in his own mod... It was the same situation; and was the image at fault, but I don't recall what the actual problem was.

** Could it be that the dds file must not be compressed?

(Also... Is it a DDS file that you are using?)
Post Reply