The commandable effects wheter you can "click" an NPC. Very handy for preventing repeat conversations, and thus XP-exploits. Primarily used for during the 'run away and be deleted'
Doors can block NPC movement. I've had a lot of issues with that in the Nar Shaddaa cantina, and in the end just gave up on trying any proper pathing there, since it was a nightmare.
Pause, resume work for cutscenes, not for the VO. So yeah. From what I hear in KOTOR1 you can't partially skip (like KOTOR2 can), which sounds extremely frustrating to me. Sorry I can't really help there either...
EDIT: Looking at the script, ActionWait() doesn't work for that. So it might be that prevents it from working properly.
Maybe use
Alternatively, instead of using ActionWait() you can just put a DelayCommand on the ActionResumeConversation, and specify that delay for however long you want the node to last.
The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.
I am still getting the teleportation issue. I got the dialog to not be skippable, but my npc won't move still.
I have 2 codes from 2 different dialog nodes.
It could be a pathing issue with the module. Easiest solution would be to add a couple locations in between the end point that you assign the NPC to walk to. Alternatively, you could use bead-v's .pth editor. Found here:
I feel a bit silly asking this, but I really haven't done much modding for K1 at all... so my question is: is it not possible to play animations from animations.2da and dialoganimations.2da in K1? I am so used to it in K2 that this seems hard to believe. But all my efforts thus far have been in vain.
I wanna mod me an increase in buff durations, cuz it's annoying to have to reactivate them every 30-odd seconds.
Modifying the values is easy.
Getting to something that can be put in the override - not so much.
Tried this: http://www.lucasforums.com/showthrea...hreadid=120785
Says all files are just includes and therefore ignored.
And I have no idea where to find Jawa's NWN toolset kotor thingie.
I feel a bit silly asking this, but I really haven't done much modding for K1 at all... so my question is: is it not possible to play animations from animations.2da and dialoganimations.2da in K1? I am so used to it in K2 that this seems hard to believe. But all my efforts thus far have been in vain.
I don't believe so, only NWScript-defined animations can be played via a script in K1.
The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.
return this error when compiling "Error: Type mismatch in parameter 2 in call to Delay Command"
at first I thought it might be becuase the problem commands are within if statements, but moving them outside the statement still gives the error. There are other DelayCommands used in this script, and they aren't giving me this error. What gives?
If I'm not mistaken SpawnAvailableNPC is not an action, therefore DelayCommand cannot be used on it. Easiest way around that that I can think of would be to put all the SpawnAvailableNPC (and any others that are non-action but you need to delay) commands into a separate script(s). Then, where you originally had the spawning done in the script, do something like this:
Code:
DelayCommand(0.5, ExecuteScript(string sScript, object oTarget, int nScriptVar=-1);
oTarget is the object called to run the script and int nScriptVar, to quote the commentary from the developers, "This value will be returned by calls to GetRunScriptVar."
The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.
Yeah, you can't delay spawns (of NPC's nor teammates) with DelayCommand.
Which do require Fallen Guardians solution.
I used it for example on the Telos cantina. One dancer got destroyed, the other spawned, but doing that at the same time like OE's script did would move the dancer away at spawn since the original was still there. Adding a small 2 seconds delay would allow her to remain on the proper location. However, yeah, doesn't seemed a way to do so unless with an executed other script.
return this error when compiling "Error: Type mismatch in parameter 2 in call to Delay Command"
Another thing you can do is create a subroutine. The benefit of this is you can keep everything in one script, though in certain cases ExecuteScript works better. So, for example:
So spend over an hour getting an "dreact" to appear properly after blowing up a droid. Nothing seemed to work.
Until I made a script for the sole purpose of triggering another script, and nothing else.
It had a 5 sec delay, but never worked properly after the droid got blown. Apparently the 5 sec had to be when the droid was still alive.
So using the other script, it immediately fired the other script and no longer required a living droid after 5 seconds. Fixing everything.
KOTOR Logic... it takes me an hour or 2 to grasp :/
All righty, basically I'm trying to make a node available if you have one of 4 party members in your party, and I didn't want to copy the node to use each companion's individual inparty check, so I did this:
Now it won't compile, saying that I'm missing a required argument in IsNPCPartyMember and NPC_JOLEE is an undeclared identifier. I copied this mostly from the BioWare written companion check script, I just added in all the || symbols in between each one.
The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.
All righty, basically I'm trying to make a node available if you have one of 4 party members in your party, and I didn't want to copy the node to use each companion's individual inparty check, so I did this:
Now it won't compile, saying that I'm missing a required argument in IsNPCPartyMember and NPC_JOLEE is an undeclared identifier. I copied this mostly from the BioWare written companion check script, I just added in all the || symbols in between each one.
You might substitute the numbers for the text, and/or split the check into four.
And now I have a new problem. Okay, so I've been trying to unequip Carth and Bastila's armor and put clothing on them, however when I try to run this it crashes to desktop. Any idea what's going on?
And now I have a new problem. Okay, so I've been trying to unequip Carth and Bastila's armor and put clothing on them, however when I try to run this it crashes to desktop. Any idea what's going on?
I'm fairly certain that the Equip/Unequip Item functions require the first parameter, in this case oArmor, to be a person. I myself have yet to get an Equip or Unequip function to actually work. For me, they've just done nothing.
Also, I recall the NWN Lexicon saying that you don't need to use the Unequip function at all if you use the Equip. You might try the script without that, though you might run into my problem with nothing happening in-game.
No, equip and unequip are actions assigned to characters:
Code:
// 32: Equip oItem into nInventorySlot.
// - nInventorySlot: INVENTORY_SLOT_*
// * No return value, but if an error occurs the log file will contain
// "ActionEquipItem failed."
void ActionEquipItem(object oItem, int nInventorySlot, int bInstant=FALSE);
// 33: Unequip oItem from whatever slot it is currently in.
void ActionUnequipItem( object oItem, int bInstant = FALSE );
Unequip might be unnccessary as you say, but you can never be too safe with this game.
No, equip and unequip are actions assigned to characters:
Code:
// 32: Equip oItem into nInventorySlot.
// - nInventorySlot: INVENTORY_SLOT_*
// * No return value, but if an error occurs the log file will contain
// "ActionEquipItem failed."
void ActionEquipItem(object oItem, int nInventorySlot, int bInstant=FALSE);
// 33: Unequip oItem from whatever slot it is currently in.
void ActionUnequipItem( object oItem, int bInstant = FALSE );
Unequip might be unnccessary as you say, but you can never be too safe with this game.
Well, could you explain where the mistake is in the item not showing up on my PC? I tried the dancer outfit as a test item and usually had the script like this:
Code:
AssignCommand(GetFirstPC(), ActionEquipItem(GetObjectByTag("g_danceroutfit"), INVENTORY_SLOT_BODY); //Though I usually inputted "1" in place of the Slot
I have a problem of my own. Well, not so much a problem, really. I'm trying to see if the global string K_STUNT_MODULE is used at all in either game, so I don't have to add my own. Has anyone worked with this before?
I have a problem of my own. Well, not so much a problem, really. I'm trying to see if the global string K_STUNT_MODULE is used at all in either game, so I don't have to add my own. Has anyone worked with this before?
If I had to guess, I'd say it's used by the game code to load the proper stunt module, given a series of conditions, such as a point in the game. I don't think there are that many stunt modules in TSL, so I would try printing the K_STUNT_MODULE as a string to your info screen in-game in K1. You might use the save game archives from deadlystream and test the script after various points in the game. Let us know if it works?
I've looked through several saves, and it always seems to be blank... though I don't have a complete set of actual saves, just me messing around in the game. I can't think of why it would be needed, though. There are already globals for the complete planets and player choices... why would a string be needed, specifically? K_LAST_MODULE is used in K1 to record the module name you're in before you use the return to hideout/Ebon Hawk function. In that case, a string is specifically needed; numbers would be possible but it would require a lot more coding and you would have to edit it every time a new module is added to the game. But in the case of loading the correct stunt module... well, the progression is mostly linear, so there wouldn't be any point of contention.
I might have to make my own anyway, though. I realized I might want more than one.
It would seem like you wouldn't really need K_STUNT_MODULE. From my understanding the only unique thing about stunt modules is the fact they use cutscenes models for all the animations in the cutscene. (That and they use semi-unique variants of the area they're supposed to take place in. i.e. in one of them the Ebon Hawk ends at the garage area, and in its stead there is a void of unwalkable blackness) Of course this could all be worthless info, I haven't looked at global strings that much.
The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.
So, I have a strange problem. The script compiles fine. The beginning of it executes fine. But then at some point it just stops recognizing two of my variables, causing all other parts of the script to fail to execute. What's stranger still is the script is almost identical to one I wrote for K2 with no such problems.
It works consistently up to and including the creation of oClone. After that, it seems like oTarget and oClone work once each, and after that they never work again. I'm able to shift parts of the code around to get that part to work, but at the expense of all the others. It's rather frustrating.
So, I have a strange problem. The script compiles fine. The beginning of it executes fine. But then at some point it just stops recognizing two of my variables, causing all other parts of the script to fail to execute. What's stranger still is the script is almost identical to one I wrote for K2 with no such problems.
It works consistently up to and including the creation of oClone. After that, it seems like oTarget and oClone work once each, and after that they never work again. I'm able to shift parts of the code around to get that part to work, but at the expense of all the others. It's rather frustrating.
Any ideas?
I don't know. Could you post the contents of jc_inc_clone? That might help us out a bit.
EDIT: I have someone breathing down my neck, waiting impatiently for me to finish this, so to prove that it's not my fault I took the scripts and all the support files and moved them into K2, not changing a damn thing. AND IT WORKS. So what's up? I'm officially lost at this point.
Last edited by JCarter426; 02-08-2013 at 02:29 PM.
Apologies if I could have found this somewhere else, but I'm rather new to modding, and can't seem to find a particular piece of script code anywhere. I'm trying to write a conditional script to check class in K1 before a specific dialogue option becomes available, but I've searched and searched and can't find the specific code I need.
// 341: A creature can have up to three classes. This function determines the
// creature's class (CLASS_TYPE_*) based on nClassPosition.
// - nClassPosition: 1, 2 or 3
// - oCreature
// * Returns CLASS_TYPE_INVALID if the oCreature does not have a class in
// nClassPosition (i.e. a single-class creature will only have a value in
// nClassLocation=1) or if oCreature is not a valid creature.
int GetClassByPosition(int nClassPosition, object oCreature=OBJECT_SELF);
So, if you want to check if a creature has any particular class:
Code:
int StartingConditional(){
object oCreature = [whatever];
int iClass = [whatever];
int iC1 = GetClassByPosition(1, oCreature);
int iC2 = GetClassByPosition(2, oCreature);
int iC3 = GetClassByPosition(3, oCreature);
if( iC1 == iClass ||
iC2 == iClass ||
iC3 == iClass ){
return TRUE;
}
return FALSE;
}
I'm not sure how the class positions get assigned, so depending on what you need it could be trickier than just that.