Jump to content

Home

How to make insta-kill grenade


Lit Ridl

Recommended Posts

I have a few question about insta-kill items, powers and feats. We all know how to make insta-kill lightsaber, balster, melee weapons. But who knows how to make insta-kill grenades and mines with custom range and that will not affect my party? The second question is about how to make insta-kill force power and feat (for example when you equip blasters they all will be insta-kill). That's all my questions. Please answer. I really need to now it!

Link to comment
Share on other sites

Grenades and mines are handled via a script and spells.2da. In order to craft a new grenade that uses the insta-kill effect you'll need to reference spells.2da. I might suggest taking a look at my creature grenade's mod for k1 that will give you a step in the right direction for building your mod. When you've taken a look at the various files you should be able to start drawing some lines between the insta kill weapons that you know and the insta-kill weapons you want. If instead you are wanting somebody to build this mod for you I would suggest you reask this in the requests subforum.

Link to comment
Share on other sites

Thanks, your mod is very helpful. I made grenades that can summon Malak, Jolee, Gizka, Super-Gizka, Maalras (from kotor II) and Vandar. Then I made mods that can summon hostile creatures (same creatures but with hostile faction). But what is script code for insta-kill? I haven't found it!

Link to comment
Share on other sites

You want to create an intant kill grenade? Alright...

 

I assume you have made a new entry into spells.2da ready for your script. Set the script field to k_instakill (Rather than editing the original script, I prefer to create my own - it makes no differnece what way you do it, this way is just quicker :)).

 

void main()  {

  effect eOuch = EffectDeath(TRUE);
  effect eParty = EffectForcePushed();
  object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 4.0, GetSpellTargetLocation(), FALSE);

  ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(1044),GetSpellTargetLocation());//I'm using the fragmentation effect.

             while(GetIsObjectValid(oTarget))
                  {
                   if (IsObjectPartyMember(oTarget))
                         {
                          ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eParty, oTarget, 0.1);//Party members are pushed back.
                         }
                   else if (GetIsEnemy(oTarget))
                         {
                          ApplyEffectToObject(DURATION_TYPE_INSTANT, eOuch, oTarget);
                         }

                   oTarget = GetNextObjectInShape(SHAPE_SPHERE, 4.0, GetSpellTargetLocation(), FALSE);
                  }

}

Compile under the script name you put in spells.2da and put both in your override.

 

I haven't tested it but I can't see any reason why it wouldn't work. If you want saves to be added to it then I can do that :). Get back to me and say if it works or not... I may get round to testing it later anyway, though.

Link to comment
Share on other sites

Thank you, Pavlos. Script looks perfect but when I uses it in KOTOR II it make only 49 piercing damage! I think it can be because of wrong item I made, it is not wrong but i made new grenade with Kotor Tool (I now gff editors are better) and it wrights:

Activate item|Grenade:frag. But I have changed spells row in my item. Spells.2da looks working.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...