Page 2 of 3

Re: [Script] SetDefaultParty (SDP)

Posted: Thu Sep 27, 2012 10:37 pm
by Neikun
HaunterV wrote:
Montis wrote:
Starnice wrote:Did you find a way to choose the traits?
I don't think there's a (documented) way to do this. -> Feature request!

custom traits just out of reach!
I want a Butterfingers trait where you drop a wepon on a 15% chance, counterbalanced by an additional +2 to all stats except dex.
This makes me picture a greasy Hulk Hogan D:

Re: [Script] SetDefaultParty (SDP)

Posted: Thu Sep 27, 2012 11:09 pm
by Shloogorgh
by the way, there's a small error several times in the code relating to the player 1 character. You have his name as ContarStonesKull, when it should be Contar Stoneskull. This is only a problem if you want to use the sdpUseDefaultOnly, which only turns on sdp if the player is using the default party. Well, sdp won't realize you're using the default party with the incorrect name, so the whole script ceases to function.

Code: Select all

if sdpEnable then
   if sdpUseDefaultOnly and party:getChampion(1):getName() == "ContarStonesKull" then
      setDefaultParty()
   elseif sdpUseDefaultOnly == false then
      setDefaultParty()
   end
end

Re: [Script] SetDefaultParty (SDP)

Posted: Fri Sep 28, 2012 5:21 am
by Huff
Dex and Willpower are not properly working on champion #2. Seems to keep using Mork's default stats for that.
I simply used this to override it.

Code: Select all

party:getChampion(2):setStat("dexterity", 10)
party:getChampion(2):setStat("willpower", 10)

Re: [Script] SetDefaultParty (SDP)

Posted: Tue Oct 02, 2012 11:51 pm
by Trap
HaunterV wrote:
Montis wrote:
Starnice wrote:Did you find a way to choose the traits?
I don't think there's a (documented) way to do this. -> Feature request!

custom traits just out of reach!
I want a Butterfingers trait where you drop a wepon on a 15% chance, counterbalanced by an additional +2 to all stats except dex.
haha.. or 15% chance the weapon slips from your hands and gets launched at the monster as well as damaging yourself. ;p

Re: [Script] SetDefaultParty (SDP)

Posted: Sun Feb 10, 2013 1:21 pm
by tymur
Hello, nice work.
I have question: How can I set default party (for example enable char 1 and other disable) and change it later (some chcarter will be found in the dungeon)?
Thanx a lot.

Re: [Script] SetDefaultParty (SDP)

Posted: Thu Feb 14, 2013 11:41 am
by tymur
No one can help me?

Re: [Script] SetDefaultParty (SDP)

Posted: Thu Feb 14, 2013 11:53 am
by Komag
It's in the scripting reference:
http://www.grimrock.net/modding/scripting-reference/
Champion:setEnabled(enabled)
Enables or disables the champion. A disabled champion is essentially an empty party slot.
You use it like:

Code: Select all

party:getChampion(2):setEnabled(false)
or

Code: Select all

for i=2,4 do party:getChampion(i):setEnabled(false) end
or

Code: Select all

party:getChampion(2):setEnabled(true)

Re: [Script] SetDefaultParty (SDP)

Posted: Thu Feb 14, 2013 8:50 pm
by tymur
Komag wrote:It's in the scripting reference:
http://www.grimrock.net/modding/scripting-reference/
Champion:setEnabled(enabled)
Enables or disables the champion. A disabled champion is essentially an empty party slot.
You use it like:

Code: Select all

party:getChampion(2):setEnabled(false)
or

Code: Select all

for i=2,4 do party:getChampion(i):setEnabled(false) end
or

Code: Select all

party:getChampion(2):setEnabled(true)

Thank You very much, its working! I try it previous, but I isn't working, may by I write something wrong. Thank you again.

Re: [Script] SetDefaultParty (SDP)

Posted: Sun Feb 17, 2013 10:54 pm
by tymur
Did anyone try to use custom portraits?
In editor, work perfect, but if I export dungeon and try play normally, the portraits are used defaults, not what I set...

Re: [Script] SetDefaultParty (SDP)

Posted: Sun Feb 17, 2013 11:31 pm
by tymur
tymur wrote:Did anyone try to use custom portraits?
In editor, work perfect, but if I export dungeon and try play normally, the portraits are used defaults, not what I set...
II solved it, the portraits must be in .dds, not in .tga. :)