Go to Page... |
|
Thread Tools | Display Modes |
|
12/22/15, 03:22 PM | #1 | ||
Wandamey
Guest
Posts: n/a
|
edit cross post with SMDK if you wait 5 mn, i'm sure votan will help with a tested version of bait listing by id and something like this : local fakeitemLink = zo_strformat(|H0blablabla<<1>>blablabla|h|h, baitId) <---build an ItemLink with no name zo_strformat(<<1>>,GetItemLinkName(fakeitemLink)) <-- get localized name - format or not depending on the value returned by GetFishingLureInfo or format both the same to compare (all you need to do this is in fisherman, file Baits.lua btw : all ids, the localized name function too) but i think you are able to simply make a table lure[itemId] = lureindex, i'm pretty sure these indexes are stable because of the selection wheel. re edit : you are using local lureIndex = GetFishingLure() at first? It probably just return the index of the current lure on the rod? not sure. but anyway you are using it as the indice 2 lines later. Doesn't seem needed at all. Last edited by Wandamey : 12/22/15 at 03:53 PM. |
||
Wandamey |
12/22/15, 04:13 PM | #2 | |
Lua Code:
Edit: You are right about the local lureIndex = GetFishingLure() I just copied from circonian's example lol. Last edited by SnowmanDK : 12/22/15 at 04:17 PM. |
||
12/22/15, 04:38 PM | #3 | |
Wandamey
Guest
Posts: n/a
|
I was thinking you could avoid the loop by using the indexes directly, though it may look cleaner, it would bring nothing since you update all the values at the same time.
your way is more resistant against indexes variations too. Don't mind what i said. |
|
Wandamey |
12/22/15, 04:48 PM | #4 | |
Now I just need an event that is fired when I OPEN my map (by pressing 'M'). As it is now, it counts every time there is ANY change in my bag, which causes lag. I did look into votan's example using Lua Code:
Last edited by SnowmanDK : 12/22/15 at 04:50 PM. |
||
12/26/15, 09:37 PM | #5 | |
|
Lua Code:
As for the map change talk...it seems like you only need this info for the map pin tooltip so why not just do it in the creator? Map pin tooltips are re-created everytime they are shown, so your bait count update code would only have to run when a tooltip is shown, which sounds like the only time you need the updated count. Also that way you would not have to re-check the counts for all of the types of baits. Since you would know which map pin the tooltip is for, you know which baits you are wanting to display and you only have to update those bait counts. Add a lures table to your pin tag to hold the usable lureIndices: Lua Code:
Then instead of creating the string {3/1/71} for counts in FishpinTypeCallback, just determine which lureIndex is usable in that water and put those lure indices in the lures table in the tag. Lua Code:
Do the lure counts in the tooltip creator Lua Code:
Last edited by circonian : 12/26/15 at 11:12 PM. |
|
ESOUI » Developer Discussions » General Authoring Discussion » How to detect when I have used some bait |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|