SKCraft / Launcher

🚀 Distribute your Minecraft modpacks with a custom launcher
Other
622 stars 435 forks source link

Enhancement: Add host option #161

Open SkyBlade1978 opened 8 years ago

SkyBlade1978 commented 8 years ago

Just got this all set up and working last night, it's fantastic so thanks.

I was just thinking how nice it would be if you added a button 'Add Host', and a dialog box to take the url and nickname of another SKCraft host site, ant pup it in a drop down box.

That way if those of us who are adopting this lovely launcher want to be communal, we can share the url's of our SKCraft host websites and use each others modpacks...

Also is it possible to have a html file for each modpack (i.e. I have a subfolder with html's each with the same name as the modpack) so when you lick the modpack the description and list of mods etc can appear in the big browser pane to the right?

Incidentally the one I set up last night is http://pandorica.co, the pack isn't very good at the moment but it's my first pack and it's a work in progress ;)

jtrent238 commented 8 years ago

I am working on a website for the hosting. SKCraft-Launcher-HOST

sk89q commented 8 years ago

The way the launcher is written at the moment isn't too friendly towards multiple sources of modpacks because it has to hit the URLs on load.

Right now it's not possible to have a per-modpack webpage but it's probably one of the more highly-requested features.

jtrent238 commented 8 years ago

Ok, when you need the site I can make it. :smile:

dj3520 commented 8 years ago

@sk89q

Right now it's not possible to have a per-modpack webpage

is this because

because it has to hit the URLs on load

? If this is an issue, an idea come to mind. Once the launcher loads, it hits each URL once and keeps a local copy (either in RAM or disk) so switching between modpacks doesn't trigger loads of requests. This copy is overridden when the launcher loads again (unless you want to add caching, which would ask the server for the last edit time to compare against the local copy.)

jtrent238 commented 8 years ago

Minecraft-Skin-Viewer loads 3 websites every time you enter a username, each a different site based on username. Not sure if this would help or not, but I decided to mention it.

This program was made in XOJO, you need to download it if you want to view the full source code.

Here is the code that loads the websites:


HtmlViewer1.LoadURL"About:Blank"
  HtmlViewer2.LoadURL"About:Blank"

  Dim username As String = TextField1.Text
  Dim username2 As String = TextField1.Text
  Dim username3 As String = TextField1.Text

  If PushButton1.Active Then username2 = "http://skins.minecraft.net/MinecraftSkins/" + username + ".png"

  If PushButton1.Active Then username = "http://crafatar.com/renders/body/" + username

  If PushButton1.Active Then username3 = "https://minotar.net/avatar/" + username3 + "/90"

  HtmlViewer1.LoadURL(username)
  HtmlViewer2.LoadURL(username2)
  HtmlViewer3.LoadURL(username3)

You can see some more source code here With out XOJO.

sk89q commented 8 years ago

The issue isn't really the downloading of URLs.

It's just that I didn't really plan to support different providers of modpacks from the start (though the previous launcher 3.x version did) so I haven't done things make sure that modpack IDs don't collide, etc.

Still very doable but low on my todo list.

spannerman79 commented 7 years ago

make sure that modpack IDs don't collide

The modpack ID's could prefix the domain thats specified for news etc.

For example; Provider domain "A" is hello.blah , so all of their modpack ID's (if opt-in/configured) would be prefixed hello.blah-x, x being whatever the ID that was set pre-opting in.

Just a thought...