Princess Artemis Posted January 22, 2006 Share Posted January 22, 2006 I'm seriously thinking about making it possible to recruit an NPC for a short period of time. Specifically, I'm creating a mod that would put Dustil on Telos for a conversation, some back story, what not, possibly kill him for DS points...but I was also thinking, wouldn't it be interesting if I could have him lend a hand to the Exile just long enough to get to the shuttle that would take the party to Atris' secret academy? I may not do this, but if I did, I can see myself running into these problems: Dustil starts out neutral, but if the Exile decides to be evil and attack him, he needs to be able to defend himself, so setting him to use defense instead of hostile scripts on the beginning of a battle (as per NPC recruit tutorial instructions) would make that kind of hard. Could I overcome this by, if the Exile is successful in recruiting Dustil, using a script to destroy the original Dustil and create a new, friendly Dustil? Getting him to leave. I'm guessing I could use a script to do this--pretend, say, he's Visas in the add/remove character scripts (since there's no way for her to be available at that point in the game) and setting a script to fire so when the party is preparing to get in the shuttle, Dustil will also leave. Could that work? And if it did, would it ditch his portrait in the chose party screen as well? Keeping his allignment unaffected by the Exile's. Maybe this wouldn't be quite acurate to TSL, but he'd be there only a short time and he's been busy shielding his Force sensitivity for a while...so possibly not long enough to be affected by the Exile? Anyway, I definitely would not want him to suddenly go even a little bit DS (although a medium to strong DS character would never be able to recruit him in the first place the way I plan to write the dialogue.) Is there some way to do that? Perhaps adapt whatever is keeping Kreia unaffected? Making his equipment impossible to change. I plan on having him have a lightsaber, but this would not be known to anyone until they either tried to kill him or they recruited him. That and I don't want the player to be able to gank any other goodies he might be wearing--if he's just joining temporarily, no one has any business stealing his stuff. If this is not possible, and it is possible ti recruit from the scenario I've put forth, I would just make him unequiped to start with and make sure he gives back anything he was wearing/holding when he leaves. I know how to make a new appearence, etc. in .2da, so that's not a problem. I just need to know which, if any/all, of the above are possible before I contemplate the idea further Link to comment Share on other sites More sharing options...
ChAiNz.2da Posted January 22, 2006 Share Posted January 22, 2006 This thread may get your started, though not positive it will answer all of your questions.. this seems to be a route you might want to explore http://www.lucasforums.com/showthread.php?t=151438 Link to comment Share on other sites More sharing options...
Princess Artemis Posted January 22, 2006 Author Share Posted January 22, 2006 That's certainly a possibility...it does adress the problem of making sure no one can swipe his stuff. Hmmm...can a puppet be assigned to multiple owners? And then leave them? Or can a character have two puppets? To do that, I'd have to destroy the original Dustil anyway, but how would I get the puppet to leave? Link to comment Share on other sites More sharing options...
stoffe Posted January 22, 2006 Share Posted January 22, 2006 Dustil starts out neutral, but if the Exile decides to be evil and attack him, he needs to be able to defend himself, so setting him to use defense instead of hostile scripts on the beginning of a battle would make that kind of hard. The creature AI scripts are (usually) a set of generic scripts most creatures use. There is no "hostile AI", e.g. enemies usually have the same scripts assigned as random scenery NPCs. There are two sets of generic AI scripts. The ones prefixed with k_def_* are the default AI that 95% of all creatures in the game are using. The ones starting with k_hen_* are for party members (doing things like following the party leader etc). What determines if a creature attacks you or not is dependant on what faction they have assigned. If they belong to a faction that is hostile towards the Player/Party, they will attack. Thus, you could start out by putting him in the "Neutral" (5) faction. Then if he should join, you flip him over to the "Friendly1" (2) faction. If he should attack (and be attackable) you switch him over to the Hostile1 (1) faction. The ChangeToStandardFaction() scripting function can be used to change what faction a creature belongs to. You can check what standard factions are available, and their relations (0=hostile, 50=neutral, 100=friend) to eachother in repute.2da. Getting him to leave. This can be done in a number of ways. The easiest is probably to edit the script that fires when you board the shuttle to remove him from the game before the player is transitioned to the new area. Keeping his allignment unaffected by the Exile's. Since the player is unlikely to be a Jedi Master or Sith Lord at that time (thus having received the alignment affecting feats those classes have), a party member would hardly be affected by the player at all if they don't have any influence changes. Making his equipment impossible to change. If you only want him to tag along for a short while and talk to the player and fight their enemies, without having to bother with levelups, equipment, alignment and such, it's perhaps easier not to add him to the party at all. This way you won't be able to access his inventory or stat-sheet. You could just assign him to faction 2 (Friendly1) which will make him friendly to the party and thus hostile to your enemies, and then put a custom heartbeat script on him that makes him follow you around whenever a particular variable is set. The only problem with doing it this way is that he's to follow you across several modules on Telos surface. But since you can't affect his stats or inventory anyway it shouldn't cause any problems to just create a new instance of him in each module the player crosses. That said, if you want him as a party member you could give him a special appearance (in appearance.2da) which has all the equipment slots locked. That way the player couldn't remove any of his gear, just like you can't strip Mandalore of his armor. Then you could, instead of setting him to the Friendly faction, add him to the party slot of an NPC who cannot be present at that time (essentially anyone but Atton, Kreia and Bao-Dur). If you give him the k_hen_* scripts he should function like any party member when he is added to the group. Then, when the player takes the shuttle, remove him from the party and party table before transitioning to the new area. This thread may get your started, though not positive it will answer all of your questions.. this seems to be a route you might want to explore (Puppet thread link snipped) Party Puppets would probably work, but be more complicated than using one of the vacant party slots to briefly add him to the party. Since you can't assign a PUP to the main character, he'd have to be a puppet to one of the other party members instead. Link to comment Share on other sites More sharing options...
Princess Artemis Posted January 22, 2006 Author Share Posted January 22, 2006 Muchos gracias! I think this is something I can do, after some serious looking at more of the tutorials and scripts. So, to clarify that I'm understanding right--I could create a unique Dustil NPC using the proper .2das for doing so, lock up his equipment, then stick him somewhere on Telos. Write a dialogue for him, in which one path fires a script that turns him hostile, and that's that for him (with his equipment locked, that would prevent total looting as well, I assume--that's a bug that for some reason I can't seem to figure out how to fix, he drops his lightsaber as well as the stuff I put in his pack as droppables). Otherwise he stays neutral, in which one dialogue path fires a script to add him to the party (using the space of a character that doesn't show up on the party select, which is nearly everyone), and then he's good to go as a party member. Then, find the point at which the party gets on the shuttle and add a script that removes Dustil from the party. (I've found most of what I'd need to do this, just looking for the shuttle part...) If I did that, he wouldn't get up again once he was turned hostile? I'm assuming that I'd have to have No Permanent Death checked on the new NPC Dustil...and it would get awful inconvenient if he kept getting up Link to comment Share on other sites More sharing options...
T7nowhere Posted January 22, 2006 Share Posted January 22, 2006 If you wanted to you can use 2 UTC files for him, A party utc and a non party utc, use the non-party utc as the one that meets the PC and if he joins the PC then with a script you destroy the first utc and then spawn in the party member utc. One instance that I can think where this is done is when Bao-Dur joins the party, most of the time when I play the scene the first UTC will ramain onscreen for a couple seconds while Party member utc is added to your group. btw I wish you luck, this sounds like and interesting recruit mod and its a cool idea. I've thought about doing this type of recuit mod myself for Peragus and Citadel, but never got around to it. You could even have him pop up on other planets for brief meetings, Unless an evil PC kills him that is. Link to comment Share on other sites More sharing options...
Princess Artemis Posted January 22, 2006 Author Share Posted January 22, 2006 :: proceeds to bang head on desk:: I made a new appearance and such for Dustil so that he could wear whatever I felt like putting on him, and, supposedly, would lock his equipment in place. Got him to spawn, got a minimal dialogue set up to test for joining...and he won't join. I don't know if I'm using the wrong script or what, but there doesn't appear to be an included script that I could put into DLGEditor and add the party slot numbers to. I tried using a_addvisas.ncs modified to Dustil's tags, I tried a trimmed down version of a_disc_join.ncs with references to Disciple changed to Dustil and the number changed to Visas' party number...not working. I feel like I'm missing something obvious... I think a_leaveparty with the parameter set to 9 (which is where I plan on putting him) will get him to leave...but it's pretty much impossible to test it if I can't get him to join! (Incidentally, I had to hide it in hk50_cut.dlg, since there's only one of those, but several shuttle.dlg files.) Also, he drops everything when he's killed, including his clothes and 'saber. Any way to get him to stop doing that? I greatly appreciate the help y'all have provided so far. Link to comment Share on other sites More sharing options...
T7nowhere Posted January 22, 2006 Share Posted January 22, 2006 Open your utc's inventory editor and right click each equiped item and uncheck "dropable", you can do the same for items in his inventory. That should ensure nothing is lootable from him. Link to comment Share on other sites More sharing options...
Princess Artemis Posted January 22, 2006 Author Share Posted January 22, 2006 ::goes and does that:: Well, that was easy, if not entirely obvious Thanks. One thing down, two to go! Link to comment Share on other sites More sharing options...
stoffe Posted January 22, 2006 Share Posted January 22, 2006 Got him to spawn, got a minimal dialogue set up to test for joining...and he won't join. I don't know if I'm using the wrong script or what, but there doesn't appear to be an included script that I could put into DLGEditor and add the party slot numbers to. A script like this should work to add him to Visas slot in the party table and add him to the active party, provided it's not already full. If the party is already full, the party member who is not Bao-Dur will be removed from the group first: void main() { object oDust = GetObjectByTag("DustilTag"); // <-- Set the Tag here if (GetIsObjectValid(oDust)) { AddAvailableNPCByObject(NPC_VISAS, oDust); if (GetPartyMemberCount() == 3) { if (IsNPCPartyMember(NPC_ATTON)) RemoveNPCFromPartyToBase(NPC_ATTON); if (IsNPCPartyMember(NPC_KREIA)) RemoveNPCFromPartyToBase(NPC_KREIA); } AddPartyMember(NPC_VISAS, oDust); } } Then, to remove him from the group and party table again, this should work: void main() { RemoveNPCFromPartyToBase(NPC_VISAS); RemoveAvailableNPC(NPC_VISAS); } Link to comment Share on other sites More sharing options...
Princess Artemis Posted January 22, 2006 Author Share Posted January 22, 2006 :: pokes at the scripts she was using:: I can see why one of them didn't work, but I'm a little boggled by the second. :: pokes at it some more:: Hmm, maybe because it was trying to add a character to a party that wasn't full, and if it was, it just yoinked out any old character to add the new one (probably tried to gank Bao-Dur, and that didn't work). I'll try your scripts...if they work, may I use them with credit? I had to add this line to the join party script, stoffe -mkb-, right above AddPartyMember, I huess since his faction was Neutral: ChangeToStandardFaction(oDust, 2); Now to test if his leave party script works! :: does a lil' jig!:: Link to comment Share on other sites More sharing options...
Princess Artemis Posted January 24, 2006 Author Share Posted January 24, 2006 I'm getting somewhere with this I'm working on a dialogue tree for Dustil and managed to work out a way for him to remember you've talked to him already using a_global_set and c_global_eq with one of the globals off poor, dead Peragus. Also got him to acknowledge he's in the party (and after wrestling with how to do this all day and finding the solution under my nose...well, I'm happy about it.) He leaves when he's supposed to, so that's good too. So, new question! Is it possible to add new dialogue to existing dialogues? I know it's possible to sneak in scripts, so I'm guessing it's possible to add to existing dialogues. I'm looking to add a few lines for Dustil when Bao-Dur talks about how calm walking on the surface of Telos makes him feel. I modified c_con_visaspm so that it would look for Dustil by tag instead of Visas and put the new script in the conditionals for Bao-Dur's dialogue at that point, but nuthin'. (Quick clarification--I did add the extra dialogue and put the conditional in the first lead off statement, like it has for Atton and Kreia.) The change is very minor: int StartingConditional() { return ((IsNPCPartyMember(NPC_VISAS) == TRUE) && (GetDistanceBetween(GetPCSpeaker(), GetObjectByTag("VisasMarr")) <= 10.0)); } becomes int StartingConditional() { return ((IsNPCPartyMember(NPC_VISAS) == TRUE) && (GetDistanceBetween(GetPCSpeaker(), GetObjectByTag("tel_dustil2")) <= 10.0)); } Basically, I just changed the tag to Dustil's and compiled it with a new name, so I'm confused about why it's not working. Link to comment Share on other sites More sharing options...
stoffe Posted January 24, 2006 Share Posted January 24, 2006 Basically, I just changed the tag to Dustil's and compiled it with a new name, so I'm confused about why it's not working. Have you tried to run the modified dialog without any custom conditional script attached, to see if the conversation node appears as it should? If it does, the problem is with the conditional script. It if doesn't appear anyway, the problem likely lies elsewhere. Could help to narrow down where the problem lies... Link to comment Share on other sites More sharing options...
Princess Artemis Posted January 25, 2006 Author Share Posted January 25, 2006 No, I didn't before, but I just tried it with different speaker tags. With no conditionals and no speaker tags, Bao-Dur would say the lines I added since they're above his default no one else is in the party response, even if it was just Exile and Bao-Dur. Then I tried different speaker tags, it skipped them, until I put in tel_dustil2 as the speaker tag (no conditionals), and Dustil said the lines. With Dustil's correct speaker tag but with him out of the party, the dialogue skipped his lines. I also tried it with the custom conditional and tel_dustil2 as the speaker tag, and Dustil said the new lines also. I think the camera was a bit different on them, though, than it was if Atton or Kreia was there...I didn't test that, so I could be wrong. So I guess the problem was the speaker tags. Now I know what Dustil's speaker tag is in case I want to add him to something else...I had no clue if it was Dustil, Visas, or tel_dustil2; I'm hazarding a guess that his speaker tag is based on what his 'tag' is on Kotor Tool's Basic page of his .utc, below his name and last name. I'll dink around and figure that out. Thanks for the suggestion, it seems to have cleared up that problem Of course, I have no idea if the custom conditional script works for its intended purpose elsewhere, since it seems that part of Bao-Dur's specific Telos dialogues cared more about the speaker tag than the conditional. Link to comment Share on other sites More sharing options...
Princess Artemis Posted January 28, 2006 Author Share Posted January 28, 2006 OK, I'm getting a bit more ambitious with this than I had originally planned. Now I'm looking into making Dustil a possible permanent recruit, if the player wishes to use him. At the moment, the temporary recruit is almost finished, just needs a finished dialogue. To make this possible the way I have planned, I'd need for Dustil to behave in a certain way on whatever other planet/possibly Citadel--that is, he would only show up if the player had recruited him on Telos. I've already borrowed an old global from Peragus to set him to 'been recruited'. Otherwise I would want him not to show up anywhere else. If I put him on Citadel, I'd have to figure out a way to keep him from showing up on the first visit but make it possible for him to show up on a second visit. Is that something that would be possible? I would change his party slot to HK-47's, since there's no plot that he's absolutely required for, but also make it optional to recruit Dustil permanently (say, he would wait if the player wanted to mess around with HK for a while.) It'd also involve finding a way toi get him on the Hawk, as well as possibly figuring out how to either change the Telos shuttle.dlg to be unique so that Dustil can tell the player where he would possibly be if they wante to look him up. But first I need to know if I can get him to conditionally show up on a planet/Citadel. Link to comment Share on other sites More sharing options...
Princess Artemis Posted February 2, 2006 Author Share Posted February 2, 2006 OK, with much searching and beating my head against scripts, I've made him spawn on Korriban, and he takes up HK's spot when he is recruited (I changed his tag to HK47 so that he wouldn't multiply on the Hawk.) Now I come to a dialogue problem. Since Dustil is replacing HK, I need to alter HK's cut-scenes so Dustil doesn't go all possessed and start talking like HK. The first one I tried to alter, hk47t3m4.dlg, literally crashes the game when I try alter it. What I did was branch off T3's second silent dialogue with a (continue) reply, with a conditional attached to it that looks for the global I set for having permanently recuited Dustil. This does successfully pull the dialogue off HK47's track. Then I add an entry of "Just testing" because that's what I'm doing... Unfortunately, the conditional reply, when the dialogue gets to it, causes the cutscene to jump over to the Exile and stalls the dialogue, locking up the game. The only difference between the original (continue) reply and the conditioned one is the conditional. I haven't changed anything else leading up to it. Anyone know why it would be jumping to the Exile in that case? I'm not entirely sure, but perhaps it has something to do with the script...maybe the conditional is throwing the a_hk47t3m4 script for a loop. Here's the script, if it helps... void main() { object oT3M4 = GetObjectByTag("T3M4", 0); object oHK47 = GetObjectByTag("HK47", 0); int nParam1 = GetScriptParameter(1); switch (nParam1) { case 1: SetLockOrientationInDialog(oT3M4, 1); SetLockOrientationInDialog(oHK47, 1); DelayCommand(1.0, AssignCommand(oT3M4, ActionPlayAnimation(113, 1.0, 0.0))); { object oRWeapItem = GetItemInSlot(5, oHK47); if (GetIsObjectValid(oRWeapItem)) { AssignCommand(oHK47, ActionUnequipItem(oRWeapItem, 0)); } oRWeapItem = GetItemInSlot(4, oHK47); if (GetIsObjectValid(oRWeapItem)) { AssignCommand(oHK47, ActionUnequipItem(oRWeapItem, 0)); } } break; case 2: break; case 3: DelayCommand(0.6, AssignCommand(oT3M4, SetFacingPoint(GetPosition(oHK47)))); break; case 4: { object oWP_hk47_cut_2_1 = GetObjectByTag("WP_hk47_cut_2_1", 0); AssignCommand(oHK47, ActionWait(1.5)); AssignCommand(oHK47, ActionMoveToObject(oWP_hk47_cut_2_1, 0, 1.0)); AssignCommand(oHK47, ActionPlayAnimation(2, 1.0, (-1.0))); DelayCommand(3.5, SetDialogPlaceableCamera(15)); } break; case 5: break; case 6: { object oWP_hk47_cut_2_2 = GetObjectByTag("WP_hk47_cut_2_2", 0); AssignCommand(oHK47, ActionPlayAnimation(101, 1.0, 0.0)); AssignCommand(oHK47, ActionWait(1.0)); AssignCommand(oHK47, ActionMoveToObject(oWP_hk47_cut_2_2, 0, 0.5)); AssignCommand(oHK47, ActionDoCommand(AssignCommand(oT3M4, SetFacingPoint(GetPosition(oHK47))))); } break; case 7: break; case 8: { effect efBeam = EffectBeam(2052, oT3M4, 0, 0); ApplyEffectToObject(1, efBeam, oHK47, 6.0); DelayCommand(0.1, AssignCommand(oHK47, ActionPlayAnimation(21, 1.0, 2.9))); DelayCommand(3.0, AssignCommand(oHK47, ClearAllActions())); DelayCommand(3.0, AssignCommand(oHK47, ActionPlayAnimation(26, 1.0, (-1.0)))); } break; } } Would I be way off in thinking that if I altered the script to add "object oDust = GetObjectByTag("HK47", 0);" and then added else such and sos to the script to direct Dustil's actions that I could use it and hopefully not blow up the dialogue? Link to comment Share on other sites More sharing options...
stoffe Posted February 2, 2006 Share Posted February 2, 2006 Now I come to a dialogue problem. Since Dustil is replacing HK, I need to alter HK's cut-scenes so Dustil doesn't go all possessed and start talking like HK. The first one I tried to alter, hk47t3m4.dlg, literally crashes the game when I try alter it. The easiest way of doing this would probably be to alter the Ebon Hawk cutscene scripts, k_003ebo_enter and a_next_scene, to prevent the scenes from being triggered alltogether if it isn't HK47 that occupies his party table slot. You could add a conditional check that checks the name of the HK47-creature, for example. To prevent the interjections where HK47 talks during conversation you could add a similar check to the dialog conditional script that checks if HK47 is in the party (the name of which escapes my mind at the moment). Link to comment Share on other sites More sharing options...
Princess Artemis Posted February 2, 2006 Author Share Posted February 2, 2006 Thanks...::looks at scripts, temporarily hyperventilates:: I'll definitely look into that. Hmm...could it be possible to call up an alternate dialogue if the condition check finds that HK isn't really HK? That's probably more complicated than I'm capable of handling at this point though. I think the dialogue party conditional check for HK is called c_con_hk47pm. I altered one before and it worked, so this could work, too. Link to comment Share on other sites More sharing options...
Princess Artemis Posted February 3, 2006 Author Share Posted February 3, 2006 Hee. After digging around Holowan for conditional scripts, I was able to find some that I could use to modify k_003ebo_enter, a_next_scene, and c_con_hk47pm. I'll include the source scripts with the mod when I finish it, but here's what I changed in k_003ebo_enter and a_next_scene--first, I added a new function... int GetIsOnHawk(object oCreature); //So that replaced HK47 can check his name. Then, added this at the begining of all the if/elses for the firing of scripts (with added semi-colons so the script would compile): void TriggerCutscenes() { SetGlobalFadeOut(); SetFadeUntilScript(); //PA: HK-47 checks to see if the HK-47 in the party is *really* HK-47... object oHK47 = GetObjectByTag ("HK47"); string sName = GetName(oHK47); string sSubName = GetSubString(sName,0,4); int nScene; And then at all instances of finding NPC_HK_47, I replaced them with this: && GetIsOnHawk(oHK47) && (sSubName == "HK47") Since the other characters had their cut scenes, and T3's cut scene with HK didn't fire despite the presense of "HK", I figure it works, but I'll have to test to make sure they fire when HK really is in the party. (When Dustil had the wrong tag, T3's cut-scene with HK did start, but with no HK to talk to, it aborted with no ill-effects.) For c_con_hk47pm, I changed it to this (I found most of this code in one of the other threads here...I'll look for it again so I can give credit where it's due): int StartingConditional() { object oHK47=GetObjectByTag ("HK47"); string sName = GetName(oHK47); string sSubName = GetSubString(sName,0,4); if ((IsObjectPartyMember(oHK47) == TRUE) && (sSubName == "HK47") && (GetDistanceBetween(GetPCSpeaker(), oHK47) <= 10.0)) { return TRUE; } return FALSE; } Then I made a custom check script for Dustil called c_con_dustilpm that just substituted "Dust" for "HK47" in the SubName. I know that it works because I added lines to Bao-Dur's dialogue on Telos and with the c_con_hk47pm in the conditional, it skipped the lines, but with c_con_dustilpm, Dustil said his lines. Although, I definitely should test it to be sure HK still says his lines when he's actually in the party. With cjt0202's help, I modified the original adding Dustil script you (stoffe) provided above so that he could have a ranged weapon in his alternate hand; only thing is I don't know how long the script will last, since it requires a look at Dustil's equipment to complete, and if the player arms someone else with Dustil's Onasi Blaster (I put one in his pack so that if the player decides that killing him would be more fun, he'll drop it along with a green 'saber crystal to make it look like his broke when he was killed), they get a free one, because come hell or high water, he's going to arm himself with an Onasi Blaster even if he has to make it out of thin air. Any help in figuring out a way to accomplish the same thing without giving away free blasters or making the player check his equipment would be much appreciated... object oNew = GetItemPossessedBy(oDust, "w_blaste_22");//Takes Dustil's Onasi Blaster out of his inventory AssignCommand(oDust, ActionEquipItem(oNew, 18, TRUE)); //Arms him with it on his alternate weapons And there is an honest question in here I'm trying to make a custom vibrosword--I've managed to do that, but can weapons grant bonus feats? I made a sword that says it gives Improved Dueling, but it doesn't seem to actually do it if I look at the character's feats when they're using it. Link to comment Share on other sites More sharing options...
Princess Artemis Posted February 8, 2006 Author Share Posted February 8, 2006 As a general service, I'd like to say, gwaaarrr I messed up those changes I made to the k_003ebo_enter and a_next_scene. They work to effectively block HK or anyone in his place triggering them. So, cjt pointed out to me that HK has an 'alive' global, and that replacing all instances of GetIsAvailable(NPC_HK_47) with (GetGlobalNumber("000_HK_Alive") == 2) would get halfway to preventing a non-HK HK (like Dustil) from triggering the cutscenes. The second part was to alter HK's initial dialogue so that if someone is already in his spot, he sets his alive global to 1 and doesn't add himself to the party, and to have certain lines of Dustil's recruit dialogue set HK's alive global back to 1 just in case the player had HK in party previously. That prevents Dustil from saying HK's lines, but lets HK say them. ...Why do the answers have to be so much less complicated than I make them? The c_con_hk47pm and c_con_dustilpm scripts do work, though, to the best of my knowledge. Link to comment Share on other sites More sharing options...
Princess Artemis Posted February 12, 2006 Author Share Posted February 12, 2006 Another question, this time regarding persuasion. I'm having trouble figuring out which scripts to use in the dialogue for persuading Dustil to join the first time 'round, and figuring out what to set the persuade level at. There's two possible persuasion checks, one which it doesn't matter if it failed but which I want to be reasonably difficult for the average player to succeed, and a second check which I want to have a better than average chance for an average player to succeed at. Basically, how this goes in dialogue is if Kreia is in the party she butts in and piques the Exile's curiosity enough to ask about Dustil's Force abilities. I want there to be a difficult persuade there, because it's early in the dialogue and Dustil's no stranger to sneaky characters like Kreia. The second persuade comes much later when Dustil's curiousity is piqued re: Sith chasing down the Exile, so the persuade to find out about Dustil's Force talent would be easier...but if it failed, he would not be recruitable. That's another reason why I don't want it very difficult (but I do want it possible to fail--it flows with the story and the character to hide Force talent.) Link to comment Share on other sites More sharing options...
stoffe Posted February 12, 2006 Share Posted February 12, 2006 Another question, this time regarding persuasion. I'm having trouble figuring out which scripts to use in the dialogue for persuading Dustil to join the first time 'round, and figuring out what to set the persuade level at. There's two possible persuasion checks, one which it doesn't matter if it failed but which I want to be reasonably difficult for the average player to succeed, and a second check which I want to have a better than average chance for an average player to succeed at. A script like this should work to use in a dialog file to make persuade rolls: int StartingConditional() { int nDC = GetScriptParameter(1); int nRoll = GetSkillRank(SKILL_PERSUADE, GetPCSpeaker()) + d20(); return (nRoll >= (nDC == 0 ? GetHitDice(GetPCSpeaker()) : nDC)); } You set the first dialog node parameter (P1 in the DLGEditor) to the DC the player will have to make a persuade roll against, or set it to 0 to use the player's character level as DC. The script will check the player's persuade skill rank + a random number between 1-20 against the DC value. If it's higher or equal to the DC value, the persuade check has succeeded. If I remember correctly you are around level 11-12 when you arrive in the Telos Restoration Zone. Thus the player would have at most a Persuade skill of about 12 if they put a skill point in persuade at every levelup. Their persuade roll could then range from 13 to 32 depending on luck. Thus an "easy" DC could be around 10 or so... that would allow a very persuasive player to always succeed, while those with less persuade skill would have a chance to fail. Link to comment Share on other sites More sharing options...
Princess Artemis Posted February 25, 2006 Author Share Posted February 25, 2006 Sorry it took so long to say--the script works fine, and I thank you deeply for providing it. An interesting bug has cropped up while testing this mod...on at least two different comps, with different mods installed, Dustil occasionally takes on the appearance of another character entirely. Once he turned into Bastila on me, but going through the Telos crash reset him to his normal Dustil self. But for someone helping me write his dialogue and generally betaing with me has had no end of trouble getting him to look like Dustil. I've checked her .2das and Dustil's .utc, and everything is the way it should be, but she's had him show up looking like Carth quite a few times and once he turned into Atton! Does anyone know an explanation for this rather bizarre behavior? Is K2 a little dodgy on new NPCs added to the .2das, and loads them sometimes with random appearances even if the .utcs and .2das specify the correct appearance? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.