Because I want to code a multi-player banter that covers ANY party. Change the party members and the dialogue goes forward as is. With all the NPC mods out there, I would have thought that the utility of this would be fairly obvious. With the large number of NPCs available, a normal CHAIN dialogue gets unwieldy, and it becomes hard to maintain the priority trees of who says what when. This protocol allows addition of NPCs to a dialogue in discrete, easily localized (modular) code and tp2 insertion.
If I understand correctly, you want some generic text that <PLAYER2> issues in a CHAIN in response to <PLAYER3>, regardless of who those NPCs are when the banter triggers? i.e. NPC personality etc is not significant, you just want to use them as a foil to bring some text across?
Hi Roxanne,
Not quite. I want to elliminate/reduce the priority triggers that are necessary when using either == partynpc or ==PLAYERn in a CHAIN dialogue. I want to define an InParty NPC functionally, and develop the dialogue using a functional !InParty NPC as a clone of the InParty NPC. I use a script protocol to determine which InParty NPC will be represented by which functional clone. The clone is then used in the CHAIN, which is no longer dependant on just who is in the party.
I have already established this protocol using non-global NPCs in my Rjali Romance mod, v4.1 of which can be found at BlackWyrmLair (Dragon's Hoard). The problem with non-global NPCs is that they have to be created before each use, and the functional determination protocol causes a significant delay before the dialogue can start up due to processing time. Use of global NPCs would allow the functional determination to be performed in little bits throughout the game, not just at dialogue time. This would elliminate the irritating delay.
I am currently working on v5 of the Rjali mod, and had hoped to use global NPCs. But it doesn't appear that they can be used in this way, which led me to see if I am missing something, by asking the modding community for advice. I am a relative neophyte at modding. There are a whole lot of things I don't know and, in the absence of documentation, I can only check other mods, experiment, and ask people such as yourself. I suspect that what I want to do with !InParty global NPCs is just not do-able, but confirmation would be nice.
I think you observed yourself the problem - it is slow and subject to loads of bugs (aside from the fact that it impacts Player1 dialogue and Baldur.bcs etc - which is always a bad idea.). You are also tweaking a large number of other people's mods to make yours work.
I looked a bit of the code you use in the Rjali mod
It is an alternative way to determine in a CHAIN dialogue who is supposed to say which generic line of the dialogue (including some branches for specific individual NPCs). The actual NPCs are represented by your strawmen creatures (each representing an NPC in the party) Instead of doing checks within the dialogue you put them to external scripts and external creatures.
The process requires a lot of preparation - I am not sure it really is so much easier to do it with your method than with the *traditional* one. The checks required for the dialogue to produce the expected resuls must be done, regardless of where it is performed and the effort for coding it stays the same.
I took a slightly different approach for similar goals in my own mod
I created one generic monster CHAIN dialogue which contains all the checks and priorities etc for all the NPCs in the game I am interested in. (This is work once done to be re-used for multiple occasions) I use this one to fill it with individual contents for all types of situation to customise them - I just need to change the trigger for the CHAIN and replace the lines each candidate has to say - I can streamline the monster to have only females talk or only males etc. I can always add new NPCs to the chain when I like. Another advantage is that I can tune the text much better to the individual (e.g. Viconia would phrase the same contents slightly different from Nalia).
I need not affect critical scripts (like Baldur.bcs) I need no invisible creatures and hope they destroy after use, I need not multiple scripts to interact for the effect.
It is always best practice to keep things as simple as you can.
Edited by Roxanne, 12 January 2016 - 09:32 AM.