[Question][RM] Campaign loading - RESOLVED

This may be out of the current scope, but seems worth asking anyway. Is there a trick to loading campaigns? I’ve got a \leveldata\campaign\Pirates.campaign and a \leveldata\campaign\Pirates\ with levels in it, and I added -campaign Pirates to my shortcut, but to no avail. Do I have to do something deeper to get the campaign button to pop up?

Edit: Oh yeah, and the campaign worked in Classic(overwriting the stock filenames instead of being it’s own), and there’s no errors in the log

Just copy over the file “ui/newui/main/exbuttons.lua” from HW1Campaign.big to your mod and the button should show up.

That gets the button but the game crashes when ever I try to load the campaign.

Hopefully you’ll have more luck than I did.

thanks for the tip, I’ll have to do some experimenting.

You might try using the -dlccampaign commandline argument to load your .big file. For example, for loading the HW2 campaign the launcher uses:

-dlccampaign HW2Campaign.big -campaign Ascension -moviepath DataHW2Campaign

EDIT: Also for this to work for mods from the Launcher, we probably need to add a new option to the config.txt file used by the WorkshopTool to specify commandline arguments that are specific to this mod. So for example, if your mod requires “-dlccampaign”, you could add that to the config.txt and the Launcher would know to append that to the arguments when running the game. Right now, everything is hard wired to use “-workshopmod” to launch with a specific .big file.

1 Like

I got it to work by using -DLCCampaign HW2Campaign.big -campaign Ascension and overwriting the Ascension campaign with my files, though I didn’t have any luck using another campaign name.

Those config options would be nice. Would it be hard to make an in-game campaign selection UI and have mods load all the campaigns included in their .big file? Certain long term plans I have would be made a lot smoother that way.

So I ran a bunch of tests and here are the results.

Custom folder contains a mod with a campaign named custom. It was compressed into Custom.big

HW1Campaign contains the extracted contents of HW1Campaign.big

Hopefully these are helpful to someone

Good testing. From that I suspect that the current engine can be coaxed into working how I want it to, localization issues aside, I just need to dig into the stock campaign archives to figure out exactly how.

I found it!

In addition to “ui/newui/main/exbuttons.lua”, “defprofile/playercfg.lua” from Homeworld2.big is also needed. A modification is needed to that file. Near the top there is a line ascension = {. Change ascension to the name of your campaign and you’re good to go.

Oh cool! Thanks for doing the legwork there, I’ll definitely test that and see what I can do with it.

No problem. I was looking into it for my own purposes, but I’m glad I could help someone out.

Okay. This method works! That’s good. AND! So long as they’re all listed in the playercfg.lua, you can have multiple campaigns in the same mod! You can’t switch between them in-game, which is inconvenient, but just being able to have them included in the same archive without using multiple.big files is a huge step up.