Sign in to follow this  
Arathok

Damage Warning for Items.

Recommended Posts

Made a little QoL mod.


Gives a popup when one of your items is above 90% Damage

If you want to get a reminder popup on your item when it is about to break, right click the item in question and select "Toggle Dam. Warn." Gives you a popup that looks something like this:

image

 

INSTALLATION:

1. Download it from GitHub: github.com/Arathok/Wurm-Unlimited-Item-Damage-Warning/releases/latest

2. This is a Server mod. Extract the contents of the Zip file to your mods folder of your Wurm Server Launcher.

Edited by Arathok
  • Like 2

Share this post


Link to post
Share on other sites

This is cool. Is it configurable?  For example, can we choose to get a warning at 50% damage?

  • Like 1

Share this post


Link to post
Share on other sites
On 15/04/2023 at 14:44, Batta said:

This is cool. Is it configurable?  For example, can we choose to get a warning at 50% damage?

 

It is alive! Made a new update for the Item Damage Warning Mod.
Now you get a nice popup that lets you select at which damage you want to get warned about the items condition and how.
You can either get a sound warning and a blinking chat message (Thanks for the strict but honest critique @Finnn) or that AND a red glaring Info-Message.

The Mod also keeps memory about the tagged items even after a shutdown or crash.

Action:
Action

 

Settings:
Screenshot 2023-04-16 203908

 

Result/s

result

  • Like 1

Share this post


Link to post
Share on other sites

This looks great, unfortunately I get...

 

Incoming RMI is disabled
[12:04:38 PM] SEVERE org.gotti.wurmunlimited.modloader.server.Listeners: ServerStartedListener handler for mod ItemDamageWarning failed
java.lang.RuntimeException: java.lang.IllegalAccessException: Can not set static final [Lcom.wurmonline.server.behaviours.ActionEntry; field com.wurmonline.server.behaviours.Actions.actionEntrys to [Lcom.wurmonline.server.behaviours.ActionEntry;
        at org.gotti.wurmunlimited.modsupport.actions.ModActions.registerAction(ModActions.java:70)
        at org.arathok.wurmunlimited.mods.itemDamageWarning.TurnDamWarnOnPerformer.<init>(TurnDamWarnOnPerformer.java:35)
        at org.arathok.wurmunlimited.mods.itemDamageWarning.DamWarnBehaviour.<init>(DamWarnBehaviour.java:24)
        at org.arathok.wurmunlimited.mods.itemDamageWarning.ItemDamageWarning.onServerStarted(ItemDamageWarning.java:86)
        at org.gotti.wurmunlimited.modloader.server.ServerHook.lambda$fireOnServerStarted$2(ServerHook.java:81)
        at org.gotti.wurmunlimited.modloader.server.Listeners.lambda$fire$0(Listeners.java:63)
        at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891)
        at org.gotti.wurmunlimited.modloader.server.Listeners.fire(Listeners.java:61)
        at org.gotti.wurmunlimited.modloader.server.ServerHook.fireOnServerStarted(ServerHook.java:81)
        at org.gotti.wurmunlimited.modloader.server.ProxyServerHook$1$1.invoke(ProxyServerHook.java:57)
        at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
        at com.wurmonline.server.ServerLauncher.runServer(ServerLauncher.java)
        at com.wurmonline.server.gui.WurmServerGuiController.startGame(WurmServerGuiController.java:1397)
        at com.wurmonline.server.gui.WurmServerGuiController.startOfflineBtnClicked(WurmServerGuiController.java:164)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
        at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1771)
        at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Node.fireEvent(Node.java:8411)
        at javafx.scene.control.Button.fire(Button.java:185)
        at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
        at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
        at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
        at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
        at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
        at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
        at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$353(GlassViewEventHandler.java:432)
        at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431)
        at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
        at com.sun.glass.ui.View.notifyMouse(View.java:937)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalAccessException: Can not set static final [Lcom.wurmonline.server.behaviours.ActionEntry; field com.wurmonline.server.behaviours.Actions.actionEntrys to [Lcom.wurmonline.server.behaviours.ActionEntry;
        at sun.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:76)
        at sun.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:80)
        at sun.reflect.UnsafeQualifiedStaticObjectFieldAccessorImpl.set(UnsafeQualifiedStaticObjectFieldAccessorImpl.java:77)
        at java.lang.reflect.Field.set(Field.java:764)
        at org.gotti.wurmunlimited.modloader.ReflectionUtil.setPrivateField(ReflectionUtil.java:65)
        at org.gotti.wurmunlimited.modsupport.actions.ModActions.registerAction(ModActions.java:68)
        ... 83 more

 

Share this post


Link to post
Share on other sites

Sorry for getting bugs! Lets look into it! Is this the latest version of ItemDamageWarning? And did you use any version of DamageWarning before?

EDIT: Found some initialisation bug and made a new release!
https://github.com/Arathok/Wurm-Unlimited-Item-Damage-Warning/releases/tag/3.1

Weird how it works on my machine anyway xD Thanks for finding and reporting the bug!

Edited by Arathok

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this