Page 1 of 1

Request: Additional Macro Variables..

Posted: Fri Sep 05, 2003 3:28 pm
by kagonis
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) ?

Posted: Fri Sep 05, 2003 3:51 pm
by Valerian
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...)

Posted: Fri Sep 05, 2003 5:36 pm
by Amadeus
I could work on coding this if you want Val ...just let me know if you havn't started already.

Posted: Fri Sep 05, 2003 7:30 pm
by Mckorr
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.

Posted: Fri Sep 05, 2003 11:33 pm
by Valerian
I don't feel like making a translation table for this, let someone else do it...

Posted: Fri Sep 05, 2003 11:47 pm
by Amadeus
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 :)

Posted: Sat Sep 06, 2003 12:06 am
by Valerian
yes amadeus, look at the ParseMouseLoc function, it already parses the ID number out of that string.

Posted: Sat Sep 06, 2003 7:50 pm
by kagonis
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 :)

Posted: Tue Sep 09, 2003 11:54 pm
by kagonis
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