 |
Category: Unit Frames (Character, Fellowship, Target)Moralebar like New World |
Interface Information |
|
Name: |
Moralebar like New World  |
Author: |
|
Date: |
09-13-2022 02:42 PM |
Size: |
166.77 Kb |
Version: |
1.1.5 |
Rate File: |
|
out of combat
|
|
in combat without powerbar
|
|
in combat with powerbar
|
|
plugin targetbar
|
|
options
|
|
Hello,
this is my first plugin. I hope you like it and it works  .
I tried it only in german client on 1440p and 64 bit.
abstract:
you get a moralebar and powerbar for your chararcter and can disable the original bars. also you get a targetbar. the postiton can be set in height. the bars have a visual effect when you hit or get a hit.
v.1.1.5
- try to fix reportet bugs
- change button label from original moralebar switch
- add a folder to the zip file, for easier copy after extracting
- delete double default settings
v.1.1.4
- first targeting show now the correct value
- added a button to reset the settings
- max. morale change (for example by a buff) change the value
reportet bugs:
v.1.1.3
- edit options panal to switch powerbar on/off (reload the plugin to update the display)
- edit options panal to switch targetbar on/off
- save function saves now the options from all switches
v.1.1.2
- sorry for the mistake. the save function doesn't work in v.1.1.1. now it should.
- added the option to level the height from targetbar
v.1.1.1
- settings can be saved (autosave by unload the plugin)
v1.1.0
Functions:
- added powerbar
- added targetbar
v1.0.0
Functions:
- Moralebar / Vitalbar similar to the bar from New World
Coming soon:
- switch powerbar on/off without reload the plugin
- more usability in the options panal
- the same size from the moralebar for the targetbar as a option
Thanks
|
Archive List (Old Versions) |
File Name |
Version |
Size |
Author |
Date |
|
1.1.4 |
166.34 Kb |
Rocky Malvia |
08-20-2022 05:20 AM |
|
1.1.3 |
166.08 Kb |
Rocky Malvia |
07-29-2022 04:34 PM |
|
1.1.2 |
165.01 Kb |
Rocky Malvia |
07-26-2022 03:31 PM |
|
1.1.1 |
164.72 Kb |
Rocky Malvia |
07-26-2022 01:48 PM |
|
1.1.0 |
167.41 Kb |
Rocky Malvia |
07-25-2022 04:04 PM |
|
1.0.0 |
91.56 Kb |
Rocky Malvia |
10-17-2021 04:43 PM |
File Statistics |
User Rating: |
|
Downloads: |
8103 |
Views: |
22515 |
Favorites: |
4 |
Uploaded By: |
|
Last Modified: |
N/A |
|
|  |
|
 |
|
02-03-2023, 04:26 AM
|
|
The Wary
Forum posts: 0
File comments: 1
Uploads: 0
|
Hello Heiky,
I love this addon too. Your update is great but unfortunnaly it cannot works here.
I get this error ingame :
Quote:
The Lord of the Rings Online\Plugins\ROCKsPlugins\Moralbar\Main.lua:208: 'end' expected (to close 'if' at line 191) near 'elseif'
|
I follow strictly your fix note when i was editing my main.lua
|
|
|
01-14-2023, 07:41 PM
|
|
The Wary
Forum posts: 0
File comments: 2
Uploads: 0
|
Hey Rocky, sorry for the big delay in response.
Thank you for the great effort to make it better.
The fix actually didn't work for me, but my patch still fixes the problem so I think the problem was related with the InCombatChanged callback not being updated. I don't know exactly, but it works.
Unrelated, but I made some changes according to my preferences.
I made the target name opacity always 100% to make it easier for me to read it, and also added the target level after the name.
Other change I did was to the player's vitals, for it to only dim if the player has full morale after leaving combat.
Here's the patch with these changes just in case.
Code:
--- a/main.lua 2023-01-07 19:33:31.373668037 +0100
+++ b/main.lua 2023-01-15 01:32:32.688216339 +0100
@@ -183,9 +183,10 @@
-- load LocalPlayer
player = Turbine.Gameplay.LocalPlayer.GetInstance();
local maxMorale = math.floor(player:GetMaxMorale());
+ local fullMorale = true;
label1:SetText(maxMorale);
- player.InCombatChanged = function()
+ local shouldDimMoralebar = function ()
if player:IsInCombat() == true then
-- set label visibility
label4:SetVisible(true); -- visible
@@ -202,7 +203,7 @@
powerwindow:SetBackColorBlendMode( Turbine.UI.BlendMode.AlphaBlend );
powerlabel4:SetBackColor(Turbine.UI.Color(1, 0, 0, 1));
end
- else
+ elseif fullMorale == true then
-- set label visibility
if (SETTINGS.WINDOWS.POWERBAR == 1) then
powerlabel4:SetVisible(false);
@@ -222,6 +223,11 @@
end
end
+ player.InCombatChanged = function()
+ shouldDimMoralebar();
+ end
+
-- routine by morale change
player.MoraleChanged = function (sender, args)
-- get actualy morale
@@ -235,9 +241,11 @@
-- display Morale
if percentMorale == 100 then
+ fullMorale = true;
label1:SetText(maxMorale);
else
+ fullMorale = false;
label1:SetText(actuMorale .. " / " .. maxMorale);
-- set remain morale label
@@ -265,6 +273,7 @@
startTime = currentTime + 1;
end
end
+ shouldDimMoralebar()
--display percent Morale
label2:SetText(percentMorale .. " % ");
end
@@ -407,6 +416,8 @@
else
--Turbine.Shell.WriteLine("else")
+
+ labelTarget0:SetForeColor(Turbine.UI.Color(1, 1, 1, 1));
local targetName = target:GetName()
-- now test for a function that is defined in the class derived from Entity
@@ -423,6 +434,8 @@
local targetMoraleStr = tostring(targetMorale);
labelTarget1:SetText(targetMoraleStr);
+ local targetLevelStr = tostring(target:GetLevel());
+ targetName = targetName .. " ( " .. targetLevelStr .. " ) ";
local targetMaxMorale = math.floor(target:GetMaxMorale())
if (targetMaxMorale == 0) then
@@ -433,7 +446,7 @@
labelTarget4:SetVisible(false); -- visible
labelTarget5:SetVisible(false); -- visible
-- opaticity change from text labels
- labelTarget0:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
+ --labelTarget0:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
labelTarget1:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
labelTarget2:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
--labelTarget3:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
@@ -453,7 +466,7 @@
labelTarget2:SetVisible(false);
labelTarget4:SetVisible(false); -- visible
labelTarget5:SetVisible(false); -- visible
- labelTarget0:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
+ --labelTarget0:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
labelTarget1:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
labelTarget2:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
--labelTarget3:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
@@ -499,7 +512,7 @@
labelTarget4:SetVisible(false); -- visible
labelTarget5:SetVisible(false); -- visible
-- opaticity change from text labels
- labelTarget0:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
+ --labelTarget0:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
labelTarget1:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
labelTarget2:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
--labelTarget3:SetForeColor(Turbine.UI.Color(SETTINGS.WINDOWS.OPACITY, 1, 1, 1));
@@ -631,6 +644,11 @@
else
Turbine.UI.Lotro.LotroUI.SetEnabled( Turbine.UI.Lotro.LotroUIElement.Vitals, false );
vitalButton:SetText("Off");
+ player.InCombatChanged = function(sender, args)
+ if player:IsInCombat() == false then
+ Turbine.UI.Lotro.LotroUI.SetEnabled( Turbine.UI.Lotro.LotroUIElement.Vitals, false );
+ end
+ end
k = 0;
end
SETTINGS.WINDOWS.ORIGINAL_MORALEBAR = k
I also meant to report an issue with the update of the bar:
Sometimes for the bar to properly update with the target morale, or update to show the textures, it's needed to cancel the target selection and target again for it to work. It would be nice to, maybe, force an update or redraw of the bar so we don't need to re-select the target.
Thanks again. 
Last edited by heiky : 01-14-2023 at 08:25 PM.
|
|
|
10-11-2022, 03:18 PM
|
|
The Wary
Forum posts: 0
File comments: 7
Uploads: 1
|
Hello dreamingxashley,
thank you for your comment.
"I rather like it, I'd like to see an option to turn off the numbers on the bars, and be able to set the transparency to zero so that it only shows up in combat. "
I add a switch to disable the visibility from the morale numbers in the next update. I donīt know which bar do you mean. You can set the visibility from the player moralebar out of combat to off. Then you donīt see the bar out of combat.
Last edited by Rocky Malvia : 10-11-2022 at 03:19 PM.
|
|
|
09-25-2022, 09:33 PM
|
|
The Unscathed
Forum posts: 18
File comments: 48
Uploads: 1
|
I rather like it, I'd like to see an option to turn off the numbers on the bars, and be able to set the transparency to zero so that it only shows up in combat. 
|
|
|
09-04-2022, 03:13 PM
|
|
The Wary
Forum posts: 0
File comments: 7
Uploads: 1
|
Thanks heiky for your comment.
I try to delete the problems this week.
A flexible change for the bars width donīt work easily, because the images for the backround have a fix size. maybe somebody else know a workaround?
Edit: I use the application "LOTRO Plungin Compendium" to install plugins.
Edit 2:
1. I added a folder.
2. I deleted the double default settings.
3. I cant reproduce your problem. try to unload and reload the plugin after changing the options. dont change the options when you in combat.
I have added the line 637.
--Turbine.Shell.WriteLine(k)
delete the "--" save the file and reload the plugin. now you should see the numbers in the chat when you change the options of the original moralebar switch. do you see the numbers 0,1,2,3 after clicking in the same row?
Edit 3:
After uploading and commenting i try it again and now it do the same like you explain. reload the plugin and it should work. i fix the bug in 1.1.6.
Last edited by Rocky Malvia : 09-13-2022 at 03:03 PM.
|
|
|
09-02-2022, 07:07 PM
|
|
The Wary
Forum posts: 0
File comments: 2
Uploads: 0
|
Really good plugin, thanks for creating it.
Some issues I found:
1. When extracting the plugin, the folder Moralbar and file Moralbar.plugin both need to be moved to a folder: ROCKsPlugins that needs to be created.
It would be nice if the folder structure was already extracted as such.
2. There's a couple of duplicate indexes on lines 39 and 40 in the main.lua
DEFAULT_SETTINGS.WINDOWS.ORIGINAL_TARGETBAR and ORIGINAL_MORALEBAR.
Not sure if it's affecting anything though.
3. When changing the Original Morale Switch option:
The OFF option doesn't really work as expected, it hides the original vitals alright but after leaving combat it comes back again.
I think the issue here is that the function hook InCombatChanged isn't updated after cycling from the Inv(2) option, the problem doesn't appear with the On(3) option because it's always showing already, but after cycling back to Off(0) the function stays the same as the Inv option still.
I don't know much of lua but I changed the else block of the vitalButton.Click between the lines 633 and 637 to :
Code:
else
Turbine.UI.Lotro.LotroUI.SetEnabled(Turbine.UI.Lotro.LotroUIElement.Vitals, false);
vitalButton:SetText("Off");
player.InCombatChanged = function(sender, args)
if player:IsInCombat() == false then
Turbine.UI.Lotro.LotroUI.SetEnabled(Turbine.UI.Lotro.LotroUIElement.Vitals, false);
end
end
k = 0;
end
and this band-aid fixed this issue for me for now.
A nice QoL feature I would like to see in the future, if possible, is the option to change the bars width and height from the options window using sliders.
Nice work. I will be using it from now on. 
Last edited by heiky : 09-02-2022 at 07:13 PM.
|
|
|
07-25-2022, 04:08 PM
|
|
The Wary
Forum posts: 0
File comments: 7
Uploads: 1
|
Hello,
thank you for your feedback. I have updatet the plugin. the option to save the position coming soon.
|
|
|
06-19-2022, 02:21 PM
|
|
The Wary
Forum posts: 0
File comments: 8
Uploads: 0
|
Mana Bar
Is there a chance to add a small mana bar right at the bottom of the health bar?
Maybe just a 1/4 size or smaller than health bar, can even be part of the health bar frame, so overall size stays the same.
Also, my bar seems to reset the location as well as the showing of my default player vita every time I log in, anyway to fix that?
Last edited by Eeshen : 06-21-2022 at 08:16 AM.
|
|
|
All times are GMT -5. The time now is 08:35 PM.
|
 |