Help with Dagoth Gares!

Post » Sat May 28, 2011 1:54 am

So now that I finally feel settled at my new apartment, I've been resuming modding, and in particular the [WIP] thread I recently put up in the Mods section.

I've been doing some quest and scripting work, and was this morning working on some edits to Dagoth Gares. Everything looks fine in the CS, and so I set off to test it in-game. Unfortunately, I didn't have the forethought to get a character to that point of the main quest, so I simply COC'ed in.

Dagoth Gares was nowhere to be found. I could PlaceAtPC him and everything looked like it worked as intended. I figured he must have a disable script to prevent the player from running into him too early, but the script attached to Dagoth Gares has no such purpose. I've removed my mod's .ESP and tried visiting him again, but he remains vanished. Am I missing something obvious? Is there another script anyone knows of which controls his appearance?

Thanks in advance!
User avatar
Marie
 
Posts: 3405
Joined: Thu Jun 29, 2006 12:05 am

Post » Fri May 27, 2011 11:26 pm

If that helps, Dagoth Gares gets disabled in a script called "Startup", and gets enabled (in dialogue Result) after you receive that particular quest form Caius Cosades.
User avatar
Tarka
 
Posts: 3430
Joined: Sun Jun 10, 2007 9:22 pm

Post » Sat May 28, 2011 5:55 am

Wow, I never noticed the Startup script before. Thanks very much for the help as I can now rest easy knowing that I haven't banished Dagoth Gares to Oblivion!
User avatar
Elena Alina
 
Posts: 3415
Joined: Sun Apr 01, 2007 7:24 am

Post » Sat May 28, 2011 6:15 am

I figured he must have a disable script to prevent the player from running into him too early, but the script attached to Dagoth Gares has no such purpose.


If you run into a similar problem like this in the future you wont find a disable script attached the item/npc/etc as that will cause the game to crash. The disable script will be attached to something else.
User avatar
Matt Bigelow
 
Posts: 3350
Joined: Sun Sep 30, 2007 6:36 pm

Post » Sat May 28, 2011 10:19 am

Are you certain about that? In my previous scripting work I've had plenty of items with disable scripts attached to themselves -- granted, they were items created at runtime so perhaps that is different. Similarly, I know that the exteriors at Uvirith's Grave (and corresponding sites for the other Houses) have enable/disable scripts attached.

Is there a particular example you can point out, to show me what sort of usage you meant?
User avatar
Alisia Lisha
 
Posts: 3480
Joined: Tue Dec 05, 2006 8:52 pm

Post » Sat May 28, 2011 3:02 am

If you run into a similar problem like this in the future you wont find a disable script attached the item/npc/etc as that will cause the game to crash.

It shouldn't cause a crash. Deleting something from a script attached to itself on the other hand ...
User avatar
Taylah Haines
 
Posts: 3439
Joined: Tue Feb 13, 2007 3:10 am

Post » Fri May 27, 2011 6:17 pm

This is from the uesp: Disable/Enable: Used to enable/disable objects within the game. A disabled object is saved but not visible or processed within the game (though any scripts attached to it will still work). Note that it is dangerous to disable an object within its own script (causes crashes).

I guess it could possibly cause a crash, just not every time.
User avatar
..xX Vin Xx..
 
Posts: 3531
Joined: Sun Jun 18, 2006 6:33 pm

Post » Sat May 28, 2011 2:18 am

Interesting, I've never experienced that issue before. In a similar vein, I have had crashes where I didn't wait long enough between Disable and SetDelete-ing an object, but never with Disable by itself.
User avatar
Anna Beattie
 
Posts: 3512
Joined: Sat Nov 11, 2006 4:59 am

Post » Sat May 28, 2011 3:38 am

I'd like to add a hint to help you help yourself on future occasions. There are multiple search functions in the CS: the most handy one for this task is "Edit->Find Text". If you'd like to find all instances where Dagoth Gares is referenced, determine his ID (dagoth gares), and enter it as the search text. Click on "Find Text", and the Text Search window will display all dialogue lines, scripts, and objects in which that ID is used.

This is from the uesp: Disable/Enable: Used to enable/disable objects within the game. A disabled object is saved but not visible or processed within the game (though any scripts attached to it will still work). Note that it is dangerous to disable an object within its own script (causes crashes).

I disagree with the UESP here. I've been enabling/disabling references from their own local scripts for years now and have never experienced crashes from it. I suspect that the UESP meant that "it is dangerous to remove a reference from the gameworld by its own script (SetDelete). Like NMZmaster said:

[...] In a similar vein, I have had crashes where I didn't wait long enough between Disable and SetDelete-ing an object, but never with Disable by itself.

This is a well known problem, documented for example in http://planetelderscrolls.gamespy.com/View.php?id=6083&view=Mods.Detail:
Notes and cautions:
SetDelete will crash Morrowind if there is any other function operating on the object in the same frame. It will also crash if the object emits sounds (or plays animations with linked sounds) and is disabled and deleted in the same frame (forum info / JOG).

In the following paragraphs, MWSFD provides several solutions to the problem.
User avatar
Esther Fernandez
 
Posts: 3415
Joined: Wed Sep 27, 2006 11:52 am

Post » Fri May 27, 2011 11:52 pm

I'd like to add a hint to help you help yourself on future occasions. There are multiple search functions in the CS: the most handy one for this task is "Edit->Find Text". If you'd like to find all instances where Dagoth Gares is referenced, determine his ID (dagoth gares), and enter it as the search text. Click on "Find Text", and the Text Search window will display all dialogue lines, scripts, and objects in which that ID is used.


Thank you greatly for that tip. As my new [WIP] is my first real foray past scripting, and only scripting new objects at that, I find I am learning all sorts of things already about interacting with existing game objects and dialogue.

Before I thought that trying to script my projectiles properly and calculating complex motion based only upon an object's orientation was tough. Dialogue is a different beast altogether!
User avatar
Erin S
 
Posts: 3416
Joined: Sat Jul 29, 2006 2:06 pm

Post » Sat May 28, 2011 12:53 am

Erm, the scripting you do is tough. You've just gotten used to it, so you don't realize it anymore. I'm confident that you'll get used to Morrowind's dialogue system rather quickly. To help you get going, have a look at http://tommyshideout.net/files/srikandi/DialogueTut/. It's the only dialogue tutorial I ever used, and I'm still refering to it from time to time.
User avatar
Scott Clemmons
 
Posts: 3333
Joined: Sun Sep 16, 2007 5:35 pm


Return to III - Morrowind