The Elder Scrolls Forums

TES Construction Set and Plugins >> General TES Construction Set

Pages: 1
Archived User Account

What should I keep in mind while making an expansion for my plugin?
      #2885390 - 08/04/04 01:25 AM

I'm planning on an expansion for a plugin I've just finished. I want the player to be able to load the expansion plugin without problems and without having to create a clean save.

The only real physical change to the original I'm planning, is replacing a static door(won't open) with one that works. Actually I was wondering if instead of replacing it, I should just put the real door over it.

What about adding dialogue and/or items to existing npc's?

Any feedback is appreciated, as the plugin I've just released is really only my first final.

Post Extras: Print Post   Remind Me!   Notify Moderator  
kwshipman
Disciple

Reged: 03/16/04
Posts: 1543
Loc: Washington State
Re: What should I keep in mind while making an expansion for my plugin? [Re: ]
      #2885407 - 08/04/04 01:31 AM

from my understanding, adding things to the world usually gives little or now problems. It is when you try to delete or rearange things that problems start occuring.

as far as npc's, I don't know, sorry.

--------------------
Maker of Kahleigh's Retreat and Wallpapers and Loading Screens

kw's List of House Mods

Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: What should I keep in mind while making an expansion for my plugin? [Re: ]
      #2885484 - 08/04/04 02:13 AM

Quote:


The only real physical change to the original I'm planning, is replacing a static door(won't open) with one that works. Actually I was wondering if instead of replacing it, I should just put the real door over it.





Not sure about replacing a static; been too long since I experimented.

Adding a new door, without changing anything already in the cell, should be completely safe.

Check the details list for your new .esp constantly, after each save, to make sure you don't accidently modify something that is already in the original .esp file. And back up the .esp frequently in case you mess something up.

I know from personal experience that it's very easy to inadvertently 'touch' an existing object without realizing it, and then wind up with a dirty save and a mess to clean up. (I discovered dirty saves by trying to do what you're trying to do: add new stuff to an existing mod that's already in use. )


Quote:


What about adding dialogue and/or items to existing npc's?





Adding dialogue to existing NPCs? You don't add dialogue to the NPCs: you add it to one big data base, which is used by all NPCs and creatures. (Just in case you didn't realize that already. )

Adding new dialogue is normally safe, as long as you understand how the dialogue system works., but I'd avoid changing any existing dialogue.

When you add new dialogue, keep in mind the order the game searches for responses: if you put your addition in the wrong place, it may block responses further down the list.

Adding items to existing NPCs? If you mean putting something in the inventory of an existing NPC, that's always a very bad idea: great way to cause a dirty save or conflicts with other mods (or with the original version of your own mod).

If you just want to give something to a merchant for them to sell, use one of the two standard methods:

1. Put it in a new container, with a unique ID, then put the container in the same cell as the merchant and set the merchant as the container's owner.

2. Put the item directly into the merchant's cell, and set the merchant as the owner.

But don't change an existing NPC's inventory in the Construction Set. (Also don't change the contents of existing containers.)

If you do need to change an existing NPC's inventory, one way that should be completely safe is to do it with a script in the game:

Use GetItemCount and RemoveItem to remove any items you don't want them to have.

Use AddItem to give them items you want to add to thier inventory.

Could just use a local script, stuck on activator in the same cell as the NPC, with a DoOnce condition so it only adds/removes things once.

Post Extras: Print Post   Remind Me!   Notify Moderator  
the_hunger
Curate

Reged: 02/16/03
Posts: 761
Loc: Indiana
Re: What should I keep in mind while making an expansion for my plugin? [Re: ]
      #2886763 - 08/04/04 12:13 PM

Regarding your door, do not simply put another door over it or else you'll likely end up with 2 doors. As KWShipman said, trying to delete or rearrange things in the expansion will cause problems (although you can generally add things). Why won't the original door open? If it has some kind of locking script on it, just take the script off. This can be done in your expansion. However, you will not be able to remove the original door itself unless you do so in the original mod (you can't do this in the expansion).

You can add lines of dialogue and new topics to an existing NPC, but as DinkumThinkum said, be careful about the order in which you add dialogue. The game reads dialogue and its conditions from top to bottom. Thus, if you list first a greeting that is filtered to an NPC and has no conditions (such as a required journal entry), it will always be that NPC's greeting, even if the NPC has other greetings listed below that one.

Regarding adding things to an NPC's inventory, I have never had a problem with this in expansions. This also goes for an NPC's stats. For example, I did a mod in which an NPC was supposed to die in a war. However, I realized later that the NPC should have had a note on her dead body for the player. So, in the expansion, I simply added the note to her inventory. I have simply had no problems with doing this. I hope this helps.

--------------------
The_Hunger (aka The V8 Man)
My homepage

The Latest, Greatest Housing Mod
The Latest, Greatest Housing Mod 2: Stormhold
The Latest, Greatest Housing Mod 2: Stormhold (patch and add-on)
(download at Morrowind Summit, Gamer's Roam, Morrowind Source, or my homepage)


Post Extras: Print Post   Remind Me!   Notify Moderator  
ManaUser
Master

Reged: 05/31/00
Posts: 6115
Loc: Long Beach, CA, USA
Re: What should I keep in mind while making an expansion for my plugin? [Re: the_hunger]
      #2887235 - 08/04/04 02:30 PM

Well if it's a load (teleport) door, than you cna just put it over the old one as long as you put it slightly in front. Then it doesn't matter that there's a static door back there. If it's a non-load (swinging) door than it's a problem.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: What should I keep in mind while making an expansion for my plugin? [Re: ManaUser]
      #2887310 - 08/04/04 02:47 PM

Quote:


Well if it's a load (teleport) door, than you cna just put it over the old one as long as you put it slightly in front. Then it doesn't matter that there's a static door back there. If it's a non-load (swinging) door than it's a problem.





Good point. I hadn't thought about the possibility the original poster might want to use a non-load door over top of the existing static.

If he doesn't mind not being able to see through an open door, he could still use a load door even though the new area is still in the same cell. Not quite as immersive as a swinging/rotating door, but it avoids the problems.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: What should I keep in mind while making an expansion for my plugin? [Re: the_hunger]
      #2887451 - 08/04/04 05:34 PM

Quote:


Regarding adding things to an NPC's inventory, I have never had a problem with this in expansions. This also goes for an NPC's stats. For example, I did a mod in which an NPC was supposed to die in a war. However, I realized later that the NPC should have had a note on her dead body for the player. So, in the expansion, I simply added the note to her inventory. I have simply had no problems with doing this. I hope this helps.





???

This is one of the most commonly complained about stumbling blocks people discover when they first try changing or adding to an existing NPCs inventory. If you've never encountered this, you've been incredibly lucky (and you probably haven't spent as much time reading new modder requests for help as I have...).

If the player character has been close enough to the NPC for the NPC's cell to be loaded, then the NPC's inventory will be stored in the character's save game, and changes made to the NPC's inventory by a mod won't show up.

"Close enough" has the usual meaning: player character in the same interior cell or an adjacent exterior cell.

I just took a few minutes and quickly reverified and double-checked this, just in case what I and others have been telling people for so long was wrong, and it works exactly as described above.

As long as the player character hasn't been close enough to the NPC for their inventory to be stored in the save game, inventory changes made by a mod will show up, which may be why you've never noticed this problem. But I don't think that basing mod changes on the assumption that the player has never been near a particular NPC is too reliable.

Also, depending on what you do with the NPCs, you can wind up with doubled NPCs. I had a bad dose of this a few days ago, when I used a test .esp file to make changes to NPCs in another one of my test .esp files: a whole bunch of my test NPCs wound up doubled, probably because I had moved them to new positions.

The other well-known problem with editing an NPC in an .esp file is that it will conflict with any other mod that changes the same NPC: only the changes made by one .esp file will take effect. (Unless you get doubling, in which case you may wind up with both sets of changes in different clones of the same NPC.)

As long as it's just a modder updating an NPC added by one of his own mods, there shouldn't be any conflicts between the different versions of the NPC as long as the modder is careful. But that still doesn't eliminate the possibility of dirty save or doubling problems.

In general it is a very bad idea to make changes to an existing NPC.

Post Extras: Print Post   Remind Me!   Notify Moderator  
the_hunger
Curate

Reged: 02/16/03
Posts: 761
Loc: Indiana
Re: What should I keep in mind while making an expansion for my plugin? [Re: ]
      #2887646 - 08/04/04 06:26 PM

Hmmmm. Maybe I've just been incredibly lucky, but I have added items, health, dialogue, and other things to NPC without adverse effect. But come to think of it, I did encourage players to clean their saved game and reload the original mod at the same time as the expansion is added. Thus, this is probably why I never experienced any problems with changing NPCs. And I have experienced the doubling effect when trying to reposition an NPC in an expansion. So, yes DinkumThinkum, you're right. One should be very careful with NPCs, though written changes (such as in scripting and dialogue) should generally be okay in expansions.

--------------------
The_Hunger (aka The V8 Man)
My homepage

The Latest, Greatest Housing Mod
The Latest, Greatest Housing Mod 2: Stormhold
The Latest, Greatest Housing Mod 2: Stormhold (patch and add-on)
(download at Morrowind Summit, Gamer's Roam, Morrowind Source, or my homepage)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: What should I keep in mind while making an expansion for my plugin? [Re: the_hunger]
      #2888867 - 08/05/04 12:55 AM

Quote:


Hmmmm. Maybe I've just been incredibly lucky, but I have added items, health, dialogue, and other things to NPC without adverse effect. But come to think of it, I did encourage players to clean their saved game and reload the original mod at the same time as the expansion is added. Thus, this is probably why I never experienced any problems with changing NPCs. And I have experienced the doubling effect when trying to reposition an NPC in an expansion. So, yes DinkumThinkum, you're right. One should be very careful with NPCs, though written changes (such as in scripting and dialogue) should generally be okay in expansions.





When you hit the save button on an NPC's properties sheet, all the data for that NPC is stored in your mod. This applies to any object: you hit the save button, you have just stored that object's data as part of your .esp file.

Also, when you change a reference: even if you don't hit the save button, the changes to the reference will be stored in your .esp file.

Why this can cause conflicts:

When two or more mods contain data for the same object, the data is not merged. Instead, one mod's data for that object is used, and the data in the other mods is ignored. Usually, the data from the last mod loaded is used.

For references: if two mods have data for the same reference, but in different positions, the game may decide that they're two different references to the same object. End result is doubling.

----------------------------------------------------------------------------

For example:

1. You put some Daedric Armor in Arrille's inventory, and hit the Save button to make that change part of your mod.

2. Modder Bill gives Arrille some Dark Brotherhood armor to sell, and hits the Save button to put it in his mod.

3. Mod user Joe installs your mod and and Bill's mod, and discovers that the Daedric Armor doesn't show up.

What happened: Bill's mod was created after your mod, so it loads after yours. So the game takes all the data for Arrille from Bill's mod, and ignores yours.

You'll get the same effect anytime you change data for an NPC and hit the Save button: changing the head or hair, changing one of their attributes or skills, etc. Hit the Save button, and everything on that NPC's properties page is now in your .esp.

Even though the AI and Services properties page for NPCs has its own Save button, those changes aren't actually saved until you also hit the Save button on the NPC's main property page. So even if you just change the barter gold or add a service to an NPC, that will put all the data for that NPC into your .esp file, and cause the same potential conflicts with other mods as changing inventory, head and hair, etc.

As I said earlier in this thread (I think... ): if you're just updating your own NPC that you added to the game in your own mod, you can avoid most of those conflicts as long as your careful.

But if you make changes to existing NPCs, that's a very bad idea because of the potential for conflicts with any other mod that changes the same NPC.

The same thing for changing any other types of objects or references that are already part of the game: an excellent way to cause conflicts with other mods, dirty save problems, or possible doubling.

----------------------------------------------------------------------------

You don't see these conflicts with scripts and dialogue because they're stored in their own databases. Add a new script, and it just gets added to the list of scripts in the mod. Same with a new dialogue response or a new journal entry: add a new one, and it just gets tucked away in the main dialogue database.

But if you change an existing script, dialogue response, journal entry, etc. then you do have the potential for problems, especially if it's one that's part of the original game or an expansion.

Post Extras: Print Post   Remind Me!   Notify Moderator  
the_hunger
Curate

Reged: 02/16/03
Posts: 761
Loc: Indiana
Re: What should I keep in mind while making an expansion for my plugin? [Re: ]
      #2888948 - 08/05/04 01:31 AM

Very informative, DinkumThinkum. The lesson here, then, is to be extremely careful about changing existing NPCs (those that are already in the game and not placed by a mod), since every other modder has access to those NPCs and may use them for their mods. Making changes to your own NPCs--which is what I was originally referring to--should be fine in an expansion (though you should be especially careful about the doubling problem caused by moving an NPC and you should double-check to make sure your changes take effect as planned).

--------------------
The_Hunger (aka The V8 Man)
My homepage

The Latest, Greatest Housing Mod
The Latest, Greatest Housing Mod 2: Stormhold
The Latest, Greatest Housing Mod 2: Stormhold (patch and add-on)
(download at Morrowind Summit, Gamer's Roam, Morrowind Source, or my homepage)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: What should I keep in mind while making an expansion for my plugin? [Re: the_hunger]
      #2889074 - 08/05/04 02:24 AM

Quote:


Making changes to your own NPCs--which is what I was originally referring to--should be fine in an expansion (though you should be especially careful about the doubling problem caused by moving an NPC and you should double-check to make sure your changes take effect as planned).





And don't forget the save game problems mentioned above, since those will affect your NPCs if the player character has ever been close enough for the NPC's cell to be loaded.

Unfortunately, there's no complete list of all the NPC data that gets saved in a saved game.

We know that an NPC's maximum barter gold setting isn't saved, and neither is their head or hair. That information is just read from the .esp file each time the game starts.

And we know that (obviously) an NPC's current inventory is stored in the saved game file.

Beyond that, I'd say it's a very safe bet that any NPC data that can be changed within the game will be included in the save file. For example, an NPC's skills and attributes can be changed by scripts or spells during the course of game play, so those are probably stored in the save file.

And I would also speculate, though not so confidently, that data that is impossible to change in the game probably isn't stored in the save game files. For example, the services offered by an NPC (training, buying/ selling, etc.) can only be changed in a mod; there's no way to modify those with a script or other means inside the game. So that data can just be read in from the .esp when the game is loaded; there wouldn't be any point storing it in the saved game file.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: What should I keep in mind while making an expansion for my plugin? [Re: ]
      #2889337 - 08/05/04 04:28 AM

Wow I didn't expect this many responses. Thanks alot Dinkum. You're a tremendous help to the community imo. I still havn't fully absorbed all of the information in the thread, so I'll bookmark it and use it for reference.

The reason I wanted to put a door on top of the older door is because the older door is a static, not a door at all. If I put an identical looking door over it I think I could mask it pretty well.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1


Extra information
0 registered and 2 anonymous users are browsing this forum.

Moderator:  Umrahel, Freddo, Pete, Hungry Donner, Attrebus, Miltiades, tegger 

Print Thread

Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 118

Rate this thread
 
Jump to

The Elder Scrolls Homepage

*
UBB.threads™ 6.3

Click for Privacy Statement 2003 Bethesda Softworks LLC, a ZeniMax Media company. All Rights Reserved.
PRIVACY POLICY | TERMS & CONDITIONS | LEGAL INFORMATION | CONTACT US