Jump to content

Home

Help, please. (Breakdown and Stealth)


Mythos

Recommended Posts

Hi, there are two thinks in the game i'd like changed. I haven't yet seen this as mods somewhere so I will do that myself, or at least try.

 

1st: The Breakdown bug: I hardly think that I will be able to fix this (That always the repair skill of the main character is taken, when breaking down items, not the skill of the person using the workbench) But if somebody had an idea...

 

2nd: Stealth teams: This should be easier. When you activate stealth mode the pop up tells you, that solo mode get's activated, too. I want to change this or simply deactivate this. But looking through the scripts, I was not able to find the method(s) for activating stealth mode. Can somebode tell me, where it is?

 

PS: TSL of cause

Link to comment
Share on other sites

1) Hmmm. I must be lucky cuz I've never had this problem. Sorry I can't be of more help.

 

2) I'm pretty sure that Stealth would be part of the game engine rather than script-dependent. If that is the case, then you can't disable the pop-up.

 

I hope that helps.

Link to comment
Share on other sites

As Achilles said, Stealth is a game engine feature and is not something that is scripted, so we can't really change anything about how it works. You can't even make a creature enter stealth mode via scripting. :/

 

The best I can think of as a workaround would be to fake it by using an invisibility force power (or an activatable item similar to a force shield, since they're essentially the same) that will render your whole party invisible.

 

It would be far more powerful than regular stealth though since the opponents would get no Awareness skill checks to see if they detect you. You'd essentially be undetectable until you attack someone or deactivate it.

 

If that doesn't bother you, I've made an invisibility force power that does just that. Here's the impact script of this power, should work for use both as a force power and an armband-item.

 


int ST_GetHighestAwareness();
void ST_RemovePowerEffects(int nPower, object oTarget);

void main() {
   object oCre;
   int nSpellId = GetSpellId();
   int i;

   if (GetHasSpellEffect(nSpellId)) {
       for (i = 0; i < 3; i++) {
           oCre = GetPartyMemberByIndex(i);
           ST_RemovePowerEffects(nSpellId, oCre);
       }   
       effect eRestore = EffectHealForcePoints(GetSpellForcePointCost());
       ApplyEffectToObject(DURATION_TYPE_INSTANT, eRestore, OBJECT_SELF);          
   }
   else if (!GetIsInCombat() && (GetSkillRank(SKILL_STEALTH) > 0)) {
       if (ST_GetHighestAwareness() >= 70) {
           SendMessageToPC(GetPartyLeader(), "A nearby opponent is too perceptive to successfully hide from!");
           ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectVisualEffect(8001), OBJECT_SELF );
           return;
       }       

       effect eInvis = EffectInvisibility(INVISIBILITY_TYPE_NORMAL);
              eInvis = EffectLinkEffects(eInvis, EffectVisualEffect(8000));

       for (i = 0; i < 3; i++) {
           oCre = GetPartyMemberByIndex(i);
           ApplyEffectToObject(DURATION_TYPE_PERMANENT, eInvis, oCre);
           SignalEvent(oCre, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));  
       } 
   } 
}

void ST_RemovePowerEffects(int nPower, object oTarget) {
   if (GetHasSpellEffect(nPower, oTarget)) {
       effect eEff = GetFirstEffect(oTarget);
       while (GetIsEffectValid(eEff)) {
           if( GetEffectSpellId(eEff) == nPower) {
               RemoveEffect(oTarget, eEff);
           }
           eEff = GetNextEffect(oTarget);
       }
   }   
}

int ST_GetHighestAwareness() {
   location lLoc = GetLocation(OBJECT_SELF);
   object oEnemy = GetFirstObjectInShape(SHAPE_SPHERE, 30.0, lLoc, TRUE);
   int nHigh = 0;

   while (GetIsObjectValid(oEnemy)) {
       if (GetIsEnemy(oEnemy) && !GetIsDead(oEnemy) && GetObjectSeen(OBJECT_SELF, oEnemy)) {
           int nAware = GetSkillRank(SKILL_AWARENESS, oEnemy);
           if (nAware > nHigh)
               nHigh = nAware;
       }

       oEnemy = GetNextObjectInShape(SHAPE_SPHERE, 30.0, lLoc, TRUE);
   }
   return nHigh;
}

 

To balance it out a bit, it won't allow you to go invisible while in combat mode (like stealth), you'll need at least one skill point put on Stealth to use it. Also it won't activate if there's a nearby opponent with an unnaturally high Awareness skill, since the game sometimes uses this on opponents that shouldn't be possible to sneak past.

 

The script works as a toggle. If it's not active, the invisibility is activated. If it's already active, it's deactivated instead.

Link to comment
Share on other sites

To bad. And I had really thought, I would have seen somebody who asked the same thing and got a positive answer some time ago. But since I can't find the thread, I'm probably wrong here.

 

However, I just found the script for the workbench and fixed that problem. *dance*

 

One question: Am I the only one who had this problem?

 

 

Another question:

 

I also made Atton become a Sith Assassin. However, the problem is, that Scundrel Sneak attack and Sith Assassin Sneak attack do not stack. I think the easiest way would be to simply change the sneak attack requirements to

Sith assasin (level*2) or Jedi Watchmen (level*3) or Atton (level*2).

Only drawback would be, that he still gets the message "New feat: Sneak attack 1", when leveling up as Assassin, allthough he allready has them since level 2...

Any idea about a more elegant way?

 

edit: ... Or a working one ... Giving Atton Sneak attack on a specific character level only works, if the class he is currently leveling in has no sneak attacks ...

Link to comment
Share on other sites

  • 9 months later...

Archived

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

×
×
  • Create New...