Jump to content

Home

TSl script with All In


Prectatorium

Recommended Posts

1st post.

 

Not sure were this should go, I'm guessing a moderator will give me a heads up and correct the situation.

 

So I decided to go a little crazy and through all TSL buffs, including all powers from each tree in a mega force power.

 

My problem is it seems to work randomly (sort of). I'll try to be a bit more specific.

Perugus II:

When I'm solo, no party members, i got it All, all three speed mastery's, valor mastery's, resists, ...inspire followers, the deal. In the journal > messages > effects it looked somewhat like this:

 

Speed Burst

Knight Speed

Speed Mastery

Force Aura

Force Shield

Force Armor

Force Mind

Knight Mind

Mind Mastery

Resist Force

Force Immunity

Resist Cold Heat Energy

Resist Poison Disease Sonic

Master Energy Resistance

Force Barrier

Improved Force Barrier

Master Force Barrier

Battle Meditation Pc

Improved Battle Meditation Pc

Master Battle Meditation Pc

Force Body

Improved Force Body

Master Force Body

Inspire Followers I

Inspire Followers II

Inspire Followers II

Inspire Followers IV

Inspire Followers V

Inspire Followers VI

Force Sight

 

When I'm in a party however I don't seem to get that result.

 

Now the idea is to go through all specific powers, apply each of them to all non enemy creatures in a specific radius.

 

something like:

void main () {

// variables
// (...)
for ( ; nSpell < 282; nSpell++ ) {

	oCreature = GetFirstObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

	while ( GetIsObjectValid ( oCreature ) ) {

		if ( !GetIsEnemy ( oCreature ) ) {

			switch ( nSpell ) {

				(...)
			}
		}
		oCreature = GetNextObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );
	}
}
}

 

I'm not sure if the game engine is not able to handle it, or my logic is flawed. I'm betting on the latter :)

 

Full version, a little extensive I fear:

Show spoiler
(hidden content - requires Javascript to show)

#include "k_inc_force"

void main () {

effect eLink1, eLink2;
effect eInvalid;

object oCreature;

int nSpell      = 0;
SWFP_SHAPE      = SHAPE_SPHERE;

float fDuration = Sp_CalcDuration ( 360.0f );
float fRange    = Sp_CalcRange    (  30.0f );

for ( ; nSpell < 282; nSpell++ ) {

	oCreature = GetFirstObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

	while ( GetIsObjectValid ( oCreature ) ) {

		// if ( GetIsFriend ( oCreature ) || IsObjectPartyMember ( oCreature ) ) {
		if ( !GetIsEnemy ( oCreature ) ) {

			switch ( nSpell ) {

				/*
				HEAL
				*/
				case FORCE_POWER_CURE: {

					SWFP_HARMFUL = FALSE;

					// The Regeneration Consular Forms increase the relevance of
					// the Wisdom and Charisma modifiers.
					int nMultiplier = 1;

					// Form/Stance re-design.

					int nHeal = ( ( GetAbilityModifier ( ABILITY_WISDOM ) + GetAbilityModifier ( ABILITY_CHARISMA ) ) * nMultiplier ) + 5 + GetHitDice ( OBJECT_SELF );

					effect eVis = EffectVisualEffect ( VFX_IMP_CURE );

					SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, FALSE ) );
					ApplyEffectToObject ( DURATION_TYPE_INSTANT, eVis, oCreature );
					ApplyEffectToObject ( DURATION_TYPE_INSTANT, EffectHeal ( nHeal ), oCreature );

				}

				break;

				/*
				FORCE ARMOR
				*/
				case FORCE_POWER_FORCE_ARMOR: {

					// float fDuration = Sp_CalcDuration ( 20.0 );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						eLink1 = EffectACIncrease ( 6, AC_DODGE_BONUS );
						eLink1 = EffectLinkEffects ( eLink1, EffectSavingThrowIncrease ( SAVING_THROW_ALL, 6 ) );
						eLink1 = SetEffectIcon ( eLink1, 7 );
						eLink2 = EffectVisualEffect ( VFX_PRO_FORCE_ARMOR );
						eLink2 = EffectLinkEffects ( eLink2, EffectVisualEffect ( VFX_PRO_FORCE_SHIELD ) );

						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eLink2, 3.0 );

					}

				}

				break;

				/*
				FORCE AURA
				*/
				case FORCE_POWER_FORCE_AURA: {

					// float fDuration = Sp_CalcDuration ( 20.0 );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						eLink1 = EffectACIncrease ( 2, AC_DODGE_BONUS );
						eLink1 = EffectLinkEffects ( eLink1, EffectSavingThrowIncrease ( SAVING_THROW_ALL, 2 ) );
						eLink1 = SetEffectIcon ( eLink1, 8 );
						eLink2 = EffectVisualEffect ( VFX_PRO_FORCE_AURA );

						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eLink2, 3.0 );

					}

				}

				break;

				/*
				FORCE IMMUNITY
				*/
				case FORCE_POWER_FORCE_IMMUNITY: {

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// float fDuration = Sp_CalcDuration ( 60.0 );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						int nSR = 15 + GetHitDice ( OBJECT_SELF );
						eLink1 = EffectForceResistanceIncrease ( nSR );
						eLink1 = SetEffectIcon ( eLink1, 9 );
						eLink2 = EffectVisualEffect ( VFX_PRO_RESIST_FORCE );

						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eLink2, 1.0 );

					}

				}

				break;

				/*
				FORCE VALOR
				*/
				case FORCE_POWER_FORCE_MIND: {

					SWFP_HARMFUL = FALSE;

					eLink1 = EffectSavingThrowIncrease ( SAVING_THROW_FORT,2 );
					eLink1 = EffectLinkEffects ( eLink1, EffectSavingThrowIncrease ( SAVING_THROW_REFLEX, 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectSavingThrowIncrease ( SAVING_THROW_WILL, 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_CHARISMA, 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_CONSTITUTION, 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_DEXTERITY, 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_INTELLIGENCE, 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_STRENGTH, 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_WISDOM, 2 ) );
					eLink2 = EffectVisualEffect ( VFX_IMP_MIND_FORCE );
					eLink1 = SetEffectIcon ( eLink1, 10 );

					// float fDuration = Sp_CalcDuration ( 20.0 );

					// if ( GetIsObjectValid ( oCreature ) && IsObjectPartyMemberIsObjectPartyMember ( oCreature ) ) {
					if ( GetIsObjectValid ( oCreature ) ) {

						// Remove any lower level or equal versions of this power.
						Sp_RemoveRelatedPowers ( oCreature, nSpell );

						// Do not apply the effects of this power if a more powerful
						// version is already attached to the target.
						if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

							SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, SWFP_HARMFUL ) );

							Sp_ApplyForcePowerEffects ( fDuration, eLink1, oCreature );
							Sp_ApplyForcePowerEffects ( 0.0, eLink2, oCreature );

						}

					}

				}

				break;

				/*
				FORCE SHIELD
				*/
				case FORCE_POWER_FORCE_SHIELD: {

					// float fDuration = Sp_CalcDuration ( 20.0 );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						eLink1 = EffectACIncrease ( 4, AC_DODGE_BONUS );
						eLink1 = EffectLinkEffects ( eLink1, EffectSavingThrowIncrease ( SAVING_THROW_ALL, 4 ) );
						eLink1 = SetEffectIcon ( eLink1, 12 );
						eLink2 = EffectVisualEffect ( VFX_PRO_FORCE_SHIELD );

						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eLink2, 3.0 );

					}

				}

				break;

				/*
				IMPROVED HEAL
				*/
				case FORCE_POWER_HEAL: {

					SWFP_HARMFUL = FALSE;

					int nMultiplier = 1;

					// Form/Stance re-design.

					// Balance change
					int nHeal = ( ( GetAbilityModifier ( ABILITY_WISDOM ) + GetAbilityModifier ( ABILITY_CHARISMA ) ) * nMultiplier ) + 15 + GetHitDice ( OBJECT_SELF );

					effect eVis = EffectVisualEffect ( VFX_IMP_HEAL );

					SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, SWFP_HARMFUL ) );

					Sp_RemoveSpecificEffect ( EFFECT_TYPE_POISON, oCreature );
					ApplyEffectToObject ( DURATION_TYPE_INSTANT, eVis, oCreature );
					ApplyEffectToObject ( DURATION_TYPE_INSTANT, EffectHeal ( nHeal ), oCreature );

				}

				break;

				/*
				MASTER HEAL
				*/
				// Same as Improved Heal with addition 5 VP and Stun removal.
				case FORCE_POWER_MASTER_HEAL: {

					SWFP_HARMFUL = FALSE;

					int nMultiplier = 1;

					// Form/Stance re-design.

					// Balance Change
					int nHeal = ( ( GetAbilityModifier ( ABILITY_WISDOM ) + GetAbilityModifier ( ABILITY_CHARISMA ) ) * nMultiplier ) + 15 + 2*GetHitDice ( OBJECT_SELF );

					effect eVis = EffectVisualEffect ( VFX_IMP_HEAL );

					SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, SWFP_HARMFUL ) );

					Sp_RemoveSpecificEffect ( EFFECT_TYPE_STUNNED, oCreature );
					Sp_RemoveSpecificEffect ( EFFECT_TYPE_POISON, oCreature );
					ApplyEffectToObject ( DURATION_TYPE_INSTANT, eVis, oCreature );
					ApplyEffectToObject ( DURATION_TYPE_INSTANT, EffectHeal ( nHeal ), oCreature );

				}

				break;

				/*
				KNIGHT VALOR
				*/
				case FORCE_POWER_KNIGHT_MIND: {

					SWFP_HARMFUL = FALSE;

					eLink1 = EffectSavingThrowIncrease ( SAVING_THROW_ALL,3 );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_CHARISMA, 3 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_CONSTITUTION, 3 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_DEXTERITY, 3 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_INTELLIGENCE, 3 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_STRENGTH, 3 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_WISDOM, 3 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectImmunity ( IMMUNITY_TYPE_POISON ) );
					eLink1 = SetEffectIcon ( eLink1, 19 );
					eLink2 = EffectVisualEffect ( 1033 );

					// float fDuration = Sp_CalcDuration ( 20.0 );

					// if ( GetIsObjectValid ( oCreature ) && IsObjectPartyMember ( oCreature ) ) {
					if ( GetIsObjectValid ( oCreature ) ) {

						// Remove any lower level or equal versions of this power.
						Sp_RemoveRelatedPowers ( oCreature, nSpell );

						// Do not apply the effects of this power if a more powerful
						// version is already attached to the target.
						if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

							SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, SWFP_HARMFUL ) );

							Sp_ApplyForcePowerEffects ( fDuration, eLink1, oCreature );
							Sp_ApplyForcePowerEffects ( 0.0, eLink2, oCreature );

						}

					}

				}

				break;

				/*
				KNIGHT SPEED
				*/
				case FORCE_POWER_KNIGHT_SPEED: {

					// float fDuration = Sp_CalcDuration ( 36.0 );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						eLink1 = EffectMovementSpeedIncrease ( 99 );
						eLink1 = EffectLinkEffects ( eLink1, EffectACIncrease ( 4 ) );
						eLink1 = EffectLinkEffects ( eLink1, EffectModifyAttacks ( 1 ) );
						eLink1 = SetEffectIcon ( eLink1, 20 );

						if ( OBJECT_SELF == GetPartyMemberByIndex ( 0 ) ) {

							eLink1 = EffectLinkEffects ( eLink1, EffectVisualEffect ( VFX_DUR_SPEED ) );

						}

						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eInvalid, 0.0 );

					}

				}

				break;

				/*
				MASTER VALOR
				*/
				case FORCE_POWER_MIND_MASTERY: {

					SWFP_HARMFUL = FALSE;

					eLink1 = EffectSavingThrowIncrease ( SAVING_THROW_ALL,5 );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_CHARISMA, 5 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_CONSTITUTION, 5 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_DEXTERITY, 5 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_INTELLIGENCE, 5 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_STRENGTH, 5 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectAbilityIncrease ( ABILITY_WISDOM, 5 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectImmunity ( IMMUNITY_TYPE_POISON ) );
					eLink1 = SetEffectIcon ( eLink1, 21 );
					eLink2 = EffectVisualEffect ( VFX_IMP_MIND_MASTERY );

					// float fDuration = Sp_CalcDuration ( 20.0 );

					// if ( GetIsObjectValid ( oCreature ) && IsObjectPartyMember ( oCreature ) ) {
					if ( GetIsObjectValid ( oCreature ) ) {

						// Remove any lower level or equal versions of this power.
						Sp_RemoveRelatedPowers ( oCreature, nSpell );

						// Do not apply the effects of this power if a more powerful
						// version is already attached to the target.
						if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

							SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, SWFP_HARMFUL ) );

							Sp_ApplyForcePowerEffects ( fDuration, eLink1, oCreature );
							Sp_ApplyForcePowerEffects ( 0.0, eLink2, oCreature );

						}

					}

				}

				break;

				/*
				IMPROVED ENERGY RESISTANCE
				*/
				case FORCE_POWER_RESIST_COLD_HEAT_ENERGY: {

					SWFP_HARMFUL = FALSE;

					eLink1 = EffectDamageResistance ( DAMAGE_TYPE_COLD, 12 );
					eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_FIRE, 12 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_SONIC, 12 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_BLASTER, 12 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_ELECTRICAL, 12 ) );
					eLink1 = SetEffectIcon ( eLink1, 24 );
					eLink2 = EffectVisualEffect ( VFX_PRO_RESIST_ELEMENTS );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						// float fDuration = Sp_CalcDuration ( 120.0 );
						ApplyEffectToObject ( DURATION_TYPE_TEMPORARY, eLink1, oCreature, fDuration );
						ApplyEffectToObject ( DURATION_TYPE_TEMPORARY, eLink2, oCreature, 1.0 );

					}

				}

				break;

				/*
				MASTER ENERGY RESISTANCE
				*/
				case FORCE_POWER_MASTER_ENERGY_RESISTANCE: {

					SWFP_HARMFUL = FALSE;

					eLink1 = EffectDamageResistance ( DAMAGE_TYPE_COLD, 20 );
					eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_FIRE, 20 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_SONIC, 20 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_BLASTER, 20 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_ELECTRICAL, 20 ) );
					eLink1 = SetEffectIcon ( eLink1, 104 );
					eLink2 = EffectVisualEffect ( VFX_PRO_RESIST_ELEMENTS );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						// float fDuration = Sp_CalcDuration ( 120.0 );
						ApplyEffectToObject ( DURATION_TYPE_TEMPORARY, eLink1, oCreature, fDuration );
						ApplyEffectToObject ( DURATION_TYPE_TEMPORARY, eLink2, oCreature, 1.0 );

					}

				}

				break;

				/*
				RESIST FORCE 1
				*/
				case FORCE_POWER_RESIST_FORCE: {

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						int nSR = 10 + GetHitDice ( OBJECT_SELF );
						eLink1 = EffectForceResistanceIncrease ( nSR );
						eLink1 = SetEffectIcon ( eLink1, 25 );
						eLink2 = EffectVisualEffect ( VFX_PRO_RESIST_FORCE );

						// float fDuration = Sp_CalcDuration ( 60.0 );
						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eLink2, 1.0 );

					}

				}

				break;

				/*
				RESIST ENERGY
				*/
				case FORCE_POWER_RESIST_POISON_DISEASE_SONIC: {

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						eLink1 = EffectDamageResistance ( DAMAGE_TYPE_COLD, 6 );
						eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_FIRE, 6 ) );
						eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_SONIC, 6 ) );
						eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_ELECTRICAL, 6 ) );
						eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_BLASTER, 6 ) );
						eLink1 = SetEffectIcon ( eLink1, 26 );
						eLink2 = EffectVisualEffect ( VFX_PRO_RESIST_ELEMENTS );

						// float fDuration = Sp_CalcDuration ( 120.0 );
						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eLink2, 1.0 );

					}

				}

				break;

				/*
				BURST OF SPEED
				*/
				case FORCE_POWER_SPEED_BURST: {

					// float fDuration = Sp_CalcDuration ( 36.0 );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						eLink1 = EffectMovementSpeedIncrease ( 99 );
						eLink1 = EffectLinkEffects ( eLink1, EffectACIncrease ( 2 ) );
						eLink1 = EffectLinkEffects ( eLink1, EffectVisualEffect ( VFX_DUR_KNIGHTS_SPEED ) );
						eLink1 = SetEffectIcon ( eLink1, 2 );

						if ( OBJECT_SELF == GetPartyMemberByIndex ( 0 ) ) {

							eLink1 = EffectLinkEffects ( eLink1, EffectVisualEffect ( VFX_DUR_SPEED ) );

						}

						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eInvalid, 0.0 );

					}

				}

				break;

				/*
				MASTER SPEED
				*/
				case FORCE_POWER_SPEED_MASTERY: {

					// float fDuration = Sp_CalcDuration ( 36.0 );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						eLink1 = EffectMovementSpeedIncrease ( 99 );
						eLink1 = EffectLinkEffects ( eLink1, EffectACIncrease ( 4 ) );
						eLink1 = EffectLinkEffects ( eLink1, EffectModifyAttacks ( 2 ) );
						eLink1 = SetEffectIcon ( eLink1, 22 );

						if ( OBJECT_SELF == GetPartyMemberByIndex ( 0 ) ) {

							eLink1 = EffectLinkEffects ( eLink1, EffectVisualEffect ( VFX_DUR_SPEED ) );

						}

						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eInvalid, 0.0 );

					}

				}

				break;

				/*
				FORCESIGHT
				*/
				case FORCE_POWER_FORCE_SIGHT: {

					// float fDuration = Sp_CalcDuration ( 20.0 );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, EffectForceSight (), fDuration, eInvalid, 0.0 );

					}

				}

				break;

				/*
				FORCE BARRIER
				*/
				case FORCE_POWER_FORCE_BARRIER: {

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						eLink1 = EffectDamageResistance ( DAMAGE_TYPE_BLUDGEONING, 4 );
						eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_PIERCING, 4 ) );
						eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_SLASHING, 4 ) );
						eLink1 = SetEffectIcon ( eLink1, 64 );
						eLink2 = EffectVisualEffect ( VFX_PRO_FORCE_ARMOR );
						eLink2 = EffectLinkEffects ( eLink2, EffectVisualEffect ( VFX_PRO_FORCE_SHIELD ) );

						// float fDuration = Sp_CalcDuration ( 30.0 );
						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eLink2, 3.0 );

					}

				}

				break;

				/*
				IMPROVED FORCE BARRIER
				*/
				case FORCE_POWER_IMPROVED_FORCE_BARRIER: {

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						eLink1 = EffectDamageResistance ( DAMAGE_TYPE_BLUDGEONING, 8 );
						eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_PIERCING, 8 ) );
						eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_SLASHING, 8 ) );
						eLink1 = SetEffectIcon ( eLink1, 65 );
						eLink2 = EffectVisualEffect ( VFX_PRO_FORCE_ARMOR );
						eLink2 = EffectLinkEffects ( eLink2, EffectVisualEffect ( VFX_PRO_FORCE_SHIELD ) );

						// float fDuration = Sp_CalcDuration ( 45.0 );
						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eLink2, 3.0 );

					}

				}

				break;

				/*
				MASTER FORCE BARRIER
				*/
				case FORCE_POWER_MASTER_FORCE_BARRIER: {

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						eLink1 = EffectDamageResistance ( DAMAGE_TYPE_BLUDGEONING, 15 );
						eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_PIERCING, 15 ) );
						eLink1 = EffectLinkEffects ( eLink1, EffectDamageResistance ( DAMAGE_TYPE_SLASHING, 15 ) );
						eLink1 = SetEffectIcon ( eLink1, 66 );
						eLink2 = EffectVisualEffect ( VFX_PRO_FORCE_ARMOR );
						eLink2 = EffectLinkEffects ( eLink2, EffectVisualEffect ( VFX_PRO_FORCE_SHIELD ) );

						// float fDuration = Sp_CalcDuration ( 60.0 );
						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eLink2, 3.0 );

					}

				}

				break;

				/*
				BATTLE MEDITATION
				*/
				case FORCE_POWER_BATTLE_MEDITATION_PC: {

					SWFP_HARMFUL = FALSE;

					// Bonuses
					eLink1 = EffectDamageIncrease ( 2, DAMAGE_TYPE_UNIVERSAL );
					eLink1 = EffectLinkEffects ( eLink1, EffectAttackIncrease ( 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectSavingThrowIncrease ( SAVING_THROW_WILL, 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectVPRegenModifier ( 50 ) );
					eLink1 = SetEffectIcon ( eLink1, 67 );

					SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, SWFP_HARMFUL ) );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						ApplyEffectToObject ( DURATION_TYPE_INSTANT, EffectVisualEffect ( 9000 ), oCreature );
						ApplyEffectToObject ( DURATION_TYPE_TEMPORARY, eLink1, oCreature, fDuration );

					}

				}

				break;

				/*
				IMPROVED BATTLE MEDITATION
				*/
				case FORCE_POWER_IMPROVED_BATTLE_MEDITATION_PC: {

					SWFP_HARMFUL = FALSE;

					// Bonuses
					eLink1 = EffectDamageIncrease ( 2 );
					eLink1 = EffectLinkEffects ( eLink1, EffectAttackIncrease ( 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectSavingThrowIncrease ( SAVING_THROW_WILL, 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectVPRegenModifier ( 50 ) );
					eLink1 = SetEffectIcon ( eLink1, 68 );

					// float fDuration = Sp_CalcDuration ( 20.0 );

					SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, SWFP_HARMFUL ) );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						ApplyEffectToObject ( DURATION_TYPE_INSTANT, EffectVisualEffect ( 9001 ), oCreature );
						ApplyEffectToObject ( DURATION_TYPE_TEMPORARY, eLink1, oCreature, fDuration );

					}

					SWFP_HARMFUL = TRUE;
					SWFP_PRIVATE_SAVE_TYPE = SAVING_THROW_WILL;
					SWFP_SHAPE = SHAPE_SPHERE;

					// Penalties
					eLink1 = EffectDamageDecrease ( 2 );
					eLink1 = EffectLinkEffects ( eLink1, EffectAttackDecrease ( 2 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectSavingThrowDecrease ( SAVING_THROW_WILL, 2 ) );
					eLink1 = SetEffectIcon ( eLink1, 68 );

					// Iterate over all targets of the detrimental effects and
					// apply them.

					/*
					object oCreature = GetFirstObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

					while ( GetIsObjectValid ( oCreature ) ) {

						// This power targets hostile creatures only.
						if ( GetIsObjectValid ( oCreature ) &&
								GetIsEnemy ( oCreature ) &&
								GetRacialType ( oCreature ) != RACIAL_TYPE_DROID ) {

							SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, SWFP_HARMFUL ) );

							// Make Immunity Checks
							int nResist = Sp_BlockingChecks ( oCreature, eLink1, eInvalid, eInvalid );

							if ( nResist == 0 ) {

								int nSaves = Sp_MySavingThrows ( oCreature );

								if ( nSaves == 0 ) {

									// Remove any lower level or equal versions of this power.
									Sp_RemoveRelatedPowers ( oCreature, nSpell );

									// Do not apply the effects of this power if a more powerful
									// version is already attached to the target.
									if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

										ApplyEffectToObject ( DURATION_TYPE_INSTANT, EffectVisualEffect ( 9003 ), oCreature );
										ApplyEffectToObject ( DURATION_TYPE_TEMPORARY, eLink1, oCreature, fDuration );
									}

								}

							}
						}

						oCreature = GetNextObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

					}
					*/

				}

				break;

				/*
				MASTER BATTLE MEDITATION
				*/
				case FORCE_POWER_MASTER_BATTLE_MEDITATION_PC: {

					SWFP_HARMFUL = FALSE;

					// Bonuses
					eLink1 = EffectDamageIncrease ( 4 );
					eLink1 = EffectLinkEffects ( eLink1, EffectAttackIncrease ( 4 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectSavingThrowIncrease ( SAVING_THROW_WILL, 4 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectVPRegenModifier ( 50 ) );
					eLink1 = SetEffectIcon ( eLink1, 69 );

					// float fDuration = Sp_CalcDuration ( 20.0 );

					SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, SWFP_HARMFUL ) );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						ApplyEffectToObject ( DURATION_TYPE_INSTANT, EffectVisualEffect ( 9002 ), oCreature );
						ApplyEffectToObject ( DURATION_TYPE_TEMPORARY, eLink1, oCreature, fDuration );

					}

					SWFP_HARMFUL = TRUE;
					SWFP_PRIVATE_SAVE_TYPE = SAVING_THROW_WILL;
					SWFP_SHAPE = SHAPE_SPHERE;

					// Penalties
					eLink1 = EffectDamageDecrease ( 4 );
					eLink1 = EffectLinkEffects ( eLink1, EffectAttackDecrease ( 4 ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectSavingThrowDecrease ( SAVING_THROW_WILL, 4 ) );
					eLink1 = SetEffectIcon ( eLink1, 69 );

					/*
					object oCreature = GetFirstObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

					while ( GetIsObjectValid ( oCreature ) ) {

						// This power targets hostile creatures only.
						if ( GetIsObjectValid ( oCreature ) &&
								GetIsEnemy ( oCreature ) &&
								GetRacialType ( oCreature ) != RACIAL_TYPE_DROID ) {

							SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, SWFP_HARMFUL ) );

							// Make Immunity Checks
							int nResist = Sp_BlockingChecks ( oCreature, eLink1, eInvalid, eInvalid );

							if ( nResist == 0 ) {

								int nSaves = Sp_MySavingThrows ( oCreature );

								if ( nSaves == 0 ) {

									// Remove any lower level or equal versions of this power.
									Sp_RemoveRelatedPowers ( oCreature, nSpell );

									// Do not apply the effects of this power if a more powerful
									// version is already attached to the target.
									if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

										ApplyEffectToObject ( DURATION_TYPE_INSTANT, EffectVisualEffect ( 9004 ), oCreature );
										ApplyEffectToObject ( DURATION_TYPE_TEMPORARY, eLink1, oCreature, fDuration );
									}

								}

							}

						}

						oCreature = GetNextObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

					}
					*/

				}

				break;

				case FORCE_POWER_FORCE_BODY:
				case FORCE_POWER_IMPROVED_FORCE_BODY:
				case FORCE_POWER_MASTER_FORCE_BODY: {

					int nFX = 0;

					if ( nSpell == FORCE_POWER_FORCE_BODY ) {

						nFX = 9011;

					}

					else if ( nSpell == FORCE_POWER_IMPROVED_FORCE_BODY ) {

						nFX = 9012;

					}

					else if ( nSpell == FORCE_POWER_MASTER_FORCE_BODY ) {

						nFX = 9013;

					}

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						SWFP_HARMFUL = FALSE;

						int nValue = nSpell - FORCE_POWER_FORCE_BODY;
						eLink1 = EffectForceBody ( nValue );
						eLink1 = SetEffectIcon ( eLink1, 76 + nValue );

						// float fDuration = Sp_CalcDuration ( 30.0 );
						Sp_ApplyEffects ( FALSE, oCreature, 0.0, 1, eLink1, fDuration, eInvalid, 0.0 );
						ApplyEffectToObject ( DURATION_TYPE_INSTANT, EffectVisualEffect ( nFX ), oCreature );

					}

				}

				break;

				case FORCE_POWER_INSPIRE_FOLLOWERS_I:
				case FORCE_POWER_INSPIRE_FOLLOWERS_II:
				case FORCE_POWER_INSPIRE_FOLLOWERS_III:
				case FORCE_POWER_INSPIRE_FOLLOWERS_IV:
				case FORCE_POWER_INSPIRE_FOLLOWERS_V:
				case FORCE_POWER_INSPIRE_FOLLOWERS_VI: {

					SWFP_HARMFUL = FALSE;

					// float fDuration = Sp_CalcDuration ( 45.0 );

					// Calculate the size of the bonus based on the power used.
					// It goes from 1 to 6.
					int nBonus = nSpell - FORCE_POWER_INSPIRE_FOLLOWERS_I + 1;

					// Bonuses
					eLink1 = EffectAttackIncrease ( nBonus );
					eLink1 = EffectLinkEffects ( eLink1, EffectDamageIncrease ( nBonus ) );
					eLink1 = EffectLinkEffects ( eLink1, EffectSavingThrowIncrease ( SAVING_THROW_WILL, nBonus ) );
					eLink1 = SetEffectIcon ( eLink1, 85 + nBonus - 1 );

					SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, SWFP_HARMFUL ) );

					// Remove any lower level or equal versions of this power.
					Sp_RemoveRelatedPowers ( oCreature, nSpell );

					// Do not apply the effects of this power if a more powerful
					// version is already attached to the target.
					if ( !Sp_BetterRelatedPowerExists ( oCreature, nSpell ) ) {

						ApplyEffectToObject ( DURATION_TYPE_TEMPORARY, eLink1, oCreature, fDuration );

					}

				}

				break;

			}

		}

		oCreature = GetNextObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );
	}

}

}

I appreciate your time. Thank you very much.

Link to comment
Share on other sites

1st post.

 

Not sure were this should go, I'm guessing a moderator will give me a heads up and correct the situation.

 

So I decided to go a little crazy and through all TSL buffs, including all powers from each tree in a mega force power.

 

My problem is it seems to work randomly (sort of). I'll try to be a bit more specific.

 

void main () {

// variables
// (...)
for ( ; nSpell < 282; nSpell++ ) {

	oCreature = GetFirstObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

	while ( GetIsObjectValid ( oCreature ) ) {

		if ( !GetIsEnemy ( oCreature ) ) {

			switch ( nSpell ) {

				(...)
			}
		}
		oCreature = GetNextObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );
	}
}
}

 

I'm not sure if the game engine is not able to handle it, or my logic is flawed. I'm betting on the latter :)

 

I appreciate your time. Thank you very much.

 

Nice try and I think I can help. Try this:

void main () {

// variables
// (...)
       int nSpell;
for (nSpell = 0; nSpell < 282; nSpell++ ) {

               int iParty = 0;
	oCreature = GetPartyMemberByIndex(iParty);


	while ( GetIsObjectValid (oCreature ) ) {

			switch ( nSpell ) {

				(...)
			}
		iParty++;
                }
}
}

 

That will(should) just get the current party member, apply all the spells, and then do the same for the others...

Link to comment
Share on other sites

Welcome to the forums!

 

Moving your thread to Holowan labs as Ahto is about everything and nothing (except KotOR).

 

Wish I could answer but I am so out the loop these days...

Thank you Darth333.

 

I've been wondering around a few threads in the "Editing / Modding" forums, and you popped out quite a lot with some helpful tips, and I thank you for that.

 

Nice try and I think I can help. Try this:

void main () {

// variables
// (...)
       int nSpell;
for (nSpell = 0; nSpell < 282; nSpell++ ) {

               int iParty = 0;
	oCreature = GetPartyMemberByIndex(iParty);


	while ( GetIsObjectValid (oCreature ) ) {

			switch ( nSpell ) {

				(...)
			}
		iParty++;
                }
}
}

 

That will(should) just get the current party member, apply all the spells, and then do the same for the others...

 

Thank you Fair Strides 2, no joy though.

 

So I take your logic and implement it in "my" code, and nothing happens, but your logic seems quite flawless to me, so I check the implementation again, and again, but I can't seem to understand why it doesn't work.

 

Here is a little snippet:

 

Show spoiler
(hidden content - requires Javascript to show)
#include "k_inc_force"

void main () {

effect eLink1, eLink2;
effect eInvalid;

object oCreature;

int nSpell      = 0;
SWFP_SHAPE      = SHAPE_SPHERE;

float fDuration = Sp_CalcDuration (  5.0f );
float fRange    = Sp_CalcRange    ( 30.0f );

for ( ; nSpell < 282; nSpell++ ) {

	// oCreature = GetFirstObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

	int iParty = 0;
	oCreature = GetPartyMemberByIndex ( iParty );

	while ( GetIsObjectValid ( oCreature ) ) {


		if ( !GetIsEnemy ( oCreature ) ) { // Always true I guess

			switch ( nSpell ) {

				/*
				HEAL
				*/
				case FORCE_POWER_CURE: {

					SWFP_HARMFUL = FALSE;

					// The Regeneration Consular Forms increase the relevance of
					// the Wisdom and Charisma modifiers.
					int nMultiplier = 1;

					// Form/Stance re-design.

					int nHeal = ( ( GetAbilityModifier ( ABILITY_WISDOM ) + GetAbilityModifier ( ABILITY_CHARISMA ) ) * nMultiplier ) + 5 + GetHitDice ( OBJECT_SELF );

					effect eVis = EffectVisualEffect ( VFX_IMP_CURE );

					SignalEvent ( oCreature, EventSpellCastAt ( OBJECT_SELF, nSpell, FALSE ) );
					ApplyEffectToObject ( DURATION_TYPE_INSTANT, eVis, oCreature );
					ApplyEffectToObject ( DURATION_TYPE_INSTANT, EffectHeal ( nHeal ), oCreature );

				}

				break;
				(...)
			}

		}

		// oCreature = GetNextObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );
		iParty++;
	}

}

}

But that's not quite what I was looking for, I wanted something that followed this condition:

if ( !GetIsEnemy ( oCreature ) )

In other words, buff every damn creature out there, aside from those that want to blast or cut me down. :thmbup1:

 

If you are getting all of these powers when you're playing solo, why the heck would you need Inspire Followers then?

@Sith Holocron

Ah lol... Very attentive of you. Well the idea isn't to be roaming around solo, you see I started a new play through, (haven't played the game in years, you know, for old times' sake, right?), and at Peragus Mining Facility you start out solo. But back in the day I had no concepts of scripting and what not, now that have some basic notions of high level object oriented programming languages, I thought to my self, "I'm gonna cheat the hell out of this game" :dev7:

 

So I decide to invert the nSpell count, to a count down:

 

int nSpell      = 281;

for ( ; nSpell > -1; nSpell--) {

 

You guessed it... I get the force powers in an inverted order :D

 

Anyways, as long as the games engine doesn't give up on me, I'm going to keep trying...

 

Thanks to all.

Link to comment
Share on other sites

PLEASE tell me you have TSLRCM and M4-78EP installed. If not, you will miss out on so much...

 

No I don't... I guess I'm gonna have to get these mods...

 

I've just arrived at Telos, have I missed out on anything?

 

Knights of the Old Republic 2 Download Index site isn't working correctly, right?

 

I hope It's this "TSL Restored Content Mod 1.8.2" and this "M4-78 Enhancement Project" your talking about.

Link to comment
Share on other sites

No I don't... I guess I'm gonna have to get these mods...

 

I've just arrived at Telos, have I missed out on anything?

 

Knights of the Old Republic 2 Download Index site isn't working correctly, right?

 

Get TSLRCM 1.8.2 and M4-78 EP from Deadly Stream (as linked) or from MODDB.com. Do not get it from Filefront as they only have the old versions.

 

As for other files from Filefront: Check this post to see if your country is on the list. If it is, you won't be able to get your files from Filefront / Gamefront. I've also heard Google Chrome's configuration might also hinder downloads from Filefront as well.

Link to comment
Share on other sites

Game Front File Hosting FAQ no explanation whatsoever.

 

Anyways mods downloaded and installed... I really appreciate you guys doing all this to improve my gaming experience... that or I'm just deluded... :D

 

And I also hope this thread isn't going TO much off topic...;)

 

Well, if you read the read-mes(it's ironic how many people don't read a file whose title is "read-me"), you'd find that M4-78EP took what little info was in the game files and re-made a droid planet, and TSLRCM 1.8.2 restores a lot of missing lines, removed content, and options. For example, in the old TSL HK-47 mentioned a droid factory, but you never visited it. Now it's there for you.

Link to comment
Share on other sites

Well, if you read the read-mes(it's ironic how many people don't read a file whose title is "read-me"), you'd find that M4-78EP took what little info was in the game files and re-made a droid planet, and TSLRCM 1.8.2 restores a lot of missing lines, removed content, and options. For example, in the old TSL HK-47 mentioned a droid factory, but you never visited it. Now it's there for you.

 

@Fair Strides 2

 

I was talking about the country restrictions mentioned on Sith Holocron's previous post.

 

And I do read the "read-me's"... they usually have the best info :thmbup1:

 

As for your peace of code

Show spoiler
(hidden content - requires Javascript to show)
void main () {

// variables
// (...)
int nSpell;
for (nSpell = 0; nSpell < 282; nSpell++ ) {

	int iParty = 0;
	oCreature = GetPartyMemberByIndex(iParty);

	while ( GetIsObjectValid (oCreature ) ) {

			switch ( nSpell ) {

				(...)
			}
			iParty++;
	}
}
}

It's working nicely, don't know why I didn't get it right the first times (yes plural).

 

Though I did this

Show spoiler
(hidden content - requires Javascript to show)
void main () {

// for party members
// just like your code
// and works like a dream
for ( nSpell = 0; nSpell < 282; nSpell++ ) {

	nPartyMember = 0;

	oCreature = GetPartyMemberByIndex ( nPartyMember );

	while ( GetIsObjectValid ( oCreature ) && nPartyMember < 3 ) {

		if ( GetIsObjectValid ( oCreature ) ) {

			switch ( nSpell ) {

				// // // // // // // // // // // // // // // // // // // //
				// FORCE POWER *
				// // // // // // // // // // // // // // // // // // // //
				case FORCE_POWER_*(...): {

					(...)

				}

				break;

			}// switch ( nSpell )

		}// if ( GetIsObjectValid ( oCreature ) )

		nPartyMember++;

		oCreature = GetPartyMemberByIndex ( nPartyMember );

	}// while ( GetIsObjectValid ( oCreature ) && nPartyMember < 3 )

}// for ( nSpell = 0; nSpell < 282; nSpell++ )

// For non party members
// This is for all remaining non enemy creatures
// But it fails though, no idea why
for ( nSpell = 0; nSpell < 282; nSpell++ ) {

	oCreature = GetFirstObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

	while ( GetIsObjectValid ( oCreature ) ) {

		if ( !GetIsEnemy ( oCreature ) && !IsObjectPartyMember ( oCreature ) ) {

			switch ( nSpell ) {

				// // // // // // // // // // // // // // // // // // // //
				// FORCE POWER *
				// // // // // // // // // // // // // // // // // // // //

				case FORCE_POWER_*(...): {

					(...)

				}

				break;

			}// switch ( nSpell )

		}// if ( !GetIsEnemy ( oCreature ) && !IsObjectPartyMember ( oCreature ) )

		oCreature = GetNextObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

	}// while ( GetIsObjectValid ( oCreature ) )

}// for ( nSpell = 0; nSpell < 282; nSpell++ )  

}

 

But I still have the issue with every other creature.

 

I noticed something though, when the script didn't have the distinguished part specific for the party (and now for the npc's part), in specific parts of a map, it would work. Say I would move a bit and a party member would be where I once was, and it would buff that member, and/or an npc passing by. :headbump

 

This looks pretty standard in the "k_inc_force" file...

oCreature = GetFirstObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

while ( GetIsObjectValid ( oCreature ) ) {

(...)

oCreature = GetNextObjectInShape ( SHAPE_SPHERE, fRange, GetLocation ( OBJECT_SELF ), FALSE, OBJECT_TYPE_CREATURE );

}

 

I don't know. :migraine:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...