RPTools.net

Discussion and Support

Skip to content

It is currently Sun Dec 17, 2017 8:35 am 




Forum rules


Please discuss all HOWTO topics in the main forum. They will be moved here by a moderator when appropriate.



Reply to topic  [ 85 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject:
PostPosted: Mon Jun 09, 2008 12:14 pm 
So how could we make this easier for people to use? Perhaps provide a Perl or PHP script that accepts an uploaded file, verifies the contents to ensure it matches some kind of data structure with an assets directory and such, and then unpacks it into a specified directory?

That would be fairly easy to do with both Perl and PHP.

But should MapTool require that the ZIP file be unpacked in the first place? How much easier it would be to just upload a ZIP file and be done with it!

I see two advantages: an unpacked directory structure is easier to add new images to, and the entire collection doesn't have to be downloaded all at once.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6325
Location: Middle of Nowhere, NM
 Post subject:
PostPosted: Mon Jun 09, 2008 1:21 pm 
Having the repository in an unpacked state on the server is probably for the best. Having each client download an entire repository file when they perhaps only need a small portion of it for a given session would kind of defeat the purpose.

A basic PHP script that people could put on their own website to use for uploading and unpacking repositories would be a nice thing to have.


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3782
Location: MD
 Post subject:
PostPosted: Mon Jun 09, 2008 4:05 pm 
Phergus wrote:
For Full Replacement, delete the existing files from your web server and upload the contents from the new repository file to the website.


Just to be clear on this... the only files I need to delete are the assets directory and the index.gz file, correct?


Quote:
You can also just upload over the top of the existing files on the website.


I can upload the exported repository zip file over the the existing file, correct?

When I unzip the new file, will it just overwrite the existing index.gz and put the new files into the existing assets cache?


Quote:
For Update, upload any new assets from the new repository file that aren't present on the web repository and then upload the new index.gz file.


Not sure I follow the "upload the new index.gz" files step. Is there an index.gz file inside the repository zip that I've need to extract? I thought my webserver was creating that when I unzipped the file there.


Quote:
You could also remove any assets that are on the website but not in the current repository if saving space is an issue.


I can delete the repository zips after unzipping them on the website, correct?


Quote:
The repositories for different campaigns should be placed in separate directories on the website.


Good to know. It will be easier to clean up old stuff anyway if I were to keep things separate... However, it seems kind of inefficient to be uploading multiple copies of commonly used assets to separate directories.


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject:
PostPosted: Wed Jun 11, 2008 1:16 am 
Well, technically you could locate assets with the same filename and just copy them from one directory on the server to another, or if you're using Unix hosting, just hard link them (use the ln command).

The asset name is the unique ID of the asset which, IIRC, is the calculated MD5 hash of the contents. So the same image in different directories should still have the same name...


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Fri Oct 26, 2007 7:55 am
Posts: 523
Location: Near a tree, in a cave, under a rock.
 Post subject:
PostPosted: Tue Jul 29, 2008 7:47 am 
I know there's a lot of good posts in this forum, but this one really needs to be stickied.

_________________
A wandering lost soul


Top
 Profile  
 
User avatar  Offline
Codeum Arcanum (RPTools Founder)
 
Joined: Mon Jan 09, 2006 4:16 pm
Posts: 11390
Location: Austin, Tx
 Post subject:
PostPosted: Tue Jul 29, 2008 10:28 am 
Good idea

_________________
Dreaming of a 1.3 release


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon May 19, 2008 9:23 pm
Posts: 399
 Post subject:
PostPosted: Thu Aug 07, 2008 10:29 am 
Okay, I like the idea of a server doing the heavy lifting. So, let me see if I understand the basics. I upload any and all images that I want to use to build maps with Maptool. Than I use those images from the server to build the maps needed for the campaign. At that point I follow the instructions at the start of the thread to upload the repository.

Is this correct? Or are all files needed converted into those m5d and uploaded in assets at the same time?


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Fri Apr 27, 2007 9:27 pm
Posts: 1253
Location: NY
 Post subject:
PostPosted: Thu Aug 07, 2008 11:21 am 
There are two methods.

One is for a single campaign file. You make your maps, then export the campaign file. You will get a zip file. You then upload that zip to a server and unzip it. You then put the web address of the file into your "Repositories" under "Campaign Properties". Anyone connecting to your campaign will now download the maps from the server.

The second way has to do with a script that they run in the RPTools gallery. It indexes all of the images. So, if you download images from the RPTools gallery and don't change them in anyway, then when you make maps with them, your players will download them from the gallery and not from you(that is as long as you keep the default web address in the Repositories). Much faster if you have more then one or two players. I would love for there to be some instruction on how to take this script and run it on my own gallery on my personal website. :)

_________________
View MapTool video tutorials at RPToolsTutorials.net


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon May 19, 2008 9:23 pm
Posts: 399
 Post subject:
PostPosted: Thu Aug 07, 2008 1:13 pm 
That answers everything. I think I will be going with method number one. That will allow me to save space on my teeny tiny web server provided with my DSL. Thanks for answering so promptly.

- Josh


Top
 Profile  
 
User avatar  Offline
Cave Troll
 
Joined: Tue Aug 12, 2008 10:06 am
Posts: 25
Location: Fairfax, VA
 Post subject:
PostPosted: Mon Oct 06, 2008 4:27 pm 
Noticed something interesting with one of my campaign files.

When I add a new repository to my campaign, it works as expected (yay!). However, if I remove the rptools URL from the repositories list and export (so that only my URL is in the list), it effectively "breaks" the properties file. That is, I cannot re-import this same mtprops file later. There is no error message or anything to indicate a failure, other than that properties are not imported.

To test, try creating a new campaign, and going into "Campaign Properties." Add a token property, light definition, state... whatever. Then, go into repositories, delete the default URL and add a new one. Export the properties, open a new campaign, and try to import the mtprops file you just saved. At this point, I don't see any change to the default repositories list, and whatever else I had defined is not there. Repeat the same procedure, but omit the delete step and it works as expected.

I rather foolishly overwrote my only copy of my mtprops file and then found it un-importable. Unzipping the mtprops file, manually editing content.xml, and putting the rptools gallery back in repaired it (this was actually the first thing I tried after validating the XML was still well formatted, and lucky me it worked).

I'm using b45... does anyone else see this behavior, or am I nuts?

Not that I have anything against the rptools.net gallery (far from it), but my campaign won't use anything from there so if I can save my players a server call, I'd like to do so... but it seems I can't avoid having it defined.

_________________
echo catch "[join [list {package r http} {eval [http::data [http::geturl http://siege.org]]}] {; }]" | wish


Top
 Profile  
 
 Offline
Dragon
 
Joined: Sat Dec 22, 2007 5:37 pm
Posts: 358
 Post subject: Re:
PostPosted: Sat Dec 13, 2008 11:22 am 
brad wrote:
The second way has to do with a script that they run in the RPTools gallery. It indexes all of the images. So, if you download images from the RPTools gallery and don't change them in anyway, then when you make maps with them, your players will download them from the gallery and not from you(that is as long as you keep the default web address in the Repositories). Much faster if you have more then one or two players. I would love for there to be some instruction on how to take this script and run it on my own gallery on my personal website. :)


By "not changing" the maps, are you saying that adding tokens and such is "changing" the map?

Also, does it matter where in the gallery you upload the images? I can just upload maps to my gallery area and Maptool will pick them up?

Thanks!


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6325
Location: Middle of Nowhere, NM
 Post subject: Re: Re:
PostPosted: Sat Dec 13, 2008 12:40 pm 
Elorebaen wrote:
By "not changing" the maps, are you saying that adding tokens and such is "changing" the map?


No. If you use the images from the galley without modifying them before using them in MapTool then your player's clients will be able to retrieve them from the gallery during the session.

Elorebaen wrote:
Also, does it matter where in the gallery you upload the images? I can just upload maps to my gallery area and Maptool will pick them up?


That is correct with the caveat that the list of images in the repository is only updated periodically and images you upload today may not be accessible via the remote repository function for some period of time.


Top
 Profile  
 
 Offline
Dragon
 
Joined: Sat Dec 22, 2007 5:37 pm
Posts: 358
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Sat Dec 13, 2008 4:31 pm 
Thanks Phergus


Top
 Profile  
 
 Offline
Dragon
 
Joined: Sat Dec 22, 2007 5:37 pm
Posts: 358
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Sat Dec 13, 2008 4:53 pm 
Can we upload .png files to the Gallery? I seem to be having trouble.

Thanks.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6325
Location: Middle of Nowhere, NM
 Post subject: Re: HOWTO: Put your images on a webserver
PostPosted: Sat Dec 13, 2008 7:49 pm 
You can upload images of any type but there seems to be some problems with the gallery that are probably a side-effect of the move to the new hosting service.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 85 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman