Jump to content

Home

[TSL]EffectSkillIncrease not working with SKILL_COMPUTER_USE?


Langy

Recommended Posts

I'm attempting to create a script that will temporarily increase my Computer Use skill, but it seems the EffectSkillIncrease function doesn't work with SKILL_COMPUTER_USE (or nSkill = 0). Could someone please point me towards another route that could do what this script is supposed to do? I already attempted to use AdjustCreatureSkill, but that function is both permanent and instantaneous, which is not my intention. If I could add in a reliable time-keeping portion that would re-set the skill to the original value after, say, 20 seconds have passed, that would be good, though the best solution would simply be if the EffectSkillIncrease function worked correctly with SKILL_COMPUTER_USE.

 

Here is my test script:

 

void main()	
{	
effect eBuff;
eBuff = SetEffectIcon(eBuff, 7);  

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

ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBuff, GetFirstPC(), 50.0);			

ActionStartConversation(GetFirstPC(),"workbnch");			
}

 

Simply changing SKILL_COMPUTER_USE to SKILL_REPAIR, or any of the other SKILL_* constants, makes it work correctly. Keeping it as-is, however, and the buff icon doesn't even show up.

 

I'd appreciate any help on this matter.

Link to comment
Share on other sites

Yes, I have. It acted the same exact way, which is correct, because SKILL_COMPUTER_USE is just a constant that equals 0.

 

EDIT: I'm quite aware that it's possible my installation itself is somehow at fault - could anyone please confirm whether or not it works for them?

Link to comment
Share on other sites

As far as I can see that is a bug with EffectSkillIncrease(). I don't think there is any other fully reliable way of doing it, unfortunately. While you could use AdjustCreatureSkills() like:

AdjustCreatureSkills(GetFirstPC(), SKILL_COMPUTER_USE, 30);
DelayCommand(50.0, AdjustCreatureSkills(GetFirstPC(), SKILL_COMPUTER_USE, -30));

...to grant the skill bonus and then remove it again after a while, this is fairly exploitable. I would assume that the delayed command gets dropped if the player transitions to another area/module, which would make the skill bonus permanent.

 

While it may have other undesirable side-effects, you could probably use an EffectAbilityIncrease() effect to boost the ability score that grants bonuses to Computer Use and get the desired bonus that way.

Link to comment
Share on other sites

The DelayCommand method works fine, actually, so long as you don't actively *try* to exploit it. I had set the time to 50 seconds only in my test script, the actual one only has the command last a few seconds.

 

I probably went about this in the completely wrong way, but it's all part of a script to allow remote operation of a workbench/labstation by any of your party members - not just by your PC, which is all I could actually get the game to do. ActionStartConversation(GetPartyMemberByIndex(0),"workbnch") looks like it should work, but all it does is start a conversation between the party member and the PC - so, after messing with that for a while, I decided to just make it so the PC temporarily has all the stats of the NPC. With the DelayCommand added in for SKILL_COMPUTER_USE, it works great. If I decide to release it to the public, I'll probably add in a stun effect for the 4 seconds or so that it's active, to prevent people from moving to new locations.

 

I attempted to use DelayCommand earlier - originally I had everything using AdjustCreatureSkills, as it was an easier command to work with than learning Effects, but I probably got the syntax all wrong, and it didn't compile. That's when I decided to change over to Effects, which would have been perfect if they worked with SKILL_COMPUTER_USE, but oh well.

 

Thanks for your help!

Link to comment
Share on other sites

Because then I'd have to manually find out what the change would be, etc., etc., etc. It's not a cheating application - just for convenience so you can access a workbench from anywhere using any of your characters, rather than just the Exile, like on the Hawk.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...