• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Modding - BattleInterface scaling

liam1

Landlubber
Hello

Back with some more UI scaling headaches :)

First off I'm using Hook's mod and everything below has been done by modifying his BattleInterface.c file.
I'm perfectly capable of making changes through trial and error but I don't really understand exactly what is going on under the hood, this becomes apparent later in this post.

I'm now working on getting TEHO UI looking nice in 4k.
Done really well so far, except I've hit a stumbling block, see image below:

I've doubled the size of the ShipIcon from 256x256 to 512x512
And I've managed to move everything to fit except the glaringly obvious problem.

I've narrowed these two bits of text down to lines 1830 - 1836 in BattleInterface.c
Code:
    BattleInterface.ShipIcon.sailorfontid            = "interface_normal";
    BattleInterface.ShipIcon.sailorfontcolor        = argb(255,255,255,168); //argb(255,255,255,255);
    BattleInterface.ShipIcon.sailorfontscale        = 2.2;

    BattleInterface.ShipIcon.shipnamefontid            = "interface_normal";
    BattleInterface.ShipIcon.shipnamefontcolor        = argb(255,255,255,255);
    BattleInterface.ShipIcon.shipnamefontscale        = 2.2;

Now unlike every other element in the UI that I've faced so far there is no "offset" or x and y positioning values for this.
And so my question reveals itself;
Simply, how can I modify the position of these text values?
More deeply and frankly, less important if the above can be answered simply, I've tried adding in "sailoroffset" manually, following the format of all other elements inside this section but I don't understand how the game knows to look for "shiphpoffset", for example, but not "sailoroffset".
 
Looks like you are out of luck for that. I checked the source and I see those offsets are hardcoded into the engine, with no way to change/override. With that knowledge, I'm going to change that in my version so they are configurable.
 
Back
Top