Jump to content

GemRB detection in WeiDU


the bigg

Recommended Posts

To consolidate the info:

To aid modders installing mods that require advanced engine capabilities, WeiDU will provide facilities to detect if GemRB is installed, as well as its version. To do so, it will read the file {game}/gemrb_version.txt, strip it of all white space, and parse it as <major>.<minor>.<patchlevel>, where all three parameters are integers, comparing it against an user-provided minimum version. To aid in installation:

1) for people installing and running from the same machine, GemRB will write to that file every time the game is run, and users will be instructed to run GemRB once before installing mods (to create that file, as well as for checking the correctness of the install).

2) people installing on a machine and running on another one, however, will have to manually create that file. To aid them, the GemRB archive should contain a copy of gemrb_version.txt, with instructions to copy that file to the game dir prior to installing mods.

 

Thoughts?

Link to comment

I'd have conflicts, as I play the same data with both gemrb and the vanilla original. Additionally, the game dir can be on a readonly filesystem.

 

If the point is to check if gemrb is installed, why not check if it is installed? :) Through PATH inspection, for example. We can then add a proper --version to get that (if you really do need this information). Cross-machine installers would use a flag for weidu to force the mode.

Link to comment
I'd have conflicts, as I play the same data with both gemrb and the vanilla original.

If the mods don't need advanced engine capabilities (AEC) this is philosophical, and if they do need AEC mods will install ToBEx and/or tob_hacks, ensuring that they are met. The only case where this will be a problem is if you install GemRB, a mod that requires AEC but doesn't install an AE, and then run vanilla - which is pretty rare, since 99% of AEC-needing mods do install AEs. Besides, we'll all be deleting bgmain.exe and running solely GemRB in an year or so :)

 

Additionally, the game dir can be on a readonly filesystem.

In which case you won't be installing mods (or will manually create gemrb_version.txt), and GemRB not touching the FS isn't a problem :)

 

If the point is to check if gemrb is installed, why not check if it is installed? :) Through PATH inspection, for example. We can then add a proper --version to get that (if you really do need this information). Cross-machine installers would use a flag for weidu to force the mode.

Too much work (Windows, PATH inspection, manual flag...), compared to reading a file.

Link to comment

I'm surprised Gemrb has code visible (or script visible to be accurate) features that are not on the original or tobex.

 

Or is this just in case, for the future?

 

 

I don't think fragmentation in the file formats is a good idea if it happens...

 

Managed to miss the explanation by the bigg above.

 

:)

 

Yeah, that would be a problem...

Link to comment

Cool, i'm happy to see more GemRB support.

We aren't supposed to add files to the original dataset, though.

So, the detection algorithm needs to be improved.

If there is any other idea how to make it easier (short of modifying the original data), please tell us.

 

On the other hand, if it is gemrb/aec specific, we just need to make sure the features are as compatible as possible.

Link to comment
I'd have conflicts, as I play the same data with both gemrb and the vanilla original.

If the mods don't need advanced engine capabilities (AEC) this is philosophical, and if they do need AEC mods will install ToBEx and/or tob_hacks, ensuring that they are met. The only case where this will be a problem is if you install GemRB, a mod that requires AEC but doesn't install an AE, and then run vanilla - which is pretty rare, since 99% of AEC-needing mods do install AEs. Besides, we'll all be deleting bgmain.exe and running solely GemRB in an year or so :)

Cool, didn't know tobex is bundled with mods.

 

I
Additionally, the game dir can be on a readonly filesystem.

In which case you won't be installing mods (or will manually create gemrb_version.txt), and GemRB not touching the FS isn't a problem :)

You would the first time. One of my bg2 install is years old and had gemrb left a marker in there on creation, the data would have been misleading — we've done more than 10 releases since.

Link to comment

If you can think of a way to figure out which version of GemRB is installed, that works cross-platform, works for cross-installers, and doesn't require users to add gemrb's binary to the $PATH I'd be interested in hearing it. Otherwise, a plain text file is the route of least attrition for both users and developers.

 

In particular, if you refuse to write anything to the game path, you could tell all users to copy gemrb_version.txt to their game directory if they wish to install mods, rather than having the gemrb engine write that file itself.

Link to comment

I'd have conflicts, as I play the same data with both gemrb and the vanilla original.

Surely half the point of GemRB is to open up possibilities which didn't exist in the original games (like that Sorcerer/Monk mod)? For mods which take advantage of those possibilities, they're not going to work without GemRB anyway. At the moment doing something like that seems to be a bit of a mess, though, since you have to do a lot of manual work and things.

Link to comment

the bigger issue is how to override gemrb's overrides programmatically. I think we discussed this already somewhere, but I forgot. Something like a gamedir/gemrb-override where weidu would write for us.

 

On topic: I don't think the file is problematic, but I wouldn't trust its contents.

Link to comment

Archived

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

×
×
  • Create New...