I've been trying furiously for the past 40 forevers to modify the Force Persuasion cog in such a way as to make it affect all AI's in Mysteries of the Sith, because a large number of AI's are totally unaffected by this Force power.
After many failures, I've come up with the only viable solution I can think of: add lines to the cog that cause the alignment of the player(or ai's) to change in order to make them leave you alone while this cog is active. However, I'm not a very well-learned cogger. I've learned to modify existing values, but I have no idea how to add new values to an existing cog. Here's a copy of the cog if anyone might be able to help.
# Jedi Knight Cog Script
#
# FORCE_PERSUASION.COG
#
# FORCEPOWER Script - Persuasion
# Light Side Power
# Bin 26
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing player local
flex mana local
flex cost=3 local
int rank local
sound persuasionSound=ForcePersuas01.WAV local
int channel=-1 local
int inbubble=0 local
int old local
int new local
message startup
message activated
message pulse
message newplayer
message killed
message selected
message enterbubble
message exitbubble
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
inbubble = 0;
call stop_power;
Return;
# ........................................................................................
activated:
if(inbubble) Return;
if(old == 0)
{
new = 1;
if(!IsInvActivated(player, 26))
{
print("Immersion Activated");
if(GetInv(player, 64) != 1) ChangeInv(player, 14, -cost);
// Send a "force disturbance"...
if(!IsMulti())
SendMessageExRadius(GetThingPos(player), cost, 0x4, splash, 26, 0, 0, 0);
SetInvActivated(player, 26, 1);
PlayMode(player, 24);
// Play activation sound
PlaySoundThing(persuasionSound, player, 1.0, -1, -1, 0x80);
rank = GetInv(player, 26);
// Set player invisible to AI
SetActorFlags(player, 0x80);
// Set player "invisible" to real players
if(rank == 1) jkSetPersuasionInfo(player, 14, 22);
else if(rank == 2) jkSetPersuasionInfo(player, 11, 19);
else if(rank == 3) jkSetPersuasionInfo(player, 8, 16);
else if(rank == 4) jkSetPersuasionInfo(player, 5, 13);
SetThingCurGeoMode(player, 0);
jkSetFlags(player, 0x20);
SetPulse(0.5);
}
}
Return;
# ........................................................................................
pulse:
if(GetThingHealth(player) < 1) call stop_power;
mana = GetInv(player, 14);
if(GetInv(player, 64) != 1) ChangeInv(player, 14, -cost);
if(mana <= 0)
{
call stop_power;
}
Return;
# ........................................................................................
selected:
old = new;
if(old == 1)
{
call stop_power;
}
Return;
# ........................................................................................
killed:
if(GetSenderRef() != player) Return;
newplayer:
call stop_power;
Return;
# ........................................................................................
enterbubble:
inbubble = 1;
call stop_power;
Return;
# ........................................................................................
exitbubble:
inbubble = 0;
Return;
# ........................................................................................
stop_power:
print("Immersion Deactivated");
new = 0;
SetPulse(0);
KillTimerEx(1);
if(channel != -1)
{
StopSound(channel, 0.1);
channel = -1;
}
SetInvActivated(player, 26, 0);
ClearActorFlags(player, 0x80);
SetThingCurGeoMode(player, GetThingGeoMode(player));
jkClearFlags(player, 0x20);
Return;
end
------------------
I just love that part of the Jedi Code that says, "There is no ignorance - only knowledge". If that's the case, then what am I doing on this Force-blasted message board??!!
After many failures, I've come up with the only viable solution I can think of: add lines to the cog that cause the alignment of the player(or ai's) to change in order to make them leave you alone while this cog is active. However, I'm not a very well-learned cogger. I've learned to modify existing values, but I have no idea how to add new values to an existing cog. Here's a copy of the cog if anyone might be able to help.
# Jedi Knight Cog Script
#
# FORCE_PERSUASION.COG
#
# FORCEPOWER Script - Persuasion
# Light Side Power
# Bin 26
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing player local
flex mana local
flex cost=3 local
int rank local
sound persuasionSound=ForcePersuas01.WAV local
int channel=-1 local
int inbubble=0 local
int old local
int new local
message startup
message activated
message pulse
message newplayer
message killed
message selected
message enterbubble
message exitbubble
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
inbubble = 0;
call stop_power;
Return;
# ........................................................................................
activated:
if(inbubble) Return;
if(old == 0)
{
new = 1;
if(!IsInvActivated(player, 26))
{
print("Immersion Activated");
if(GetInv(player, 64) != 1) ChangeInv(player, 14, -cost);
// Send a "force disturbance"...
if(!IsMulti())
SendMessageExRadius(GetThingPos(player), cost, 0x4, splash, 26, 0, 0, 0);
SetInvActivated(player, 26, 1);
PlayMode(player, 24);
// Play activation sound
PlaySoundThing(persuasionSound, player, 1.0, -1, -1, 0x80);
rank = GetInv(player, 26);
// Set player invisible to AI
SetActorFlags(player, 0x80);
// Set player "invisible" to real players
if(rank == 1) jkSetPersuasionInfo(player, 14, 22);
else if(rank == 2) jkSetPersuasionInfo(player, 11, 19);
else if(rank == 3) jkSetPersuasionInfo(player, 8, 16);
else if(rank == 4) jkSetPersuasionInfo(player, 5, 13);
SetThingCurGeoMode(player, 0);
jkSetFlags(player, 0x20);
SetPulse(0.5);
}
}
Return;
# ........................................................................................
pulse:
if(GetThingHealth(player) < 1) call stop_power;
mana = GetInv(player, 14);
if(GetInv(player, 64) != 1) ChangeInv(player, 14, -cost);
if(mana <= 0)
{
call stop_power;
}
Return;
# ........................................................................................
selected:
old = new;
if(old == 1)
{
call stop_power;
}
Return;
# ........................................................................................
killed:
if(GetSenderRef() != player) Return;
newplayer:
call stop_power;
Return;
# ........................................................................................
enterbubble:
inbubble = 1;
call stop_power;
Return;
# ........................................................................................
exitbubble:
inbubble = 0;
Return;
# ........................................................................................
stop_power:
print("Immersion Deactivated");
new = 0;
SetPulse(0);
KillTimerEx(1);
if(channel != -1)
{
StopSound(channel, 0.1);
channel = -1;
}
SetInvActivated(player, 26, 0);
ClearActorFlags(player, 0x80);
SetThingCurGeoMode(player, GetThingGeoMode(player));
jkClearFlags(player, 0x20);
Return;
end
------------------
I just love that part of the Jedi Code that says, "There is no ignorance - only knowledge". If that's the case, then what am I doing on this Force-blasted message board??!!
I just love that part of the Jedi Code that says, "There is no ignorance - only knowledge". If that's the case, then what am I doing on this Force-blasted message board??!!