ace92 Posted July 28, 2008 Share Posted July 28, 2008 i want to make a conversation and i don't want every line to show up every time, for example i want the PC to talk to someone and only if the pc is at 85 LS points he can chose the line, how do i do that? Link to comment Share on other sites More sharing options...
TriggerGod Posted July 29, 2008 Share Posted July 29, 2008 *sigh* If you have a problem, please state what game... Anyways, if for TSL: There is a script called c_lighthigh. Here is the source script, as I cannot decompile because DeNCS hates me. //:: c_lighthigh /* checks to see if pc is really good */ //:: Created By: Jason Booth //:: Copyright (c) 2002 Bioware Corp. #include "k_inc_debug" #include "k_inc_utility" int StartingConditional() { return IsLightHigh(); } I'm not sure if there is a way to see if there is a way to know how high it is, except the dialog your companions have when you are kinda LS/DS, and mostly LS/DS. So use that as a guideline. Link to comment Share on other sites More sharing options...
sekan Posted July 29, 2008 Share Posted July 29, 2008 I'm not sure but I think this script should do it int StartingConditional() { object oPC = GetFirstPC(); if (GetFactionAverageGoodEvilAlignment(oPC) != 85) return FALSE; return TRUE; } Link to comment Share on other sites More sharing options...
oldflash Posted July 29, 2008 Share Posted July 29, 2008 Is not better if you put if (GetFactionAverageGoodEvilAlignment(oPC) < 84) return FALSE; ? Thinking about npc with 90 lightside points which can return false. Link to comment Share on other sites More sharing options...
glovemaster Posted July 29, 2008 Share Posted July 29, 2008 Is not better if you put if (GetFactionAverageGoodEvilAlignment(oPC) < 84) return FALSE; ? Thinking about npc with 90 lightside points which can return false. Well it depends on whether or not ace wants it to be 85 or higher. Admittedly ace hasn't been very clear but I think that 85+ would be better since its rare than anyone will have exactly 85. Also its GetAlignmentGoodEvil(); to return the alignment as an integer. int StartingConditional() { return (GetAlignmentGoodEvil(GetFirstPC()) >= 85); } Link to comment Share on other sites More sharing options...
ace92 Posted July 29, 2008 Author Share Posted July 29, 2008 ohh i see, sorry i didn't mention it but yes it's for TSL, i meant that he has at least 85 so it's should be: int StartingConditional() { return (GetAlignmentGoodEvil(GetFirstPC()) >= 85); } right? another question if i may, is it possible to write a script that it's condition is that if the player finished a quest? Link to comment Share on other sites More sharing options...
glovemaster Posted July 29, 2008 Share Posted July 29, 2008 Right. another question if i may, is it possible to write a script that it's condition is that if the player finished a quest? Its certainly possible, most quests have a global variable assigned to them to track their progress. So I guess if you wanted to see if they had completed a quest you would have to find the global for that quest and compare the number with the number that would mean it was completed. AFAIK there is easier script function to get the progress of a quest. Do you know which quest it is that you want to check? The script will be something like this: int StartingConditional() { int iFinished = [color=cyan](Complete value)[/color]; return (GetGlobalNumber([color=cyan]"quest_global_ref"[/color]) >= iFinished); } Link to comment Share on other sites More sharing options...
ace92 Posted July 29, 2008 Author Share Posted July 29, 2008 i see thanks for helping me out, it will help me a lot with my mod! and again thanks! Link to comment Share on other sites More sharing options...
Stream Posted July 29, 2008 Share Posted July 29, 2008 Obviously you need a way to track the quest, if you use journal entries to track it then this script would do, just replace entry with the name of the journal entry and 60 with whatever state it is to be completed. int StartingConditional() { return (GetJournalEntry("ENTRY")==60); } Another way to do it is to use globals, again replace global with the name of the global you're using and 2 with whatever state it needs to be at. int StartingConditional() { return (GetGlobalBoolean("GLOBAL")==2); } --Stream Link to comment Share on other sites More sharing options...
ace92 Posted July 29, 2008 Author Share Posted July 29, 2008 i was looking at "How to add Journal entries" by Darth333 but i wasn't able to find the global.jrl, can you help me? Link to comment Share on other sites More sharing options...
Istorian Posted July 29, 2008 Share Posted July 29, 2008 The global.jrl file is located for TSL: Open up Kotor Tool>Kotor II>dialogues.bif>Journal File>global.jrl. To extract it, simply select it and press the Extract file button at the right. For Kotor 1: Open up Kotor Tool>Kotor I>_newbif.bif>Journal File>global.jrl. To extract it, do the same thing as with TSL. You can then open the global.jrl file with a GFF editor. |I| Link to comment Share on other sites More sharing options...
ace92 Posted July 29, 2008 Author Share Posted July 29, 2008 thanks for your help! i really appreciate it!and thanks again Link to comment Share on other sites More sharing options...
Darth InSidious Posted July 29, 2008 Share Posted July 29, 2008 You might also want to try this tutorial. Link to comment Share on other sites More sharing options...
ace92 Posted July 29, 2008 Author Share Posted July 29, 2008 i did, it just didn't covered what i wanted. but thanks anyway darth. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.