Jump to content


Photo

Changing Kits


  • Please log in to reply
9 replies to this topic

#1 icelandismine

icelandismine

    Support your 2nd Amendment rights!

  • Member
  • 280 posts

Posted 26 July 2004 - 03:36 PM

How can you be able to change a kit in game through dialog? If possible, please tell me how to do it by writing it in a .D file, but I suppose I can deal with scripting.
Thanks.
"What's wrong with being a trigger-happy, nationalistic, meat-eatin' neo-con who likes to shoot things, shoot 'em dead?"
-Me

"It is foolish and wrong to mourn the men who died. Rather we should thank God that such men lived."
- General George S. Patton

#2 DevilishPope

DevilishPope

    Hail to the Pope, baby.

  • Member
  • 108 posts

Posted 26 July 2004 - 07:05 PM

Hmm... I only know of one way:

274 AddKit(I:Kit*KIT)
This removes the creatures current kit, and then add the specified kit. Abilities from any previous kit are removed.
AddKit(0) will remove a creatures current kit.
Class restrictions apply for kits. When attempting adding an invalid kit, the existing kit (if any) will be replied.

(Thank You IESDP)

This could be done as such:

IF
InParty(Myself)
Global("KitGlobal","LOCALS",0)
Global("EventGlobal","GLOBAL",1)
THEN
RESPONSE #100
AddKit(KitName)
ReallyForceSpellRES("kitname",Myself)
SetGlobal("KitGlobal","LOCALS",1)
END


(I shamelessly took that from the NPCKIT Mod, and I sadly have no idea what ReallyForceSpellRES does, as the IESDP just says (Ref,Target)).
(To Add, you just EXTEND_BOTTOM the Character in questions personal script)

Edited by DevilishPope, 26 July 2004 - 07:06 PM.

If you are interested in free mod hosting, PM me. I am willling to host a variety of Mods, from Baldur's Gate 2 to Doom 3 and beyond.

#3 icelandismine

icelandismine

    Support your 2nd Amendment rights!

  • Member
  • 280 posts

Posted 27 July 2004 - 07:15 AM

Great! We are good to go now.
I just don't understand is why the spell needs to be forced.

The only problem with running the script from the chararcter is that scripts can be changed, and protaginists don't have overrides, methinks.
"What's wrong with being a trigger-happy, nationalistic, meat-eatin' neo-con who likes to shoot things, shoot 'em dead?"
-Me

"It is foolish and wrong to mourn the men who died. Rather we should thank God that such men lived."
- General George S. Patton

#4 DevilishPope

DevilishPope

    Hail to the Pope, baby.

  • Member
  • 108 posts

Posted 27 July 2004 - 11:26 AM

Another one that might be handy:

289 AddSuperKit(I:Kit*KIT)
This will set the creatures kit to the kit specified. Abilities from any previous kits are kept.
Class restrictions apply for kits. When attempting adding an invalid kit, the existing kit (if any) will be replied.


ack....erm....lets hope someone comes up with an answer to how to attach scripts to work on the protagonist? I'll look into it, the one that comes to mind is the script that forces the player to slayer change. :S
If you are interested in free mod hosting, PM me. I am willling to host a variety of Mods, from Baldur's Gate 2 to Doom 3 and beyond.

#5 icelandismine

icelandismine

    Support your 2nd Amendment rights!

  • Member
  • 280 posts

Posted 27 July 2004 - 05:30 PM

The one that forces the Slayer change may be in the area script for Spellhold actually. If we can't attach the script to the protanganist, we could attach it to the creature or area that the kit would change in, and change the target around.
"What's wrong with being a trigger-happy, nationalistic, meat-eatin' neo-con who likes to shoot things, shoot 'em dead?"
-Me

"It is foolish and wrong to mourn the men who died. Rather we should thank God that such men lived."
- General George S. Patton

#6 MagusWizardo

MagusWizardo

    Don't ask... please don't ask.

  • Member
  • 201 posts

Posted 28 July 2004 - 03:55 AM

ReallyForceSpell means that the spell is cast instantly and is always succesful. SpellRES means it uses a resource reference (ie, a filename) rather than a SPELL.IDS entry.
You can, from memory, attach a script to the protagonist by EXTENDing PLAYER1.BCS .  Don't quote me on that, though.

To do it in dialogue, you use a line of this format:

IF ~stuffhashapped()~ THEN DO ~makemorestuffhappen()~ <TRANSITION>

You will mostly just use AddKit() and AddSuperKit(), I *think*, although if this is the case, I cannot think what NPCKit would use the spell casting for...

#7 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 28 July 2004 - 04:20 AM

The ReallyForceSpellRES is probably used to change something that the AddKit() doesn't effect properly. Most likely it fixes kit/class title which doesn't get changed automatically for dualclass characters.

dplayer.bcs always runs on the protagonist, however, AI must be on for it to work. I suggest extending baldur.bcs if you want to affect the PC.

#8 icelandismine

icelandismine

    Support your 2nd Amendment rights!

  • Member
  • 280 posts

Posted 28 July 2004 - 06:51 AM

Baldur.bcs? Is that a global, always active script?
"What's wrong with being a trigger-happy, nationalistic, meat-eatin' neo-con who likes to shoot things, shoot 'em dead?"
-Me

"It is foolish and wrong to mourn the men who died. Rather we should thank God that such men lived."
- General George S. Patton

#9 Caswallon

Caswallon

    Telvanni Archmagister

  • Member
  • 284 posts

Posted 28 July 2004 - 11:19 AM

Exactly.

#10 Vlasák

Vlasák
  • Member
  • 51 posts

Posted 01 August 2004 - 09:07 AM

Baldur.bcs? Is that a global, always active script?

...but assigned to nobody... so you must always specify the object of action/trigger etc.
Baldur's Gate II add-on CZ - TC from Dalelands
http://addoncz.gamestar.cz

English forums are opened!