Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Setting AI alignment...
Setting AI alignment...
2000-11-18, 9:56 AM #1
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??!!
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??!!
2000-11-18, 5:48 PM #2
Yeeeeee-haaaaaah!!!

Success!

I managed to change the alignment so that all of the AI's leave you alone when the power is active. Now, I have only one thing left to do.

I want the power to be deactivated whenever the player attacks with one of his weapons. How would I go about doing that?

Any help would be most appreciated.

------------------
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??!!
2000-11-19, 2:28 AM #3
Take a look at Drazen Isle.. one of the special powers available was invisibility, but it turned off when you moved, unless you were crouching.

-Jipe
2000-11-19, 7:41 AM #4
In all of the weapon cogs, in the fire message, put the following line:
Code:
SendMessage(fpcog, stop_power);

In the place of fp cog should be something that refers to the force persuasion cog, I don't know it off the top of my head though...
Capitalization
Commas
Periods
Question Marks
Apostrophes
Confusable Words
Plague Words
2000-11-19, 7:37 PM #5
I'm having trouble finding that reference also. If someone could direct me to it, I'd be a really happy camper, cuz then I'd have all of my Force power cogs totally modified and ready to go.

By the way, the reason I've been playing around with the Persuasion cog is that I want it to resemble the Immersion skill that Luke Skywalker learned from the Fallanassi Adepts of the White Current. With this skill, the user actually merges him/herself with the Force and becomes undetectable. It beats having to actively invade the minds of others to make them think you're not there. And it gives me the perfect excuse to make Force Persuasion work against those blasted probe droids. Man, I HATE those things...

------------------
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??!!

↑ Up to the top!