EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Featured Projects > EQ2MAP

Reply
Thread Tools Search this Thread Display Modes
  #26  
Unread 03-08-2005, 06:48 PM
Talyns's Avatar
Talyns Talyns is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Everfrost
Posts: 604
Default

Wow I just re-read all my post.. I wanted to say.. I'm still going through all this in my head (and in code).. That's probably why my post(thoughts) are all over the place..
Sorry if I try to over explain some things or don't explain other things.. The things I explain are probably on my mind at the time and it helps me think..

Everything I ask for is just asking.. So if something cannont change I understand that

--------------------------------------------------------------------------

Goal:
I'm trying to make the plugin system as modular as possible..
So that plugin system itself is seperate from the mainhud_map as much as possible.. But allows plugins to be very robust & flexible.. (Add buttons, pages, onshow options, etc)

Goal:
I want to make it so no plugin makers cut functionality out of the default coding (or a skins coding).. However, they will be able to add to the end of them, because, the callback events..

Goal:
There should be a callback system for OnTitlebar, OnFrame, OnHide, OnShow, OnMinimize, OnRestore..

Goal:
I want to get the changes in the map system down to 2 includes and a handful of lines of script in the mainhud_map..

--------------------------------------------------------------------------

Right now the way it's set up I can make plugins.xml a blank page and the plugin system is basically removed.. I want it so the whole system can be unplugged. If you change something in the mainhud_map it sits in it shouldn't break the plugin system.. Unless you remove the includes and the script support..

There are 2 reasons for me wanting to change your buttons like that.
1. I want the minimize feature to be a standard feature of eq2map..
2. I DON'T want a modder to write there own (No reason to repeat a function) they should be able write a button that calls your fuction and add to it with the "callback event" that is called..

You would have to use on activate for all buttons you want to call in script If I recall correctly. But not 100% positive.. I came up with that Idea, tested and started using OnActivate in most of my buttons for a while..

I believe:
The OnPress event is only called when the user presses the button in game.. And, not when I activate it through a script call..
OnActivate is also called when the user presses the button in game..

It's pretty much the same technique as hide/show but you can also activate with mouse..



You don't have to change The MapBorder at all.. Just give me the map underlay and it can be a blank page and hidden in the default setup.. I can't add this through a plugin because the plugins should sit on top of everything else, a tan backdrop over the map and poi's is useless.. I don't think it should be named Window_MapUnderlay then.. It should be TM_Plugins_MapUnderlay or something.. I will think of a way to change it..




I want atleast the plugins.xml to use the includes in this way.. Doing it that way makes it very robust/flexible.. Doing the minimap that way demonstrates how robust/flexible it is (I can add a whole bunch of pages right to the main map page if needed).. I can probably contain the whole minimap in one window but It actually makes the script longer in my opinion (more typing anyway).. I don't think it's any less efficient just more flexible..

If I put all the plugin# pages inside the plugins page then I add the pages I need for the minimap and the dock button to a plugin# page.. to access the MapPage from the minimap window for example I would have to type in script..

Parent.Parent.Parent.MapPage.Visible=true
The way it is now I can just do:
Parent.MapPage.Visible=true



Deathbane:
Did I offend you or something in my last reply to you? If I did I'm sorry.. I did not mean too.. I was trying to reinforce your statement not trying to be a Smarta$$, which it kinda came off as.. Haven't heard from ya since then on this subject.. Any thoughts on the subject?



Edit: I'll work on it some more a little later tonight.
__________________
Talyns

Last edited by Talyns : 03-08-2005 at 06:51 PM.
Reply With Quote
  #27  
Unread 03-08-2005, 08:24 PM
Quib Quib is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jan 2005
Posts: 720
Default

Alright, I'll script the Close and Minimize buttons using OnActivate; please suggest some code for the default Minimize button(well, buttons since it's 2). I have a good idea of what I'd do with it, but want your feedback.

Why do you need an underlay? Couldn't your script just use the stuff inside of MapBorder to make an underlay (by moving/resizing it)?

Quote:
Goal:
There should be a callback system for OnTitlebar, OnFrame, OnHide, OnShow, OnMinimize, OnRestore..
Explain what you mean by OnTitlebar and OnFrame.

Quote:
Parent.Parent.Parent.MapPage.Visible=true
The way it is now I can just do:
Parent.MapPage.Visible=true
Not really sure what this was in reply too so I don't understand the exmaple. I know by using includes outside of page objects you'll avoid a level of using Parent.

The reason I say it's inefficient, is you're calling an include which will just call 5 more includes. That's ~16% less efficient than just directly calling the 5 includes. Likewise, calling one parent plugin object that'll call all the plugins themselves (to distribute the OnEvent calls) adds a layer of calls that just doesn't need to be there. I don't mind bulking up the main page objects OnEvents with calls directly to the plugins; the main page's calls are already massive.

Quib
Reply With Quote
  #28  
Unread 03-09-2005, 04:55 AM
Talyns's Avatar
Talyns Talyns is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Everfrost
Posts: 604
Default

Quote:
Originally Posted by Quib
Alright, I'll script the Close and Minimize buttons using OnActivate; please suggest some code for the default Minimize button(well, buttons since it's 2). I have a good idea of what I'd do with it, but want your feedback.
I'm attaching yet another version of this system.. You can view the changes I made to the buttons there.. I will explain the changes I would make/made here..

The changes to the EQ2Map are minimal:
mainhud_map:
Added 3 lines of code..
You can find them by searching for TM_ ..
The code is support for the callback system and the showing of the plugins page..
and the include for plugins.xml...

window_titlebar.xml changes:
All buttons in titlebar: (To make them pressable through script)
Changed OnPress to OnActivate and added the line Activated=false as the last call in the scripts..

RestoreButton: (To support the Plugins OnEvent Callbacks)
Added Parent.Parent.TM_Plugins.OnRestoreWindow.Activated=true to the second to last call in the OnActivate Script..

MinimizeButton: (To support the Plugins OnEvent Callbacks)
Added Parent.Parent.TM_Plugins.OnMinimizeWindow.Activated=true to the second to last call in the OnActivate Script..

CloseButton: (To make it always close the window no matter what plugin is installed)
The script looks like this now:
OnActivate="Activated=false Parent.Parent.OnHide=TM_OnHideBackup Parent.Parent.Visible=false Parent.Parent.OnHide=' ' TM_OnHideBackup=Parent.Parent.OnHide"


Quote:
Why do you need an underlay? Couldn't your script just use the stuff inside of MapBorder to make an underlay (by moving/resizing it)?
This is what I ended up doing.. I was overthinking it..

Quote:
Explain what you mean by OnTitlebar and OnFrame.
I was going to add Callback events for when the Titlebar or Frame changed it's visible state.. I decided to skip it for now.. If there's ever a need for it.. It can be added later..

Quote:
Not really sure what this was in reply too so I don't understand the exmaple. I know by using includes outside of page objects you'll avoid a level of using Parent.
Sorry I think I read your reply wrong just ignore it..

Quote:
The reason I say it's inefficient, is you're calling an include which will just call 5 more includes. That's ~16% less efficient than just directly calling the 5 includes. Likewise, calling one parent plugin object that'll call all the plugins themselves (to distribute the OnEvent calls) adds a layer of calls that just doesn't need to be there. I don't mind bulking up the main page objects OnEvents with calls directly to the plugins; the main page's calls are already massive.
I thought about it and have come to the conclusion it doesn't matter where the pages go or get included.. As long as they get in there.. I guess either way is just as flexible.. In the new version I got going all the plugins are children of that master page.. The master page takes care of all the callbacks to the plugins.. The main map code just has to perform callbacks on one page that way.. All of this is for the sake of modularity. Seperates it as much as possible..

It's up to you if you want to bulk up the OnEvents code.. I perfer seperating it the way I have it now though..

I included the minimap and 3 other plugins in the zip as examples.. The minimap is now contained in one page.. But, I still have it seperated into 3 files.. The minimap plugin uses the OnRestoreWindow and OnMinimizeWindow events.. the Minimize/Restore with keyboard plugin uses the OnHideWindow callback event.. The other two use the OnShow event to make a change to the map (like the current plugin system)

Edit: Updated Attachment.. made a quick change:
Note: This should be installed over the same eq2map version I've been using for all attachments thus far.
Edit: Updated Attachment again the min/restore with keyboard plugin wasn't working right..
Attached Files
File Type: zip _eq2map_proposal_plugins_2c.zip (11.8 KB, 277 views)
__________________
Talyns

Last edited by Talyns : 03-09-2005 at 06:20 AM.
Reply With Quote
  #29  
Unread 03-10-2005, 12:27 AM
Talyns's Avatar
Talyns Talyns is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Everfrost
Posts: 604
Default

Quote:
Originally Posted by Talyns
I was going to add Callback events for when the Titlebar or Frame changed it's visible state.. I decided to skip it for now.. If there's ever a need for it.. It can be added later..
I thought of at least on use for titlebar callbacks in plugins.. It allows modders to hide and show a button plugin (like the dockbutton in minimap) with the titlebar..

So I added both just in case..

Changes to mainhud_map:
I removed the WC_Frame.OnHide=' ' that was in the onshow2 script..

Changes to window_titlebar: OnHide="Parent.TM_Plugins.OnHideTitlebar.Activated=true Parent.Size=484,597" (Read edit at bottom)

OnShow="Parent.TM_Plugins.OnShowTitlebar.Activated=true">

Changes to window_frame:
OnHide="Parent.TM_Plugins.OnHideFrame.Activated=true" OnShow="Parent.TM_Plugins.OnShowFrame.Activated=true"

Plus the changes from previous post

Edit: there was a bug with the titlebar OnHide script.. When the title bar was hidden the window was restored by resizing back to fullsize.. It didn't notify the plugin system.. I changed it so it activates the restore button instead..

So the titlebar on hide should be:
OnHide="Parent.TM_Plugins.OnHideTitlebar.Activated=true QM_RestoreButton.Activated=true"

( I updated the attachment to reflect changes )
Attached Files
File Type: zip _eq2map_proposal_plugins_3b.zip (12.3 KB, 265 views)
__________________
Talyns

Last edited by Talyns : 03-10-2005 at 02:36 AM.
Reply With Quote
  #30  
Unread 03-10-2005, 08:16 AM
Eloa Eloa is offline
EQ2MAP Webmaster
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Unkown
Posts: 496
Default

Our mods so cool that theres a plugin system....wow...
Reply With Quote
  #31  
Unread 03-11-2005, 03:02 AM
Talyns's Avatar
Talyns Talyns is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Everfrost
Posts: 604
Default

Ok one last version..

I polished up the minimap..

I made 1 plugin that handles, I think, all the "window options" thus far.. Except the remove fog thingie.. and it adds a few.. Allows you to change upto 4 of the default eq2map behaviours by copying files..

Full-list: (Besides default options and plugins from the old sytem)
CloseOptions:
Min/Restore with keyboard 'M key' Esc disabled

IconOptions:
Alway 50% transparent
33% transparent till mouseover

ConnectionsOptions:
Both Off on login
City Off on login

And my darkness filter:
Maps 15% Darker than default (this is the one I will be using)
Maps 30% Darker than default

The only change to eq2ui_mainhud_map.xml this time was:
I added a page above the WorldMap Image definition..
<Page AbsorbsInput="false" BackgroundColor="#FFFFFF" BackgroundOpacity="1.000" BackgroundTint="#000000" Location="1,2" Name="TM_DarknessOverlay" Opacity="0.000" ScrollExtent="436,506" Size="436,506"/>

Required for my darkness option

I also changed the plugins.xml so that all the event buttons are not visible..

Things we will have to note to window skinners if this system is used: (I'm sure you know)
The OnHide and OnShow event for the window frame and title bar have to call the plugin handlers that are present there in the default skin at the end of the event..

The Restore and Minimize OnActivate script must end with the plugin handler followed by Activated=false

The CloseButton OnActivate must end with Ativated=false

Edit: I reversed the order in which the callbacks in plugins.xml get called instead of 1 to 5 the now trigger backwards.. So that plugin 1 has priority over 5.. System now has priorty like the z order of the plugin windows..
This is something to tell to plugin authors

I think that's it from me.. I'm out of ideas for improvements to it..
Attached Files
File Type: zip _eq2map_proposal_plugins_4b.zip (26.7 KB, 280 views)
__________________
Talyns

Last edited by Talyns : 03-11-2005 at 04:15 AM.
Reply With Quote
  #32  
Unread 03-11-2005, 09:27 AM
diztorded's Avatar
diztorded diztorded is offline
Crushbone - Cronique
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Crushbone
Posts: 163
Default

I was submitting a bug report last night (heh..) when it hit me.. POI!

When the bug report window is up, and your entering your message, you cannot press TAB to go from field to field. It just changes your target which is reflected on the bug report. That is when the idea hit me...

Why not have a pop-out pane in EQ2Map that the user can stand in a spot, target a critter, enter a blurb, click a button and have it send it to our website for POI insertion?

What do ya think?
Reply With Quote
  #33  
Unread 03-11-2005, 09:44 AM
taco-man's Avatar
taco-man taco-man is offline
EQ2MAP Updater Author
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 1,349
Default

i will look into making a page that works with the html viewer in game where people can submit new poi's no promises though, because i remember someone said that the thing sucks pretty bad as far as displaying stuff.
__________________
EQ2MAP Updater Download
EQ2MAP Website
How to Install a custom interface
Reply With Quote
  #34  
Unread 03-11-2005, 12:57 PM
Quib Quib is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jan 2005
Posts: 720
Default

Quote:
I think that's it from me.. I'm out of ideas for improvements to it..
Alright, I think everything's looking good so will have a new version of eq2ui_mainhud_map.xml up for the auto-updater to grab by the end of the day. Dolby added a new "allow addons or whatever" option for mods, and I already turned it on for EQ2MAP (the main XML download) so you can upload the plugins there, though I suggest waiting a couple days; I'll update the main download with the newest version the auto-updater downloads after I update the auto-updater's downloadable files.

Quib
Reply With Quote
  #35  
Unread 03-14-2005, 04:19 PM
Quib Quib is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jan 2005
Posts: 720
Default

Sorry, I got tied up this weekend. Just logged in for my final test of EQ2MAP with your plugin code added. You'll want to get the auto-updater Talyns, and put it in an empty folder and run it to make sure you get all of the newest files. Check eq2ui_mainhud_map.xml, window_plugins.xml (this was the only filename I changed) and everything to make sure what I've done with your work is acceptable. Very little should be different; however I added it to my newest version by hand so you might wanna make sure I didn't miss anything.

Also, I figured out the difference between OnActivate and OnPress (if you already knew this, oh well): OnActivate occurs on mousedown, OnPress occurs on mouseup; basically, I can click and hold on a button, but OnPress won't occur unless my mouse is still over the button when I let go of the mouse button. OnActivate occurs the instant you click on a button. If you used both OnActivate and OnPress on the same button, there's no guarantee OnPress would get called; the user could move the mouse off of the button before releasing.

Quib
Reply With Quote
  #36  
Unread 03-14-2005, 11:36 PM
Talyns's Avatar
Talyns Talyns is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Everfrost
Posts: 604
Default

Quote:
Originally Posted by Quib
Sorry, I got tied up this weekend. Just logged in for my final test of EQ2MAP with your plugin code added. You'll want to get the auto-updater Talyns, and put it in an empty folder and run it to make sure you get all of the newest files. Check eq2ui_mainhud_map.xml, window_plugins.xml (this was the only filename I changed) and everything to make sure what I've done with your work is acceptable. Very little should be different; however I added it to my newest version by hand so you might wanna make sure I didn't miss anything.
No need to apologize..

Looks and works right =)

I found a couple minor things I need to tweak on the Minimap Plugin then I will upload both as add-ons..

Where should I upload them to when I'm done? The map AutoUpdater download? Never mind I reread two post up

Quote:
Also, I figured out the difference between OnActivate and OnPress (if you already knew this, oh well): OnActivate occurs on mousedown, OnPress occurs on mouseup; basically, I can click and hold on a button, but OnPress won't occur unless my mouse is still over the button when I let go of the mouse button. OnActivate occurs the instant you click on a button. If you used both OnActivate and OnPress on the same button, there's no guarantee OnPress would get called; the user could move the mouse off of the button before releasing.
Quib
I knew OnActivate is called on mouse down.. I think it occurs at the same time the image switches to the "Pressed" Image..

OnDeactivate.. I think is called when the image is changed back to normal..

It's good to know that OnPress has a "user failsafe" to it..
I wonder what's called first OnDeactivate or OnPress.. Good to know how this stuffs works in general..
Hmm... Is it bad that we're going around it? I don't think so.. They're just basic switches..

Probably not a good Idea to put script in OnActivate that could create a bad out come.. Like an autoattack button.. Don't want to accidently attack a sentry or something..

Anyhow, Thanks for adding this feature!

So, When you gonna make that map selector tab plugin?
__________________
Talyns

Last edited by Talyns : 03-14-2005 at 11:39 PM.
Reply With Quote
Reply



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
Forum Jump


All times are GMT -5. The time now is 04:32 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI