DarthCyclopsRLZ Posted November 21, 2006 Share Posted November 21, 2006 Heya. Here's the backstory. I've been working on FPs a bit last night and it just damned on me how insanely powerful CrushOpp/Inspire were. Since these spells seem to be are hardcorded into the game, there's just nothing that can be done about Masters/Lords *NOT* getting them. So, what I wanted, was to give via scripting up to lvl 2 of those spells to the other prestige classes. Now, the scripting part was easy Tested it by sticking it in the kreia.dg file. and it works. *** What I'm asking is: is there an equivalent of the k_oei_hench_inc script for the PC? Stoffe figured out a while back to *continually* check the NPCs' level for, let's say feats/powers/classchange/whatever. Can the same thing be done for the PC? (The continually checking lvl part and using an existing script rather than having to stick a costum script *anywhere* ). Oh well. Not much of an issue for me since, but I was wondering if just for the sake of compatibility. Suggestions? Link to comment Share on other sites More sharing options...
stoffe Posted November 21, 2006 Share Posted November 21, 2006 Here's the backstory. I've been working on FPs a bit last night and it just damned on me how insanely powerful CrushOpp/Inspire were. Since these spells seem to be are hardcorded into the game, there's just nothing that can be done about Masters/Lords *NOT* getting them. I've always thought Crush Opposition was pretty weak since it allows a saving throw to avoid it all and almost all enemies in the game have rather insane saves compared to what your party members have. But you can always change the impact scripts of those powers if you want to change how they work. What I'm asking is: is there an equivalent of the k_oei_hench_inc script for the PC? The player-made character has the default user-defined script, k_def_userdef01 assigned, and the default associate spawn script, k_hen_spawn01. Keep in mind though that a fair number of NPCs also use those scripts if you modify them. If you want to add player-specific code to them remember to check if OBJECT_SELF is the player made character before running that code (with GetIsPlayerMadeCharacter()). Link to comment Share on other sites More sharing options...
DarthCyclopsRLZ Posted November 21, 2006 Author Share Posted November 21, 2006 I've always thought Crush Opposition was pretty weak since it allows a saving throw to avoid it all and almost all enemies in the game have rather insane saves compared to what your party members have. But you can always change the impact scripts of those powers if you want to change how they work. Yeah, but the only players becoming Sith Lords usually start out as Consulars and have a pretty good saves for FPs But yeah, you're right, CrushOpp does have limitations (which I had completely forgotten - thought the penalty was a sure-hit). Let me rephrase. Inspire is overpowered and make any "semi-well-thought-out NPC character development" somewhat of a waste of time. Better? The player-made character has the default user-defined script, k_def_userdef01 assigned, and the default associate spawn script, k_hen_spawn01. Keep in mind though that a fair number of NPCs also use those scripts if you modify them. If you want to add player-specific code to them remember to check if OBJECT_SELF is the player made character before running that code (with GetIsPlayerMadeCharacter()). mmm. Ok. Since I'm not attaching it to a dialog file, I redid part of the script. The most basic version of the code should look like this, right? Oh, I wasn't sure where to put the "||" for the "or" functionality - Thus the tacky classes repetition. void { if ( GetIsPlayerMadeCharacter(OBJECT_SELF)) { if ((GetLevelByClass(CLASS_TYPE_JEDIWATCHMAN) >= 1) && !GetSpellAcquired(167)) { GrantSpell(167, OBJECT_SELF); } else if ((GetLevelByClass(CLASS_TYPE_WEAPONMASTER) >= 1) && !GetSpellAcquired(167)) { GrantSpell(167, OBJECT_SELF); } else if ((GetLevelByClass(CLASS_TYPE_SITHASSASSIN) >= 1) && !GetSpellAcquired(144)) { GrantSpell(144, OBJECT_SELF); } else if ((GetLevelByClass(CLASS_TYPE_SITHMARAUDER) >= 1) && !GetSpellAcquired(144)) { GrantSpell(144, OBJECT_SELF); } } } So where exactly do I put this? I take it those scripts are continually checked? Or do I have to punch in a "check on heartbeat" functionality somewhere...? Link to comment Share on other sites More sharing options...
stoffe Posted November 21, 2006 Share Posted November 21, 2006 mmm. Ok. Since I'm not attaching it to a dialog file, I redid part of the script. (snip) So where exactly do I put this? I take it those scripts are continually checked? Or do I have to punch in a "check on heartbeat" functionality somewhere...? I got the impression you were intending to put the check in the user-defined heartbeat script. If that's the case you'd need to modify the UserDefined script like: #include "k_inc_generic" #include "k_inc_utility" void main() { int nUser = GetUserDefinedEventNumber(); if ((nUser == 1001) && GetIsPlayerMadeCharacter(OBJECT_SELF)) { if (!GetSpellAcquired(167) && (GetLevelByClass(CLASS_TYPE_JEDIWATCHMAN) + GetLevelByClass(CLASS_TYPE_JEDIWEAPONMASTER) > 0)) { GrantSpell(167, OBJECT_SELF); } else if (!GetSpellAcquired(144) && (GetLevelByClass(CLASS_TYPE_SITHASSASSIN) + GetLevelByClass(CLASS_TYPE_SITHMARAUDER) > 0)) { GrantSpell(144, OBJECT_SELF); } } else if(nUser == HOSTILE_RETREAT) { UT_ReturnToBase(); } } ...and the OnSpawn script like: #include "k_inc_generic" void main() { SetIsDestroyable(TRUE,TRUE,TRUE); GN_SetListeningPatterns(); if (GetIsPlayerMadeCharacter(OBJECT_SELF)) { GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_HEARTBEAT); } } Link to comment Share on other sites More sharing options...
DarthCyclopsRLZ Posted November 22, 2006 Author Share Posted November 22, 2006 Just wasn't sure if I had anything else to add beside flag_on_event line in the spawn file, actually. The whole "said file having next to nothing in it" had me scratching my head, eh. For those wondering, it works like a charm. Muchas gracias. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.