lfnetwork.com mark read register faq members calendar

Thread: [KotOR]Wookiee Rage and other Special Abilities
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 03-05-2008, 12:01 PM   #1
jinger
Rookie
 
jinger's Avatar
 
Join Date: Nov 2005
Posts: 187
[KotOR]Wookiee Rage and other Special Abilities

I'm giving Zaalbar his special ability and I thought I'd ask a little about them special spells. Am I right to assume there's no way to use that Special Ability utc field? If so, I've been thinking to let the whole thing be scripted and used by wookiees automatically with a subrace check, as opposed to a magic wand (stim) which would be usable by wookiees alone, say once every two minutes, and that would sadly show on the item panel. What do you think?

jinger is offline   you may: quote & reply,
Old 03-05-2008, 09:14 PM   #2
jinger
Rookie
 
jinger's Avatar
 
Join Date: Nov 2005
Posts: 187
Done. I put this in GN_DetermineCombatRound.
Code:
int EnterWookieeRage()
{
    if( (GetSubRace(OBJECT_SELF) == SUBRACE_WOOKIE) &&
        (GetHPRatio() <= 0.4) && (Random(100) < 25) &&
        GetHasSpell(SPECIAL_ABILITY_RAGE) && !GetHasSpellEffect(SPECIAL_ABILITY_RAGE) )
    {
        ClearAllActions();
        ActionUseTalentOnObject(TalentSpell(SPECIAL_ABILITY_RAGE), OBJECT_SELF);
        return TRUE;
    }
    return FALSE;
}
I have found that even if you can't select them, the spells you give a non-jedi creature are recognized by the game nonetheless, and can be used via script. So I made special abilities kind of instinctual, like a reflex. Though I don't think this sucks too much, other ideas are always welcome

jinger is offline   you may: quote & reply,
Old 03-05-2008, 09:57 PM   #3
Q
The one who knocks
 
Q's Avatar
 
Join Date: May 2006
Location: ABQ
Posts: 6,643
Current Game: Mowing down neos with my M60
LF Jester Forum Veteran Helpful! 
This is a good idea. I'll be sure to give it a try when you release it.


"They should rename the team to the Washington Government Sucks. Put Obama on the helmet. Line the entire walls of the stadium with the actual text of the ACA.
Fix their home team score on the board to the debt clock, they can win every game 17,000,000,000,000 to 24. Losing team gets taxed by the IRS 100%, then droned."
-Toker
Q is offline   you may: quote & reply,
Old 03-05-2008, 10:17 PM   #4
Darth Payne
I Am Revan, I Remember.
 
Darth Payne's Avatar
 
Join Date: Nov 2007
Location: Grong, Norway
Posts: 2,491
Current Game: DS3, Alien: Colonial Marines
I agree, might make me want to use Zaalbar more.


http://www.xboxlc.com/cards/sig/newblack/pederskomsvold.jpg
Formerly known as: Danyael27
My mods at KotorFiles: K1 Robe Stat Boost, TSL Jedi Robe Stat Boost, Jedi Fight Training.
Quando omni flunkus moritati - the motto of the Possum Lodge, Pseudo-Latin for 'when all else fails, play dead.'


SW: Invasion 05,P16 -(Spraug: Seriously? A Wookie with a lightsaber? Thats just overkill.
Darth Payne is offline   you may: quote & reply,
Old 03-06-2008, 03:47 PM   #5
jinger
Rookie
 
jinger's Avatar
 
Join Date: Nov 2005
Posts: 187
Zaalbar's rage actually sucks, I blended that with Hanharr's and gave him: +4Str, +2VP per Lev, +2Will&Fort, -4AC, immunity to paralysis, and one extra attack.
Code:
int AssumePsychicStance()
{
    if( (GetStandardFaction(OBJECT_SELF) == STANDARD_FACTION_FRIENDLY_1) &&
        GetHasSpell(SPECIAL_ABILITY_PSYCHIC_STANCE) &&
        (GetGlobalNumber("CONFUSION_CURRENT") < GetHitDice(OBJECT_SELF)/2) )
    {
        int nFoes, nAllies;
        location loc = GetLocation(OBJECT_SELF);
        object oCreature = GetFirstObjectInShape(SHAPE_SPHERE, 8.0, loc, TRUE, OBJECT_TYPE_CREATURE);
        while(GetIsObjectValid(oCreature))
        {
            if( (GetRacialType(oCreature) != RACIAL_TYPE_DROID) && !GetIsDead(oCreature) )
            {
                if(GetIsEnemy(oCreature)) ++nFoes;
                else if(GetIsFriend(oCreature)) ++nAllies;
            }
            oCreature = GetNextObjectInShape(SHAPE_SPHERE, 8.0, loc, TRUE, OBJECT_TYPE_CREATURE);
        }
        if(nFoes < 2) return FALSE;
        nFoes-=nAllies;
        if(nFoes < 1) nFoes = 1;
        if(GetHPRatio()/IntToFloat(nFoes) <= 0.2) //1 at full health versus 5 or more
        {
            ClearAllActions();
            ActionUseTalentOnObject(TalentSpell(SPECIAL_ABILITY_PSYCHIC_STANCE),OBJECT_SELF);
            return TRUE;
        }
    }
    return FALSE;
}
Here's Psychic Static, any bugs you can think of? This triggers the special ability whenever Jolee is outnumbered in a range of 8 meters, which is the power's area of effect. It won't be used in combat with Revan and Bastila, applying confusion to a party member would mean to get them out of the party, then join them back later; that'd be trouble, I guess.
Code:
        case SPECIAL_ABILITY_PSYCHIC_STANCE:
        {
            SWFP_HARMFUL = TRUE;
            float fDuration = IntToFloat(6*GetHitDice(oTarget));
            int nCurrent = GetGlobalNumber("CONFUSION_CURRENT");
            int nRemaining = GetHitDice(oTarget)/2-nCurrent;
            int nCnt;
            location loc = GetLocation(oTarget);
            object oCreature = GetFirstObjectInShape(SHAPE_SPHERE, 8.0, loc, TRUE, OBJECT_TYPE_CREATURE);
            while( (nCnt < nRemaining) && GetIsObjectValid(oCreature) )
            {
                if(GetIsEnemy(oCreature) && (GetRacialType(oCreature) != RACIAL_TYPE_DROID) && !GetIsDead(oCreature) )
                {
                    SignalEvent(oCreature, EventSpellCastAt(oTarget, GetSpellId(), SWFP_HARMFUL));
                    int nRoll = Random(100);
                    if(nRoll < 80)
                    {
                        ++nCnt;
                        int nFaction = GetStandardFaction(oCreature);
                        DelayCommand(fDuration,ChangeToStandardFaction(oCreature,nFaction));
                        ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(8003), oCreature);
                        if(nRoll < 40)
                        {
                            ChangeToStandardFaction(oCreature, STANDARD_FACTION_FRIENDLY_1);
                            AssignCommand(oCreature, ClearAllActions());
                            AssignCommand(oCreature, GN_DetermineCombatRound());
                        }
                        else
                        {
                            ChangeToStandardFaction(oCreature, STANDARD_FACTION_NEUTRAL);
                            AssignCommand(oCreature, ClearAllActions());
                            FaceObjectAwayFromObject(oCreature, oTarget);
                        }
                    }
                }
                oCreature = GetNextObjectInShape(SHAPE_SPHERE, 8.0, loc, TRUE, OBJECT_TYPE_CREATURE);
            }
            SetGlobalNumber("CONFUSION_CURRENT",nCurrent+nCnt);
            DelayCommand(fDuration,UpdateGlobalNumber("CONFUSION_CURRENT",-nCnt));
        }
The Psychic Static effect doesn't seem to work, I had to rewrite the spell. According to the description of the spell: 40% chance the organic turns friendly, 40% neutral, 20% stays hostile. I limited the number of targets you can keep under the spell with a global number, that is, one each two levels, to a maximum of tenů yeah maybe that's too many.

Due to lack of TSL-like visual effects, I don't think I can make Battle Meditation. Body Fuel (Force Body) would have been easy to make, but the description says it's Bastila's, that's too many special abilities in one person. I'd hand it over to Juhani, since she has more vitality points to speak of, being a guardian, but then again she too has her own special power already. So I guess that's it, there ain't laigreks or storm beasts in K1, no monster abilities. Still now every npc who was said to have a talent actually uses it.

EDIT: Psychic Static still needs work. Should you save the game and reload, or change area, it would screw the whole thing up, I need some other way to create the faction modifier effect. Since local numbers don't seem to work, I've been thinking how and where to store the original faction number, so that it may be used to turn creatures back to normal. I could create an invisible placeable to control the area with heartbeats, set a number on each creature to keep track of time and original faction and so forth. Creature XP? Item cost? What else has a number you can set?

"Help! Please! Over here! Under the wreckage!"

Edit2: Works fine with the placeable. Now whenever Jolee enters an area the global is set to 0 and any creature under the spell, say from a battle before, is disenchanted. When you cast the spell, on the targets is stored a WORD with their original faction and a counter, and an invisible placeable is created that updates the counters at each heartbeat. When a counter is 0 the creature turns back to normal and the global is updated. The placeable self-destructs as soon as it runs out of creatures to check. I used creature XP to store the numbers. Better ideas?


Last edited by RedHawke; 03-09-2008 at 05:37 AM. Reason: Combined DP...
jinger is offline   you may: quote & reply,
Old 03-10-2008, 03:50 AM   #6
jinger
Rookie
 
jinger's Avatar
 
Join Date: Nov 2005
Posts: 187
I still had a lot of trouble with Psychic Static, but I managed to get it working by other means. I used shouts, specifically I used listen pattern numbers to keep track of the original faction and the heartbeats of an invisible placeable to shout a string which those under the spell are set to listen for. That's quite efficient, I thought I'd share the solution.
Code:
//This is from k_inc_generic, I wrote this to trigger the ability in the body of GN_DetermineCombatRound.
//With 25% chance, Jolee activates Psychic Static if he is outnumbered in a range of 8 meters.
//The action is not worth the round if he can't affect at least two creatures. Maximum is six.
//Makes sure never to use it against the player.
int AssumePsychicStance()
{
    if( GetHasSpell(SPECIAL_ABILITY_PSYCHIC_STANCE) && (Random(100) < 25) &&
        GetIsFriend(GetFirstPC()) && (GetGlobalNumber("CONFUSION_CURRENT") < 5) )
    {
        int nFoes, nAllies;
        location loc = GetLocation(OBJECT_SELF);
        object oCreature = GetFirstObjectInShape(SHAPE_SPHERE, 8.0, loc, TRUE, OBJECT_TYPE_CREATURE);
        while(GetIsObjectValid(oCreature))
        {
            if( (GetRacialType(oCreature) != RACIAL_TYPE_DROID) && !GetIsDead(oCreature) )
            {
                if(GetIsEnemy(oCreature)) ++nFoes;
                else if(GetIsFriend(oCreature)) ++nAllies;
            }
            oCreature = GetNextObjectInShape(SHAPE_SPHERE, 8.0, loc, TRUE, OBJECT_TYPE_CREATURE);
        }
        if(nFoes < 2) return FALSE;
        nFoes-=nAllies;
        if(nFoes < 1) nFoes = 1;
        if(GetHPRatio()/IntToFloat(nFoes) <= 0.2) //1 versus 5 at full health
        {
            ClearAllActions();
            ActionUseTalentOnObject(TalentSpell(SPECIAL_ABILITY_PSYCHIC_STANCE),OBJECT_SELF);
            return TRUE;
        }
    }
    return FALSE;
}

//This is from k_inc_force, Sp_RunForcePowers()
//I had the effects last 2 rounds plus one each four character levels, that is a short while
//at low levels (18 seconds) and a reasonably long while at level 20 (42 seconds)
//I also limited to 6 the number of creatures Jolee can keep under the spell,
//all in all it's reasonable, in TSL Force Confusion is a prestige power
//and can affect just one creature at a time
        case SPECIAL_ABILITY_PSYCHIC_STANCE:
        {
            SWFP_HARMFUL = TRUE;
            int nCurrent = GetGlobalNumber("CONFUSION_CURRENT");
            int nRemaining = 6 - nCurrent;
            int nCnt, nRoll, nFaction;
            location loc = GetLocation(oTarget);
            object oCreature = GetFirstObjectInShape(SHAPE_SPHERE, 8.0, loc, TRUE, OBJECT_TYPE_CREATURE);
            while( (nCnt < nRemaining) && GetIsObjectValid(oCreature))
            {
                if( GetIsEnemy(oCreature) && (GetRacialType(oCreature) != RACIAL_TYPE_DROID) && !GetIsDead(oCreature) )
                {
                    nRoll = Random(100);
                    if(nRoll < 80)
                    {
                        ++nCnt;
                        SetListening(oCreature, TRUE);
                        SetListenPattern(oCreature,"PSYCHIC_STATIC", 100 + GetStandardFaction(oCreature));
                        nFaction = STANDARD_FACTION_FRIENDLY_1;
                        if(nRoll < 40) nFaction = STANDARD_FACTION_NEUTRAL;
                        ChangeToStandardFaction(oCreature,nFaction);
                        eLink1 = EffectPsychicStatic();
                        eLink1 = SetEffectIcon(eLink1,0);
                        ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink1, oCreature, RoundsToSeconds(GetHitDice(oTarget)/4 + 2));
                        ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(8003), oCreature);
                    }
                }
                oCreature = GetNextObjectInShape(SHAPE_SPHERE, 8.0, loc, TRUE, OBJECT_TYPE_CREATURE);
            }
            if(nCnt > 0)
            {
                SetGlobalNumber("CONFUSION_CURRENT",nRemaining - nCnt);
                if(!GetIsObjectValid(GetObjectByTag("plc_confusion"))) CreateObject(OBJECT_TYPE_PLACEABLE,"plc_confusion",loc);
            }
        }
        break;

//This is the heartbeat of the placeable
void main()
{
    SpeakString("PSYCHIC_STATIC");
    object oCreature = GetFirstObjectInArea();
    while(GetIsObjectValid(oCreature))
    {
        if(GetHasSpellEffect(SPECIAL_ABILITY_PSYCHIC_STANCE,oCreature)) return;
        oCreature = GetNextObjectInArea();
    }
    DestroyObject(OBJECT_SELF);
}


//And this is from k_ai_master
//Switches the creature back to normal if spell effects are expired.
//I had Psychic Static listen pattern numbers offset by 100 the original faction of the creature.
        case 1004: //KOTOR_DEFAULT_EVENT_ON_DIALOGUE
        {
            int nMatch = GetListenPatternNumber();
            if(nMatch > 99)
            {
                ResetDialogState();
                if(!GetHasSpellEffect(SPECIAL_ABILITY_PSYCHIC_STANCE))
                {
                    int nCurrent = GetGlobalNumber("CONFUSION_CURRENT");
                    if(nCurrent > 0) SetGlobalNumber("CONFUSION_CURRENT",nCurrent - 1);
                    ChangeToStandardFaction(OBJECT_SELF,nMatch - 100);
                    GN_DetermineCombatRound();
                }
                return;
            }
I went through all this trouble but the spell is kind of cool, it deserved restoring.

jinger is offline   you may: quote & reply,
Old 06-27-2009, 02:51 PM   #7
WRFan
Rookie
 
Join Date: Jun 2009
Posts: 63
I also tried to fix the cut henchmen abilities, both in Kotor 1 and Kotor 2 (Obsidian didn't remove the abilities introduced by Bioware). Don't care much about Zaalbar's rage, but I was checking out the following powers:

Body Fuel (Bastila, regenerates ALL of her FP every round, loses vitality points when casting, very similar to Body Fuel in TSL)

Enhanced Senses (Awareness skill increase, True Seeing, Cathar ability for Juhani)

PSYCHIC_STANCE (Jolee ability, effect EffectConfused).

The abilities are all broken. Psychic stance doesn't work at all, as pointed out by the poster above, Body Fuel actually works, but there's no penalty for casting spells while under the effect of this spell (no vitality point loss), so it makes the game too easy and the spell too powerful.

Enhanced senses spell contains an error - the effects are not properly linked, so the True Seeing effect is not applied - Kotor TSL k_inc_force.nss:

Quote:
effect eAC = EffectACDecrease(6);
effect eAware = EffectSkillIncrease(SKILL_AWARENESS, 10);
effect eSee = EffectTrueSeeing();
eLink1 = EffectLinkEffects(eAC, eAware);
eLink1 = EffectLinkEffects(eLink1, eAware);
see the error? Awareness increase is linked twice and the True Seeing effect isn't linked at all. Can be fixed, but the spell is not very useful
WRFan is offline   you may: quote & reply,
Old 06-27-2009, 05:26 PM   #8
DarthCyclopsRLZ
Rookie
 
DarthCyclopsRLZ's Avatar
 
Join Date: Nov 2006
Posts: 35
Well, there's a reason all of these weren't in the final game.

As lazy as it sound, you might want to consider going the cheap route and just giving your character personalized armbands that can only be equipped after some requirements (say, dummy feats given either with feat.2da (non-jedi) or conditional scripted events).
DarthCyclopsRLZ is offline   you may: quote & reply,
Old 06-28-2009, 02:56 AM   #9
Allronix
Forumite
 
Allronix's Avatar
 
Join Date: Aug 2003
Location: Seattle
Posts: 575
Well, who says we need to give these abilities only to our friends? body Fuel scripted into say, Uthar or Jorak Uln, could make for a good headache.

I wouldn't be surprised that Zaalbar has a weaker version of rage. He's still a young fellow by Wookiee standards, and a hell of a lot saner. (One reason I prefer K1, the crew didn't make me squirm). All bets are off if you play DS and take his little buddy out of the picture, though.


Allronix - KOTOR Filefront Supporter
http://knightsoftheoldrepublic.filefront.com/

Please bring your mods. They'll give them a good home!
Allronix is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > [KotOR]Wookiee Rage and other Special Abilities

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:36 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.