[Mod] Community Content Browser List

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 10:16 pm
Location: Los Angeles
Contact:

Re: Mod: Main Menu with over 160 user maps!

Post by Anton » Mon Oct 15, 2012 12:24 am

10-14-12
Added CJAwesome's Rabbit VS Wolves War.
Added Gogg.B1's Rabbot Factory - WIP.
Added Timbles's Instinct.
Added zzwerty's Trampolines!.
Added CryptoSeven's Slice the Splitters.
Added Timbles's Survival.

Updated Akazi's Cave as well.

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 10:16 pm
Location: Los Angeles
Contact:

Re: Mod: Main Menu with 165 user maps!

Post by Anton » Wed Oct 17, 2012 7:26 pm

I tried doing an updated ribbon for the Versus maps... it's not as subtle as the one that Steelraven7 suggested... but I kinda like having it... if you update, and find those vs maps, tell me if it's too much. (I haven't "deleted" anything, so it's easy to go back...) just curious what you guys think...

Here's an example:
frozenpeak-vs.png
frozenpeak-vs.png (69.99 KiB) Viewed 1783 times

User avatar
akazi
Posts: 1935
Joined: Fri Dec 30, 2011 3:14 pm
Location: Montgomery, Alabama

Re: Mod: Main Menu with 165 user maps!

Post by akazi » Wed Oct 17, 2012 7:32 pm

Are you also going to do the thing with the Lugaru challenge levels still, that the Devs did for there prototype Overgrowth challenge levels?

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 10:16 pm
Location: Los Angeles
Contact:

Re: Mod: Main Menu with 165 user maps!

Post by Anton » Wed Oct 17, 2012 7:34 pm

akazi wrote:Are you also going to do the thing with the Lugaru challenge levels still, that the Devs did for there prototype Overgrowth challenge levels?
I've looked at it a couple times, but haven't been able to figure out how to make it work yet. I do still want to do that though. If I can get that working, I'll probably do the same with these versus maps.

(Hint hint... if anyone wants to help... I've figured out how to create the list of maps, but I haven't been able to figure out how to get the menu to read that list...)

User avatar
akazi
Posts: 1935
Joined: Fri Dec 30, 2011 3:14 pm
Location: Montgomery, Alabama

Re: Mod: Main Menu with 165 user maps!

Post by akazi » Wed Oct 17, 2012 7:35 pm

Anton wrote:
akazi wrote:Are you also going to do the thing with the Lugaru challenge levels still, that the Devs did for there prototype Overgrowth challenge levels?
I've looked at it a couple times, but haven't been able to figure out how to make it work yet. I do still want to do that though. If I can get that working, I'll probably do the same with these versus maps.
Okay cool, hope you figure it out. :)

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 10:16 pm
Location: Los Angeles
Contact:

Re: Mod: Main Menu with 165 user maps!

Post by Anton » Wed Oct 17, 2012 7:37 pm

akazi wrote:
Anton wrote:
akazi wrote:Are you also going to do the thing with the Lugaru challenge levels still, that the Devs did for there prototype Overgrowth challenge levels?
I've looked at it a couple times, but haven't been able to figure out how to make it work yet. I do still want to do that though. If I can get that working, I'll probably do the same with these versus maps.
Okay cool, hope you figure it out. :)
Thanks. :)

I think part of it is hard coded, so that's why I haven't been able to do it myself yet.

User avatar
Black_Stormy
Posts: 161
Joined: Sat Mar 12, 2011 2:42 am

Re: Mod: Main Menu with 165 user maps!

Post by Black_Stormy » Wed Oct 17, 2012 10:07 pm

Anton wrote: (Hint hint... if anyone wants to help... I've figured out how to create the list of maps, but I haven't been able to figure out how to get the menu to read that list...)
What do you mean? Are you scraping the directory to see what files/folders exist? Are you updating the list as mods are added and then looping through them? You could create a simple JSON object list file, which would be like

Code: Select all

var modList = {};
modList.1 = {name: "BS_awesomeMod", thumb: "relative/path/to/thumb.png", description: "The BEST MOD EVARR"};
modList.2 = {name: "BS_betterMod", thumb: "relative/path/to/thumb.png", description: "somehow and EVEN BETTAR MAWD""};
and then loop through that list

Code: Select all

for(var i = 0; i < modList.length; i ++){
 var div = document.createElement("div");
 div.setAttribute("id", modList.i.name);
 var img = document.createElement("img");
 img.setAttribute("src", modList.i.thumb);
 div.appendChild(img);
 document.body.appendChild(div);
}
Or am I totally thinking of something else.

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 10:16 pm
Location: Los Angeles
Contact:

Re: Mod: Main Menu with 165 user maps!

Post by Anton » Thu Oct 18, 2012 12:39 am

Black_Stormy wrote:
Anton wrote: (Hint hint... if anyone wants to help... I've figured out how to create the list of maps, but I haven't been able to figure out how to get the menu to read that list...)
What do you mean? Are you scraping the directory to see what files/folders exist? Are you updating the list as mods are added and then looping through them? You could create a simple JSON object list file, which would be like

Code: Select all

var modList = {};
modList.1 = {name: "BS_awesomeMod", thumb: "relative/path/to/thumb.png", description: "The BEST MOD EVARR"};
modList.2 = {name: "BS_betterMod", thumb: "relative/path/to/thumb.png", description: "somehow and EVEN BETTAR MAWD""};
and then loop through that list

Code: Select all

for(var i = 0; i < modList.length; i ++){
 var div = document.createElement("div");
 div.setAttribute("id", modList.i.name);
 var img = document.createElement("img");
 img.setAttribute("src", modList.i.thumb);
 div.appendChild(img);
 document.body.appendChild(div);
}
Or am I totally thinking of something else.
I want to add a button to the main menu that adds all the lugaru challenge levels to one list, the same way David has his challenge maps listed. However, I think that functionality is hard coded into the game, and not fully moddable.
I'm able to create the list, and exchange that for Davids challenges, but I can't add the new button into the menu, and make it link to a separate list.

User avatar
Black_Stormy
Posts: 161
Joined: Sat Mar 12, 2011 2:42 am

Re: Mod: Main Menu with 165 user maps!

Post by Black_Stormy » Thu Oct 18, 2012 5:24 pm

I don't really understand the problem. You can't create the button element? That would be this:

Code: Select all

var but = document.createElement('button');
var text = document.createTextNode("Challenge Maps");
but.appendChild(text);

but.addEventListener("click", function(){
    alert("Yey!");
});

document.body.appendChild(but);
Do you want to replace a list of levels?

Code: Select all

var id = // id of existing list
document.getElementById(id).innerHTML = '';
for(var i = 0; i < challengemapslist.length; i++){
 // create the list like davide does and append it to the div
}
Do you want to create a new list div?

Code: Select all

var new = document.createElement('div');
new.setAttribute("id", "challengeMapsList");

for(var i = 0; i < challengemapslist.length; i++){
 // create the list like davide does and append it to the div
}

document.body.appendChild(new);
But I get the feeling that stuff isn't working. We should talk on IRC.

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 10:16 pm
Location: Los Angeles
Contact:

Re: Mod: Main Menu with 167 user maps!

Post by Anton » Fri Oct 26, 2012 12:47 am

10-25-12
Added Macrauchenia's The Body.
Added ChrisRuck's The Village.

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 10:16 pm
Location: Los Angeles
Contact:

Re: Mod: Main Menu with 165 user maps!

Post by Anton » Thu Nov 01, 2012 5:25 pm

Black_Stormy wrote:I don't really understand the problem. You can't create the button element? That would be this:

Code: Select all

var but = document.createElement('button');
var text = document.createTextNode("Challenge Maps");
but.appendChild(text);

but.addEventListener("click", function(){
    alert("Yey!");
});

document.body.appendChild(but);
Do you want to replace a list of levels?

Code: Select all

var id = // id of existing list
document.getElementById(id).innerHTML = '';
for(var i = 0; i < challengemapslist.length; i++){
 // create the list like davide does and append it to the div
}
Do you want to create a new list div?

Code: Select all

var new = document.createElement('div');
new.setAttribute("id", "challengeMapsList");

for(var i = 0; i < challengemapslist.length; i++){
 // create the list like davide does and append it to the div
}

document.body.appendChild(new);
But I get the feeling that stuff isn't working. We should talk on IRC.
Sorry I never got back to you on this... Here's a summary of what I want to do. There are buttons on the main menu that look like this:
Screen shot 2012-11-01 at 3.19.35 PM.png
Screen shot 2012-11-01 at 3.19.35 PM.png (20.05 KiB) Viewed 1711 times
And I'd like to add a new button, like this (I can do this part):
Screen shot 2012-11-01 at 3.19.42 PM.png
Screen shot 2012-11-01 at 3.19.42 PM.png (24.22 KiB) Viewed 1711 times
But the problem comes now. When I try to add the function of what the button does, I am stuck. The challenge buttons function looks like this:

Code: Select all

$('#challenge').click(function() {
      Client.ChallengeMenu();
    });
So I'd like to create something like this:

Code: Select all

$('#lugaru').click(function() {
      Client.LugaruMenu();
    });
My only problem is I can't seem to find where that is defined anywhere. (I think it's hard coded.)
Alternatively, I could take the ChallengeMenu file, and create a new version of that. It points to a reference file located at Data/LevelSets/challenge_test.xml, and I could create a level set there, but again, I think the way this is coded is hard coded though, so I can't redirect the file there either. (Edit: I've found this portion in the angelscript files... still can't figure out how to reference the angelscript file though...)

User avatar
Black_Stormy
Posts: 161
Joined: Sat Mar 12, 2011 2:42 am

Re: Mod: Main Menu with 167 user maps!

Post by Black_Stormy » Thu Nov 01, 2012 10:02 pm

HMMMMMMmmmm... Yes that looks like it is hardcoded. Probably part of the in-game browser. I guess you'll have to make your own menu with javascript and have that built on click. You might be able to do some tricky code insertion like and use document.getElementsByTagName("*") in the challenge menu to get more of an idea how it is constructed, but if the images are on disk it shouldn't be too hard to reconstruct it.

To create the page via javascript you're going to want to use a lot of

Code: Select all

var div = document.createElement("div");
div.setAttribute("id", "thing");
var img = document.createElement("img");
img.setAttribute("src", "img/image.png");
div.appendChild(img);
document.body.appendChild(div);
etc. Of course, jquery has easier ways to do this:

Code: Select all

div.addClass('class').attr('id', 'thing');
img.attr('src', img/image.png');
div.append(img);
$.append(div);
I like to still create the elements with document.createElement(el). Call me oldfashioned.

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 10:16 pm
Location: Los Angeles
Contact:

Re: Mod: Main Menu with 171 user maps!

Post by Anton » Sun Nov 04, 2012 2:58 pm

11-4-12
Added SteelRaven7's Grim Valley.
Added Noxid's CatScape (v1).
Added Macrauchenia's Lambent Dash.

Also Updated MrOtton's Cat Palace - Remastered.

squeaksmgee
Posts: 4
Joined: Sun Aug 26, 2012 10:03 am

Re: Mod: Main Menu with 171 user maps!

Post by squeaksmgee » Wed Nov 07, 2012 4:23 pm

this is taking ages to download all the menu mod files

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 10:16 pm
Location: Los Angeles
Contact:

Re: Mod: Main Menu with 171 user maps!

Post by Anton » Wed Nov 07, 2012 5:26 pm

squeaksmgee wrote:this is taking ages to download all the menu mod files
Sorry about that. The whole mod is about 1.3 GB right now, so I know it can take a while. We are working on some updates to SUMLauncher which will significantly change the amount of time it takes to update. Unfortunately, do to schedule conflicts, I don't expect that to really be released until the end of the year. But, we will make it better eventually.

Post Reply