Jump to content

Deleting a Module


TGBlank

Recommended Posts

Problem: toolset can't delete modules.

More problems: you can easily delete the physical files, but the database entries remain.

 

Solution: open the database on, say, sql server management studio, connect to the database, navigate to the dbo.Modules table and delete the mod there as described by this:

http://social.bioware.com/wiki/datoolset/i...emoving_Modules

 

Now is where the real problem crops up:

You see, this method only works if you never, ever created anything on that module. If you did something, like, create a script or duplicate an area, even if you delete said script/area afterwards on the toolset, the method fails, you'll get a big:

"DELETE statement conflicted with REFERENCE constraint "FK_tt_ModuleResRef_t_Module". The conflic ocurred in database "bw_dragonage_content", table "dbo.t_ModuleResRef", column 'ModuleID'."

(note, your message may mention a different table or column instead)

 

Why?, because everything you created now references to the module directly or indirectly, and you can't delete the module until you delete those from the database itself.

Sure, i'll just look for the object in question in the database that the error mesage said and delete it, right?, no more complications?.

 

Nope.

 

Lets say you duplicated an area, then deleted the duplicate.

The module won't delete because an area is referencing it.

The area won't delete because there's area volume, area music and area reverbs pointing at it.

Each of them would be referenced by an area_sumthing_geometry and audio.

Then there'd be the area objects, and the line in string table that contained who knows what about the duplicated area. This also won't delete until you remove the matching entry in the string text table.

There's also supposedly certain things that even make circular references, so you'd need to modify and THEN delete.

 

This process is a pain to do manually.

 

In short, we need a program or at the very least a batch script that systematically and recursively deletes an entry and everything that references it. Is there anyone here who's not as rusty as me in sql-fu willing to do a cascade delete script?.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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