Jump to content

Home

Change models by "port to hawk"


Zhoken

Recommended Posts

Hey guys,

 

I dont know if someone found a better way to change models or to have the changed models stay when changing planets, But I've Implemented the change models script into the "go_sup_gohawk.nsc" script that will change the player model every time you port back to the hawk or the taris apartments.

 

If you want to try it:

 

Find the k_sup_gohawk script using bifunpacker, Copy paste the script into what ever script editor you are using and add these lines between "void main" and Db_MyPrintString

 

void main()

{

 

object oPC = GetFirstPC();

int nClass = GetClassByPosition(1,GetFirstPC());

 

if(nClass == CLASS_TYPE_"your base class here")

{

effect eDisg = EffectDisguise(DISGUISE_TYPE_DARTHREVAN):

ApplyEffectToObejct(DURATION_TYPE_PERMANENT,eDisg,oPC);

}

 

NOTE: where I wrote "your base class" you should write in your starting class i.e. Soldier, Scout or Scoundrel as this script is dependent on your base class.

 

ALSO: I did this on another pc so you would be better off copy pasting what you need from the change model script. I Pretty darn sure I copied it down right but you never know. I've tried this script on taris and it works but I havent gotten past that, although its the same script to go to the hawk so it should work. Also it work with games that have been started already, which means you could edit it and changed models during the game if you get tired of one.

 

If any of the "real" scripters out there know how to make this script more efficient go right ahead. I don't really know how to script I just understand the syntax rules... (I think.. ;) )

 

Hope this helps, and if there’s a better way let me know, ill delete the post.

 

Oh and HUGE thanks to Lil' jawa and override367, they really made this possible.

 

 

EDIT: Incase you're wondering yes, it work when your multiclassed.

 

EDIT2: It works on other planets aswell as on taris.

 

-Zhoken.

Link to comment
Share on other sites

try this (the forum members are my test monkeys since I don't play , too busy scripting right now!)

 

this should give a permanant dark revan model, but it looks goofy with him running, feet go through cape...

 

the default onheartbeat script

 

k_def_heartbt01

/*

Default heartbeat script

*/

//:: Created By: Preston Watamaniuk

//:: Copyright © 2002 Bioware Corp.

 

#include "k_inc_switch"

#include "k_inc_debug"

 

void main()

 

 

{

 

ExecuteScript("k_ai_master", OBJECT_SELF, KOTOR_DEFAULT_EVENT_ON_HEARTBEAT);

 

/*

object oEnemy = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF,1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);

 

if(!GN_GetSpawnInCondition(SW_FLAG_AI_OFF))

{

if(GN_GetSpawnInCondition(SW_FLAG_AMBIENT_ANIMATIONS) || GN_GetSpawnInCondition(SW_FLAG_AMBIENT_ANIMATIONS_MOBILE))

{

string sWay = "WP_" + GetTag(OBJECT_SELF) + "_01";

int nSeries = GetLocalNumber(OBJECT_SELF, WALKWAYS_SERIES_NUMBER);

if(!GetIsObjectValid(GetObjectByTag(sWay)) && nSeries <= 0)

{

if(GetCurrentAction(OBJECT_SELF) != ACTION_MOVETOPOINT)

{

if(!GN_GetIsFighting(OBJECT_SELF) && !GetIsObjectValid(oEnemy))

{

GN_PlayAmbientAnimation();

}

}

}

}

}

if(GN_GetSpawnInCondition(SW_FLAG_EVENT_ON_HEARTBEAT))

{

SignalEvent(OBJECT_SELF, EventUserDefined(1001));

 

}

*/

 

{

object oPC = GetFirstPC();

ApplyEffectToObject(DURATION_TYPE_PERMANENT,

EffectDisguise(DISGUISE_TYPE_N_DARTHREVAN), oPC);

 

}

}

Link to comment
Share on other sites

Originally posted by sicamica

Hey!!

 

Could someone plz send that file to me because i don't have a clue about modding... but the revan's model is great and i want to play the game again with "real" revan!!

 

mail: sicamica@hotmail.com

 

thank you!!! :(:)

 

 

Yes could someone please host the REVAN model script all compiled? The one Override just posted?

 

or send it to minitarbz@direcway.com and i'll host it.

 

Thanks

Link to comment
Share on other sites

I have discovered the spawn in scripts, so you can add global functions without modifying the existing scripts.

 

If you never worked with custom events before, it´s actually quit easy. Just uncomment the state flags for the user defined events in the k_def_spawn01. Now you can add own scripts into the k_def_userdef01.

 

scripts.bif resource:

 

res432.nss=k_def_spawn01

res438.nss=k_def_userdef01

 

include scripts:

res874.nss=k_inc_debug

res881.nss=k_inc_generic

res895.nss=k_inc_utility

Link to comment
Share on other sites

Originally posted by Talchia

I have discovered the spawn in scripts, so you can add global functions without modifying the existing scripts.

 

If you never worked with custom events before, it´s actually quit easy. Just uncomment the state flags for the user defined events in the k_def_spawn01. Now you can add own scripts into the k_def_userdef01.

.....

 

true but there seems to be at least one problem.

 

I wrote a script using the userdef on_heartbeat which checks if the player wears both revan's robes and the sith mask. if so then the player's disguise is changed to Revan. And of course it switches back to the player model if you unequip one of the two (so you can wear Revan's robes with or without the hood up).

 

The problem is, it stops to work after the first cutscene is triggered on the endar spire (dark jedi fighting light jedi).

 

I am using compiled .nss files in the override folder.

 

Does anyone know a good workaround (apart from putting the code in the default on_heartbeat) ?

 

I was looking for a function, which would be triggered once the player equips /unequips something, but couldn't find any.

 

any ideas?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...