pencilgame Posted February 27 Report Share Posted February 27 Hello! Hope everyone is having fun. How do you make the contextual tool tip that appears when you hover over blocks? I've read over the wiki, but could have missed it. For example, when you look at a berry bush, it gives you a tool tip that says "right click to harvest" for the player. How do you enable that for a custom block in a mod? I've seen a bunch of mods that have these help items. I can find their text in the en.json language file. Like this. "viesblocks:helpitem-windowbig-2": "Cycle through different variants", But....I can't find where you associate that with a certain block. Is it part of the API? Fine if solution is in C#. What am I missing? Link to comment Share on other sites More sharing options...
Spear and Fang Posted February 27 Report Share Posted February 27 https://github.com/search?q=repo%3Aanegostudios%2Fvssurvivalmod+path%3A%2F^Block\%2F%2F+worldinteraction&type=code Link to comment Share on other sites More sharing options...
pencilgame Posted February 27 Author Report Share Posted February 27 (edited) World Interaction! You're a legend. That link will also be a treasure trove of examples. What a class act. Thank you. For anyone who doesn't have github: https://apidocs.vintagestory.at/api/Vintagestory.API.Client.WorldInteraction.html Edited February 27 by pencilgame 1 Link to comment Share on other sites More sharing options...
Spear and Fang Posted February 27 Report Share Posted February 27 (edited) 11 hours ago, pencilgame said: World Interaction! You're a legend. That link will also be a treasure trove of examples. What a class act. Thank you. For anyone who doesn't have github: https://apidocs.vintagestory.at/api/Vintagestory.API.Client.WorldInteraction.html fwiw, I never direct anyone to the api docs because they are auto-generated and difficult to navigate. And while the Anegostudios github is convenient for pointing people towards and searching, it is missing half of the resources that one might want to look at (and also pretty clunky). Using a decompiler like dnSpy or ILSpy (or Visual Studio has a plug in apparently) is so much better than the other two resources. I use dnSpy myself. Run it, drag and drop all the relevant .dll files into it (i.e. VintagestoryAPI, VintagestoryLib, VintagestoryServer, plus everything in the Vintagestory\mods folder), and Bob's your uncle. Edited February 27 by Spear and Fang Link to comment Share on other sites More sharing options...
Recommended Posts