Thread Tools Display Modes
04/02/17, 12:51 PM   #1
Irregulator
Join Date: Apr 2017
Posts: 4
New Developer Here, Couple Questions

Hi all,

I'm new to addon authoring but not to coding. I had a couple ideas in mind and was hoping to get some feedback/somewhere to start with them.
  1. I want to be able to re-color the standard discovered map pins on the world map. I understand each pin has a texture .dds file associated with it - can I change that file or somehow change what file is used for world map pins?
  2. A toggle sprint keybind (not toggle run). I have some issues with my hands and would like to not have to hold a button in order to sprint. Ideally I could press this toggle sprint key and my character would sprint until he ran out of stamina or until I pressed the move forward or backward keys. It'd work similarly on a horse.

Where should I start with these ideas? I know that the function that actually makes your character sprint is private - does this mean my toggle sprint idea isn't possible?
Since all the .dds files are rolled into .dat files in the game's code - does that mean changing the game's map pin colors won't be possible?

Thanks for your time.
  Reply With Quote
04/02/17, 12:57 PM   #2
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
The default sprinting button was a pain to get used to since it is an awkward angle, but I didn't have a better choice in mind. Due to sprinting being private, it does kill the most logical way of handling it. I'm not sure if it might be possible to keep a normal keybind from toggling it back off on release though.

As for changing the map pins, Harven's addon allows creating new custom map pins and perhaps it could allow reskinning existing ones? http://www.esoui.com/downloads/info3...nsMarkers.html
  Reply With Quote
04/02/17, 02:57 PM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
You can colorize the map pin textures instead of exchanging them with new ones.
You just need to find their global name (using addon ZGOO and moving the mouse above the pin on the map and thenn type "/zgoo mouse" into the chat na dpress return), get the control for the name by

Lua Code:
  1. local mapPinTextureCtrl = WINDOW_MANAGER:GetControlByName("ZO_MapPin36", "Background").
->Background contains the texture for the pin itsself, Highlight the blue glowing surrounding. Bozth are children of type CT_TEXTURE of that pin ZO_MapPin36.
-> The pins should all be in ZO_WorldMapContainer as children, starting with "ZO_MapPin" and then a number.

After this you can use somehting like this to colorize it
Lua Code:
  1. mapPinTextureCtrl:SetColor(r, g, b, a)

Where r = red, g= green, b=blue and a = alpha value (0 to 1, in 0.1 steps I think)

To exchange the texture instead use:
Lua Code:
  1. mapPinTextureCtrl:SetTexture("/esoui/art/path/to/ingame/texturefile.dds")
  Reply With Quote
04/02/17, 09:37 PM   #4
Irregulator
Join Date: Apr 2017
Posts: 4
Originally Posted by Baertram View Post
To exchange the texture instead use:
Lua Code:
  1. mapPinTextureCtrl:SetTexture("/esoui/art/path/to/ingame/texturefile.dds")
I didn't realize I could do this! So I can simply place a file in that location in my addon folder? Or does it go somewhere else? Thanks for your help.
  Reply With Quote
04/02/17, 10:01 PM   #5
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 408
Yes, you can use custom textures placed in the addon's files. For example,[[DolgubonsLazySetCrafter/images/patterns/templateTexture.dds]]
  Reply With Quote
04/04/17, 07:11 PM   #6
Irregulator
Join Date: Apr 2017
Posts: 4
/zgoo mouse is incredibly helpful, thank you Baertram. I'm starting to realize why an addon doesn't exist to re-color existing map pins already though (maybe lol) - it appears that every pin has its own control, even when they're the same icon. However, map pins (in the m_Pin table) have a sub-table called m_PinTags, and in this sub-table the path to the pin texture file is the second value.

Would it be possible to pull all pins into my code and re-color/re-texture them if they use a certain texture file? Or maybe there's some other identifying value that is the same across all pins of the same icon I can use? Getting the control for each pin individually would be incredibly time consuming...
  Reply With Quote
04/05/17, 10:26 AM   #7
retired_adventurer
AddOn Author - Click to view addons
Join Date: Dec 2016
Posts: 5
For your ergonomic issues you could try moving sprint to your mouse or some other key, like spacebar.
  Reply With Quote
04/06/17, 07:02 PM   #8
Irregulator
Join Date: Apr 2017
Posts: 4
Originally Posted by retired_adventurer View Post
For your ergonomic issues you could try moving sprint to your mouse or some other key, like spacebar.
That's a good idea, but my god I've been sprinting with shift and jumping with the spacebar since the second grade! lol
  Reply With Quote
04/07/17, 08:17 AM   #9
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
I put sprint to "CTRL" and sneak to "<" for that reason.
  Reply With Quote
04/07/17, 01:31 PM   #10
retired_adventurer
AddOn Author - Click to view addons
Join Date: Dec 2016
Posts: 5
Originally Posted by Irregulator View Post
That's a good idea, but my god I've been sprinting with shift and jumping with the spacebar since the second grade! lol
Don't worry, a few hundred hours of ESO will easily rewire your brain into trying to sprint with space in every other game too.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » New Developer Here, Couple Questions

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off