Request: Additional Macro Variables..

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Request: Additional Macro Variables..

Post by kagonis » Fri Sep 05, 2003 3:28 pm

Valarian posted something about adding variables that controls the various paths used by MQ and EQ.

My own request that I would find really handy was the following:

$server(id|name|shortname)
- id returns the id of the server currently logged on to.
- name returns the Long Name for the server currently logged on to.
- shortname returns (obviously enough) the shortname, ie the prefix used for when sending to chat channels on this server.

The use for this variable would be several things really:
To handle various ini files more dynamically, such as:
"$char(id)_$server(id).ini"
"UI_$char(name)_$server(id).ini"
etc.

Or for handling cross server chat channels in EQ
";#$server(shortname).somechannel" (probably not gonna be used much, but might as well add it right away)

Valerian wrote in another thread:
uh oh... I see a few new parms incoming... how about $eqpath $mqpath $logpath and $macropath?
I like that idea a lot, but wouldnt it be more "clean" if you make it more like:
$path(eq|mq|log|macro) ?

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Fri Sep 05, 2003 3:51 pm

clean? maybe, but it works just fine the way I did it. I'd have made them individual functions in PMP() either way.

About server, get me some code to find all the info you want it to return, and I can stick it in a parm for you. (name and id are easy... it's the shortname that may be a bit more difficult...)

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Fri Sep 05, 2003 5:36 pm

I could work on coding this if you want Val ...just let me know if you havn't started already.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Fri Sep 05, 2003 7:30 pm

Current server ID is already handled in the mouse location parser. We pull that value in order to find the full path to your UI_Name_##.ini file. You'll find the offset already in eqgame.ini. Long server name would just be a translation table.
MQ2: Think of it as Evolution in action.

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Fri Sep 05, 2003 11:33 pm

I don't feel like making a translation table for this, let someone else do it...

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Fri Sep 05, 2003 11:47 pm

Well..I have no problems coding the ID and name version of this (from CHARINFO) ..I'm not sure I know what the long name is (or what use it would have anyway).

In speaking of the ServerHost offset, is the value always "eqworld-##...." ..meaning, I could just check that offset + 8 and +9 for the id#?


Either way, I'll do this for you guys ...just give me until Sunday to finish with my schedule :)

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Sat Sep 06, 2003 12:06 am

yes amadeus, look at the ParseMouseLoc function, it already parses the ID number out of that string.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Sat Sep 06, 2003 7:50 pm

I dont have any real use for it as of now, but I was thinking that if it was easy to implement, then might as well do it right away..

An example use would be to use the server name to store server and/or character specific stuff (god knows for what though, but I bet someone will find a use) in an ini file. Could use just the id though, just that fullname will make it more human readable.

And thanks for the hard work :)

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Tue Sep 09, 2003 11:54 pm

Okay, just found a use for the "shortname", it seems that SOE just changed all ini files to use the "shortname" rather than the "id". ie:
$char(name)_$server(shortname).ini
UI_$char(name)_$server(shorname).ini