Campaign Repository question

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Campaign Repository question

Post by xavram »

I went through the steps to create a campaign repository but when I add the link into maptool, I get this in the chat window.

Repository not available:
"https://drive.google.com/file/d/XXXXXX/ ... share_link"

(XXXXX is me just obscuring the link, but that url I put in is what I get from Google Drive).

Did I miss a step somewhere?

1. File->Export->Campaign Repository file
2. Extracted the files
3. Created a folder out on Google Drive
4. Copied the index.gz file out to that folder and copied the "assets" folder out to there as well.
5. Got the URL from the index.gz folder.

I did make the indez.gz file and the assets folder "available to anyone with the link".

Does this not work with Google Drive?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Campaign Repository question

Post by aliasmask »

You'll need a direct download link. Not sure if google drive allows those. I usually use dropbox which has a special url format to allow direct download links.

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: Campaign Repository question

Post by xavram »

I actually wondered the same thing...so I tried the same deal on Box (I don't have a Dropbox account and don't want to pay for one, for what little use I have of it). But same issue there, "Repository not available".

I wonder if I can get a direct download link from Box...?

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: Campaign Repository question

Post by xavram »

So I found a tool that was supposed to generate a "Direct Download Link" for box...and when I put that link into the campaign repo, I did NOT get that message about "Repository not available"....but is there any way to know if its actually working?

taustinoc
Dragon
Posts: 516
Joined: Mon Aug 03, 2015 6:30 pm

Re: Campaign Repository question

Post by taustinoc »

My experience (and I have quite a bit of it) with Google Drive is that you can get a direct link to a file, but not to a directory. And that's a problem with a repository. The link you put in is for the index file, and it references the individual image files in a subdirectory. So you're not getting the error message because the index file is available, but adding

Code: Select all

/assets/filename
after that link isn't going to get the image files (they'll be served up directly from the MapTool server). So far as I know (and I've tried), there's no way to make a repository work on Drive.

(In theory, maybe you could manually edit the index file to include direct download links for each file. Maybe. If MapTool will take absolute instead of relative addresses. But it'd be a royal pain even for a few files.)

The only way I know to test whether or not the repository as whole is working is to connect to the server from a remote location with and without the repository set, and see if there's a difference in how long it takes to pull the images. (Assuming there's a significant difference in upload speeds between the computer running the server and the host of the repository, which seems likely.)

I've never had much luck finding a free web host that will work. You might be able to do it with a Google Sites web site, if it has enough storage space, but I haven't toyed with that in a long time.

I can point you at a hosting service that will provide very high speed upload speeds with 30 GB of drive space for $4/month, but that's the best I can do. (And it would require setting up the web server from the command line, which actually isn't all that difficult, but can be intimidating.)

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: Campaign Repository question

Post by xavram »

I do appreciate the info taustinoc...Its good to have that info so I don't keep fighting with tyring to make this work on Google Drive.

Am i wrong though? The article in MT about setting this up said that its just the link to the index.gz file that you put into maptool, not the link to the assets folder. Is there some second link I'm supposed to use?

i may just bite the bullet and get a Dropbox account, as this is proving very frustrating for my players.

taustinoc
Dragon
Posts: 516
Joined: Mon Aug 03, 2015 6:30 pm

Re: Campaign Repository question

Post by taustinoc »

The link you put in is for the index.gz file (which is a just text file that's been zipped). That will be a normal url: http://somewebserver.com/index.gz. Everything else is based on an address relative to that.

MT gets the index file, unzips it, and looks in it for the various image files it needs (if it doesn't find it listed there, it uploads direct from the MT server). The index file consists of a list of filenames, followed by a space, followed by a location, one file per line. Looks like this:

00ab95b0f8af673819b2ea642c4e83ea assets/00ab95b0f8af673819b2ea642c4e83ea

MT then takes the url of the index file, removes the index.gz at the end, and adds the assets/filename on instead, and tries to download that. So it'd be looking for:

Code: Select all

http://somewebserver.com/assets/00ab95b0f8af673819b2ea642c4e83ea
The problem is, that's not a valid direct download link for the image file. You can get a direct download link for each file, but that's a huge pain if it's a lot of files, and I'm not sure if MT will accept a full URL starting with http:// instead of the relative one that says "look where the index file is, but inside a folder called 'assets'." (And even if it will, from what I recall of direct download links on Drive, each one would be completely unique, so you couldn't just do a search and replace on the "assets/" part.)

It's been some time since I fooled with it, but unless Google has made some major changes, I'm 99.99999% certain you can't make it work on Drive.

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: Campaign Repository question

Post by xavram »

This is all great info taustinoc, I really appreciate it.

So sounds like I'm doing it right but neither Google nor Box is handling these "direct download" links correctly. Even after I got a direct download for each of them and MT stopped throwing the error, the players were still waiting a looooong time to load the campaign and then to load the main, big map.

It sounds like Dropbox is the only reliable way to do this...? Is that what you've used?

taustinoc
Dragon
Posts: 516
Joined: Mon Aug 03, 2015 6:30 pm

Re: Campaign Repository question

Post by taustinoc »

I'm using a hosted server account at Kamatera, which is about $50/month, but I'm doing a lot of other stuff on it as well (including, at least for now, hosting the MapTool Wiki). I've been very happy with it so far, and their internet pipes are very fast, so the repository is very responsive.

Their most basic accounts start at $4/month (and that's still with 10 gig upload speeds and 5 terabytes of traffic per month), for a virtual server that should run a web server OK to delivery images (I think. That's with 1 GB of RAM, which should be sufficient with nothing but Apache running. If it needs 2 GB, it goes up to about $6/month). But it's not a web hosting service, it's a virtual service host, so what I got was a bare bones install of Ubuntu server, and had to install and configure the web server (and PHP and MySQL) myself. Not a problem for me, and really not that complicated, but intimidating to many. I've been thinking of writing a howto on it for those adventurous enough to dig in.

What would be easier for you would be a real web hosting account with someone like Hostgator, so you don't have to worry about admin-ing the server, just uploading files. There's lots of them around, but they'll probably cost more once you're through the introductory offer. ($10-15/month seems to be pretty common, with discounts for paying by the year.)

What I'd look for is:

Enough drive space (shouldn't be an issue these days)
Generous bandwidth (also shouldn't be an issue if all you're doing is the repository)
Fast internet speeds (should just be a matter of paying attention to what you're getting, but anything should be faster than upload speeds from home
ftp uploads (having to upload through some kind of web interface would be a nightmare)

No need for a domain, or SSL, or PHP or MySQL or anything fancy. Just the ability to serve up files on demand. Create a blank home page so nobody can get a directory listing, upload the repository, and you should be good to go.

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: Campaign Repository question

Post by xavram »

So I tried to set this up via Dropbox (caved and got an account).

But when a player of mine connected to the server, although he did say that the "loading campaign" screen was a little faster (still took 7 minutes to get past that), when he went to load a map, it just froze at 26/100 assets.

Here's what I used for the repo link

https://www.dropbox.com/s/4o16d4fv87ydi6t/index.gz?dl=1

Is there any way to check to see if this working? Something still doesn't appear to be "right", if its still taking that long to load the campaign.

taustinoc
Dragon
Posts: 516
Joined: Mon Aug 03, 2015 6:30 pm

Re: Campaign Repository question

Post by taustinoc »

I'm not really the one to ask on that, since I've never used Dropbox at all (and have limited experience with repositories to boot). Maybe aliasmask or one of the experts can offer an opinion?

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: Campaign Repository question

Post by xavram »

Thank you taustinoc, yeah, hoping one of them will take pity on me...or to be more exact, pity on my players who are getting annoyed with how long it takes to get into the game or download a map!

R23Wave
Kobold
Posts: 3
Joined: Mon Sep 18, 2023 7:39 pm

Re: Campaign Repository question

Post by R23Wave »

hello All,

i need some help. i have read through a lot of threads and articles and still can't get a Repository to work. some articles say you can't use sites like dropbox others say it is preferred. some say you need to upload the exported repository still zipped others say you need to have them in the same folder but they can't be zipped. no matter what site i use or how i load it. i keep getting the error saying

"the following repositories are not available:
http://www.blablabla.com/blabla........
to change or remove an invalid repo, go to campaign properties.....

please someone clarify this for v1.13.2 of maptools.

also while i am here if anyone knows how to use vbl and not crash maptools while hosting a server that would help.

some helpful info i am a engineer and know programing so the fact that i can't figure this out is embarrassing.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Campaign Repository question

Post by aliasmask »

Afaik, this is the source detailing setting up a repository: https://rptools.hyperbooks.com/index.ph ... positories

Online web servers may have worked in the past but most, imo don't work anymore. Maybe something like Git hub will work, but I'm no expert at setting up a repository. Generally speaking, it's really only useful if you have an older machine and bad internet service for the server computer. In that case I would say don't bother.

taustinoc
Dragon
Posts: 516
Joined: Mon Aug 03, 2015 6:30 pm

Re: Campaign Repository question

Post by taustinoc »

I cannot speak to how things are supposed to work, but this works for me:

Create the repository file in MapTool. This should be a .zip file.

Extract the contents, that is to say, the index.gz file and the assets folder.

The index.gz file is compressed, and should be left as is. The assets folder has the images (with funny file names with no extensions) that are not zipped.

Upload those, as is, to the web server.

So a directory listing should show index.gz and the assets folder.

Under Edit-->Campaign Properties, in the Repositories tab, put in the full URL of the index.gz file, which should look something like this:

Code: Select all

https://web.address.com/repository/index.gz
To test it, you should be able to put that address in your web browser, and either display a bunch of garbage (because it's compressed) or download it.

The biggest caveat is that, these days, most cloud storage won't work (Dropbox apparently used to, and now doesn't). You don't get a URL that connects directly to the index.gz file, you get a download link instead that connects to some sort of download script. The problem with that is that MapTool uses the first part of the URL for index.gz to know where to look for the images, so if

Code: Select all

https://web.address.com/repository/index.gz
tells MapTool there is an image called
0aa8abc0ef6996a7a6def0113f878fd0, MapTool will look for it at

Code: Select all

https://web.address.com/repository/assets/0aa8abc0ef6996a7a6def0113f878fd0
And (most of) the cloud storage sites don't support that, they generate an unrelated download link for each file.

What you really need is not cloud storage/file sharing, it's web hosting. There's lots of sites that offer free web hosting, but make sure you have ftp uploads (uploading dozens, or hundreds, or files through a web form would be impractical), a large enough file size limit (many are only a few MB), and a generous traffic allowance. And test with your browser to make sure they allow directly downloading the images without them being part of a larger page (not sure how common such restrictions are, but I'd be surprised if there aren't at least some that do that, since it can be used for spamming and distributing malware).

If you need web hosting, maybe take a look here:

https://freehosting1.net/free_ftp_hosting.aspx

Post Reply

Return to “MapTool”