Go to Page... |
Thread Tools | Display Modes |
12/22/15, 05:33 PM | #21 | ||
Wandamey
Guest
Posts: n/a
|
maybe /zgoo mouse or /zgoo SCENE while on a map and browse around to find that map "panel" name that begins with ZO_ it's a bit frustrating to not be able to load a char... circonian? help? OK this time I go to bed for real. gn8 Last edited by Wandamey : 12/22/15 at 05:36 PM. |
||
Wandamey |
12/22/15, 05:39 PM | #22 | |
I can tell that /zgoo mouse returned GetName()= "ZO_WorldMapContainer" GetOwningWindow()= "ZO_WorldMap" GetParent()= "ZO_WorldMapScroll" |
||
12/22/15, 05:42 PM | #23 | |
Wandamey
Guest
Posts: n/a
|
I lied, i looked into a map mod instead of going to bed and found ZO_WorldMap too
try ZO_PreHookHandler(ZO_WorldMap, "OnShow", UpdateBaitsCount) and if it works it will be the one line function that does all of what you dreamt and now i think i can sleep |
|
Wandamey |
12/22/15, 06:37 PM | #24 | |
|
Lua Code:
|
|
12/23/15, 01:46 PM | #25 |
First, merry christmas, happy hanuka, or whatever
With the great help from all you guys, then I ended with what I think is my final code. I may no have used what you all suggested, but you still inspired me function: Lua Code:
Lua Code:
|
|
12/23/15, 05:36 PM | #26 | |
Wandamey
Guest
Posts: n/a
|
don't forget this local name, icon, stack, sellPrice, quality = GetFishingLureInfo(lureIndex) before using the stack variable. And idk what happens in refresh pins, if you refresh your data there or not, but in case, as the call is already done to count the stacks in this loop, you might as well update your saved variables right away (with the name and icon check) for the next check. You'll have to do it at some point and the call is done so... Beside these are very small loops and in UI mode it's not like you're looting zombies in the middle of a swarm. also, if i lose 2 worms and find 2 minows, it wont update. but i'm not sure what you are displaying though : the total number of baits? or the total for this water type? or each type amout for the water? |
|
Wandamey |
12/24/15, 07:50 AM | #27 | |
It always does it's initial count on player load, so that part is covered. In regards to the chance of getting 2 of one bait and loosing 2 of another, then you are right. The chance of that happening is small, but I guess I should count them individually. Thanks for the tips My pins show this (example, depending on settings in Destinations. They can all be toggled) achievement name rare fish name (the fish names can be only the ones missing, OR all for the acheivement) rare fish name rare fish name water type (foul, ocean etc.) optimal primary bait name/optimal rare bait name primary bait left/rare bait left/simple bait left (if any) |
||
12/25/15, 04:16 AM | #28 | |
Lua Code:
|
||
12/25/15, 10:20 AM | #29 | |
Don't know if I did something wrong. Maybe it is because I had already previously opened the map in that zone? |
||
12/25/15, 12:22 PM | #30 | |
It would be very odd, if the scene state would not change, if you press 'M'. |
||
12/25/15, 01:25 PM | #31 | |
Wandamey
Guest
Posts: n/a
|
hi guys, merry Christmas!
and yup that should have worked, but maybe the issue wasn't the callback when you tried last page, Snowman, but the value you are using to update your pins : last of your (posted) code, you say your count is updated on player activated (and probably map changed too?), but when you check if the count has changed in what you wrote, nowhere you are updating the new value to use it on the refreshed pins As I said idk what happens on refresh pins, but as it seems to be from a lib I assume the new value is not calculated there. maybe that was what prevented the update on state change and made you have to change the shown map to update your values. |
|
Wandamey |
12/26/15, 03:38 PM | #32 | |
The code for re-reading the bait amounts are included in that part (as I have had issues with too many functions before, then I try to include them in existing ones). |
||
12/26/15, 09:37 PM | #33 | |
|
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 |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|