Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Questions about my custom Force Power.

Page: 1 of 1
 SomthingMachine
04-06-2011, 8:11 PM
#1
Ok, so like most of the people with questions I am new to this. I took one CS class several years ago and learned some stuff in C so the scripting looks familiar enough, but I am way out of practice. I have been looking at the examples and I saw the Force Buffs thread and the custom force power thread. Long story short I have got my power to "work," kind of. I wrote a force power that buffs all skills based on an equation of 4 + pc's wis mod (minimum of 4), and it works except for Computer Use. I'm not really sure how this happened so help would be appreciated. Here is my script...

#include "k_inc_force"

int FORCE_POWER_FORCE_INSIGHT = 132;


void main()
{

object oTarget = GetSpellTargetObject();
// This will set oTarget equal to who you cast the spell at
// In this case it will be yourself

effect eTargetVisual;

effect eBuff;
// This variable will be used to set the actual buff

SWFP_HARMFUL = FALSE;
// The variable SWFP_HARMFUL has already been declared in the include file
// It is used by the signal event command to let the target know if this is
// an attack spell or not.



if(GetHasSpellEffect(FORCE_POWER_FORCE_INSIGHT))
{
Sp_RemoveSpellEffectsGeneral(FORCE_POWER_FORCE_INS IGHT, oTarget);
// This is a function call to one of Bioware's original scripts
// it will check all of the effects oTarget has and remove them if they were
// given by the Sith Rage power
}



SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), SWFP_HARMFUL));


eBuff = SetEffectIcon(eBuff, 65);


eTargetVisual = EffectVisualEffect(VFX_IMP_MIND_FORCE);


if(GetAbilityModifier(ABILITY_WISDOM, OBJECT_SELF) >= 0)

{

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_COMPUTER_USE, 4 + GetAbilityModifier(ABILITY_WISDOM, OBJECT_SELF)));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_STEALTH, 4 + GetAbilityModifier(ABILITY_WISDOM, OBJECT_SELF)));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_DEMOLITIONS, 4 + GetAbilityModifier(ABILITY_WISDOM, OBJECT_SELF)));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_AWARENESS, 4 + GetAbilityModifier(ABILITY_WISDOM, OBJECT_SELF)));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_PERSUADE, 4 + GetAbilityModifier(ABILITY_WISDOM, OBJECT_SELF)));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_SECURITY, 4 + GetAbilityModifier(ABILITY_WISDOM, OBJECT_SELF)));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_REPAIR, 4 + GetAbilityModifier(ABILITY_WISDOM, OBJECT_SELF)));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_TREAT_INJURY, 4 + GetAbilityModifier(ABILITY_WISDOM, OBJECT_SELF)));
}

else

{

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_COMPUTER_USE, 4));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_STEALTH, 4));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_DEMOLITIONS, 4));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_AWARENESS, 4));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_PERSUADE, 4));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_SECURITY, 4));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_REPAIR, 4));

eBuff = EffectLinkEffects(eBuff, EffectSkillIncrease(SKILL_TREAT_INJURY, 4));
}


ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eTargetVisual, oTarget, 3.0);

ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBuff, oTarget, 120.0);

}


That is problem one. Problem two is that for some reason I am no longer able to select some of the force powers that are in the second column and beyond, i.e. Heal, Insanity, etc., I assumed that this had something to do with the .2da but I've tinkered as much as I know how to tinker and have found nothing.

I plan on working on an extensive expansion here in the next couple of years, but I wanted to do something small with all aspects of the game first to get a handle on modding it. I just need a little help with figuring out what is going on with my stuff. I've been messing around with this problem for a couple of days now, when I've had time. Thanks again for the help guys, I know that no one on here is obligated to help anyone, but it is nice that there are people who will help. You Guys Are Much Appreciated!! If you need my actual files to look over then pm me your email and I'll email them to you.


Lastly, I am not above criticism (as long as it is positive) so if you think that this maybe overpowered then I won't be offended if you say so and give your opinion. That is how we grow. Again, thanks for any help that is offered.
Page: 1 of 1