[QUESTION] HODOR, RODOH, and other tools?

I supposed that’s what @radar3301 meant (the “campaign select” thingy), but I could be wrong ^^

This.

I was asking if there was a way to avoid this.

I would love to see that re energised if you get round to it :slight_smile:

Install a Maya3 is not that hard… well, if people won’t blame me for putting a download link of a cracked version here…

I probably will, since we could definitely use it in our mod. :slight_smile:

1 Like

We can use an alternative dlc, so the stock campaigns are preserved, but it comes to the same thing - to change campaign you would have to relaunch the game, just like switching between HW1RM campaign and HW2RM campaign requires relaunching.

yes, exacly this I’m afraid :’(

It looks like the campaign button is a hard-coded Lua to C(++) function [“CampainButton()”].

the CampaignButton() function is not hardcoded itself, you can find it in exbutons.lua. It calls another function, NoButton(_name), where _name is “btnCampaign”. The thing is that it doesn’t link to anything after that, so I think the code running behind it is hardcoded.

From experience, as soon as a screen as a defined type in uisettings.lua (type=“SPMissionSelect” in our case), you can be sure that there is harcoded things running into it (or hardcoded linked informations between screen, like for the badge screen which I couldn’t reuse in my rainbow mod)

Actually, I beg to differ. (Edit: I think you might have edited your post before I got finished with mine, or I didn’t read through yours all the way.) The way the Lua bindings work, you can bind a C function to a Lua global “name,” so that Lua can call a C function.

I’d imagine that the “-campaign” flag in the command line basically creates that CampaignButton function in the C side of the program. (I just confirmed that the HW2 Ascension campaign is only accessible via (Update)HW2Campaign.big, and that the only way to load that big file is through the “-campaign ascension” flag.)

Since in normal operation, that function is never bound on the C side of the program into the Lua global namespace, that call in “exbuttons.lua” returns a nil value (as expected), which then binds a function called “CampainButton” into the Lua global namespace from the Lua side.

This is mostly just speculation, but I feel pretty confident in my assumptions. I’m sure @BitVenom (or another dev) could confirm.


Edit: I’m doing quite a bit of C-Lua binding research in my work of creating an updated FXTool; hence my confidence.

don’t know, you’re perhaps right, I’m not a C expert at all ^^

But I’m not so sure because there is clearly a dofilepath(“data:ui/newui/Main/ExButtons.lua”) in the beggining of the file containing the call to CampaignButton(), so the code should look there beforehand. Wherever the hardcoding is, it’s a bad news for us anyway ^^

Yeah, I went all the way up the dofilepath chain and into all referenced files, even did a file content search for “CampainButton” and, other than in the exbuttons.lua file, CampainButton is never defined anywhere else.

Although in the campaign’s override of exbuttons.lua, there is this:

function CampainButton()
	return NewMenuButton("btnCampaign", "$2603", nil, 0, LAYOUT_MENU_BUTTONS, "FEButtonStyle1", nil)
end

I can guarantee you “NewMenuButton” is a hard-coded function just like “addWeaponConfig” is, so I wonder if some of the magic is taking place in the C-side of that “NewMenuButton” function…?


Edit:

NewMenuButton is also defined in ui\newui\styles\hwrm_style\controlconstructors.lua, but even then, the “onMouseClick” function for the CampaignButton is assigned a “nil” value, which tells me there’s some hardcoding funkery going on.

In which file did you find this version of the CampaignButton() ?
There is too many versions of the same files at the moment ! Between all the big file (I’ve looked in dataUpdate), it’s a mess ! :’(

HW2Campaign.big\ui\newui\main\exbuttons.lua

I really need to re-extract all the files in the correct order. I had only done the “core” files before, not the campaign ones, didn’t think there would be UI related stuff in there

I have them all extracted into separate locations… :wink:

… or rather, I extracted lists of the files in each, then extract specific files as needed. :smile:

I know what was my problem… the DataMP.big file in the dataUpdate folder

function CampainButton() return NoButton("btnCampaign") end is actually the default behavior in “exbuttons.lua”

Yep, that’s what I had before my “revelation” ^^