Jump to content

Dialogue Condition: Only if You're NOT in a certain faction?


Recommended Posts

Hi all,

 

I am working on polishing up quorn's "Hospitality Papers" so that you can ask what they are and where to get them. Then people will give you directions.

 

What I'm struggling with is finding a way to make dialogue topics/responses only appear if you are NOT a member of House Telvanni. This is easy if the NPC IS member but what if they're not?

 

Function, Rank Requirement = 0 Doesn't seem to work. :(

Any ideas?

Thanks.

Link to comment
Share on other sites

I agree that it would be better not to have a 'Telvanni' response just to make the other possible.

 

I gather the difficulty is that not all service providers in Sadrith Mora are of House Telvanni otherwise you would merely filter for Function: SameFaction = 0. I suggest you use a global variable to filter the responses you want for non-Telvanni.

 

Create a new short global variable (e.g. ps_IchBinEinTelvanni). In the dialogue response section for the entry that the player agrees to 'join House Telvanni', add the line:

 

set ps_IchBinEinTelvanni to 1

 

No you can filtered service refusual to not-Telvanni, non-hospitality paper bearing players by Global: ps_IchBinEinTelvanni != 1

 

The reason for checking 'not equal to 1' is that you may want to refuse service to Telvanni players who have been expelled. The player cannot be permently expelled from House Telvanni, but the filter PC Expelled will not be satisfied if the speaker and player are not of the same faction (Telvanni). However, you can check for explusion in a script using:

 

if ( PCExpelled "Telvanni" == 1 )

set ps_IchBinEinTelvanni to 2

endif

 

When the player is reinstated by a mouth through 'make amends', add to dialogue results the line:

 

set ps_IchBinEinTelvanni to 1

 

and all will be right again.

 

Because this has to be done through a script, you will require an invisible activator in the exterior of Sadrith Mora to check if the player has been expelled from House Telvanni. It could also be used to check if the player has joined House Telvanni, in case the mod is added after the player joins (or you do not want to handle it through dialogue). The script might look something like this:

 

Begin ps_CheckTelvanniStatus

 

if ( menumode == 1 )

return

endif

 

if ( ps_IchBinEinTelvanni == 1 ) ; player is Telvanni

if ( PCExpelled "Telvanni" == 0 ) ; player is in good standing

return

else ; player has been expelled

set ps_IchBinEinTelvanni to 2

endif

elseif ( GetPCRank "Telvanni" >= 0 ) ; player is Telvanni...

if ( ps_IchBinEinTelvanni == 0 ) ; but global not set yet

set ps_IchBinEinTelvanni to 1

endif

endif

 

End

 

There are limitations of using a local script on an activator in Sadrith Mora. It will process only when the player enters the exterior. You may want to add a copy of the activator to the Telvanni Council House where the mouths assemble since they are responsible for changing the Telvanni player's expulsion status. Not doing so means that the player would be refused service in those interior cells until he/she steps outside. Also, the player could be expelled in an interior cell and still enjoy services until he/she steps outside for the script to update the status. There is also the matter of the player teleporting between interior cells and not encountering the invisible activator(s) - not an unreasonable thing to expect from Telvanni players. Now you're have to consider placing an activator in any Sadrith Mora cell that offers services. That is doable, but at some point you might decide the 'cost' of a global script might be worth it.

 

Good luck

Link to comment
Share on other sites

Function, Rank Requirement = 0 Doesn't seem to work. :sad:

 

Any ideas?

First, I know very little about dialogue and/or dialogue/quest filtering, cyran0 is the expert.

 

Have you tried to check the first Telvanni rank e.g Hireling via dialogue?

 

Function, Rank Hireling = 1

Link to comment
Share on other sites

 

Have you tried to check the first Telvanni rank e.g Hireling via dialogue?

 

Function, Rank Hireling = 1

 

I believe that would only work for setting dialogue responses for if you were Telvanni?

 

cyran0, thanks so much for the suggestion and the help with the scripting, that's great! :smile: I'm wondering, would a start script not work? As I'd have thought this would get round the issues with using an activator and potentially be compatible with other mods such as Tamriel Rebuilt?

Edited by PoodleSandwich2
Link to comment
Share on other sites

There is no filter Function: Rank, but if there was it would likely refer to the speaker's rank in the faction, not the player's rank.

 

If by 'start script' you are referring to the feature added with Tribunal then yes, but it will introduce a dependency on that expansion. You could also use the script function Startscript - that is how we initiate global scripts in-game. Either way you are introducing a global script. Modders are discouraged from using global scripts since they run continuously and can tax the game engine. That was more of a concern fifteen years ago when Morrowind was young and processors were less powerful. Still, the cumulative affect of many global scripts all running at the same time may still slow the game for people running many mods. It may be worth it in this case, particularly if you add a timer to the script. Presently, I know of no other location than Sadrith Mora that checks for 'hospitality papers', but you are correct in thinking that a global script would function in other Telvanni settlements where that requirement is added.

 

If you decide to add a timer to the script, remove the menumode (if ( menumode == 1)) block - it will contribute little to making the script more efficient. Replace it with the timer code:

 

float timer ; variable declaration

 

set timer to ( timer + GetSecondsPassed ) ; tracks passage of time

if ( timer < 5 ) ; 5 seconds

return ; do not process rest of script

endif

set timer to 0 ; reset for next cycle

 

The rest of the code is as it was in my previous post. This means that the checks for the player's status in House Telvanni are performed only once every five seconds which should be often enough. Honestly, not much is saved since the original code was pretty efficient, but some might argue that the timer is better. Personally, I'm not certain.

 

 

This was mostly an academic exercise for me. There are other instances when checking the player's faction affiliation is necessary in dialogue and when using a timer can greatly improve a script's performance. However, I can't help to observed that the mod changes you are considering are not really necessary unless you care if the player has been expelled. Only players who are of House Telvanni need the refinements to circumvent the 'Hospitality Papers' nuisance dialogue. Therefore, the best thing for them to do is not load the original mod in first place. Your changes give the Telvanni player the same experience as if the mod was not loaded at all.

Link to comment
Share on other sites

I was thinking of "Gameplay / Edit Start Scripts... / Add Script" in the CS. I didn't know this was a thing that only works with Tribunal? I'm not too worried about that dependency but would doing it this way mean that players would have to start a new game for my version of Hospitality Papers to work? And could this be avoided by having some arbitrary thing (a line of dialogue, an invisible activator etc.) activate a script with 5 or 3 second tick that always checks if you are in House Telvanni?

I get your point but I'd like to make it integrated and dependent on Player Character's actions rather than the Player's actions, better for new players and might also be more immersive for the Telvanni player starting a new game, going to Sadrith Mora as a lowly N'Wah for the first time, role-playing not knowing their way around etc. I definitely think that being expelled would lead you to needing Hospitality Papers again too.

 

In terms of global vs local when it comes to other Telvanni settlments; I wasn't thinking so much of there being other settlements requiring Hospitality Papers, but more of the player going to the mainland and joining or being expelled there, then coming back to Sadrith Mora, but as I'm typing this now I'm thinking that would work fine the way you suggested, with invisible activators? If someone added a new interior to Sadrith Mora with a non-Telvanni merchant I may be in trouble that way though right?

Thanks :)

Link to comment
Share on other sites

First of all let me say that I agree with you about the immersion value of adding these sorts of details even as small as they may be. It gives a sense of progress and gained respect after the lowly player new to Sadrith Mora and harassed about the hospitality papers is subsequently welcome after joining House Telvanni. I certainly like it for snubbing the player should he/she be expelled.

 

The path to the start scripts is correct - we are talking about the same thing. It was a feature introduced with the Tribunal expansion so a player would need to have it or Bloodmoon loaded for a mod using start scripts to work properly. So long as that is true, such a mod could be added to a game in progress (it would not require a new game). Start scripts are initiated each time the game is launched.

 

I mention the dependency because you should know if you plan to release your mod. You need to advise players of that fact. That being said, it is very unlikely that players of Morrowind do not have both expansions sixteen years after the game's release. It must be difficult to find a copy of Morrowind that is not GOTY. I have one, but I also own each of the expansions as well as a GOTY edition. Few modders worry very much about introducing Tribunal dependencies and I don't blame them. Still, I avoid it if I can. That is a decision you have to make for yourself.

 

The easiest way for you to initiate a global script is with start script. To do so with the script function StartScript requires a local script (or dialogue results) which sort of brings you back to the reasons you might choose to avoid using a local script in the first place: where to place it so it will run in a timely fashion.

 

If the player arrives in Sadrith Mora without using magic, he/she will approach from the dock or Wolverine Hall. An invisible activator placed just outside the entrance to Tel Naga will be loaded when the player is in that cell and any of the surrounding eight cells. This covers all of Sadrith Mora, and then some. A local script on that activator will address a player arriving from 'outside'. As for magic, there are the intervention spells. Divine Intervention will send the player to Wolverine Hall. There is no Tribunal Temple in Sadrith Mora so you do not have to worry about the player arriving by Almsivi Intervention. That leaves mark and recall. Even with multimark mods, it is unlikely that the player would leave more than one mark in Sadrith Mora. However, if there is a second or if not in an exterior cell the logical place for it would be in the Telvanni Council House (where the mouths are located). I don't believe there are services available in Tel Naga or in the depths of the Hermitage (Llunela Hleran) so there would be no need to update in any of those interior cells. It is the truly lazy player that leaves mark in Anis Seloth's alchemy shop. So realistically you could get by with two invisible activators: one outside Tel Naga and one in the Telvanni Council House.

 

You could use the invisible activators at those two locations to start the global script, but since these are the only locations where the script needs to run you may as well use a local script to update the player's status in the house. If you decide on the local script the one I posted originally should be fine (it is untested) - I really don't see the need for the timer. It could be made a little more efficient with a CellChanged check, but there are instances where that gives a false negative. Some modders refuse to use it for that reason. It is probably not worth it in this case.

 

There is really little you can do to protect yourself from what other mods might introduce. A Sadrith Mora expansion mod could make the city larger than the nine cells our local script activator will be loaded, or introduce a service-rich interior cell that the player might want to mark. It is possible that there might be a few instances where the player is able to receive services when he/she should be denied. Rather than worry about that I would prefer to roleplay that the merchant is rebeling against Angaredhel.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...