Skip to content

skill names being missing from the .info menu #100

@ted182

Description

@ted182

Description

On a newly compiled server, when running the .info command, some skill names do not appear in Gump.

Image

Problem identified: insufficient width in the cropped text of the skill name (70px).
The skills that are not appearing have the longest KEYs in the game (13-15 characters). The UO client's bitmap font uses ~8-9px per character — "MagicResistance" would need ~120px, but the field is only 70px. When the text exceeds the width, the UO client simply renders nothing (cropped text behavior).
Confirms the pattern: skills 7, 14, 16, 26, and 40 have 13-15 characters. Skill 44 (Lumberjacking, 13 characters) is probably also breaking but hasn't been noticed yet.

Solution:

/scripts/core/dialogs/d_charprop.scp
before:   
dcroppedtext <eval 45+((<LOCAL._FOR>/20)160)> <eval 35+((<LOCAL._FOR>%20)20)> 70 20 2048 <STRSUB(<SERV.SKILL.<LOCAL._FOR>.KEY>,0,9)>
after:      
dcroppedtext <eval 45+((<LOCAL._FOR>/20)160)> <eval 35+((<LOCAL._FOR>%20)20)> 70 20 2048 <STRSUB 0 9 <SERV.SKILL.<LOCAL._FOR>.KEY>> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions