Page 4 of 8
Re: Huge script request - new party member(s)
Posted: Tue Dec 23, 2014 12:49 am
by Drakkan
Isaac wrote: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.

** 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

Re: Huge script request - new party member(s)
Posted: Mon Dec 29, 2014 4:56 pm
by JKos
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.
https://github.com/JKos/log2doc/archive/master.zip
Re: Huge script request - new party member(s)
Posted: Tue Dec 30, 2014 8:37 am
by Drakkan
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.
https://github.com/JKos/log2doc/archive/master.zip
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
Re: Huge script request - new party member(s)
Posted: Thu Jan 01, 2015 8:45 pm
by JKos
Try this: in demo dungeon add these lines to the end of champion_recruit_1
Code: Select all
....
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.
Re: Huge script request - new party member(s)
Posted: Thu Jan 01, 2015 10:57 pm
by Drakkan
JKos wrote:Try this: in demo dungeon add these lines to the end of champion_recruit_1
Code: Select all
....
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 ?
Re: Hiring party member(s) script - SOLVED
Posted: Tue Feb 17, 2015 9:17 am
by Eleven Warrior
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.
Re: Hiring party member(s) script - SOLVED
Posted: Tue Feb 17, 2015 12:48 pm
by JKos
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)
I hope Petri finds some time to implement these.
Re: Hiring party member(s) script - SOLVED
Posted: Wed Mar 04, 2015 9:14 pm
by JKos
new version(works with LoG II version 2.2.4):
- 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
Re: Hiring party member(s) script - SOLVED
Posted: Wed Mar 04, 2015 10:24 pm
by Eleven Warrior
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

Re: Hiring party member(s) script - SOLVED
Posted: Wed Mar 04, 2015 11:44 pm
by JKos
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.
The new version can be found from here
https://github.com/JKos/log2doc/archive/master.zip