TESAME can screw up global variables

Post » Sat Jul 31, 2010 10:28 am

I noticed over the past few days that *sometimes* TESAME changes the values of all of my global variables in the mod I'm working on. I usually use TESAME to manually delete GMSTs, unwanted dialogue, blank topics, and other records I no longer want. I noticed my mod started acting strangely and finally figured out that my globals, instead of being 0 to start with, now had values like 1, 5, 16, etc. I have now become ultra-paranoid so, after cleaning with TESAME, I load the mod back into TES CS and check the globals. If they're screwed up, I fix them and then use TESTool to clean the GMSTs.

I'm posting this topic:
A. as a warning
B. to find out if anyone else has seen this problem

This is the first time I've used global variables. If you have any wisdom about them, please share.
User avatar
Erin S
 
Posts: 3416
Joined: Sat Jul 29, 2006 2:06 pm

Post » Sat Jul 31, 2010 2:05 am

I have never observed this behavior and I regularly use TESAME to clean mods. Are youi certain that the change is occurring after loading in TESAME?

Stuporstar was having some issues last fall that seemed to be a result of error checking in the construction set. If that is a possibility read closely Kir's comments in http://www.gamesas.com/index.php?/topic/1045944-global-variable-weirdness/page__p__1517282.

By the way, as a call for feedback this thread might be better served in the construction set forum that modders regularly visit. And as a warning to other modders it will not be buried quite so quickly in that forum.
User avatar
Lisa
 
Posts: 3473
Joined: Thu Jul 13, 2006 3:57 am

Post » Sat Jul 31, 2010 11:49 am

Hey cyran0!

Thanks for the pointer. I was 95% sure that TESAME was the culprit, but the thread you pointed me to mentions using the Error Checking button in dialogue, which is something I've been using lately. Next time I use it I'll try to remember to check my globals immediately afterwards.

Hmm, come to think of it, I've also noticed that sometimes a dialogue entry is not where I thought I put it. I wonder if Error Checking also moves dialogue entries around. Sounds like I should follow Kir's advice and NEVER SAVE after Error Checking. I'd better go eyeball all my dialogue to make sure nothing else is screwed up.

I'm sorry I impugned the good name of TESAME!
User avatar
Stephanie Valentine
 
Posts: 3281
Joined: Wed Jun 28, 2006 2:09 pm

Post » Sat Jul 31, 2010 3:39 am

Hmm, come to think of it, I've also noticed that sometimes a dialogue entry is not where I thought I put it. I wonder if Error Checking also moves dialogue entries around. Sounds like I should follow Kir's advice and NEVER SAVE after Error Checking. I'd better go eyeball all my dialogue to make sure nothing else is screwed up.


The moving of dialog entries... are some new entries being moved to the bottom of the list in a given topic? While this may be happening as a result of using TESAME to clean your mod it is not really its fault. Any third-party utility will have this effect. Even toggling the ignore flag of the mod's details before loading in the construction set will break the dialog pointers around (and particularly below) the new dialog entry deleted. However, if you load the mod, open the dialog window and DELETE the undesired entry, the next time you load the mod in the editor (or in the game for that matter) your remaining dialog will be properly ordered.

I first http://forums.elricm.com/emma/viewtopic.php?t=516&start=16 over at Emma's Forum. Kateri explanation while not particularly detailed helped me understand what must be happening. melian's tests confirmed this phenomenon.

I offered a more detailed explanation in my epic "Conventional Wisdom on Cleaning Dialog" thread. The last entry was about three years ago so it has been subsequently pruned from the construction set forum. However Yacoby was kind enough to preserve that thread in his http://www.yacoby.net/es/forum/11/6816271177042920.html. The first part of that thread discusses the merits of cleaning the insertion points around new dialog. The relevant posts begin with mine on 9 May, 2007 (after the block of LGNPC dialog conventions).

What is not included in that particular post (but followed up on 11 May, 2007) is what I mentioned earlier (and have confirmed through testing). You can easily and safely remove unwanted new dialog entries by 'deleting' it while in the dialog window. The entry is flagged 'DELETED' and will be removed after the mod is saved and subsequently loaded. The reason this works is the editor is able to reassign the dialog pointers to ignore the deleted entry thus giving a continuous path of next and previous entry pointers. When this is done outside the construction set (or by toggling ignore in the mods details just before loading it) the entry is removed, but the line above it has a next pointer (NNAM) with no object and the line below it has a previous pointer (PNAM) with no object. These get tied off to the nearest official entry and the block of new dialog below the deleted entry gets moved to the bottom since nothing is pointing to its top entry.

These concerns about deleting new dialog entries are only an issue for dialog added to existing topics. If you delete an entry from a topic you have created there is no scrambling of the order of the remaining entries from what I have observed. However if two mods add the same new topic and one (or both) deletes an entry using a third-party utility such as TESAME, there could be some strangeness when they are loaded with the game. I am not certain it would be an issue, and it is such a remote possibility that I do not worry about it.
User avatar
Emmanuel Morales
 
Posts: 3433
Joined: Sat Oct 06, 2007 2:03 pm

Post » Fri Jul 30, 2010 11:59 pm

Only once did I discover that an entire block of dialogue had moved to the bottom of the topic's list. That was a while back so I don't remember what I may have done to cause it. Recently I noticed only one line out of several within a topic appeared to have been moved to the top away from all my other new dialogue. No idea what the circumstances were around that one either. Of course, either could have been caused by using Error Checking I suppose.

I'm following the, I think, conventional wisdom of putting DELETE in any original dialogue line that gets marked as changed (because of the pointer) and then deleting those lines with TESAME. At this point I'm pretty satisfied with my mod and I'll be sure to be very careful with dialogue in the future.

Thanks for the links! I'm saving them separately so I can refer back to them if necessary.
User avatar
Becky Cox
 
Posts: 3389
Joined: Thu Jun 22, 2006 8:38 am


Return to III - Morrowind