Gguy 8 Posted November 23, 2016 Greetings, great ones! I come before you, great ones, to ask a question that will fulfill my destiny...ok, let's not do that... Howdy! I always liked the way the plasma thrower looked ingame and i think it would look cool (the blue flames) as a replacement for the drain life/death field powers. I ain't no professional when it comes to Kotor modding , but I do know a bit about 2da editing and using the kotor tool for retexturing. I wish to ask if my wish is possible to achieve, and if so...how? To explain myself yet again, I wish to use the blue flame beam effect from the plasma thrower as a replacement for the drain life, death field powers (or well, all 3 of the type) Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted November 23, 2016 You would need to open k_inc_force.nss, locate each of the powers you want to edit, and swap the numbers in the EffectVisualEffect and/or EffectBeam functions with a different number from visualeffects.2da. After that, you'd save the k_inc_force.nss in your Override folder and compile k_sp1_generic.nss, which is what actually fires the force powers in-game. I don't know if the Plasma Thrower's visual effect is part of visualeffect.2da or not, but there is VFX_BEAM_PLASMA_SPRAY, which is row 2069, so you might try that value. Quote Share this post Link to post Share on other sites
Gguy 8 Posted November 23, 2016 I noticed the VFX_BEAM_PLASMA_SPRAY in the 2da, but all the info that was listed was the duration, the rest was blank (****). I'll check the mentioned file and see what i notice. I'll reply after i do so... EDIT: found the file using the Kotor tool, what should I use to open it? I'm aware that I can use notepad or notepad ++ to open script files, but i wish to ask if there is any specific tool i should use to avoid any file corruptions or errors (since most are written in text). The coding i done in my past was on a more simple level, as i am mainly a machinima director and graphics designer. EDIT MK2: i did open it with notepad as a test and noticed that it does indeed look right (as a script should) , I'll try the instructions above and see if it all works out, if not...I'll comment again EDIT MK3: (i know, so many edits, but i want to avoid double posting) : I don't seem to understand what you mean by "Numbers" , there are no numbers near the "effectvisualeffect" and the "effectbeam" sections. this is what I'm looking at: DRAIN LIFE */ case FORCE_POWER_DRAIN_LIFE: { SWFP_HARMFUL = TRUE; SWFP_PRIVATE_SAVE_TYPE = SAVING_THROW_FORT; int nDam = GetHitDice(OBJECT_SELF); int nDamTest = GetHitDice(OBJECT_SELF); if(nDamTest > 10) { nDamTest = 10; } // DJS-OEI 3/25/2004 SWFP_DAMAGE = Sp_CalcDamage( oTarget, nDamTest, 4 ); //SWFP_DAMAGE = d4(nDamTest); SWFP_DAMAGE_TYPE= DAMAGE_TYPE_DARK_SIDE; SWFP_DAMAGE_VFX = VFX_PRO_DRAIN; //Set up the drain effect link for the target effect eBeam = EffectBeam(VFX_BEAM_DRAIN_LIFE, OBJECT_SELF, BODY_NODE_HAND); effect eVFX = EffectVisualEffect(SWFP_DAMAGE_VFX); //Set up the link to Heal the user by the same amount. effect eHeal; effect eDamage = EffectDamage(SWFP_DAMAGE, DAMAGE_TYPE_DARK_SIDE); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam, oTarget, fLightningDuration); DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oTarget)); int nResist = Sp_BlockingChecks(oTarget, eDamage, eInvalid, eInvalid); SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), SWFP_HARMFUL)); if(GetRacialType(oTarget) != RACIAL_TYPE_DROID) { if(nResist == 0) { int nSaves = Sp_MySavingThrows(oTarget); if(nSaves > 0) { SWFP_DAMAGE /= 2; } eDamage = EffectDamage(SWFP_DAMAGE, DAMAGE_TYPE_DARK_SIDE); if(GetCurrentHitPoints(OBJECT_SELF) < GetMaxHitPoints(OBJECT_SELF) && SWFP_DAMAGE > 0) { eHeal = EffectHeal(SWFP_DAMAGE); ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, OBJECT_SELF); } ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget); } else { ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectForceFizzle(), OBJECT_SELF); } } } break; Now, this line does seem important, though : effect eBeam = EffectBeam(VFX_BEAM_DRAIN_LIFE, OBJECT_SELF, BODY_NODE_HAND); Quote Share this post Link to post Share on other sites
Kexikus 995 Posted November 23, 2016 You should either use Kotor Tools script editor or the Kotor Script Editor since those also allow you to compile the script once you're done. Notepad can't do that AFAIK. Quote Share this post Link to post Share on other sites
Gguy 8 Posted November 23, 2016 I did notice that the kotor tool has a text editor, I suppose that is what you are referring to? The most important part right now is figuring out what Fair strides meant by "Numbers" , there are no numbers next to the lines mentioned Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted November 23, 2016 I wasn't sure if that would be the case or not. The first part of the EffectBeam and EffectVisualEffect functions is the number. The text that is there is something from nwscript.nss that references the row in visualeffects.2da. You'd replace that with the row number itself. Quote Share this post Link to post Share on other sites
Gguy 8 Posted November 23, 2016 these are the effectbeam and effectvisualeffect lines of the drain life power: effect eBeam = EffectBeam(VFX_BEAM_DRAIN_LIFE, OBJECT_SELF, BODY_NODE_HAND); and effect eVFX = EffectVisualEffect(SWFP_DAMAGE_VFX); only actual numbers i see are the row numbers on the very left, but those are obviously not editable =P. Are you perhaps referring to the "VFX_BEAM_DRAIN_LIFE" and "SWFP_DAMAGE_VFX" lines (That makes the most sense to me, as those are also present in the 2da file) , because if not, i honestly don't see what you may be talking about. Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted November 23, 2016 EffectBeam(VFX_BEAM_DRAIN_LIFE, OBJECT_SELF, BODY_NODE_HAND); If you open nwscript.nss and search for "VFX_BEAM_DRAIN_LIFE", you will find that it will be listed something like this: int VFX_BEAM_DRAIN_LIFE = ; The number there is the same number as the row number in the visualeffects.2da file (the column furthest to the left when you're editing a .2da file is the row number). The "VFX_BEAM_DRAIN_LIFE" is merely a substitute for the number. This is to make it more understandable for people reading the script. In this case, you'd replace the "VFX_BEAM_DRAIN_LIFE" with either 2069 (the row number from visualeffects.2da that indicates Plasma Spray) or "VFX_BEAM_PLASMA_SPRAY" without the quotes. Be aware that the only reason you can use "VFX_BEAM_PLASMA_SPRAY" instead of the number is because the original values from visualeffects.2da are listed in nwscript.nss. Any that are added from a mod can't do this. Quote Share this post Link to post Share on other sites
Gguy 8 Posted November 23, 2016 I totally understand your post now, I'll go get to work and get back if I run into further issues! Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted November 23, 2016 Should you be interested in any more scripting or want to learn more, I'll be doing a streaming event where I go over scripting, trying to teach others about it and how to do it. It'll be in about three weeks or so, once on Thursday (around 5PM PST, which is UTC-8) and once on Saturday (around 9AM PST, which is UTC-8). http://deadlystream.com/forum/blog/64/entry-169-a-proposal-for-scripting Quote Share this post Link to post Share on other sites
Gguy 8 Posted November 23, 2016 Thanks for the offer, but like I said, while I do have some minor scripting experience, I am not really a scripter by trade. (Machinima direction and graphics designing (including animation, 3d animations and effects, gimp (really similar to Photoshop) ,adobe after effects and many many more.) anyways,back to the task at hand =P : I had managed to change the VFX_BEAM_DRAIN_LIFE and the beams were successfully replaced in-game (After compiling) , but I still need to do the most important part of this project: the plasma IMPACT effect is still the same as before and I want to change it to the blue flame that is used by the plasma thrower. Mind explaining how I do that part (change the impact effect)? Here is my progress so far: Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted November 23, 2016 SWFP_DAMAGE_VFX = VFX_PRO_DRAIN; effect eVFX = EffectVisualEffect(SWFP_DAMAGE_VFX); The eVFX is the effect applied to the targets, the impact effect. It references SWFP_DAMAGE_VFX as a shortcut, so changing that top line is what you want to do. The VFX_PRO_DRAIN is another shortcut from nwscript.nss that references visualeffects.2da again. This will be replaced just like you did with the beam effect. In the visualeffects.2da, look through the "VFX_IMP_" entries ("IMP" is short for "IMPACT"). You can sort the .2da by a column by click the label at the very top of the .2da file's column. Quote Share this post Link to post Share on other sites
Gguy 8 Posted November 23, 2016 Ok, so pretty much same process as before. Now the only issue will finding out what the plasma flame effect is called. I’ll check the 2da and see if any name mind resemble what I am searching for. There is one called VFX_IMP_PLASMA , I think it's pretty obvious this might be it; I’ll see when I test it out... EDIT: it wasn't the above, the visual itself was right...but the flames were green instead of the blue seen in the plasma thrower, I’ll continue searching... Success! It seems that for some reason, the row numbers for the VFX_imp_plasma and VFX_imp_posion (it's misspelled in the 2da, but it's clearly the poison effect) were switched around. Here is the final result in-game (death field is the same, besides the animation difference and splitting beams): I wish to thank Fair Strides and others for the assistance in this task, I appreciate the assistance you have given me. I’ll probably go use the death field impact (purple) in case I find that this one doesn't fit well, but I am sure glad I accomplished something! Quote Share this post Link to post Share on other sites