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.

for some reason SKILL_COMPUTER_USE isnt working

Page: 1 of 1
 Nirran
08-15-2008, 11:16 PM
#1
decided to make some force powers, 3 for each skill to increase said skill slightly,all of them work except the computer use ones,even copy pasted and changed the 2 variables in this script,changing the include to something different works also,this is what i have

{
SWFP_HARMFUL = FALSE;
int nBonus = 5;
effect eLink3, eLink4;
float fDuration = Sp_CalcDuration( 300.0 );
eLink3 = EffectLinkEffects(eLink3, EffectSkillIncrease(SKILL_COMPUTER_USE, nBonus));
eLink3 = SetEffectIcon(eLink3, 130 );
eLink4 = EffectVisualEffect(VFX_PRO_FORCE_ARMOR);
eLink4 = EffectLinkEffects(eLink4, EffectVisualEffect(VFX_PRO_FORCE_SHIELD));
int nCnt = 0;

object oParty;
if(IsObjectPartyMember(OBJECT_SELF))
{
oParty = GetPartyMemberByIndex(nCnt);
}
else
{
oParty = OBJECT_SELF;
}

while(nCnt < 3)
{
if( GetIsObjectValid(oParty) )
{
SignalEvent(oParty, EventSpellCastAt(OBJECT_SELF, GetSpellId(), SWFP_HARMFUL));

Sp_RemoveRelatedPowers( oParty, GetSpellId() );

if( !Sp_BetterRelatedPowerExists( oParty, GetSpellId() ) ) {
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink3, oParty, fDuration);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink4, OBJECT_SELF, 1.0);
}
}
nCnt++;
if(IsObjectPartyMember(OBJECT_SELF))
{
oParty = GetPartyMemberByIndex(nCnt);
}
else
{
oParty = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, nCnt);
}
}
}


and that above include is in this file

#include "jd_force_include"

void main()
{
switch (GetSpellId())
{
case 282: //Experimental Shield

#include "jd_shield_01"

break;

case 283://Sun Beam

#include "jd_sun"

break;

case 284://Improved Sun Beam

#include "jd_imp_sun"

break;

case 285://Master Sun Beam

#include "jd_mstr_sun"

break;

case 286://Pull

#include "jd_pull"

break;

case 287://Improved Pull

#include "jd_imp_pull"

break;

case 288://Master Pull

#include "jd_mstr_pull"

break;

case 289://Chain Lightning

#include "jd_chain"

break;

case 290://Improved Chain Lightning

#include "jd_imp_chain"

break;

case 291://Master Chain Lightning

#include "jd_mstr_chain"

break;

case 292://Dust Devil

#include "jd_dust_devil"

break;

case 293://Tornado

#include "jd_tornado"

break;

case 294://Huricane

#include "jd_huricane"

break;

case 295: //Preperation

ExecuteScript("jd_prep", OBJECT_SELF);

break;

case 297: //Repair Droid

#include "jd_droid"

break;

case 298: //Improved Repair Droid

#include "jd_imp_droid"

break;

case 299: //Master Repair Droid

#include "jd_mstr_droid"

break;

case 300: //demolitions

#include "jd_demolitions"

break;

case 301: //Improved demolitions

#include "jd_imp_demo"

break;

case 302: //Master demolitions

#include "jd_mstr_demo"

break;

case 303: //awareness

#include "jd_aware"

break;

case 304: //Improved awareness

#include "jd_aware_imp"

break;

case 305: //Master awareness

#include "jd_aware_mstr"

break;

case 306: //computer use

#include "jd_comp"

break;

case 307: //Improved computer use

#include "jd_comp_imp"

break;

case 308: //Master computer use

#include "jd_comp_mstr"

break;

case 309: //persuade

#include "jd_pers"

break;

case 310: //Improved persuade

#include "jd_pers_imp"

break;

case 311: //Master persuade

#include "jd_pers_mstr"

break;

case 312: //repair

#include "jd_repair"

break;

case 313: //Improved repair

#include "jd_repair_imp"

break;

case 314: //Master repair

#include "jd_repair_mstr"

break;

case 315: //security

#include "jd_secure"

break;

case 316: //Improved security

#include "jd_secure_imp"

break;

case 317: //Master security

#include "jd_secure_mstr"

break;

case 318: //stealth

#include "jd_stealth"

break;

case 319: //Improved stealth

#include "jd_stealth_imp"

break;

case 320: //Master stealth

#include "jd_stealth_mstr"

break;

case 321: //treat injury

#include "jd_treat_inj"

break;

case 322: //Improved treat injury

#include "jd_treat_inj_imp"

break;

case 323: //Master treat injury

#include "jd_treat_inj_mstr"

break;
}
}


is that a known problem or something?cause my files and 2da are all looking good
 Nirran
08-16-2008, 2:53 PM
#2
i made it work,for some reason the game doesnt see the scripting of SKILL_COMPUTER_USE with EffectSkillIncrease() function,to make it work add another line in skills.2da and set it to be line 0,then change ur scripts to numbers instead of SKILL_ ect,matching the numbers to the line numbers of skills.2da,only drawback is that the game reads line 0 and displays it in the skills screen.i simply typed in some overview of skills for it,and made an icon.
 Nirran
08-16-2008, 3:18 PM
#3
scratch the above
Page: 1 of 1