Choose Your Language

Thursday, 18 December 2008

I Think I've Done It! (DLGPartySwap)

I believe I have done it! (See yesterday's post.) I was struggling with one last issue where the PCs of the party would keep swapping back to the main PC during any conversation. Then I had a sudden thought to check the Campaign Editor and voila! I discovered what DLGPartySwap now does. :) It does exactly what I hoped for and when FALSE, it stops the dialogue returning focus to the main PC. Once this was set, it solved all my remaining problems that I have tested to date. Although, I am quietly confident that by doing this I have resolved all my issues.

And so, the bottom line is, I believe I have managed to allow players to add a party at the start (or not, as is their choice) and still have all my systems work OK. Just to reiterate what I had to do to get this to work, in a basic outline was this:

1) Swap the original created PCs for copies with new Tags. (Unspawn originals.)
2) Edit 2da script and attach companion type scripts to them using SetCreatureScriptsToSet. (See Script below.)
3) Set DLGPartySwap to FALSE in the Campaign Editor section.

4 comments:

Amraphael said...

Glad to hear that you solved the problem! I have not a clue about how things work in SoZ but I'm sure that I will know sooner or later :)

E.C.Patterson said...

Although, I don't comprehend 100% what is the issue you solved, I can see that copying the character might come in handy in various situations. For instance, to allow player made characters to be featured in companion banter (where the tag of the speaker is specified). Good thinking. Thanks for the idea.

It really is a shame there is no SetConversation function though...

Lance Botelle (Bard of Althéa) said...

Amraphael,

I'm still working my way through the changes myself. I still need to look more into the map and crafting systems myself.

E.C. Patterson,

Yes, changing to a copy (with a valid Tag) and being able to attach the appropriate scripts was a big step for me.

And as you say, another big hurdle is being able to add a conversation to them. I am hoping to find a way around this (somehow) as I think I may need this facility to overcome another issue ... to do with what currently happens to them should they die.

I will keep everyone updated with my efforts.

I spent most of yesterday just trying to make sure all my other pertinent systems (that worked fine with companions) worked with added PCs. There were some changes required, but I hope I am nearing completion of tha now so I can start doing other stuff that has been sitting on teh side for a while. ;)

Lance.

Lance Botelle (Bard of Althéa) said...

Hi E.C. Patterson,

Adding a conversation was relatively simple actually:

Just follow the instructions above, and then give the 2da file a link to a generic On Conversation script. Then compare the name (or Tag) of the PC to their relevant conversation and use ActionStartCoversation to start the appropriate conversation.

I had a rough version working no problem. So, it can be done! :)

Lance.