Welcome, Guest. Please login or register.
Did you miss your activation email?
March 29, 2024, 09:39:38 am *

Login with username, password and session length
Pages: [1]
Print
Author Topic: Offline Hotbutton Editor  (Read 2321 times)
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« on: January 22, 2020, 06:45:11 pm »

There are a lot of posts illustrating what snippets of mq2 code can increase your EZ Quality of Life experience and it's pretty easy to set up those hotkeys from in game if you enable the EQ option for Paste from Clipboard, but a lot of people either don't know how to do this or don't care enough to do it so they end up having to type out lines of code they don't understand into the in game social button they are editing.  MQ2 code isn't intuitive, I've been trying to master it for years and am still learning new things to do with it, but it's doesn't always make sense when I read it straightline.  I imagine for a lot of folks, typing code into a hotkey line is akin to trying to type a foreign language into a text box constantly tabbing in and out to check to see if you have it right.

Enter my latest project, a super basic and horribly interfaced app that can read your hotbutton information and display it to you, allow you to edit existing hotkeys and also set up available blank hotkeys.  One of the main benefits to using this application as opposed to setting up socials in game is that you can easily have the application open, tab to the thread containing the code you are building a hotkey for and copy the line you want to insert and paste it in the corresponding hotbutton line.  

Another benefit to doing it this way is when the application loads your character's settings file, you'll have access to everything in the ini section [Socials] which is where this information is saved.  You select the hotbutton page and hotbutton number on that page for the hotbuttons you want to access the information from and it displays the current hotkey lines.  If you've ever manually edited your character_server.ini file, you know what a jumbled mess it can be to try to muddle through it...when EQ sets up social keys it saves them in the order that you tell it...until you edit it.  What this means is if you have a 3 line social for button 7 on the first page of socials, when you first build it it would look something like this in the file:

Page1Button7Line1=/tar id ${Me.ID}
Page1Button7Line2=/stick 5
Page1Button7Line3=/attack on

This makes sense and is pretty easy to read, you built the hotkey and added all the values as you went so it's listed in order, but let's say you edit some of the code in lines, maybe add another.  Every time you update a line with Page1Button7 in it, if the line already exists, it'll move it to the bottom of the values beginning with Page1Button7.  To illustrate this, say you wanted the stick to be behind the mob and use uw so if fighting underwater, the character will always camera look at the mob instead of just straight ahead.  You also want to add a /bca command so that all your toons target what is on your target.  You update the target line then the stick line, now in your ini file it's listed like this:

Page1Button7Line3=/attack on
Page1Button7Line1=/bca //tar id ${Me.ID}
Page1Button7Line2=/stick 5 behind uw

It still performs all the functions in the right order but it's confusing looking at it, and I tend to prefer structure.  So the offline reader sees all corresponding values for Line1Button7 lines and sorts them when it displays them in the editor.  You can then edit the buttons as needed and the fixes are applied when you press the update button.  If your selected button is a blank value, there's no social set up for it, then you should be able to enter in the lines you want and press the update button and it should update your file with the new button.

One thing to note:  This is very much in the alpha stage, there are bound to be bugs so I'd suggest anyone willing to test and feedback this saves a backup of any character files they are using to test with so it can easily be reverted back when something unforseen happens.

If anyone wants to test this application out and offer feeback a bit more verbose than It's broken and This sucks, post here and I'll set up a share link for you.  Also feel free to post all questions regarding this application and corresponding feedback for anyone who does use it in this forum thread, it'll be far more likely to get a quick response than it would be to wait to find me in game.

Known issues :
Need to add a name field for hotbuttons so they aren't displayed as blank hotkeys in game *Fixed 1/23/20


« Last Edit: January 23, 2020, 12:20:03 am by Dimur » Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #1 on: January 22, 2020, 07:03:06 pm »

Here's a short post explaining how to use the application, I'll try to keep it short and sweet.

When you launch the application, it will have my own default values set up but you are able to override these with your own values and the application will remember the last values you entered when you re-run the program.  The first thing you need to do is tell the application where your EQ directory is.  Simply put, this is the file path your computer uses to navigate to the folder you have EQ installed in.  My default directory for alts is D:/RoF2 - Copy, yours will likely be different.  

First image shows what the path will look like in your file explorer, image 2 shows the actual file path and this is what the application needs from you.  Just click the bar in the first image where it shows This PC > Local Disk...etc and it'll show you the actual file path.  Copy this and paste it into the first text field in the application. 
Point of Emphasis, the code I am using sees the back slash character, \ as an escape character.  Without getting sidetracked into what that is, all you need to know is you can use the forward slash instead.  C:\RoF2 is essentially the same as C:/RoF2.  PLEASE replace the backslash with forward slash before telling me it doesn't recognize your given string as a valid directory.
« Last Edit: January 23, 2020, 12:25:51 am by Dimur » Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #2 on: January 22, 2020, 07:13:10 pm »

Once the application sees a valid directory path, it'll want you to tell it the character name.  Don't be fucking stupid here, the only thing the application knows is to check if the supplied path actually exists, it doesn't care if EQ is there or not so you need to do the work of actually supplying the correct directory.  Once you have the directory set, press the Confirm button...if it's a valid directory the Character Name text field is enabled.  Enter the character name and hit Submit, if it finds a matching file for the character you supplied in the directory, it'll parse the file and extract all of the information in the section [Socials] and display this in the large text box.  If you supplied a valid character name and there are no socials set up yet, the section doesn't exist in your file so this application will add it for you.
Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #3 on: January 22, 2020, 07:23:25 pm »

Now that the application has access to all of the values in your [Socials] section of your character file, you can specify which hotbutton you want to check the values of.  In this picture, I selected page 10 and button 9, then I clicked Select This Hotkey.  These values were already in order but sort still verifies and puts the corresponding lines into the hotbutton editor fields.  Now you can modify or delete any of the loaded lines, if there are blank lines you can add new ones and if the corresponding button doesn't exist, you can create it.  Enter the text into the corresponding fields then click Edit this Hotkey and it'll assign the values in the editor to your character ini file, reload the values of the character file and show you the updated hotbutton lines.  At this point you can edit the same button again or select a different button to work with or you can even put a different character name in the character name file and work with another character's hotbutton settings.

The next time you start the application, your last assigned values should be saved.  Your directory path will be pre-populated and the last character you worked with should prepopulate too, but you can alter either of these values if you want, just understand that the saved values should persist across uses.
« Last Edit: January 22, 2020, 07:28:09 pm by Dimur » Logged
Akkadius
Administrator
Legend
*****
Posts: 2016



View Profile
« Reply #4 on: January 22, 2020, 08:19:49 pm »

Looks slick!
Logged


EZ Server GM
Pages: [1]
Print
Jump to:  

Recent

Stats

Members
Stats
  • Total Posts: 64971
  • Total Topics: 5051
  • Online Today: 95
  • Online Ever: 8678
  • (December 19, 2022, 02:32:09 pm)
Users Online
Users: 1
Guests: 52
Total: 53
TinyPortal v1.0 beta 4 © Bloc