Search the Community
Showing results for tags 'badge'.
-
Feature: I was able to figure out a command that allows the player to say how many days are left for a WX's overcharge to run out. Proof of concept If it's just yourself, you can use this command to let an overcharged WX say how many days are left. ThePlayer.components.talker:Say(tostring(ThePlayer.charge_time/480 .. " days until overcharge runs out")) If it's another player, you can use these two commands to make that specific player say how many days are left for their overcharge. The first command is to get the player list, the second is to make them talk. --This command outputs the numbers associated with players in the in-game chat, since for me, c_listallplayers() does not produce an output if caves are enabled. for i, v in ipairs(AllPlayers) do TheNet:SystemMessage(tostring(i) .. ": " .. v.name, false) end --The overcharge information that the selected player will say, where # is replaced by that character's number. AllPlayers[#].components.talker:Say(tostring(AllPlayers[#].charge_time/480 .. " days until overcharge runs out")) Problem: The issue is that you need to be admin to run these commands, which is inconvenient and not always possible. What I would have liked to have done is to turn this concept into a client-side mod so that this information is displayed on a widget/badge instead it being limited to an admin command. However, when I looked at some other UI mods (nightmare phase indicator, Combined status mod, woodie's beaver timer), I could not wrap my head on how to implement this as I have only extremely basic coding skills. Hence why I'm making this mod request. Thanks! Inspiration for this came from *CarlZalph's post here about how long WX's overcharge lasts under its current recursive function as well as some Mosling shenanigans I was doing.
-
Please Help! How to make a custom bagde! i want to make badge as wunk character badge! thanks!
-
Hello modders! I've been digging around to understand how to add a custom badge to a character. I managed to make it appear on the screen using a code I put in the modmain. I have the widget under scripts/widgets/remorsewidget.lua which I created by copying some of the sanity badge. And put a OnEaten function my character prefab. I come accross many problems tho. First, I can't understand how to put number in the badge. (***I want the number to raise by 10 after eating meat***) Second, how do we change the animation of the badge according to the number above? Third, Haven't been able to reach that point but, I wonder how to launch a sanity delta when the number reaches 100%. I tried something, can someone tell me if it will work? Here what I have so far; there might be some mistakes, still trying to figure things out. Dont know exactly where to put the codes anymore : Modmain : Character : Widget : (from the sanity badge) I hope my questions are clear enough. The badge itself should be simple but I don't know out to solve that. Thanx for helping ! D4rkh0bb1T