• 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!

Solved Updating the Interface Textures

Continuing from the post here.

When I centered the skill separator I did so by changing the coordinates in PROGRAM\INTERFACE\character.c, but the proper way to do it is to actually center the separator in the RESOURCE\Textures\FONTS\interface bold numbers.tga.tx texture file itself. These changed coordinates cause a compatibility issue in the various New Horizons versions since they use different texture files.

To do this properly and prevent this particular compatibility issue from continuing I have now changed the separator in the texture file to more closely match the numbers and centered it, and reverted the coordinates to how they were.

If the separator is now too dark in the interface, the 1 in ChangeStringColor(stringname,SetAlphaIntoColor(COLOR_MONEY,GetAlphaFromSkill(1))); in SetSkillShow() can be changed to another value from 1 to 10 such as 5 or 10 or even follow along with modval (the value on the right).

bluearrows.jpg blue5.jpg blue10.jpg bluemodval.jpg bluepercent.jpg
brownarrows.jpg brown5.jpg brown10.jpg brownmodval.jpg brownpercent.jpg
 

Attachments

  • correctedskillseparator.zip
    42.7 KB · Views: 25
If I understand correctly, the separator was previously lowered by changing coordinates in "character.c", which causes trouble in other versions of NH. The new fix puts the coordinates back where they were and lowers the separator in the font texture. But the new texture also makes the separator darker.

If changing values in "character.c" caused problems with other NH's before, correcting the separator brightness by changing something in "character.c" would seem to risk doing it again. Better would therefore be to make the separator as bright as the original in the texture. If you can do that, I'll add it into the next update. Otherwise, my quick'n'dirty fix was simply to make a version of the original font texture with the separator lowered by 2 pixels. That, along with your corrected "character.c", produced an interface screen identical to the one produced by the current "character.c" and texture.
 
If I understand correctly, the separator was previously lowered by changing coordinates in "character.c", which causes trouble in other versions of NH. The new fix puts the coordinates back where they were and lowers the separator in the font texture. But the new texture also makes the separator darker.
Correct.

If changing values in "character.c" caused problems with other NH's before, correcting the separator brightness by changing something in "character.c" would seem to risk doing it again. Better would therefore be to make the separator as bright as the original in the texture. If you can do that, I'll add it into the next update. Otherwise, my quick'n'dirty fix was simply to make a version of the original font texture with the separator lowered by 2 pixels. That, along with your corrected "character.c", produced an interface screen identical to the one produced by the current "character.c" and texture.
Not quite. What I wrote here is only applicable to Build 14:
If the separator is now too dark in the interface, the 1 in ChangeStringColor(stringname,SetAlphaIntoColor(COLOR_MONEY,GetAlphaFromSkill(1))); in SetSkillShow() can be changed to another value from 1 to 10 such as 5 or 10 or even follow along with modval (the value on the right).
BNH, MNH, and the new NHRE use different textures, so this potentially too dark separator only exists in this texture file I uploaded. I reverted the coordinates so that all versions can have the same baseline coordinates, or else the other versions get an incompatibility due to a coordinate change that was only intended for Build 14, as mentioned on the Discord server. All versions now use their own different character.c and texture files, so with this change there hopefully won't be another incompatibility with this.

As for the separator itself, there are reasons for why I made it the way it is. First of all it is now exactly centered in the texture file:

W13H14.jpg

Thinner looked too thin in-game, and thicker looked too thick in-game.

It is made from this part of the "4":

4.jpg

This is so it has similar shading as the numbers.

Its length is center for all numbers as closely as possible, as shown here with the "8":

8.jpg

So, since it is now literally made from the numbers and has the same transparency as a skill value of "1", that might appear as too dark in-game, and if so, any change in ChangeStringColor(stringname,SetAlphaIntoColor(COLOR_MONEY,GetAlphaFromSkill(1))); will only affect Build 14 since the other versions now have different files.

Of course, obviously this also means that Build 14 can keep its current character.c and interface bold numbers.tga.tx files since the different versions now have different files, but I figured they should have the same baseline coordinates and that it could be desirable to have Build 14's separator more closely match the numbers and actually be centered in the texture file itself.
 
Of course, obviously this also means that Build 14 can keep its current character.c and interface bold numbers.tga.tx files since the different versions now have different files, but I figured they should have the same baseline coordinates and that it could be desirable to have Build 14's separator more closely match the numbers and actually be centered in the texture file itself.
Running a comparison check between the Build 14 and Build 15 versions of "character.c", there are a lot of differences but none of them are coordinates. Apart from some lines which differ in nothing apart from formatting, the real differences are in the way they handle the character name (Build 14 has been upgraded to better handle characters with single names such as "Blackbeard"). Changing the coordinates in Build 14's version of "character.c" would therefore introduce a further difference.

The new separator looks nice but I'd still prefer it to be brightened up to match the original, and if Build 14 is keeping the original coordinates to match Build 15 then the separator needs to be moved up so that "character.c" can move it down to the centre position.
 
Here are the separator's coordinates in B15:
C-like:
    CreateString(true,SKILL_LEADERSHIP+"_SEP","",FONT_BOLD_NUMBERS,COLOR_NORMAL,543,46,SCRIPT_ALIGN_CENTER,1.0);
    CreateString(true,SKILL_FENCING+"_SEP","",FONT_BOLD_NUMBERS,COLOR_NORMAL,543,80,SCRIPT_ALIGN_CENTER,1.0);
    CreateString(true,SKILL_SAILING+"_SEP","",FONT_BOLD_NUMBERS,COLOR_NORMAL,543,114,SCRIPT_ALIGN_CENTER,1.0);
    CreateString(true,SKILL_ACCURACY+"_SEP","",FONT_BOLD_NUMBERS,COLOR_NORMAL,543,148,SCRIPT_ALIGN_CENTER,1.0);
    CreateString(true,SKILL_CANNONS+"_SEP","",FONT_BOLD_NUMBERS,COLOR_NORMAL,543,182,SCRIPT_ALIGN_CENTER,1.0);
    CreateString(true,SKILL_GRAPPLING+"_SEP","",FONT_BOLD_NUMBERS,COLOR_NORMAL,543,216,SCRIPT_ALIGN_CENTER,1.0);
    CreateString(true,SKILL_REPAIR+"_SEP","",FONT_BOLD_NUMBERS,COLOR_NORMAL,543,250,SCRIPT_ALIGN_CENTER,1.0);
    CreateString(true,SKILL_DEFENCE+"_SEP","",FONT_BOLD_NUMBERS,COLOR_NORMAL,543,284,SCRIPT_ALIGN_CENTER,1.0);
    CreateString(true,SKILL_COMMERCE+"_SEP","",FONT_BOLD_NUMBERS,COLOR_NORMAL,543,318,SCRIPT_ALIGN_CENTER,1.0);
    CreateString(true,SKILL_SNEAK+"_SEP","",FONT_BOLD_NUMBERS,COLOR_NORMAL,543,352,SCRIPT_ALIGN_CENTER,1.0);
If that's not what you're seeing, then you have an older version or Hammie forgot to include the update.
EDIT: I just got confirmation that Hammie did indeed forget to include the update.

B15 and the other NH versions such as NHRE got an incompatibility issue due to inheriting my B14-specific change, but since the other NH versions use different texture files, that caused their separators to be too far down. I therefore now reverted the coordinates for B14 as well, and implemented a proper solution to the underlying problem by centering the actual texture in its file and I never should have changed the coordinates in the first place. The reason I did so is because I didn't anticipate that other NH versions would make changes. Reverting the coordinates to how they were gives B14, B15, and other versions baseline coordinates instead of having a B14-specific change, and the other NH versions have since diverged from B14 in things like coordinates and textures.

As always, everyone can use whatever they prefer. Changing the separator's brightness in B14's texture file would make it inconsistent with the numbers in the file, so therefore, for Build 14, the way to change its in-game brightness would be by changing the 1 in ChangeStringColor(stringname,SetAlphaIntoColor(COLOR_MONEY,GetAlphaFromSkill(1))); in character.c to another value from 1 to 10 such as maybe 5 or maybe even modval as I mentioned previously.
 
Last edited:
Back
Top