[IC2 Exp][1.2.5 to 1.12.2] Armour and Tool Status HUD

  • Now updated to Minecraft 1.3 - get version 2.3a if you use MC r1.3.2, or stick with 2.2g if you use MC r1.2.5 (we love Redpower).


    Experimental version out for MC r1.4.2 - see this post (if it works, I'll stick the link here).


    *Another* experimental version out for MC r1.4.6 - see this and grab it. I won't put it on the first post until there's an official IC2 release.


    Release for MC r1.5.1: see v2.5 here.


    Release for MC r1.6.4: see v3.0 here.


    Release for MC r1.7.10: mod version 3.1, see here.


    Release for MC r1.12.2: mod version v3.2, see here.


    Here's my latest abomination - a display on your HUD of your armour and tool charge status. Shows the remaining durability (vanilla and ordinary armours), charge level (electric armours, batpacks, electric jetpacks) or fill level (chemical jetpacks, CF packs) of your currently equipped armour pieces, along with the charge/durability level remaining in your currently equipped tool. Stackable items display their name along with how many items are present in the stack. There is an option to display the item durability/charge as a percentage (accurate to 0.1%), along with the ability to show a snazzy colour-coded graphical overlay which is ultimately inferior to the text display in terms of precision.


    (snip dead picture links)


    Attached are the mod and the source code. Older versions used stub header files in the source which allowed me to access IC2 and Gravitation Suite information. Don't include them in the final mod if you compile your own variant and don't extract them if you've already got the development versions. Newer versions don't have this, but v3.1 includes the APIs for IC2 and Redstone Flux energy in the source for ease of access (likewise, they must also be removed from the final package).


    Version 3.0 added an API for mod developers. Use that to choose what your item displays to the HUD.



    (snip changelog and instructions - download the mod and look in the readme file for this)



    Usage:


    Do whatever you like with this mod and its source - distribute it, stick it in a modpack, learn from it, carve it into pieces and stick in your own code, whatever. All I ask is that you don't distribute modified versions using the same class names and locations (so that we don't end up with conflicts if someone installs both mine and your version at the same time).

  • Awesome!


    Works great on IC² 1.95b. Only the Jetpack shows 96,3% even if it's full charged. But i guess it has nothing to do with your mod.


    Is it maybe possible to change the position of the information? To the lower right corner? I have another mod that's using the upper left corner and i don't want to change it ;)

  • Awesome!


    Works great on IC² 1.95b. Only the Jetpack shows 96,3% even if it's full charged. But i guess it has nothing to do with your mod.


    Is it maybe possible to change the position of the information? To the lower right corner? I have another mod that's using the upper left corner and i don't want to change it ;)

    Should be possible. I'll just filch a bit more of Tooltip's code, slam in a config file and have version 2 up and running in a bit

    GENERATION (Pineapple + i): The first pineapple you see, copy it into your sig on any forum and add sqrt(-1) to the generation. Pineapple experiment.

  • Awesome!


    Works great on IC² 1.95b. Only the Jetpack shows 96,3% even if it's full charged. But i guess it has nothing to do with your mod.


    Is it maybe possible to change the position of the information? To the lower right corner? I have another mod that's using the upper left corner and i don't want to change it ;)

    Done - get version 1.1 from the first post.

    GENERATION (Pineapple + i): The first pineapple you see, copy it into your sig on any forum and add sqrt(-1) to the generation. Pineapple experiment.

  • One more suggestion:
    Text scaling by config / key (now is scaled with minecraft UI right?).

    Dear Lord,
    please grant me the ability to punch people in the face over standard TCP/IP.

  • One more suggestion:
    Text scaling by config / key (now is scaled with minecraft UI right?).

    That's not going to be a simple change. As it is renderStringWithShadow (the Minecraft function which I call to display text) doesn't offer any kind of option to change its size. And I can't call the character rendering code from FontRenderer directly, since they are private member functions and hence inaccessible to anything that's not from Minecraft's FontRenderer class (also, they appear horribly difficult to figure out, since MCP hasn't got very far with deciphering the internals of FontRenderer and I know nothing about OpenGL programming). Right now, I don't think that I'd be able to change the text size independently of the GUI (shame, since I *would* like it to be smaller). If you know of any examples of configurable text size in mods, tell me and I'll see if I can learn anything from them.

    GENERATION (Pineapple + i): The first pineapple you see, copy it into your sig on any forum and add sqrt(-1) to the generation. Pineapple experiment.

  • Done - get version 1.1 from the first post.


    Thank you! Now im totally happy!



    Edit: Nah, it needs a little bit more tweaking. Just tested the config file and the status is only in the upper right corner correct displayed.
    The others corners miss some information.


    Position: 2


    Position 3:


    Position: 4


    The default upper right corner ->


    Position: 1

  • Edit: Nah, it needs a little bit more tweaking. Just tested the config file and the status is only in the upper right corner correct displayed.
    The others corners miss some information.

    Fixed. Nice one spotting the bug,


    cant see the screenshots, the OP must use imgur

    Imageshack works just fine for me (anyone else having problems seeing the images). What makes imgur special?

    GENERATION (Pineapple + i): The first pineapple you see, copy it into your sig on any forum and add sqrt(-1) to the generation. Pineapple experiment.

  • May I suggest making it a bit like this ? It would be really cool.

    The forum won't let me specify my gender accurately, so I'll just use my signature to say that I go by they/them pronouns.

  • May I suggest making it a bit like this ? It would be really cool.

    Holy crap, an aviation HUD. I've got a while to go before I can make something that neat, I'm afraid. Hell, we're probably better off it the author of that mod takes my code and uses it to improve his stuff.

    GENERATION (Pineapple + i): The first pineapple you see, copy it into your sig on any forum and add sqrt(-1) to the generation. Pineapple experiment.

  • Hell, we're probably better off it the author of that mod takes my code and uses it to improve his stuff.

    Do you know japanese? No? Then we have a problem. That's the actual reason why I suggested this - the mod is on a japanese forum and I don't know if it is updated to 1.2.5.
    But you could at first improve the look of your HUD to something like this:


    The most important things are the lines! (Sorry for the bad picture, it's just a draft)
    The tool you are holding should have such a line to the text with the required information.


    Thanks for reading!

    The forum won't let me specify my gender accurately, so I'll just use my signature to say that I go by they/them pronouns.

  • AWW YEAH! No more running out of fuel mid-flight. :thumbup: :thumbup:

    1. OMG CREEPER RUN AWAY!
    2. Go away, you creeper wierdo!
    3. What ever, I'll just go around.
    4. Hup, over their heads I go!
    5. Okay Mister living grenade, I'm going to knock you into those skeletons, and I'll follow through with a nano saber. Understood? FOR THE ALMIGHTLY DRAGON LORD!

  • Do you know japanese? No? Then we have a problem. That's the actual reason why I suggested this - the mod is on a japanese forum and I don't know if it is updated to 1.2.5.
    But you could at first improve the look of your HUD to something like this:


    The most important things are the lines! (Sorry for the bad picture, it's just a draft)
    The tool you are holding should have such a line to the text with the required information.


    Thanks for reading!

    Well, I suppose that I'd better get working on it. Looks like I've got a busy weekend ahead of me...

    GENERATION (Pineapple + i): The first pineapple you see, copy it into your sig on any forum and add sqrt(-1) to the generation. Pineapple experiment.

  • Well, I suppose that I'd better get working on it. Looks like I've got a busy weekend ahead of me...

    I guess this is worth a

    The forum won't let me specify my gender accurately, so I'll just use my signature to say that I go by they/them pronouns.

  • I guess this is worth a

    Hold your horses there - it's not done yet. I've never done anything involving OpenGL texturing before (that's what this is going to need), so I'm going to have to climb a bit of a learning curve first...

    GENERATION (Pineapple + i): The first pineapple you see, copy it into your sig on any forum and add sqrt(-1) to the generation. Pineapple experiment.