tk102 Posted March 26, 2004 Share Posted March 26, 2004 There's been a lot of discussion about adding spells to items and making flamethrowers and what not recently. I created an armband flamethrower which works, though I haven't been able to perfect the animation. Screenshot The problem that we ran into on this thread was the hostile indicator would not give the option using the item or would not invoke the spell correctly. So I decided to model this item from an armband (specifically, Echani Shield) so no targeting is involved: the nearest enemy gets burned. Here is a summary of how I built the flamethrower: 1) In Kotor Tool, opened up g_i_frarmbnds04 and extracted it to the Override directory, saving it as g_i_frarmbnds22. 2) Open up g_i_frarmbnds22 in GFF Editor, changing Tag and TemplateResRef to g_i_frmarmbnds22. In PropertiesList - SubType changed this field to 132. In LocalizedName, entered 'TK Flamethrower'. 3) In Kotor Tool, opened up spells.2da. Copied row #102 (Echani Shield) to a new row (#132 -- same as referenced in PropertiesList - Subtype above). 4) In Kotor Tool, extracted k_sup_bands.nss from Bifs->Templates->Scripts. 5) Modified k_sup_bands.nss by adding the following elseif statement. (I stole pieces from k_inc_force.nss and got help using NWN Lexicon reference.) right after this part else if(nIndex == 115) { nShield = SHIELD_DROID_ENVIRO_3; nIcon = 54; } add this else if(nIndex == 132) { int nDamage=60; int nDC=20; object oSelf=GetSpellTargetObject(); object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 17.0, GetLocation(oSelf), FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE); while (GetIsObjectValid(oTarget)) { if (GetIsEnemy(oTarget)) { break; } oTarget = GetNextObjectInShape(SHAPE_SPHERE, 17.0, GetLocation(oSelf), FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE); } if (GetIsObjectValid(oTarget)) { effect eBeam = EffectBeam(2053, OBJECT_SELF, BODY_NODE_HAND); //Flame Thrower effect eVFX = EffectVisualEffect(1039); effect eBump = EffectVisualEffect(2062); effect eHorror = EffectHorrified(); effect eDam; eHorror = SetEffectIcon(eHorror, 57); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oTarget); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam, oTarget, 1.0); if(GetHitDice(oTarget) < 7 || FortitudeSave(oTarget, 15) == FALSE) { ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHorror, oTarget, 3.0); } DelayCommand(0.33, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBump, oTarget, 1.5)); if(ReflexSave(oTarget, nDC, SAVING_THROW_TYPE_FIRE)) { nDamage /= 2; } eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); } return ; } I hated having to modify spells.2da, but I couldn't think of another way to break into k_sup_bands.nss effectively. Anyway, armbands are pretty convenient for tucking in scripts. I think the old schools modders like Andaragor did this to invoke mods (Emporium mod I think). Not sure at this point how to make a weapon behave similarly. Link to comment Share on other sites More sharing options...
Jackel Posted March 26, 2004 Share Posted March 26, 2004 looks good tk, and proberly the best we can do till we can get some info from bioware on how to make a real flamethrowing weapon like thats going to happen though Link to comment Share on other sites More sharing options...
tk102 Posted March 26, 2004 Author Share Posted March 26, 2004 Unfortunately, the scripts handling force powers and other spells are pretty narrowly defined. So this level of script customization and recompiling is required to perform what should be an otherwise simple task. Bioware is probably happy that they don't have to support modding. Link to comment Share on other sites More sharing options...
Panglicar Posted March 26, 2004 Share Posted March 26, 2004 does it have unlimited uses ? will you publish the files pls ? Link to comment Share on other sites More sharing options...
Weiser_Cain Posted March 26, 2004 Share Posted March 26, 2004 Hmm, I can't tell from the shot, does it have an animation or does the flame just come from nowhere? Link to comment Share on other sites More sharing options...
T7nowhere Posted March 26, 2004 Share Posted March 26, 2004 Originally posted by tk102 Bioware is probably happy that they don't have to support modding. This is what I have been thinking since I started to dig into KotOR Nice work with the mod. Just a thought have you tried to use the flamethower without any weapons in your characters hands. It's most be likely that only HK-47 has the anim for the flame thower. I am curiouse with what you have changed if any thing in spells.2da besides adding a new spell. You could try to change column range from T to M(may do nothing) Link to comment Share on other sites More sharing options...
Commas Posted March 26, 2004 Share Posted March 26, 2004 so, since there was no file posted i tried doing this myself, and i cut and pasted your script just like you said, and evertyime i tried to compile it, it told me there were numerous errors and wouldn't do it, so if someone could please please just post the files needed, thanks also, what i tried to do was make it so instead of the flamethrower, its the carbonite ray, since i can't seem to make any of my scripts compile, i couldnt test this or the flamethrower, but basically i just cut and pasted stuff from k_sup_droid into the script you posted into where it looked like it fit, so if someone could let me know if this right, cause i've never done scripts, i dont understand them at all, and i dont know if this could possible even work. this is the script: else if(nIndex == 132) { int nDamage=60; int nDC=20; object oSelf=GetSpellTargetObject(); object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 17.0, GetLocation(oSelf), FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE); while (GetIsObjectValid(oTarget)) { if (GetIsEnemy(oTarget)) { break; } oTarget = GetNextObjectInShape(SHAPE_SPHERE, 17.0, GetLocation(oSelf), FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE); } if (GetIsObjectValid(oTarget)) { effect eBeam = EffectBeam(2051, OBJECT_SELF, BODY_NODE_HAND); //Carbonite Ray effect eIce = EffectVisualEffect(2055); //Ice chunks effect eSolid = EffectVisualEffect(2054); //Ice Bumpout effect eStuck; if(GetRacialType(oTarget) != RACIAL_TYPE_DROID) { eStuck = EffectParalyze(); } else { eStuck = EffectDroidStun(); } eStuck = SetEffectIcon(eStuck, 59); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oTarget); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam, oTarget, 1.0); if(ReflexSave(oTarget, nDC, SAVING_THROW_TYPE_COLD)) { nDamage /= 2; fDuration = fDuration - 6.0;nDamage /= 2; } ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSolid, oTarget, fDuration); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eIce, oTarget, fDuration); eDam = EffectDamage(nDamage, DAMAGE_TYPE_COLD); ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eStuck, oTarget, fDuration); } return ; } so yeah, dont know if it will work, probably not since i cant even compile it this way, but then again, i couldn't complie your script either. please keep in mind i have no freaking clue how scripts work or how to write them. i really want to be able to add this spell to the lightsaber i built, as its the last step before its finnished Link to comment Share on other sites More sharing options...
tk102 Posted March 26, 2004 Author Share Posted March 26, 2004 Panglicar: As created, the armband only has 5 charges. You can easily make it unlimited by editing g_i_frarmbnds22.uti with Kotor Tool or GFF Editor. Weiser Cain, T7Nowhere: The animation is what you'd expect -- 'activation of an armband' -- not the outstretched palm. I tried playing around with the k_sup_bands.nss script, changing the part that says BODY_NODE_HAND to BODY_NODE_CHEST and BODY_NODE_HEAD but that just looked more weird. Commas, Panglicar: You can download the files from here: Flamethrower files I wasn't planning on publishing the files, but rather incite others to follow the instructions laid out in this thread. I hope that others will be able to improve this type of mod. Link to comment Share on other sites More sharing options...
Darth333 Posted March 27, 2004 Share Posted March 27, 2004 Nice work. But looks dangerous! Now we will need fireproof jedi robes Link to comment Share on other sites More sharing options...
shosey Posted March 27, 2004 Share Posted March 27, 2004 looks awesome, going to try it out tonight when I get home Link to comment Share on other sites More sharing options...
shosey Posted March 27, 2004 Share Posted March 27, 2004 oh by the way, why are there rodians in the desert?? I"ve never seen this. Link to comment Share on other sites More sharing options...
tk102 Posted March 27, 2004 Author Share Posted March 27, 2004 That's Jagi and his gang -- Canderous's side quest Link to comment Share on other sites More sharing options...
Commas Posted March 27, 2004 Share Posted March 27, 2004 i understand you reason tk, i just couldn't get it to work, and i tried it like, three times, with no luck everytime, but now that i have files that work ima try to make the other droid spells work in the same fasion, thanks Link to comment Share on other sites More sharing options...
Panglicar Posted March 29, 2004 Share Posted March 29, 2004 thanx tk102 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.