Jump to content

My first mod, Rose joinable NPC


kthxbye

Recommended Posts

Hi @ all!

I've been reading some tutorials for some time and decided to start my career as a modder with a joinable NPC. Anyway, my project became quickly something more than a BG1 or BG2 only NPC with a standard dialog path, so.. Here I am, asking for help. :D

Before starting, a few things: I've read some tutorial (and used theacefes NPC tutorial to build my mod), but there are so many around here that I may most likely have missed some important informations. If that's the case, I apologize in advance for asking something that's already covered elsewhere. Other than that, I didn't know where to post. I think posting here should be fine, but since I saw mostly only guides here if there is another section for help pleas please move my topic there. :blush:

 

Now, the mod: if you want to read it all from the start, I'm currently using this topic ( http://forums.bioware.com/viewtopic.html?t...61&forum=18 ) for discussions and the like. Anyway, here's the short version: I'd like to make a joinable NPC which will have strong continuity between BG1 and BG2. So, if she starts romancing the protagonist in BG1, she will continue her banters exactly from where she was left at the end of BG1 in BG2 as well. In order to do so, I currently had to restrict the mod to BG:Trilogy only (but I will work on a tutu conversion as soon as the mod exits the beta version).

I'd also like her to have different dialogs that will fire at random times, completely unrelated to the friendship/romance ones. Here's my first problem: how do I make sure that my script planned dialogs will fire correctly with an Interact(Protagonist) command, if there will be more than one dialog that could fire?

I thought I could make different dialog files (for example, k-rose-romance, k-rose-friendship etc and calling them in the script, instead of using Interact) for scripted dialogs and use the game's engine to make the other random banters to fire.. But I really don't know how should I implement this in the tp2 file.

 

I had other questions too but while writing all this stuff I forgot about them. :blush:

 

If you could point me to a place where I can upload what I did so far I'll post the link here.

Thank you in advance. :)

Link to comment

Ok, here's a second question.. I made Rose interject after the Nashkel's guard Bardolan (sp?) lines about Brage, so Rose's lines were the last ones of the whole banter. The fact is, she inherited Bardolan's EscapeArea() command. I used the INTERJECT_COPY_TRANS command to add her lines to Bardolan's speech. Do I have to add a == BardolanDfile (something to say here) in order to have Bardolan be the last one to speak so that he will be the one to use the EscapeArea() command?

Thanks!

Link to comment
Guest jastey*

Maybe this helps for your first question: In a dialogue file, the states are executed from top to bottom. The state with a true condition will be executed, independently whether this was the dialogue that was intended to trigger by the script. Say, if in the beginning of the dialogue file there is a state with the trigger condition "true()", which would mean always true, no dialogue following after that could be called.

 

Thus, to ensure the correct dialogue to trigger, all that is need is a unique trigger variable. This variable gets set by the scipt to "1", the dialogue gets called having this airbale = 1 as a trigger, and in the dialogue this variable will be incremented (so that it is "closed").

 

Have also a look at Kulyok's tutorial which ensures that dialogues will get executed when they are intended to: How to ensure your banters always run when you want them to.

 

To your second question, have a look at Kaeloree's tutorial about I_C_T(s): Coding Interjections Yes, in your case a "back"-line would be needed, so that the actions performed by the game character don't get assigned to your NPC.

Link to comment

@razlyubleno: thanks, that's an interesting link. :blush: It will definitely help me.

 

@jastley: thanks both for the links and for the answer. :blush: Since the D file is parsed from top to bottom I should be able to achieve what I have in mind by placing the friendship/romance first, then some other banters with "hard requisite" and lastly the "random" ones. Heh, hope it will come out nice. :)

Link to comment

It's going slow as hell for a lot of reasons (problems with hardware components of my pc, my university classes, etc) but I think it's going well enough. :) Never thought that writing a dialog tree taking in consideration all the possible answers was that difficult anyway.. :)

Today I will upload a new version with Friendship Talks 2 & 3 and adding the BG1->BG2 transition (without any BG2 dialog, so the transition is there only for who wants to run a trilogy game with Rose too - I need some other dialogs before focusing on the BG2 part of the mod).

Link to comment

I'd like to inform you that I've uploaded today a patched version of the mod. The previous one (that has been online for quite some time) had a typo (OR(3) instead of OR(4) ) that prevented Rose from advancing to the next banter. I apologize for the issue but I found it only today, as I had no time to test my code. Now it should work properly. If someone has problems please let me know, so that I'll be able to fix it.

If someone would like to apply as betatester I'd be really grateful since (as you may have noticed) I tend to not to spot tiny typos and I don't always have the time to fully test the mod.

 

Thanks in advance. :rolleyes:

Link to comment

Hi again! :)

I'm slowly progressing with the mod, and I have two lil' questions..

First of all, my list of variables grew and it's still growing considerably: is it better to use GLOBALS or LOCALS to store variables, or is it indifferent? Right now I'm using GLOBALS to let the player have access to them more easily, and because if Rose's chunked (or lost forever in any other way) it's easier to CLUA her in with globals, since those aren't destroyed while locals stored on Rose would've been instead (I suppose).

Also, I'm going to insert a little fight with some mercenaries and I don't know if it's better to create them as playable characters, then convert them from .chr to .cre (like I did for Rose) or if it's better to modify and adapt an existing .cre file (using either NI or SK).. How is it usually done?

 

Thanks in advance! ;)

Link to comment

I just create a copy of whatever cre I have and then export it with it's own name. Then I go back and edit it to give it the proper DV, colors, d file, etc.

 

Use a variable to spawn them in whenever you need to in the game. You can have them spawn in at a specific coordinate or just close to the player.

 

I use GLOBALS because LOCALS can only be read by that one character in the game that you're assigning the LOCAL to. Something like joining the party could be a LOCAL, while something like a quest should probably be a GLOBAL.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...