A question of technique

Post » Tue Dec 22, 2009 6:05 pm

Some may remember my avowed intention to do a Politics mod. Work does proceed slowly, but I'd like to check if anyone has a better way to monitor (and implement) faction status changes and events than this:-

As Goty or Tribunal will be a requirement, a startup script that once every 2000 frames or so, checks the status of various journal entries. Once it scores a 'hit' it sets a local flag to avoid checking that entry again. Ordering the checks correctly will allow for short circuits so that not every journal entry is checked. (e.g, no need to check if you are Hortator or Nerevarine if you haven't even passed the Third trial yet).

I don't want to alter the results scripts of journal entries because there is too much risk of incompatibility with other mods. For example, LGNPC adds or amend numerous journal entries, and I certainly don't want this to be incompatible with LGNPC.

So, am I missing a neater technique?
User avatar
N3T4
 
Posts: 3428
Joined: Wed Aug 08, 2007 8:36 pm

Post » Tue Dec 22, 2009 7:40 pm

Some may remember my avowed intention to do a Politics mod. Work does proceed slowly, but I'd like to check if anyone has a better way to monitor (and implement) faction status changes and events than this:-

As Goty or Tribunal will be a requirement, a startup script that once every 2000 frames or so, checks the status of various journal entries. Once it scores a 'hit' it sets a local flag to avoid checking that entry again. Ordering the checks correctly will allow for short circuits so that not every journal entry is checked. (e.g, no need to check if you are Hortator or Nerevarine if you haven't even passed the Third trial yet).

I don't want to alter the results scripts of journal entries because there is too much risk of incompatibility with other mods. For example, LGNPC adds or amend numerous journal entries, and I certainly don't want this to be incompatible with LGNPC.

So, am I missing a neater technique?



Hmm well obviously all dialogue could simply have conditions attached to them to check on the status of other quests, without the need for scripts running and changing global variables or whatever.

What are you having to check status for specifically?
User avatar
Matthew Warren
 
Posts: 3463
Joined: Fri Oct 19, 2007 11:37 pm

Post » Tue Dec 22, 2009 7:16 pm

Amending dialog entries would be worse then amending journal entries and have the same issue.

I'm monitoring the completion of any quest that advances or hinders the status of any and all factions. For example, the assassination of your rivals, the ones that didn't bother with construction contracts.

The point is, there are no specifics, many quests may or may not be completed and the effect will vary depending on PC faction membership.
User avatar
Sammykins
 
Posts: 3330
Joined: Fri Jun 23, 2006 10:48 am

Post » Wed Dec 23, 2009 2:47 am

Certainly when checking progress in faction quests your script should make an initial check for faction membership should be made for the sake of efficiency. This I expect you are already doing. Within a particular faction there may be other conditions that can be checked such as faction rank or one quest being a prerequisite for the next - the latter is particularly true for a specific quest-giver. In fact for such quest progressions you could use a single local variable to track the progress through a single quest-givers quest-line.

You expressed particular concern about changes LGNPC mods make to official quests. Pax Redoran is most 'guilty' of this practice. In most cases (such as the Hortator quests) a new journal is introduced and once it is completed the official terminal quest entry is added. In other instances new intermediate entries are added. In either case, you can still check for the official terminal journal entry to know that the player has completed the quest. If you need to check for intermediate progress in a quest you may have to do that on a case-by-case basis. In general, I do not think LGNPC changes are going to interfere with your work.
User avatar
James Baldwin
 
Posts: 3366
Joined: Tue Jun 05, 2007 11:11 am

Post » Wed Dec 23, 2009 3:06 am

Thanks Cyran0. I think you have a good handle on what I'm currently planning on doing. It struck me as the most compatible (with most potential mods) way of doing this. I just wondered if anyone else might be able to suggest a more elegant way that I've not thought of.
User avatar
ZzZz
 
Posts: 3396
Joined: Sat Jul 08, 2006 9:56 pm


Return to III - Morrowind