Tetahydril
Terrarian
Hello!
I am trying to make a mod for the community to export certain player values (especially health and mana stats) live from ingame values in order to use them in outside projects (for example an LED Health or mana bar).
I have already tried different methods, especially Tesseract OCR in order to read health values directly by looking at the numbers displayed by the health bar and converting them to external values, making it cross-compatible with other games that display numbers with a health bar. I also tried to read the color values of the health bar, but both turned out to be failures since
1. the OCR had a high rate of failure to properly read the characters and produced a lot of lag
2. Some mods and the life fruit upgrades change the color of the health bar which produced nonsense values. (I could hardcode the color values but that doesn't really solve the problem in hindsight)
Right now I am looking into .plr files to see if they contain only the static health and mana values or the usable temporary health values.
But heres the problem: I tried to open player files with notepad++ and tried every programming language installed including C but I couldn't gather any usable data from there. Also sadly, I tried using online and offline character editors but most don't display current health and are not compadible with modded items.
Therefore I ask:
1) Is the temporary player health and mana stored in the player files (if so, in which? the .bak files; the .tplr files or the .plr files?)
1.5) Is there a reliable and fast way to convert those files into a readable text file?
2) is there a way to generate a temporary text file containing the Health and mana data of the character in real time?
3) Can somebody give me Ideas that I have missed / Is there another way?
I would really appreciate any help and thank you for taking your time!
I am trying to make a mod for the community to export certain player values (especially health and mana stats) live from ingame values in order to use them in outside projects (for example an LED Health or mana bar).
I have already tried different methods, especially Tesseract OCR in order to read health values directly by looking at the numbers displayed by the health bar and converting them to external values, making it cross-compatible with other games that display numbers with a health bar. I also tried to read the color values of the health bar, but both turned out to be failures since
1. the OCR had a high rate of failure to properly read the characters and produced a lot of lag
2. Some mods and the life fruit upgrades change the color of the health bar which produced nonsense values. (I could hardcode the color values but that doesn't really solve the problem in hindsight)
Right now I am looking into .plr files to see if they contain only the static health and mana values or the usable temporary health values.
But heres the problem: I tried to open player files with notepad++ and tried every programming language installed including C but I couldn't gather any usable data from there. Also sadly, I tried using online and offline character editors but most don't display current health and are not compadible with modded items.
Therefore I ask:
1) Is the temporary player health and mana stored in the player files (if so, in which? the .bak files; the .tplr files or the .plr files?)
1.5) Is there a reliable and fast way to convert those files into a readable text file?
2) is there a way to generate a temporary text file containing the Health and mana data of the character in real time?
3) Can somebody give me Ideas that I have missed / Is there another way?
I would really appreciate any help and thank you for taking your time!