Can GBX please fix one little thing? It's quite urgent/critical yet very simple - path lookups

If a file does not exist in a mod’s path, it should next check the default path before throwing an error.

Right now you require the HOD file of every ship you modify, though there are more examples.
So they have to be copied, even though they’re not changed. This makes mods WAY bigger than they should be.

My mod should be <1mb, but instead it’ll be 2GB if I include all the HODs for everything I need to change.

This is waste of peoples HD space and can really deter them from downloading large mods that shouldn’t be so large.

+1 please.

Uh… I’ve been doing tweak modding exactly the way you’re asking for, and it seems to work?

2 Likes

I’ve noticed I can sometimes remove the .hod file and it’s fine. Like I don’t need the Kus mothership one. Othertimes, it crashes on load. And I can’t be arsed to go through them one at a time to see which missing .hod creates the crashes.

It seems in some cases the game really needs a .hod, in which case it does not check the default path.
The cases it doesn’t crash are cases where I guess it doesn’t need the hod, for some reason?
I’ve seen other cases besides .hod that make crashes too.

Oh, and it should certainly log that it couldn’t found it and used the default.

Okay, that sounds rather buggy, yeah. More logging on this sort of crash would be a huge boon to modding generally, too.

2 Likes

Ermahgerd yes

1 Like

It actually does tell you which .hod was missing when it crashes, IIRC.
Either way, that duplicate .hod shouldn’t be needed.

But just the first one. So you replace that one, and there’s another.
Assuming I did go through and only add in the .hods it complains about, repeatedly attempting to load and see which it crashes on(it’ll only report one at a time), it’s still a few hundred extra mb it shouldn’t need.

Okay, but knowing which ones it does and doesn’t need might reveal a pattern that would help in figuring out the root of the problem.

1 Like

Are you modding classic or Remastered?

Remastered.

It’s easy to reproduce:
Copy all the ship files to the mod folder. Search for .hod and delete all those hod files. It’ll crash.

Are you removing the event files too? I’ve changed a few of the .ship files, removing both the .hod & .events files. (Nothing but .ship files in any directory under /ship/. [8 modified, 2 added.])
I haven’t had any unusual crashes. (Only crashes have been some LUA error on my part.)

Any mod file is supposed to supersede the vanilla ones. If a file isn’t included it should fall back to the vanilla one. This should be just as true for .hod files as any other file.
I don’t say this to indicate what the engine should do, but rather, this is how the engine currently operates. I’ve never had a problem with failing to find a file.

Please post your current command line switches. I’m wondering if this is some unintended bug resulting from different combinations of the mod/data command line switches.

My current HW2RM command line: HomeworldRM.exe -luatrace -logonverbose -logfileloads -hardwarecursor -ssNoLogo -dlccampaign HW2Campaign.big -campaign Ascension -moviepath DataHW2Campaign -moddatapath GregHW2

NOTE: I don’t have files packed into a .big file. Perhaps this is the cause of the bug?

Some ships are in HW1Ships.big. Other ships are in HW2Ships.big. Still yet others are in Homeworld2.big. By default the game only checks the last of these, so you’re going to have to include ship HODs from the other two when creating a mod.

Hm.
‘Homeworld2.big’ contains all (most) of the shared files. ‘HWnShips.big’ contains only the ships needed for that game.
But because the vs. mode uses both (and they depend on Homerowld2.big, the trinity should always be loaded. (The campaign .bigs are mutually exclusive though.)

I’ve just tried referencing .ship files from all three .bigs in the same mod and it worked perfectly. No .hods and no issues.

Evidence the game loads all three:

Loaded Archive: 'Homeworld2.big'
Loaded Archive: 'UpdateHomeworld2.big'
Loaded Archive: 'HW1Ships.big'
Loaded Archive: 'UpdateHW1Ships.big'
Loaded Archive: 'HW2Ships.big'
Loaded Archive: 'UpdateHW2Ships.big'

Is this some issue when referencing a HW1 ship while playing the HW2 campaign (or vice versa)? When you get the missing .hod error does the log show you’ve loaded the parent archive? Could you actually post a log with the error present? I’m curious to see what’s happening.

Got any steps to reproduce?

Nope, only .hod.

Like I said, you can copy over all the ship files and remove the .hods, and you’ll get a crash. (The missing hod will get logged, yes)
It’s weird that some hods need to be duplicated and some don’t, but either way it should check the default path for them.

And yes, I’m talking about ships across all the .bigs.

And oh, this is doing skirmish vs CPU. I’ll go reproduce it again real quick in a few minutes and edit this or reply again.

edit: Hm okay. This time it doesn’t seem to crash. I know for sure it was crashing after I removed .hod files, and the error was that it couldn’t find a .hod file in the mod’s path. Not sure what to say, now.