[1.3.b50] MapTool stores/recalls server info

If you have an idea for a new feature, please discuss it in the main MapTool forum first, then post a summary of the discussion here. Use the first Sticky as a template.

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Xypher
Kobold
Posts: 20
Joined: Sun Feb 08, 2009 12:34 am

[1.3.b50] MapTool stores/recalls server info

Post by Xypher »

Ok, I have played more than a few games with maptool and I have really only found one thing I wouldn't mind seeing. The ability to save a IP address, like on the ventrilo chat. I play with a few groups and I think it would make it easier on people if they could save the password and the IP address instead of going to there e-mail and having to type it in over and over. oh and it would be great if you could copy/paste info into the chat on maptools as well.

If any of this IS a feture already please let me know because I haven't found it

Thanks for reading

Xypher
Last edited by Xypher on Mon Feb 23, 2009 5:34 pm, edited 1 time in total.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Game addresses

Post by Azhrei »

Yes, this has been something I've been looking for myself. :(

I think the best way to handle this is to have a dropdown box for the server name (from the registry or the LAN tab) or IP address (for the Direct tab) and then auto-populate the other fields based on that.

But I've been working on other things and haven't had a chance to poke at that yet.

(Btw, please go back and edit your Subject line to better depict what feature you're asking for. Maybe "[1.3.b50] MapTool stores/recalls server info". Or something. :))

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: Game addresses

Post by RPTroll »

I think this came up before but it would be nice to also embed the server name within the web start URL so that can be posted and easily connected to. As I recall that was a significant code change, however.

Still, it never hurts to make the wheel squeak a little.
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Game addresses

Post by jfrazierjr »

Yea... I thought about this before several times cause I have run into that boat and it's frustrating to go find the right IP/port. I just have not gotten around to "fixing" the problem in the code yet.
I think this came up before but it would be nice to also embed the server name within the web start URL so that can be posted and easily connected to. As I recall that was a significant code change, however.
I am working on this. For me, this will take care of the above as I will just create(copy/modify) a jnlp to point to the right server/ip and away I go. I hope I an get this done before the b52 release, depending on Trevors timing of the build, but no promises.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

Xypher
Kobold
Posts: 20
Joined: Sun Feb 08, 2009 12:34 am

Re: Game addresses

Post by Xypher »

Azhrei wrote:(Btw, please go back and edit your Subject line to better depict what feature you're asking for. Maybe "[1.3.b50] MapTool stores/recalls server info". Or something. :))
Not a probllem
RPTroll wrote:Still, it never hurts to make the wheel squeak a little.
I would put a huge emphasis on the squeaking at this point :P

But no really you guys do great work on this site ... I just thought I would put my 2 cents in

As always keep up the good work .... cause if you don't ... I will be very board

Xypher

User avatar
palmer
Great Wyrm
Posts: 1367
Joined: Sat Sep 06, 2008 7:54 pm

Re: Game addresses

Post by palmer »

Azhrei wrote:I think the best way to handle this is to have a dropdown box for the server name (from the registry or the LAN tab) or IP address (for the Direct tab) and then auto-populate the other fields based on that.
I would go with a "My Servers" tab, where you can set a server up with an alias (so you don't have to remember which IP is which game).

Each alias tracks the server IP, Port, Password and Role (Player/GM).

Save to wherever global macros are saved

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Game addresses

Post by Azhrei »

palmer wrote:Each alias tracks the server IP, Port, Password and Role (Player/GM).

Save to wherever global macros are saved
And login name.

Yeah, that would work.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Game addresses

Post by jfrazierjr »

Yea... I thought about this before several times cause I have run into that boat and it's frustrating to go find the right IP/port. I just have not gotten around to "fixing" the problem in the code yet.
I think this came up before but it would be nice to also embed the server name within the web start URL so that can be posted and easily connected to. As I recall that was a significant code change, however.
I am working on this to some degree. For me, this will take care of the above as I will just create(copy/modify) a jnlp to point to the right server/ip and away I go. I hope I an get this done before the b52 release, depending on Trevors timing of the build, but no promises.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Game addresses

Post by Azhrei »

jfrazierjr wrote:I am working on this to some degree. For me, this will take care of the above as I will just create(copy/modify) a jnlp to point to the right server/ip and away I go. I hope I an get this done before the b52 release, depending on Trevors timing of the build, but no promises.
Excellent. When this is implemented, I'll add an optional "ServerName" field to the Launch page on the web site.

I suppose technically it shouldn't be called "server name" but maybe "game configuration"? Obviously, the name of the server from the RPTools registry will be a part of that, but for people who don't (or can't) use the registry, they will need an IP address so using "server name" is a little misleading. (I[/I} think it's perfectly understandable, but others might not!)

When you implement this it would also be nice to add an import/export feature as well. I always use the same computer for MapTool from week to week, but others might be bouncing around between laptop/desktop or otherwise from machine to machine, so being able to export the configuration might be useful. (I don't know if it is because I don't do that. But maybe others will chime in.)

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Game addresses

Post by jfrazierjr »

Azhrei wrote:
jfrazierjr wrote:I am working on this to some degree. For me, this will take care of the above as I will just create(copy/modify) a jnlp to point to the right server/ip and away I go. I hope I an get this done before the b52 release, depending on Trevors timing of the build, but no promises.
Excellent. When this is implemented, I'll add an optional "ServerName" field to the Launch page on the web site.

I suppose technically it shouldn't be called "server name" but maybe "game configuration"? Obviously, the name of the server from the RPTools registry will be a part of that, but for people who don't (or can't) use the registry, they will need an IP address so using "server name" is a little misleading. (I[/I} think it's perfectly understandable, but others might not!)

When you implement this it would also be nice to add an import/export feature as well. I always use the same computer for MapTool from week to week, but others might be bouncing around between laptop/desktop or otherwise from machine to machine, so being able to export the configuration might be useful. (I don't know if it is because I don't do that. But maybe others will chime in.)


Note that my first goal would ONLY be the ability to pass in arguments from the command line or the JNLP which is done using the System.getProperty() functions. The JNLP xml schema has a section where system properties can stored and of course, the batch files (or shell can pass such parameters with the -D switch to java.

I have no plans at this time to modify the Connect to server dialog UI. I tried playing around with Abielle forms the other day... we don't get along to well. I guess I am just used to setting specific container coordinates, H,W for stuff and just don't have that option with this, so I won't be messing with the UI, hence nothing to export.

My idea is via shell or JNLP, the use will enter key/value pairs for
  • Username
  • Player Password
  • GM Password
  • Role(GM|Player)
    • ServerName OR
    • IP and Port
  • Mode (Client|Server)


I think that is everything. The idea is that MT will auto-connect to the server if in Mode = Client. FOR NOW, Client is the ONLY MODE ALLOWED. In any event, if not enough information is available, I will most likely send something to the chat log and let the person do it all manually. In the event of an error in connecting, MT's normal error handling will take care of that such as saying invalid password, unable to find server, etc.

Will switch(case) on Mode as the very first thing and add case to Client mode, check for required data and connect to the server. Later, I will add the code for Mode = server.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
palmer
Great Wyrm
Posts: 1367
Joined: Sat Sep 06, 2008 7:54 pm

Re: Game addresses

Post by palmer »

Azhrei wrote:
jfrazierjr wrote:I am working on this to some degree. For me, this will take care of the above as I will just create(copy/modify) a jnlp to point to the right server/ip and away I go. I hope I an get this done before the b52 release, depending on Trevors timing of the build, but no promises.
Excellent. When this is implemented, I'll add an optional "ServerName" field to the Launch page on the web site.
Insert feature creep here:

Now, we already have the public game list available within MT. Any reason it can't be dynamically generated for the launch page as well? So instead of inserting a servername, you just select it from a pulldown.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Game addresses

Post by Azhrei »

palmer wrote:Now, we already have the public game list available within MT. Any reason it can't be dynamically generated for the launch page as well? So instead of inserting a servername, you just select it from a pulldown.
WHAP!

*That's the sound you hear as my palm hits my forehead*

Great idea! Yes, the RPTools server registry is (obviously) stored on the web site and that's accessible to PHP. So an SQL statement could create a JSON object to pass to the browser. The browser then uses javascript to build the WebStart URL based on the server name and the optional memory sizes.

Okay, so visit the current page and tell me how you would lay it out on the screen. Should the server name go into the CUSTOMIZATION section that is hidden by default?

I'll get ready for this so that fraiser's patch will have a page ready to support it.

Very cool. Thanks for the idea. :)

User avatar
palmer
Great Wyrm
Posts: 1367
Joined: Sat Sep 06, 2008 7:54 pm

Re: [1.3.b50] MapTool stores/recalls server info

Post by palmer »

A: I'd call that section "Advanced Settings" personally.

B: Make it a separate, but collapsed section ABOVE the customization.
If not above, then put it to the RIGHT and do NOT collapse it.

FOOD FOR THOUGHT: Your original mkjnlp supported different versions of MT.
Is there a compelling reason we cannot do that on the actual launch page?

REASON: The server list is all fine and dandy... but not everyone is using the latest and greatest.

As of RIGHT NOW, I count 51 games listed on the server list.
4 of them are 1.3.older (including one b24!)
5 of them are Pre-1.3

That's almost 18% of games not using the most current... and we can't expect people to always stay current.

So selecting a server would also select the right version, webstart that and connect

Obviously this functionality won't work at all for another few builds, but after that point, you know?

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Game addresses

Post by jfrazierjr »

Azhrei wrote:
palmer wrote:Now, we already have the public game list available within MT. Any reason it can't be dynamically generated for the launch page as well? So instead of inserting a servername, you just select it from a pulldown.
WHAP!

*That's the sound you hear as my palm hits my forehead*

Great idea! Yes, the RPTools server registry is (obviously) stored on the web site and that's accessible to PHP. So an SQL statement could create a JSON object to pass to the browser. The browser then uses javascript to build the WebStart URL based on the server name and the optional memory sizes.

Okay, so visit the current page and tell me how you would lay it out on the screen. Should the server name go into the CUSTOMIZATION section that is hidden by default?

I'll get ready for this so that fraiser's patch will have a page ready to support it.

Very cool. Thanks for the idea. :)

Yep, that was my original thought. However, this will put another step into the process. the JVM arguments and be passed as part of the URL to the JNLP file, which is GREAT. BUT as far as I have been able to learn, other stuff cannot, so stuff like System.Properties, which is what I will have to use to support command line requires the JNLP file to be rewritten. Sooo.. with that said(and I repeat this from a previous post somewhere), it would have to work like this:
  • Have a form prompting for parameters such as server,username, password, etc)
  • Have a submit button for the form
  • the action on the other end of the submit button rewrites( the JNLP file to contain the optional information (perhaps with some error checking to make sure enough/right parameters are passed along!)
  • the JNLP file will need to be unique, perhaps some combination of the PHP sessionID ???)
  • the user clicks the link on the new page and if everything is valid, they maptool starts up and they immediately get logged into the server as a client
  • some process will need to run to clean up abandoned JNLP files since they won't ever be reused as the sessions are unique.
Now, the above make the assumption that the JNLP needs to be a physical file located somewhere and can't just be a stream of data sent back to the users browser(which I seem to think is possible) and if this is the case, then we skip the need for the clean up processing part (which is really good to not need)



EDIT: I just thought of something. If the submit pointed to something that was not identified as a "file" to download by the server (such as /makejnlp.php), then the target page could take the arguments passed, set the content type to whatever it needs to be for JNLP files in the HTTP header, build the xml content and stream that, which eliminates the need for physical files right?
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: [1.3.b50] MapTool stores/recalls server info

Post by Azhrei »

The JNLP files are currently created on-the-fly by reading a configuration file on the web site. So I can insert into the JNLP anything I want, including system property assignments.

However, if you're going to pass in multiple values, I suggest using a single property with some type of delimiter between fields. Something like:

Code: Select all

-Dmaptool.connect="server=servername;name=playername"
Otherwise, as we add more fields in the future we'd have to have a new property for each one!

@palmer: My mkjnlp page was pretty tricky. It would open the ZIP file and make a list of all JAR files, then use that to create the JNLP that referred back to the original site. Because of the overhead in scanning the ZIP files, I created a cache file (with timestamps to detect updates).

I've been reluctant to use that technique on the main web site as it's somewhat fragile. A better technique would be for each version to have an external list of JARs somewhere that the PHP would have easy access to for creating the JNLP. However, this is not the technique currently used -- there is only a single configuration file and it only applies to the last build of a given series.

I had also considered just caching the JNLP files, but that means editing them to insert the memory sizes and any other fields we might want to add in the future, so I decided that wasn't practical -- if I'm going to parse the JNLP in order to replace pieces of it, I may as well just generate it on the fly. (However, I've just thought of a way that might make this more reasonable. I'll look into it again.)

Having said all that, it has always been my desire to allow people to select older versions of the tool for use with WebStart via the main site. I'm trying to add it such that it doesn't change Trevor's current system for building and uploading new content.

Post Reply

Return to “Feature Requests”