Jump to content


Photo

A little blurb about compatibility


  • Please log in to reply
22 replies to this topic

#1 Stone Wolf

Stone Wolf
  • Member
  • 1672 posts

Posted 22 May 2005 - 05:38 AM

One of the potential problems with mod compatibility is that mods might have used the same file name. If both mods have the file "sword35.itm" in them, the second mod that is installed will overwrite the itm file from the first mod. This can cause quite a few problems, especially if it's an important file (like a 2da or ids file). This isn't usually easy to fix, but it isn't that hard to find out if it will be a problem.

The easiest way to check for file overlaps is to set up a dummy folder and install the mod in question into that folder. This places all individual files into that folder, so that you can check for duplicate files. To do so, just follow these instructions:

1) Create a dummy folder, which will act as the fake base game folder. This folder can be named anything you like. You might want to name it after the mod you're testing, just so that you don't have to wonder six months later why you created that folder. Errr, not that I've done that or anything... :unsure:

2) You need to create an "override" folder within the folder you just created. The mod will look for it to install the new files, so it really does need to be there. You also need to copy and paste both the dialog.tlk file and the chiten.key file from the game you're testing for into the base folder for the same reason. Those can both be found in the regular game folder itself. Your dummy folder should look like this:

Dummy {folder}
  Override {folder}
  dialog.tlk {file}
  chiten.key{file}

3) Now you need to import the mod files. If the mod installs itself without requiring another program, then you simply start the install and tell it to install the mod to the dummy folder. If you need to use DLTCEP or IEEP to install it, you need to tell that program where to put the mod. Simply open DLTCEP and go into settings. Make a new setup that points to the chiten.key in the dummy folder, and save that as your new setup. Then you can just import the tbg/iap file as usual.

4) Now you've got an apparently useless folder with a whole bunch of files in it. If you're just comparing a couple smaller mods, I'd suggest selecting the entire dummy override and making each file read only. Just select all files and then do it all at once. Then install the other mod(s) on top of that. If there's a file conflict, it'll let you know. This won't always work though, so it's really only ideal for checking a couple mods.

If you want to check and see if a mod will work with your current setup, it's a little more complex. For this I'd use DLTCEP or Near Infinity and Windows Explorer--at least for smaller amounts of mod files. Go into the override of your dummy folder, where all the new files are. Because both DLCTEP and NI sort game files by type, I'd suggest you set that folder to sorting by file type as well. Now just go through each file type and check to see if there are any files by that name already in the game. If there is a duplicate, go to the part on resolving conflicts below.

That might sound scary, but usually it isn't. Most modders use a custom prefix (like RQ or ^& or something) at the beginning of every file name, which does a lot for compatability. You just have to check each type of game file to see if there are any files already with that prefix. Usually there won't be, but if there are you just have to check for duplicate files.

Now if the mod uses a prefix for most files, but there are a few without that prefix, those are the ones you'll need to worry about. When that happens it means that the mod is probably replacing a regular game file instead of adding a new one. Check to see if that file exists in the game anways, but it probably will. If that's the case, go to resolving conflicts below.


Resolving Conflicts

Okay, the mod is adding a file that already exists in the game. This isn't necessarily a bad thing. If the file is a standard game file that's only being altered by one mod, you should be okay. If it's a file that another mod also alters, you're probably hosed. First thing you have to do is check and see if another mod has altered or added that file. There are a number of places that file might be:

1) If any mods you have installed have added bif files (compressed collections of many files), you can check that bif for the file(s) in question. For this I'd use Near Infinity. Go to Edit-Biff, and open the bif file from the already installed mod. There might be more than one, in which case you'll need to check them all. Simply go through the list of files and check to see if any of the files in question are present. Whether they are or not, don't actually edit the biff! If the file does exist in a mod biff, you have a confirmed conflict (see below). Otherwise, go to step two.

2) If the file doesn't exist in a bif added by a mod, then it's either in the override folder or one of the standard game biffs. You can check to see if it's in the override either by manually looking for each file, or you can just try and copy/paste the contents of the dummy/override folder to the actual game override. Make sure you don't actually overwrite any files!!! If it asks you whether or not to overwrite a file, you have a conflict. Just say no and let it continue copying files. Write down each file that it asks about, since these are the files that might cause problems. When it's done, regardless of whether or not there were problems, you'll need to undo that copy. Remember that the files weren't installed properly, so the mod wont work even if there were no conflicts.

2) If the file exists in the override, we need to find out if it's a mod file or a standard game file. We can check to see if it's a file from a weidu mod rather easily. Just open the .debug file of each weidu mod you have installed with a text editor, and do a text search for the name(s) of each file that wouldn't copy over. If the file is altered by a weidu mod it'll be listed in the debug file. If you find any of those filenames you're looking for, you've found a conflict. If not, then you know it isn't a weidu mod that created or altered that file.

3) Now we know that the file isn't added by a mod to a bif folder, and it wasn't installed by a weidu mod, but it's still just sitting there in the override folder mocking us!! What I'd suggest is to install all the non-weidu mods to the same dummy folder as the first one. Before doing so, set all the files in that override folder to read only. Then install another non-weidu mod. If you have more than one other non-weidu mod to check, set the entire folder to read only again before doing so. If you get any messages saying that a file couldn't be installed, you've found the conflict. If all the mods install normally, you should be free and clear to install all the mods.

Confirmed Conflicts

If you make it to this part, you should know not only what files are conflicting, but which mods are adding or altering the same files. The very first thing you should do is post that data in the forums of both mods. Do a search first to make sure that someone hasn?t already posted about it. Searching for the name of the other mod and for the filename should do it. If you can?t find anything like that, post that you?ve found a conflict with which mod, and say what file is conflicting. Modders need to know this stuff so that they can update their compatibility list.

Now that you've done that, there are some things you can do to fix the duplicate file problem. It?s very possible to mess something up, so proceed at your own risk. I'll add more later if people want me to, but here's a quick overview of what I'd do:

Near Infinity has a lovely little "find references to this file" search option. I love that thing! It tells you which game files refer to the file in question. If you want to change the name of a file to something new to prevent a file name conflict, this search should tell you what other files need to be altered to point to the new file name. I can't say for sure that it catches all references, but it's a hell of a start! Once you have such a list, just change the name of one of the duplicate files to a new name (something with an unused prefix like "&^" or something), and then alter each reference to that file to the new file name.

Please not that this will NEVER work if the file in question is a 2da or ids file. They can't be renamed and still work. Ever. If that's the case, go to the boards and report the conflict. Hopefully someone will then be able to compare both versions and see if they can be made to work together.

That's all I've got right now. If anyone has and questions or suggestions, please don't hesitate to post them. :)

#2 Andyr

Andyr

    HERR RASENKOPF

  • Member
  • 2318 posts

Posted 22 May 2005 - 05:47 AM

It might be worth mentioning that in the case of different mods altering the same script, in most cases all that needs to be done to ensure compatability is make sure you use EXTEND_TOP or BOTTOM in the .tp2 rather than a straight COMPILE command. :)

I guess there's a similar point to be made about APPEND and similar actions rather than just overwriting an existing .DLG, too.
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

#3 igi

igi

    IESDP Guardian

  • Administrator
  • 1058 posts

Posted 22 May 2005 - 06:01 AM

I think it should be said that some mods are irrevocably incompatible with each other - it doesn't make sense, e.g. to have "Remove the entire Spellhold section from the plot" installed at the same time as "Tougher Spellhold"...

Visit the IESDP


#4 Stone Wolf

Stone Wolf
  • Member
  • 1672 posts

Posted 22 May 2005 - 11:32 AM

It might be worth mentioning that in the case of different mods altering the same script, in most cases all that needs to be done to ensure compatability is make sure you use EXTEND_TOP or BOTTOM in the .tp2 rather than a straight COMPILE command. :)

I guess there's a similar point to be made about APPEND and similar actions rather than just overwriting an existing .DLG, too.

View Post


Very true. This started out as a tbg/iap thing, so I really didn't think about checking Weidu mods. Other than scanning the tp2 for various commands, can you suggest a good way of detecting potential conflicts?

I think it should be said that some mods are irrevocably incompatible with each other - it doesn't make sense, e.g. to have "Remove the entire Spellhold section from the plot" installed at the same time as "Tougher Spellhold"...

View Post


Good point, and I also didn't mention the fact that you can't install more than one mod with a new dialog.tlk or chiten.key (except with BP). This little guide is going to get a lot longer. ;)

#5 SimDing0

SimDing0

    GROUP ICON

  • Member
  • 1654 posts

Posted 22 May 2005 - 11:44 AM

I think it's more than a little daunting for somebody with compatibility concerns to be greeted with a load of stuff about IAPs and dummy folders. I'd suggest a little restructuring, so that stage one talks about WeiDU mods and says "avoid IAPs and TLK overwriters unless you're sure what you're doing" and stage two says "okay, if you really insist..."
Repeating cycle of pubes / no pubes.

A Comprehensive Listing of IE Mods

#6 jcompton

jcompton
  • Modder
  • 492 posts

Posted 22 May 2005 - 02:02 PM

I'm with Sim, but I'll go further. I'm having difficulty understanding why this post is any longer than:

"1. When making a new game resource (item, spell, dialogue, etc.) use the file browser contained in NI/InfExp/DLTC to see if one already exists with that name. If it does, don't use it.

2. If you'd like to be extra-sure you don't give it a name some other mod will be using, go over to Black Wyrm and read the prefix list and pick one of your own."

Players shouldn't have to worry about compatibility to the extent of making dummy folders and so on and so forth--and in general, they don't, if they read the documentation thoughtful modders write up for them which should address the major known/suspected incompatibility issues.

Am I missing something?

#7 Stone Wolf

Stone Wolf
  • Member
  • 1672 posts

Posted 22 May 2005 - 02:33 PM

I'm with Sim, but I'll go further. I'm having difficulty understanding why this post is any longer than:

"1. When making a new game resource (item, spell, dialogue, etc.) use the file browser contained in NI/InfExp/DLTC to see if one already exists with that name. If it does, don't use it.

2. If you'd like to be extra-sure you don't give it a name some other mod will be using, go over to Black Wyrm and read the prefix list and pick one of your own."



Errr, this isn't written as a guide for people making new files. This grew out of a comment about iap/tbg compatibility, as I mentioned a couple posts above this.

Players shouldn't have to worry about compatibility to the extent of making dummy folders and so on and so forth--and in general, they don't, if they read the documentation thoughtful modders write up for them which should  address the major known/suspected incompatibility issues.

Am I missing something?

View Post


The section I put in bold is one potential problem. When I started downloading mods I did a bunch of goodle searches and followed links blindly, and as a result I ended up with a bunch of mods from various sources. A few had good documentation, but some didn't. This is for people who find a mod that they want to install that doesn't have a good compatability list if it even has a list at all.

#8 Rastor

Rastor

    Yes, I really am a dragon. Yes, I am a jerk. Live with it.

  • Member
  • 2001 posts

Posted 27 May 2005 - 09:09 AM

Of course, the best solution is for modders to patch everything on the fly and not overwrite anything.
Home of Kitanya, Improved Asylum, more...

Posted Image

#9 NiGHTMARE

NiGHTMARE
  • Member
  • 2328 posts

Posted 27 May 2005 - 09:13 AM

That's only useful advice for a modder making a new mod, it doesn't exactly help a player trying to install an old mod.

Edited by NiGHTMARE, 27 May 2005 - 09:13 AM.


#10 -the_Swordalizer-

-the_Swordalizer-
  • Guest

Posted 03 June 2005 - 10:02 PM

@ Nightmare: As this is the "modders room", I think aiming comments at modders rather than mod-players can be excused. :P

Real Post---> I know it is good modding practice to name all files with a unique prefix. But I have also seen it said Area files should always start "AR". Which is right?

#11 Stone Wolf

Stone Wolf
  • Member
  • 1672 posts

Posted 04 June 2005 - 12:07 AM

You can have them start with anything you like. If you need proof, take a look at The Darkest Day. ;)

#12 Cuv

Cuv

    Area Maker (retired)

  • Modder
  • 925 posts

Posted 05 June 2005 - 12:33 PM

You can also check out my Iron Modder 3 entry... A Kiss Before Dying, for a faster download:P

IRNCUV.are. The area is fully patched to the MastArea.2da in that one.

To stay on topic, patching is certainly preferable to overwriting... But imho, someone who is making a mod might not care much for compatibility with other mods. I know we are aware of it... but there will certainly be a list of mods that will never be compatible with RTW... and vice, versa.

Nowadays it is easy to think about compatibility... but when several mods were started many years ago in a galaxy far, far, away before WeiDU existed, that was not a concern at all. Who knew that so many people would be making mods so easily. I curse you Wes:P Hehe. j/k

Cuv

#13 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 05 June 2005 - 12:46 PM

But I have also seen it said Area files should always start "AR". Which is right?

If you don't want to break my code and dramatically cause death and horror, AR is best. If you wanna know why, check my .tp2 code found here.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#14 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 05 June 2005 - 01:46 PM

But I have also seen it said Area files should always start "AR". Which is right?

If you don't want to break my code and dramatically cause death and horror, AR is best. If you wanna know why, check my .tp2 code found here.

View Post


Completely unnecessary; construct better regexps. The following will copy any area file that does not begin with xr2.

COPY_EXISTING_REGEXP GLOB ~^\([^Xx]\|[Xx][^Rr]\|[Xx][Rr][^2]\).*\.are$~ ~override~

Edited by CamDawg, 05 June 2005 - 02:00 PM.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#15 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 05 June 2005 - 01:57 PM

Completely unnecessary; construct better regexps. The following will copy any area file that does not begin with xr2.

COPY_EXISTING_REGEXP GLOB ~^\([Xx][^Rr]\|[^Xx][Rr]\|[^Xx][^Rr]\|[Xx][Rr][^2]\).*\.are$~ ~override~

Uh, well, yeah, but I don't use C_E_R in that code.

If Wes would be so kind as to allow regexp in STRING_COMPARE_CASE, it'd work. Until then, areas (on the worldmap, I might add) which don't start with AR or G3 breaks the code and fuxors the game. Hmm, maybe I should request the regexp in S_C_C?

(This is the point where some smartass tells me that it's already allowed (if it is), since I haven't actually tried it.)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#16 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 05 June 2005 - 02:05 PM

You're checking to make sure the file referenced is not one of the XR2 ones, correct?

Read the first three ASCII characters individually and then use the same logical tests as the regexp. I've broken it out to make it a bit more clear

PATCH_IF 
(
("x" STRING_COMPARE_CASE "digit1" != 0) 
OR
(("x" STRING_COMPARE_CASE "digit1" = 0) AND ("r" STRING_COMPARE_CASE "digit2" != 0))
OR 
(("x" STRING_COMPARE_CASE "digit1" = 0) AND ("r" STRING_COMPARE_CASE "digit2" = 0) AND ("2" STRING_COMPARE_CASE "digit3" != 0))
)
BEGIN

Alternatively, bug Wes for regexps in STRING_COMPARE(_CASE).

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#17 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 05 June 2005 - 02:15 PM

You're checking to make sure the file referenced is not one of the XR2 ones, correct?

No, I'm checking if what I read indeed is an area entry and not an area link. I guess I could do it with some sort of:

READ_LONG  0x38 "link_off"
  PATCH_IF ("%area%" < "%link_off%")
...and even combine it in a FOR-loop. I'd be happier if I actually could use S_C_C, though.

Read the first three ASCII characters individually and then use the same logical tests as the regexp. I've broken it out to make it a bit more clear

This is more or less what I've done now, only I check for the two first digits to see what they're called.

Alternatively, bug Wes for regexps in STRING_COMPARE(_CASE).

That was my idea, yes. I think I will.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#18 Azkyroth

Azkyroth
  • Modder
  • 3496 posts

Posted 07 March 2006 - 03:36 AM

I know it is good modding practice to name all files with a unique prefix. But I have also seen it said Area files should always start "AR". Which is right?


My two cents on this would be that it doesn't have to start with AR but it might be useful to have ar in there somewhere. The area filename format I'm using with Arkalian is A2Kar### where:
A2 = registered unique personal prefix
K = Arkalian mod identifier (on the off chance I ever make any others)
and
# = one alphanumeric digit

Something like that would probably serve pretty well. Also has the convenient side effect of grouping every new mod file (or variable, if applicable, which benefit as least as much from different modders keeping theirs separate) together for easy maintenance programming and such.

"Tyranny is a quiet thing at first, a prim and proper lady pursing her lips and shaking her head disapprovingly, asking, well what were you doing (wearing that dress, walking home at that hour, expressing those inappropriate thoughts) anyway? It's subtle and insidious, disguised as reasonable precautions which become more and more oppressive over time, until our lives are defined by the things we must avoid. She's easy enough to agree with, after all, she's only trying to help -- and yet she's one of the most dangerous influences we face, because if she prevails, it puts the raping, robbing, axe-wielding madmen of the world in complete control. Eventually they'll barely need to wield a thing, all they'll have to do is leer menacingly and we fall all over ourselves trying to placate them." -godlizard


#19 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 07 March 2006 - 09:58 AM

I know it is good modding practice to name all files with a unique prefix. But I have also seen it said Area files should always start "AR". Which is right?


My two cents on this would be that it doesn't have to start with AR but it might be useful to have ar in there somewhere. The area filename format I'm using with Arkalian is A2Kar### where:
A2 = registered unique personal prefix
K = Arkalian mod identifier (on the off chance I ever make any others)
and
# = one alphanumeric digit

Something like that would probably serve pretty well. Also has the convenient side effect of grouping every new mod file (or variable, if applicable, which benefit as least as much from different modders keeping theirs separate) together for easy maintenance programming and such.

I'm afraid you don't make much sense. First, you say that you think it's a good idea to have areas starting with AR, and then you say you're going to name yours A2Kar###. :)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#20 Azkyroth

Azkyroth
  • Modder
  • 3496 posts

Posted 07 March 2006 - 12:48 PM

I'm afraid you don't make much sense. First, you say that you think it's a good idea to have areas starting with AR, and then you say you're going to name yours A2Kar###. :)


What I said was that it was a good idea to have "ar" in the name somewhere, if for no other reason than keeping track of the things if for whatever reason you can't see the extension clearly. It doesn't necessarily have to be at the beginning. :)

"Tyranny is a quiet thing at first, a prim and proper lady pursing her lips and shaking her head disapprovingly, asking, well what were you doing (wearing that dress, walking home at that hour, expressing those inappropriate thoughts) anyway? It's subtle and insidious, disguised as reasonable precautions which become more and more oppressive over time, until our lives are defined by the things we must avoid. She's easy enough to agree with, after all, she's only trying to help -- and yet she's one of the most dangerous influences we face, because if she prevails, it puts the raping, robbing, axe-wielding madmen of the world in complete control. Eventually they'll barely need to wield a thing, all they'll have to do is leer menacingly and we fall all over ourselves trying to placate them." -godlizard