Darth_ToMeR Posted June 16, 2004 Share Posted June 16, 2004 When I do Force Resistence my character appear like that- My question is, How can i get my character to always like that, but not in orange, i want it Red. Is there some way to do that? Thanks. Link to comment Share on other sites More sharing options...
Drog Posted June 16, 2004 Share Posted June 16, 2004 Originally posted by Darth_ToMeR When I do Force Resistence my character appear like that- My question is, How can i get my character to always like that, but not in orange, i want it Red. Is there some way to do that? Thanks. Well i dont think it works... but it just might , just open the forces in a scripting program and you'll see it might take alot of workk or less .. i dunno Link to comment Share on other sites More sharing options...
Drog Posted June 16, 2004 Share Posted June 16, 2004 You can also make the forces repeatly over and over again , require some scripting tough Link to comment Share on other sites More sharing options...
Darth333 Posted June 16, 2004 Share Posted June 16, 2004 You could apply a shield effect permanently, like ajunta pall in the tomb on Korriban. There is a red shield in the game. You would only need a simple script but right now i'm in the office so I can't give you all the details. Link to comment Share on other sites More sharing options...
Drog Posted June 16, 2004 Share Posted June 16, 2004 Originally posted by Darth333 You could apply a shield effect permanently, like ajunta pall in the tomb on Korriban. There is a red shield in the game. You would only need a simple script but right now i'm in the office so I can't give you all the details. Â Exactly what i found when i was looking ... maybe darth_tomer you should do something like this .. im sure i would enjoy it aswell others. Link to comment Share on other sites More sharing options...
tk102 Posted June 16, 2004 Share Posted June 16, 2004 Here's a script that should work, though I haven't tested it myself yet. Â You could attach this to a dialog or make it into an armband if you were so inclined. Â void main() { /**************************************** shazam.nss: Turn on/off a peramanent visual effect Strategy: first check to see if PC has an effect that is: 1) Permananent 2) Visual 3) Supernatural subtype if so, then remove it if not, then add it by tk102 6-15-04 ****************************************/ object oPC=GetFirstPC(); // check to see if effect is ON, if so turn it OFF effect eCheck = GetFirstEffect(oPC); while (GetIsEffectValid(eCheck)) { if ( (GetEffectDurationType(eCheck) ==DURATION_TYPE_PERMANENT) && (GetEffectType(eCheck)==EFFECT_TYPE_VISUAL) && (GetEffectSubType(eCheck)==SUBTYPE_SUPERNATURAL) ) { RemoveEffect(oPC, eCheck); return; } eCheck=GetNextEffect(oPC); } // not ON, so turn it ON effect eRedShield = EffectVisualEffect(VFX_DUR_SHIELD_RED_01); eRedShield = SupernaturalEffect(eRedShield); ApplyEffectToObject(DURATION_TYPE_PERMANENT, eRedShield, oPC); return; } Link to comment Share on other sites More sharing options...
Darth333 Posted June 16, 2004 Share Posted June 16, 2004 Thanks Tk Hmmm I sometimes wonder if you have Kotor with you at work...you certainly keep nwscript.nss not too far... Link to comment Share on other sites More sharing options...
Darth_ToMeR Posted June 16, 2004 Author Share Posted June 16, 2004 Originally posted by tk102 Here's a script that should work, though I haven't tested it myself yet. Â You could attach this to a dialog or make it into an armband if you were so inclined. Â void main() { /**************************************** shazam.nss: Turn on/off a peramanent visual effect Strategy: first check to see if PC has an effect that is: 1) Permananent 2) Visual 3) Supernatural subtype if so, then remove it if not, then add it by tk102 6-15-04 ****************************************/ object oPC=GetFirstPC(); // check to see if effect is ON, if so turn it OFF effect eCheck = GetFirstEffect(oPC); while (GetIsEffectValid(eCheck)) { if ( (GetEffectDurationType(eCheck) ==DURATION_TYPE_PERMANENT) && (GetEffectType(eCheck)==EFFECT_TYPE_VISUAL) && (GetEffectSubType(eCheck)==SUBTYPE_SUPERNATURAL) ) { RemoveEffect(oPC, eCheck); return; } eCheck=GetNextEffect(oPC); } // not ON, so turn it ON effect eRedShield = EffectVisualEffect(VFX_DUR_SHIELD_RED_01); eRedShield = SupernaturalEffect(eRedShield); ApplyEffectToObject(DURATION_TYPE_PERMANENT, eRedShield, oPC); return; } Thanks! With this script, my character will be with red shield even if i move areas? and how can i make this script into an armband? Link to comment Share on other sites More sharing options...
Drog Posted June 16, 2004 Share Posted June 16, 2004 Originally posted by Darth_ToMeR Thanks! With this script, my character will be with red shield even if i move areas? and how can i make this script into an armband? Go to Create Custom Item by t7nowhere and then add the script into the uti file or make the script and then relate it to the armband..(gauntlet) NP.. Link to comment Share on other sites More sharing options...
tk102 Posted June 16, 2004 Share Posted June 16, 2004 Actually, for an example of using an armband, take a look at the Darkside Choker mod on pcgm. Basically, it requires an entry into spells.2da and then in the .uti that you will create, under PropertiesList, make sure there exists the struct with the following parameters:  ChanceAppear: 100 Parm1: 255 Parm1Value: 0 PropertyName: 10 Subtype: <-- the entry into spells.2da  In spells.2da make sure your impactscript field is the name of the script you want to fire (shazam).  And obviously all these go into your override (shazam.ncs, spells.2da, and the uti). Link to comment Share on other sites More sharing options...
tk102 Posted June 17, 2004 Share Posted June 17, 2004 Checked the script and it seems to work fine. Link to comment Share on other sites More sharing options...
Darth_ToMeR Posted June 17, 2004 Author Share Posted June 17, 2004 Thank you!!! I want it on character i want to recruit. If it will be good, i'll release it. Thanks one more time. Link to comment Share on other sites More sharing options...
Darth_ToMeR Posted June 17, 2004 Author Share Posted June 17, 2004 Originally posted by tk102 Checked the script and it seems to work fine. How can i make it that the NPC will be Red? Link to comment Share on other sites More sharing options...
Darth333 Posted June 17, 2004 Share Posted June 17, 2004 Originally posted by Darth_ToMeR How can i make it that the NPC will be Red? Why don't you add this to the recruit script? or just attach it to a convo If it's your recruit that you want to be red, you'll have to replace oPC by the tag of the npc in the script and GetFirstPC() by GetObjectByTag("my_npc"); Link to comment Share on other sites More sharing options...
Darth_ToMeR Posted June 17, 2004 Author Share Posted June 17, 2004 Originally posted by Darth333 Why don't you add this to the recruit script? or just attach it to a convo If it's your recruit that you want to be red, you'll have to replace oPC by the tag of the npc in the script and GetFirstPC() by GetObjectByTag("my_npc"); "GetFirstPC()" is appear just one time. do i need to do something with all the "oPC" ? Link to comment Share on other sites More sharing options...
tk102 Posted June 17, 2004 Share Posted June 17, 2004 Something like this, Darth Tomer: void main() { /**************************************** npc_shazam.nss: Turn on a peramanent visual effect during recruitment of an NPC by tk102 6-15-04 ****************************************/ object oNPC=GetObjectByTag("npc_tag_goes_here"); effect eRedShield = EffectVisualEffect(VFX_DUR_SHIELD_RED_01); eRedShield = SupernaturalEffect(eRedShield); ApplyEffectToObject(DURATION_TYPE_PERMANENT, eRedShield, oNPC); return; } Â I believe there are points in the game (like when you put on a disguise (Sith, Sandperson) and then take it off that a script fires which removes all visual effects. You may need to compensate for that somehow. Â Â Also, I think this would be a cool armband to have, similar to Holowan Cloakworks where you can turn on multiple effects... I'll construct one after KSE v2 gets released. Link to comment Share on other sites More sharing options...
Darth_ToMeR Posted June 17, 2004 Author Share Posted June 17, 2004 Originally posted by tk102 Something like this, Darth Tomer: void main() { /**************************************** npc_shazam.nss: Turn on a peramanent visual effect during recruitment of an NPC by tk102 6-15-04 ****************************************/ object oNPC=GetObjectByTag("npc_tag_goes_here"); effect eRedShield = EffectVisualEffect(VFX_DUR_SHIELD_RED_01); ApplyEffectToObject(DURATION_TYPE_PERMANENT, eRedShield, oNPC); return; } Â The supernatural portion isn't necessary for just turning the effect 'ON'. Â I believe there are points in the game (like when you put on a disguise (Sith, Sandperson) and then take it off that a script fires which removes all visual effects. You may need to compensate for that somehow. Â Â Also, I think this would be a cool armband to have, similar to Holowan Cloakworks where you can turn on multiple effects... I'll construct one after KSE v2 gets released. Do i need just this part of the script? And what can i do if the shield will stop? Link to comment Share on other sites More sharing options...
tk102 Posted June 17, 2004 Share Posted June 17, 2004 Do i need just this part of the script? Yes, the above is a different script in and of itself. And what can i do if the shield will stop? You'll have to fire the script again somehow. I'd suggest using a custom OnSpawn script to make sure the effect is on. The OnSpawn script fires each time you enter a new area. Â Of course you can fire the script anyway you like -- trigger, armband, force power, dialog, etc. OnSpawn just seems to be the most natural way. Â Now your next question I anticipate: how? It's pretty easy: Â 1. In Kotor Tool BIFs -> scripts.bif -> Source -> k_def_spawn01.nss (extract this) 2. Look for this line in the code //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DIALOGUE_END); And after it add the following: effect eCheck = GetFirstEffect(OBJECT_SELF); int nEffectIsOn=0; while (GetIsEffectValid(eCheck)) { if ( (GetEffectDurationType(eCheck) ==DURATION_TYPE_PERMANENT) && (GetEffectType(eCheck)==EFFECT_TYPE_VISUAL) && (GetEffectSubType(eCheck)==SUBTYPE_SUPERNATURAL) ) { nEffectIsOn=1; } eCheck=GetNextEffect(OBJECT_SELF); } if (nEffectIsOn==0) { ExecuteScript("npc_shazam",OBJECT_SELF); } Â Then save this script with a unique name, compile it, and put it in your override. Your .utc should then have its OnSpawn field set your new script. Â Also, in this case, you'll need the supernatural flag set in npc_shazam.nss. Link to comment Share on other sites More sharing options...
Darth_ToMeR Posted June 18, 2004 Author Share Posted June 18, 2004 It's not compile it. it says "Error: Undeclared identifier "oPC" Error: requierd arguement missing in call to "GetNextEffect" Link to comment Share on other sites More sharing options...
tk102 Posted June 18, 2004 Share Posted June 18, 2004 I'm sorry Darth Tomer. I've edited the above script, and it should work this time. (oPC should've been OBJECT_SELF). Link to comment Share on other sites More sharing options...
Darth_ToMeR Posted June 19, 2004 Author Share Posted June 19, 2004 It's still doesn't compile it. Can you please give me all the code? (The two parts together). maybe i made a mistake with the copy past... Link to comment Share on other sites More sharing options...
tk102 Posted June 19, 2004 Share Posted June 19, 2004 Okay you asked for it. It compiles for me. (Watch the line breaks.) Â //:: Originally: k_def_spawn01 //:: Modified by tk102 for Darth Tomer /* v1.0 Spawn In for Darth Tomer with Permanent Red Shield Effect */ #include "k_inc_generic" #include "k_inc_debug" void main() { // WALK WAYPOINT BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** //GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_CIRCULAR); //GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_ONCE); //GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_PATH); //GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_RANDOM); //GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_RUN); //GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_STOP); //Causes the creature to pause for 1 - 3 seconds at a waypoint //GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_STOP_LONG); //Causes the creature to pause for 6 - 12 seconds at a waypoint //GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_WALK_STOP_RANDOM); //Causes the creature to pause for 1 - 12 seconds at a waypoint //GN_SetWalkWayPointsSeries(1); //If this function is uncommented a number from 1 to 99 must be passed. This number represents //a waypoint series that uses the string "01" through "99" instead of the creature's tag. // eg. WP_22_01 through WP_22_05. 22 is the series number set with this function. //GN_SetSpawnInCondition(SW_FLAG_COMMONER_BEHAVIOR); //GN_SetSpawnInCondition(SW_FLAG_FAST_BUFF); //GN_SetSpawnInCondition(SW_FLAG_AMBIENT_ANIMATIONS); //GN_SetSpawnInCondition(SW_FLAG_AMBIENT_ANIMATIONS_MOBILE); //This will play Ambient Animations until the NPC sees an enemy or is cleared. //NOTE that these animations will play automatically for Encounter Creatures. //GN_SetSpawnInCondition(SW_FLAG_ON_DIALOGUE_COMPUTER); //When a creature with this flag is talked to a computer dialogue will come up instead of the usual screens. // CUSTOM USER DEFINED EVENTS /* The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined events user 1000 - 1010 */ //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_HEARTBEAT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_PERCEPTION); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_ATTACKED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DAMAGED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DISTURBED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_COMBAT_ROUND_END); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DIALOGUE); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DEATH); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DISTURBED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_BLOCKED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1009 //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_FORCE_AFFECTED); //OPTIONAL BEHAVIOR - Fire User Defined Event 1010 //GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DIALOGUE_END); //OPTIONAL BEHAVIOR - Fire User Defined Event 1011 /******************* begin tk102 code *******************/ effect eCheck = GetFirstEffect(OBJECT_SELF); int nEffectIsOn=0; while (GetIsEffectValid(eCheck)) { if ( (GetEffectDurationType(eCheck) ==DURATION_TYPE_PERMANENT) && (GetEffectType(eCheck)==EFFECT_TYPE_VISUAL) && (GetEffectSubType(eCheck)==SUBTYPE_SUPERNATURAL) ) { nEffectIsOn=1; } eCheck=GetNextEffect(OBJECT_SELF); } if (nEffectIsOn==0) { ExecuteScript("npc_shazam",OBJECT_SELF); } /******************* end tk102 code *******************/ // DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***************************************************************************************** GN_SetDayNightPresence(AMBIENT_PRESENCE_ALWAYS_PRESENT); GN_SetListeningPatterns(); //This function although poorly named sets up the listening patterns and other important data for the //creature it should never be removed. GN_WalkWayPoints(); } Link to comment Share on other sites More sharing options...
Darth_ToMeR Posted June 19, 2004 Author Share Posted June 19, 2004 Still doesn't work. I have no idea what is the problem... Link to comment Share on other sites More sharing options...
tk102 Posted June 19, 2004 Share Posted June 19, 2004 Maybe you could post the error that is being generated by nwnnsscomp. Link to comment Share on other sites More sharing options...
Darth_ToMeR Posted June 19, 2004 Author Share Posted June 19, 2004 Here it is - http://members.lycos.co.uk/tomer06/error.jpg Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.