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!
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.
** 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?)
I was playing with it a little and solved it at the end - the "problem" was that GUI using different format than just regular portrait icons. For normal you have portrait in .tga format, refered to .tga, however this takes only .DDS format which refer to .tga...
still thanks for your replies guys, I spent with this minor problem more time then wanted to
Ok, new version is up.
- party cannot move or turn when the gui is open (mosters still do move).
- Support for multiple "recruiting spots"
- New entity: champion_recruit, just place it in to your dungeon. See details from the demo dungeon.
JKos wrote:Ok, new version is up.
- party cannot move or turn when the gui is open (mosters still do move).
- Support for multiple "recruiting spots"
- New entity: champion_recruit, just place it in to your dungeon. See details from the demo dungeon.
100% accomplished with this. Thanks JKos, this will definitely help many modders and I am able to finish my mod with it in the future.
EDIT: JKos please how can I modify some champion to be hired automatically ? (or as a default) I need to hire starting champion as a default , in previous version I just disabled all champions and then call champion function add...(champion name), and it added hero into first free slot. This is not working now. I do not even need GUI for starting champion. I could probably make some starting point which will not allow player to move until champion named... is hired, but thats little bit clunky. maybe another option just make close button optional somehow ? Thanks for response
....
function setStartingParty()
champions.script.setStore(self.go.id)
champions.script.loadChampion('Minotaur With really long name',party.party:getChampion(1))
champions.script.loadChampion('Lab Rat',party.party:getChampion(2))
champions.script.loadChampion('Test Woman',party.party:getChampion(3))
end
delayedCall(self.go.id,0.1,'setStartingParty')
....
function setStartingParty()
champions.script.setStore(self.go.id)
champions.script.loadChampion('Minotaur With really long name',party.party:getChampion(1))
champions.script.loadChampion('Lab Rat',party.party:getChampion(2))
champions.script.loadChampion('Test Woman',party.party:getChampion(3))
end
delayedCall(self.go.id,0.1,'setStartingParty')
Hope you got the idea.
working fine, thanks !
another small request if you will be around hopefully the last one I have full party and I want hire new champion (called Mortimer)- what Id like to do is that this champion could only replace champion called for example Drakkan, other ones should not appear in the "who will go" menu. Is that possible ?
Hi Jkos. Wow man this Script is awesome and imam using it no cool Is there away to keep the deleted Camp in memory so you can retrieve that Champ later on eg:
Taliah has to leave the party so Yule can do a Quest with the party. When the Quest is finished i can go back to the Inn and get Taliah back and ditch Yule.
I was going to implement that, but we don't have access to the portrait of the champion so I could't implement it.
And there is a one big problem with this script, it's impossible to downgrade the level of the champion, so you have to make sure that all recruitable champions are at least at the same level as the highest level party member.
These problems are the result of limitations of the modding api and can not be solved without new modding features.
We need at least:
champion:getPortrait() -- returns the file path to the champion portrait.
champion:setLevel(number)
- Champion levels works now as the should (see previous post)
- Traits are now shown in champion details
- Some minor gui tweaking (like nicer cancel button)
- party.onMove, party.onTurn-hooks are not needed anymore
so you can just remove them.
- monster AI is disabled when the gui is open.
- Script now uses party.onDrawGui-connector instead of the hook so you must remove the line:
champions.script.gui(g)
from your party.onDrawGui-hook
- moved the champion_recruit object definition to mod_assets\jkos\init_champions.lua
Hi Jkos so you mean you can now set the party member level(s)? I hope that's what you mean if it does then AWESOME Ohh where is the new version mate, did I miss something lol
Yeah, you can now set levels freely, Petri was so kind that he implemented Champion:resetExp() method for us.
Well actually you must set exp to match the desired level:
1 = 0 - 999
2 = 1000 - 2999
3 = 3000 - 5999
4 = 6000 - 9999
5 = 10000 - 14999
6 = 15000 - 20999
..etc
so the gap to the next level = level*1000, it always rises by 1000 exp/level.