|
06/26/24, 06:49 PM | #1 | |
Join Date: Apr 2024
Posts: 9
|
Request: dual mount notification
Ok so i got maybe a weird request but ill throw it out anyway hoping its possible (couldn't see in pinned message anything about this).
So what am i looking for. I play a lot with a guild member and we travel a lot on the dual mount. Tough i am sometimes so blind (not literally but...) tgat i dont see correct if the extra player is on mount or left rhe mount (jumping off) to gather node in the world . Is there a way to make a kind of notification message on screen as soon as a player mounts on your dual mount or leaves it? I see a lit is possible with messages on screen... (example crutch alerts and for trials). So i assume its a simple thing, but to be fair i am no programmer so no clue if it's possible . Hoping someone is able to help me have a bit more pleasure playing with dual mount If any more info is needed please ask,ill try to answer as best as i can. Tldr: Notitify big message on screen when other player enters+leaves dual mount. |
|
06/26/24, 07:37 PM | #2 |
I think that would be only possible if you play in a group, and even then both would need to have the same addon active so it can "communicate" via "group sending small data per map pings".
So no easy way to achieve this, no. Kind of a more coplex addon to create. |
|
06/26/24, 08:16 PM | #3 |
|
there is EVENT_MOUNT_INFO_UPDATED in the latest API notes with no description. it is suspiciously possibly able to report personal mount changes but I haven't tested it yet to see what it does. If it does return changes to your mounts state it could be used to sound of an alert imo with a very tiny addon. I'll likely check this out soon as im interested ins soemthing like that as well. If it works ill make a standalone version that does just that or someone else can.
Last edited by sinnereso : 06/26/24 at 08:20 PM. |
06/26/24, 08:40 PM | #4 |
That event EVENT_MOUNT_INFO_UPDATED does not return anything and got neither any parameters-
It's used at the stables to update your mount's data if you buy new bag space, mount speed or stamina. https://github.com/esoui/esoui/blob/...anager.lua#L61 |
|
06/26/24, 09:11 PM | #5 | |
|
|
|
06/27/24, 12:20 AM | #6 | |
Join Date: Apr 2024
Posts: 9
|
Hmmm
I was checking also through addons for if it was already made or something. Then i saw "RidinDirty", that seems to have something to do with mounting to a players mount. So me with my nubcake head went to download it and open the lua to see how and what (And trying to understand it....) Cause it said it had a option to mount on a player their mount. I almost dont understand anything of the code, except a few namings that seems to like to see if the "original" rider has a free spot or not. But like i said, i have no clue how it all works and what is and isnt possible. Thanks anyway for the reply! -- I wanted to send a message to the addon maker of RidinDirty, but just saw the creator already posted here above so that would be no use to ask if the creator had a idea for it ^^* *Also we always play in group if we are together Last edited by tdc-nl : 06/27/24 at 01:28 AM. |
|
06/27/24, 04:26 AM | #7 | |
|
|
|
06/27/24, 05:17 AM | #8 | |
Join Date: Apr 2024
Posts: 9
|
yeah i saw
had typed out a long private message and was about to send it untill i recognized the name haha. Well thanks anyway for looking into it I'll go look if i can request somewhere on their forum a api update or something No clue if they will/can add it but always worth a shot i guess |
|
06/27/24, 05:19 AM | #9 |
I don't have any dual mounts, so I can't test this. Just some thoughts:
1) periodically check "IsGroupMountPassenger" or "IsGroupMountPassengerForTarget" and show an alert, when it changes from true to false 2) periodically check the distance between you and the mounted group member (maybe "GetMapPlayerPosition", "IsUnitInGroupSupportRange" or hook into the out of reach visualisation on the group frames) Not sure if those API functions work. The periodical part could be done once in a second and only while grouped and mounted on a dual mount, which shouldn't affect performance too much. |
|
06/27/24, 06:22 AM | #10 |
There even exist other and better ways "in group" to detect the real distance to the group member (if on the same map/zone. For everything else wookifriseur already mentioned IsUnitInGroupSupportRange e.g.).
But as I said in my initial post: There won't be any easy way to create such an addon! It would need either several libraries that handle that distance and other things (LibMap*), and/or data sharing in group (where both players need the same addon enabled) via LibGroupSocket e.g. Plus checks for IsDead, IsMounted and and and It should be possible to craete such an addon if you have the will and time, but I for myself will not do so as I'm lacking the time and won't create addons for 1 player only (no offense tdc-nl, but your usecase is kind of strange to me. Do you play in 1st person mode and cannot see the passenger behind you because of that? Then maybe use existing addons that change view of sight via a keybind shortly so you get to 3rd person and see if the pessenger is on your mount or not?). If anyone else wants to create such an addon, feel free to spy my FCOAccessibility addon which does group member distance and position checks already. But that was designed for visibly impaired players and thus only works in accessibility mode of ESO. Though the code should be the very same. |
|
06/27/24, 06:37 AM | #11 |
|
i have managed to create my own distance check quite easily but I dont think he needs that.. If its ok with you guys i'll take on this project and make him a standalone version of ridindirty that does just that with a keybind for auto mounting group member in range since I already done all the work for this. Gimmie a day or two cuz I have RL things to tend to atm as well. I've been considering doing this already since it was the original primary function of ridindirty to begin with. I'll call it RidinDirty Lite or something
Last edited by sinnereso : 06/27/24 at 06:44 AM. |
06/27/24, 06:57 AM | #12 |
Well he was not asking for an automount in range addon, but for other features clearly described in his post?
Else I'd have recommanded him your blackbox addon already (not sure though if you can disable all the other non wanted features). So if you just strip that feature out from RidinDirty it is not what he asked for I guess. |
|
06/27/24, 07:19 AM | #13 | |
|
Last edited by sinnereso : 06/27/24 at 07:22 AM. |
|
06/27/24, 08:23 AM | #14 |
|
okm its ready for testing but maybe because its still early I'm unsuccessful at having it disable itself or not load if the main addon RidinDirty is present. They obviously cant run together so I'd like the lite version to just not load if RidinDirty is present.. Suggestions?
I did some googling but only came across disabling functions etc in that scenario which I've used myself but not sure on disabling the entire addon. OK done some testing and appears to be working perfectly but I still need to have the Lite version not load if the main RidinDirty is enabled obviously because of the identicle keybind and will have same feature soon cuz its just kewl Once I get this I think its rdy for upload and he can give it a whirl. Last edited by sinnereso : 06/27/24 at 08:34 AM. |
06/27/24, 08:37 AM | #15 | |
Your problem description does not match what tdc-nl was asking for, I think. But sure, go ahead. It makes sense to put it in your AddOn as it is already doing similar things.
Maybe add RidinDirty as an optional dependency, that way you can be sure RidinDirty is loaded when you load the lite version. And in the lite version you can check if your AddOn tables or functions exist and only create them if they don't exist yet. |
||
06/27/24, 08:42 AM | #16 | |
|
What I'm asking for help with though is how do I have RidinDirtyLite not load if RidinDirty is an enabled addon? Because I intend to add this new functionality to the primary RidinDirty as well. #EDIt after re-reading his request again I see he wanted a big ONSCREEN msg instead of just chat window which I can change easily if the chat window isnt enough. They can let us know here either way. Last edited by sinnereso : 06/27/24 at 08:49 AM. |
|
06/27/24, 08:41 AM | #17 |
1st
In RidinDirtyLite.txt add ## OptionalDependsOn: RidinDirty That will make RidinDirty load first if present 2nd Does your addon RidinDirty have a global variable like RidinDirty? Then check in EVENT_ADD_ON_LOADED callback of RidinDirtyLite: Lua Code:
Or f there is no global like RidinDirty then check in your EVENT_ADD_ON_LOADED callback of RidinDirtyLite Lua Code:
|
|
06/27/24, 09:02 AM | #18 |
|
I cant seem to get that to work but I also think you missunderstood the question. I dont want RidinDirty as a dependency for RidinDirtyLite.
What Id like to know is how do I make RidinDirtyLite NOT load if lets say your FCO addon is enabled for example? I used your FCO addon to eliminate any name confusion for this question There are globals for each as follows: Code:
RidinDirty = { name = "RidinDirty", author = "@sinnereso", version = "2024.06.27", svName = "RidinDirtyVars", svVersion = 1, Code:
RidinDirtyLite = { name = "RidinDirtyLite", author = "@sinnereso", version = "2024.06.27", svName = "RidinDirtyLiteVars", svVersion = 1, Code:
function RidinDirtyLite.AddOnLoaded(eventCode, addOnName) if RidinDirty ~= nil then EVENT_MANAGER:UnregisterForEvent("RidinDirtyLite", EVENT_ADD_ON_LOADED) return end if addOnName ~= "RidinDirtyLite" then return end -- Keybindings -- ZO_CreateStringId("SI_BINDING_NAME_MOUNT_PLAYER", "Mount Group Member") EVENT_MANAGER:UnregisterForEvent("RidinDirtyLite", EVENT_ADD_ON_LOADED) RidinDirtyLite.Initialize()--<< INITIALIZE VARIABLES AND OPTIONS end Last edited by sinnereso : 06/27/24 at 09:17 AM. |
06/27/24, 09:38 AM | #19 | |
If that is not working as you expect either your expectation is different to what you asked, or you got an error in there. If you do not understand what the OptionalDependsOn does and why we said you should do that pelase read the Wiki to understand it further. I cannot describe it better sorry, and wookiefriseur also explained why this has to be done -> load RidinDirty BEFORE RidinDirtyLite so one can check if RidinDirty was loaded as ridinDirty loads afterwards. Hint: SHOW US YOUR TOTAL ADDON's CODE and we maybe able to help. Only posting example and parts of the code is not enough to find actual errors. |
||
06/27/24, 09:51 AM | #20 | |
|
Code:
;------------------------------ DISCLAIMER ----------------------------- ; This Add-on is not created by, affiliated with or sponsored by ZeniMax ; Media Inc. or its affiliates. The Elder Scrolls® and related logos are ; registered trademarks or trademarks of ZeniMax Media Inc. in the United ; States and/or other countries. All rights reserved. ; You can read the full terms at https://account.elderscrollsonline.com/add-on-terms ## Title: |c6666FFRidinDirtyLite|r ## Description: Mount group member multi-rider mount in range and audio / visual notification of being mounted / dismounted! ## Author: @sinnereso ## Version: 2024.06.27 ## APIVersion: 101042 ## OptionalDependsOn: RidinDirty ## SavedVariables: RidinDirtyLiteVars RidinDirtyLite.lua bindings.xml Code:
--------------------------------------------------------- ------- GLOBAL ADDON SETTINGS -- --------------------------------------------------------- RidinDirtyLite = { name = "RidinDirtyLite", author = "@sinnereso", version = "2024.06.27", svName = "RidinDirtyLiteVars", svVersion = 1, logo = "|c6666FF[RDL]|r", errSnd = "PlayerAction_NotEnoughMoney", mailSnd = "New_Mail", queSnd = "GuildRoster_Added", chgSnd = "InventoryItem_ApplyCharge", ultSnd = "Ability_Companion_Ultimate_Ready_Sound", warngSnd = "BG_Countdown_Finish", apSnd = "AlliancePoint_Transact", tickSnd = "Duel_Accepted", eventSnd = "GroupElection_ResultWon", hasPassenger = false, } --------------------------------------------------------- --------- ADDON LOADED -- --------------------------------------------------------- function RidinDirtyLite.AddOnLoaded(eventCode, addOnName) if RidinDirty ~= nil then EVENT_MANAGER:UnregisterForEvent("RidinDirtyLite", EVENT_ADD_ON_LOADED) return end if addOnName ~= "RidinDirtyLite" then return end -- Keybindings -- ZO_CreateStringId("SI_BINDING_NAME_MOUNT_PLAYER", "Mount Group Member") EVENT_MANAGER:UnregisterForEvent("RidinDirtyLite", EVENT_ADD_ON_LOADED) RidinDirtyLite.Initialize()--<< INITIALIZE VARIABLES AND OPTIONS end --------------------------------------------------------- ------- INITIALIZE AFTER ADDON LOADED -- --------------------------------------------------------- function RidinDirtyLite.Initialize() -- Default Account Saved Variables -- local defaultSavedVars = { } RidinDirtyLite.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirtyLite.svName, RidinDirtyLite.svVersion, nil, defaultSavedVars ) EVENT_MANAGER:RegisterForEvent("RidinDirtyLite", EVENT_PLAYER_ACTIVATED, RidinDirtyLite.PlayerActivated) end --------------------------------------------------------- -------- PLAYER ACTIVATED -- --------------------------------------------------------- function RidinDirtyLite.PlayerActivated() RidinDirtyLite.PassengerStateChange() end --------------------------------------------------------- -------- MOUNT SAVED PLAYER -- --------------------------------------------------------- function RidinDirtyLite.MountPlayer() local displayNamePref = nil local isMountable = false if IsUnitDeadOrReincarnating("player") or IsUnitInCombat("player") or IsMounted() or HasPendingCompanion() then PlaySound(RidinDirtyLite.errSnd) df(RidinDirtyLite.logo .. " Unable to mount player right now") return end for iD = 1, GetGroupSize() do local playerID = GetGroupUnitTagByIndex(iD) local playerCharName = GetUnitName(playerID) local playerDisplayName = GetUnitDisplayName(playerID) local mountedState, hasEnabledGroupMount, hasFreePassengerSlot = GetTargetMountedStateInfo(playerDisplayName) if mountedState == MOUNTED_STATE_MOUNT_RIDER and hasEnabledGroupMount and hasFreePassengerSlot then isMountable = true else isMountable = false end if not ZO_ShouldPreferUserId() then displayNamePref = playerCharName else displayNamePref = playerDisplayName end displayNamePref = zo_strformat("<<1>>", displayNamePref)--<< Strip genders if playerDisplayName ~= GetUnitDisplayName("player") and IsUnitOnline(playerID) and IsUnitInGroupSupportRange(playerID) and isMountable and RidinDirtyLite.DistanceToUnit(playerID) < 5.0 then df(RidinDirtyLite.logo .. " Mounting " .. displayNamePref) UseMountAsPassenger(playerDisplayName) return end end PlaySound(RidinDirtyLite.errSnd) df(RidinDirtyLite.logo .. " No player in group mountable") end function RidinDirtyLite.PassengerStateChange()--<< CHECK FOR MOUNTED STATE CHANGE local mountedState, hasEnabledGroupMount, hasFreePassengerSlot = GetTargetMountedStateInfo(GetUnitDisplayName("player")) if mountedState ~= MOUNTED_STATE_MOUNT_RIDER then RidinDirtyLite.hasPassenger = false elseif mountedState == MOUNTED_STATE_MOUNT_RIDER and hasEnabledGroupMount and hasFreePassengerSlot and RidinDirtyLite.hasPassenger then RidinDirtyLite.hasPassenger = false PlaySound(RidinDirtyLite.mailSnd) df(RidinDirtyLite.logo .. " Lost Passenger") elseif mountedState == MOUNTED_STATE_MOUNT_RIDER and hasEnabledGroupMount and not hasFreePassengerSlot and not RidinDirtyLite.hasPassenger then RidinDirtyLite.hasPassenger = true PlaySound(RidinDirtyLite.mailSnd) df(RidinDirtyLite.logo .. " Have Passenger") end zo_callLater(function() RidinDirtyLite.PassengerStateChange() end, 1000) end function RidinDirtyLite.DistanceToUnit(unitID)--<< DISTANCE TO UNITID local _, selfX, selfY, selfH = GetUnitWorldPosition("player") local _, targetX, targetY, targetH = GetUnitWorldPosition(unitID) local nDistance = zo_distance3D(targetX, targetY, targetH, selfX, selfY, selfH) / 100 return nDistance end EVENT_MANAGER:RegisterForEvent("RidinDirtyLite", EVENT_ADD_ON_LOADED, RidinDirtyLite.AddOnLoaded) Code:
<Bindings> <Layer name="SI_KEYBINDINGS_CATEGORY_GENERAL"> <Category name="|c6666FFRidinDirtyLite|r"> <Action name="MOUNT_PLAYER"> <Down>RidinDirtyLite.MountPlayer()</Down> </Action> </Category> </Layer> </Bindings> Last edited by sinnereso : 06/27/24 at 11:11 AM. |
|
ESOUI » AddOns » AddOn Search/Requests » Request: dual mount notification |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|