Jump to content

A note on file checks: ToB


Andyr

Recommended Posts

Reading various posts around, it seems a standard check for ToB's presence is 25DIALOG.BIF or another .BIF file.

 

Igi's multi-install tool points clones to the orignal files (.BIFs are not copied to save space). Hence installing the fixes on the clone would fail to pick up these points.

 

Might it be better to do a check for Melisaan or something put into Override by the Official Patch instead?

 

I've already experienced some components of mods failing because they can't see the ToB .BIF files. Am posting here because, as a fixpack, it may be more important (plus Igi is likely to see it). :)

Link to comment

You (actually my multi-install tool) could put a blank version of the TOB BIFF files in the local data directory, then any weidu REQUIRE_FILE's would see them, and work.

I think I included a sample BIFF in one of the test releases, the main idea was to see if InfExp would like it, or complain or something. But, the idea is valid, and if someone could tell me if it works....

 

As to checking the override or another file... this is a case of educating mod makers who package mods with weidu, surely?

Link to comment

That sounds like a good workaround. The version of the tool I had didn't make a fake .BIF, I will probably have a go when next installing mods.

 

And yeh, it is a case of educating modders, though I don't think it's something which has occured to them before (as there's not been a clone install tool). You could almost call it innovative. :)

Link to comment

There are two main ways to handle this. One is the trusty ACTION_IF check which is great for blocks of individual file patches. If you have many files for both SoA and ToB that can use the same patch code, ALLOW_MISSING is a much better choice. The problem is that WeiDU's zero-byte file handling means we need to add an extra layer of protection when patching. For example, assuming tob_foo.itm is in the ALLOW_MISSING list:

 

COPY_EXISTING ~soa_foo1.itm~ ~override~
              ~soa_foo2.itm~ ~override~
              ~soa_foo3.itm~ ~override~
              ~soa_foo4.itm~ ~override~
              ~tob_foo.itm~  ~override~
  PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN 
    // long ugly patch stuff
  END
  BUT_ONLY_IF_IT_CHANGES

 

The SOURCE_SIZE check means it'll only catch valid files, and not ones in the ALLOW_MISSING list (which WeiDU treats as valid files, but zero bytes). I use > 0x71 for items, > 0x2d3 for creatures, etc.--basically the base item size without headers minus one.

Link to comment

I think the real problem is that people use REQUIRE_FILE ~data/tob_biff~ whereas people should be using REQUIRE_FILE_IN_GAME.

One command takes an absolute path and filename, whereas the other doesn't.

Link to comment

I don't think so - to play ToB you have to have the CD in the drive, and even if you'd cracked it, the files would still be referenced by the .KEY which would mean the check succeeded. Wouldn't it?

Link to comment
I don't think so - to play ToB you have to have the CD in the drive, and even if you'd cracked it, the files would still be referenced by the .KEY which would mean the check succeeded. Wouldn't it?

 

The code CamDawg posted should work. If not...

 

FILE_EXISTS_IN_GAME ~melliss01.cre~

 

That will.

Link to comment

How can this be changed to account for REQUIRE_FILE? Since that seems to need a path, and there's no REQUIRE_FILE_IN_GAME... Any ideas?

 

For example, instead of the current REQUIRE_FILE ~data/25dialog.bif~ @69

 

I seem to remember a function, but can't find examples of, something which would be like this:

 

ACTION_IF NOT FILE_EXISTS_IN_GAME ~saradush.mve~
THEN BEGIN
FAIL @69
END

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...