I've been looking at lrn_form.dlg and its associated scripts, particularly a_give_form and c_chkform_next. And I have a few reservations about teaching the player a new form out of sequence. I know supposedly it has been done before - M4-78 and Coruscant Jedi Temple, for example - but if I'm reading this right... well... it shouldn't be possible. At least, not without breaking the existing system.

The problem, as I see it, is that it's set up to check a global (G_PC_FORM) rather than how many forms the player has learned. The global is used for a switch, with each case determining what form the player learns. The global value is then increased each time the player learns a form. Because the scripts only anticipate this global having three possible states (0, 1, and 2), once it is set to 3, it should be impossible for the player to learn additional forms. And this could have disastrous consequences, as in at least one case there is not a conditioness safety node, so if there is no valid form left to learn, the conversation will break.

There are seven forms in total that you can learn from the masters, and only three masters in the original game, so it seems like it should be a nonissue... I'm have a hard time believing my eyes, so I'm wondering if anyone else could help decipher the matter.

I was attempting to make a message box pop up in KotOR II. However, the function used for this [ DisplayMessageBox(); ] will make a message box pop up, even while one is in a conversation. This causes the GUI to break, so once the conversation is over the player can neither move, nor access any menus.

In order to make it so I could still call a script with this function in the middle of a dialogue without breaking the GUI, I had an idea to use the GetIsInConversation function to make the script wait until the conversation is over, and then immediately display the message box. However, I don't know exactly how to do that. I was leaning towards something like this:

Code:

void main()
{
while( GetIsInConversation(GetFirstPC()) == TRUE )
{
make script keep looping back and checking to see if the conversation
has ended
}
Once conversation as ended
{
DisplayMessageBox();
}
}

I don't know if this is how you'd go about setting it up, and obviously I need the proper functions, so any help would be appreciated.

The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

I was attempting to make a message box pop up in KotOR II. However, the function used for this [ DisplayMessageBox(); ] will make a message box pop up, even while one is in a conversation. This causes the GUI to break, so once the conversation is over the player can neither move, nor access any menus.

In order to make it so I could still call a script with this function in the middle of a dialogue without breaking the GUI, I had an idea to use the GetIsInConversation function to make the script wait until the conversation is over, and then immediately display the message box. However, I don't know exactly how to do that. I was leaning towards something like this:

Code:

void main()
{
while( GetIsInConversation(GetFirstPC()) == TRUE )
{
make script keep looping back and checking to see if the conversation
has ended
}
Once conversation as ended
{
DisplayMessageBox();
}
}

I don't know if this is how you'd go about setting it up, and obviously I need the proper functions, so any help would be appreciated.

Okay, this might help, but it depends on what you want the message box to do/say/have in it:

void main()
{
DelayCommand(0.5, DisplayMessageBox());
}

Then place the script in the .dlg file's "Script that fires when conversation ends" slot in DLGEdit(Click the topmost node, that has the file path).

Alternatively, you might try experimenting with ActionPauseConversation(), display message box, then ActionResumeConversation(), since I believe a script ends with its node in a dlg(which means your script above would need to be in a heartbeat script, most likely).

I originally tried that, but couldn't make it work. I just took another look at it and the UserDefined script for the Sith Assassin. I believe what I have will work, but I can't test it until tomorrow. I'll report back when I can.

I originally tried that, but couldn't make it work. I just took another look at it and the UserDefined script for the Sith Assassin. I believe what I have will work, but I can't test it until tomorrow. I'll report back when I can.

Check post number 3 in this thread. I believe that script could be adapted to fit your purpose.

If I don't destroy Carth after spawning him, he shows up naked. If I destroy him, exit the module, and then add him to the party, he still has the armor on.

So, how would I modify the script above to make the changes stick, without having Carth permanently added to the party after the conversation (which would break immersion if he wasn't in the party when you entered...)?

I would probably go around on making Carth required for the conversation option to appear, rather than going this script route.
Kinda need a look on the .dlg how to properly do that though without making people go "why doesn't this option appear?"

EDIT:
Aside from that you can always try to simply destroy the item rather than unequip it?

I would probably go around on making Carth required for the conversation option to appear, rather than going this script route.
Kinda need a look on the .dlg how to properly do that though without making people go "why doesn't this option appear?"

EDIT:
Aside from that you can always try to simply destroy the item rather than unequip it?

Well, I tried again just now and discovered something...

Show spoiler

(hidden content - requires Javascript to show)

A weird anomally that could be exploited...

I've just come to the conclusion that each party member has a separate inventory, with each inventory sharing the same items.

When a character equips something, a copy of it is removed from the inventory of every other party member.

Similar, when something is aquired or bought, a copy is added.

Scripting doesn't follow the same behaviour.

I've come to this conclusion, which could very well prove wrong, because of the Sith Armor.

I removed it from the first party member's (the one I control at the time) inventory while Carth was in the party, and then left the Hidden Bek Base.

Of note is the fact that I checked my inventory after the talk with Gadon and saw no Sith Armor.

After leaving the base, I added Carth to the Party, and he didn't have the Armor equipped...

*but*

he did have a copy in his inventory.

In short, each party member has their own inventory, and when one uses the normal game mechanics to acquire or discard items, the inventories of the other party members are "synced" with the inventory of the one who got rid of/acquired the item.

When one uses scripting for the same purpose, they have to apply it to more than just the one inventory...

Thus, my issue was Carth's Inventory not changing/updating and him thus retaining the armor.

First that comes to mind is a situation with TSL(RCM) with BaoDur on the Telos Plateau.
I fixed him being injured in 1.7, but afterwards people still mentioned him being hurt. So I wanted to check it out myself, and I spend hours on that, not understanding why it didn't work anymore...

Until finally, after an insane long time, I found out;
* If entering the academy the actual teammates are placed inside the force fields. If you go up then, it will heal Bao-Dur properly.
* If you save, then load, before getting your teammates out, they are instead replaced by clones. The clone Bao-Dur gets healed, but the *actual* Bao-Dur is still injured if he joins your party or goes to the Hawk.

It could be you simply deleted it from Carth's clone, rather than the actual teammate?

(In the end I solved it by aside from healing at the academy, there's also a healing addition in the 950COR cutscene during the fade-in)

Still nothing. I tinkered around with SignalEvent() too, but same end result.

CreateObject() doesn't list ITEM_TYPE_TRIGGER as a possible type in its function notes, so I'm not sure if it can even spawn them, and if the mines have their events defined anywhere, I haven't found it yet.

I've been trying to make Awareness and Demolitions more useful by adding in stealthed enemies with Sneak Attack and enemies that lay mines, but so far only the former has been successful. I can't think of a point in KotOR where you see a mine get created by a script.

edit: I was thinking there might be an associated talent with Demolitions that lets you use it, like there is with Stealth, but if that's the case I haven't managed to make it work yet.

Still nothing. I tinkered around with SignalEvent() too, but same end result.

CreateObject() doesn't list ITEM_TYPE_TRIGGER as a possible type in its function notes, so I'm not sure if it can even spawn them, and if the mines have their events defined anywhere, I haven't found it yet.

I've been trying to make Awareness and Demolitions more useful by adding in stealthed enemies with Sneak Attack and enemies that lay mines, but so far only the former has been successful. I can't think of a point in KotOR where you see a mine get created by a script.

edit: I was thinking there might be an associated talent with Demolitions that lets you use it, like there is with Stealth, but if that's the case I haven't managed to make it work yet.

Well, I'm clueless then. When you do the TSL version, or if you let me make it for TSL, then we can use the SpawnMine function.