in game assets

  • is there anyway to access the in game icons via API ?

    James1bow-owner


    Rising World server's

    (java) Wild Times Gaming

    24.165.197.229:3250

    (Unity) Wild Times Gaming

    24.165.197.229:7254


    Ark Cluster

    24.165.197.229:7778 Lost Island

    24.165.197.229:6668 Ragnarok

    24.165.197.229:5558 Valguero

    24.165.197.229:9998 Fjordur24.165.197.229:8888 Crystal (pvp)



    Join Our Discord

    https://discord.gg/eXfbQ7Ap


    Check Out The Wild Times Gaming (JAVA) Rising World Trello

    https://trello.com/b/gBZudgTP/wtg-plugin


  • Yes, that's possible with the GameImageInformation object (which is derived from ImageInformation). It can be used to reference game textures or icons. Using it is a bit tricky though, because you need to provide the "path" to the game image. By default it tries to look for a "texture" in the "textures.jar" (which is located in "Rising World/data/assets/"), but if you add "Interface/" at the beginning of the path, it looks for the image in the "interface.jar".


    For example, to use the pickaxe icon (which is located in the "interface.jar" under "Interface/Icons/Items/", the file name is "pickaxe_0.png"), the code could look like this:

    Java
    ImageInformation icon = new GameImageInformation("Interface/Icons/Items", "pickaxe_0.png");
  • Yes, that's possible with the GameImageInformation object (which is derived from ImageInformation). It can be used to reference game textures or icons. Using it is a bit tricky though, because you need to provide the "path" to the game image. By default it tries to look for a "texture" in the "textures.jar" (which is located in "Rising World/data/assets/"), but if you add "Interface/" at the beginning of the path, it looks for the image in the "interface.jar".


    For example, to use the pickaxe icon (which is located in the "interface.jar" under "Interface/Icons/Items/", the file name is "pickaxe_0.png"), the code could look like this:

    Java
    ImageInformation icon = new GameImageInformation("Interface/Icons/Items", "pickaxe_0.png");

    thanks for the info, i had noticed the gameimageinformation method, glad to know it works in the icons. one thing i noticed while peaking around the .jars is there is no icons for block's. im guessing these icons are created during runtime using model/ texture? i think i can get around this by layering 2 images. one in the foreground with a blank outline of the blocks and lay said texture underneath. thanks again for all the info the last few month's. its been a big part of this learning experience!

    James1bow-owner


    Rising World server's

    (java) Wild Times Gaming

    24.165.197.229:3250

    (Unity) Wild Times Gaming

    24.165.197.229:7254


    Ark Cluster

    24.165.197.229:7778 Lost Island

    24.165.197.229:6668 Ragnarok

    24.165.197.229:5558 Valguero

    24.165.197.229:9998 Fjordur24.165.197.229:8888 Crystal (pvp)



    Join Our Discord

    https://discord.gg/eXfbQ7Ap


    Check Out The Wild Times Gaming (JAVA) Rising World Trello

    https://trello.com/b/gBZudgTP/wtg-plugin


  • one thing i noticed while peaking around the .jars is there is no icons for block's. im guessing these icons are created during runtime using model/ texture?

    Sorry for the late response, but yeah, the icons for blocks, objects (like furniture) and certain items (e.g. ores) are rendered during runtime, so there is unfortunately no way to access them this way :/

  • Can in-game models for items like pickaxes be accessed in a similar way, so we can use existing item models for custom items without needing to have new model files on the client end? Something like; ModelInformation modelInfo = new ModelInformation( {some path to in-game item model} ).

    I tried something analogous to your GameImageInformation example; i.e. new ModelInformation("Models/Items/Pickaxe/pickaxe_modern.j3o") but that didn't work server side.

  • Can in-game models for items like pickaxes be accessed in a similar way, so we can use existing item models for custom items without needing to have new model files on the client end? Something like; ModelInformation modelInfo = new ModelInformation( {some path to in-game item model} ).

    I tried something analogous to your GameImageInformation example; i.e. new ModelInformation("Models/Items/Pickaxe/pickaxe_modern.j3o") but that didn't work server side.

    i had tried something like this and couldnt get it to work. the only supported model information is .blend and .obj. maybe try importing the model.j3o into the jmonkey sdk and convert in to an obj? not sure if that would help as ive not looked into the jmonkey sdk. my work around was to create a gui to craft a new item and assign in an attribute, then using the playerchangeequiped item eventmethod to check for the attribute and make the changes.

    James1bow-owner


    Rising World server's

    (java) Wild Times Gaming

    24.165.197.229:3250

    (Unity) Wild Times Gaming

    24.165.197.229:7254


    Ark Cluster

    24.165.197.229:7778 Lost Island

    24.165.197.229:6668 Ragnarok

    24.165.197.229:5558 Valguero

    24.165.197.229:9998 Fjordur24.165.197.229:8888 Crystal (pvp)



    Join Our Discord

    https://discord.gg/eXfbQ7Ap


    Check Out The Wild Times Gaming (JAVA) Rising World Trello

    https://trello.com/b/gBZudgTP/wtg-plugin


  • There is unfortunately no way to access the built-in models through the API :( This is planned for the new version though.


    However, the ModelInformation class should support .j3o files, so basically you could extract them from the game files and ship them with your plugin (in terms of copyright, that's totally fine if you're just using them for RW plugins^^). But I haven't tested .j3o loading in a long time, so unfortunately I'm not sure if it still works properly :/

  • Thanks for the responses. Gives me something to work with. :)

    EDIT: So the j3o model loaded just fine, though at size 0.5f it was way too big on screen. lol Adjusting the value helped reign in the model. Not sure how to get it to be one-handed but I'll figure it out. ;)


Participate now!

Don’t have an account yet? Create a new account now and be part of our community!