[Talk] Don't stop developing Expansion Pack

YYYYEEEEESSSSS.
A legend is back

Woow a legend?? Really?? I’ve never been called that before :stuck_out_tongue:

1 Like

@KizzaGaming Don’t be so creepy :stuck_out_tongue: You should have called him a “living legend:wink: U know, legends are usually long time gone!

just kiddin

1 Like

Haha

Hmm alright, custom genres is done. Except for 1 quiet anoying bug: you don’t get any tech/design points when creating a game with the genre :stuck_out_tongue:

1 Like

Just out of curiosity what ideas do you have for Genre’s? Cause I personally thought they were all pretty well defined >_> I made a topic suggesting adding in a new section called themes. This way some topics can go to themes like medieval fantasy, military. then you make topics like beat’em up and first person shooter. I made a thread with my idea.

here it is if you want to read it. I was thinking of modding it myself but it would take forever since I never used javascript before. With you being the legend, if you don’t think it is possible or too time consuming for you then what chance do I have?

http://forum.greenheartgames.com/t/changing-some-topics-into-themes/10566

The first genre that I’m going to add will be Platformer.
After I get that one working I’ll see what else I can add ^^

Wow didn’t think of platformer as a genre…gues I just lumped it up with casual >_> So how are you gonna balance it out? I take it is gonna be more design heavy. Hmmm what could be another tech genre? Is platform gonna be the only Genre you add?

Idea: Add Turn-Based to genres

Thats a section of strategy

Yes, it is. I didn’t thought that sorry

Hey @PatrickKlug, I don’t know if I’m doing something wrong but I found something really weird:

While adding a new genreWeighting I noticed that .splice is not working for the platforms. But here’s the weird thing: using .splice is working for everything else. For topics and the stage missions.

Is this a known thing?? And could you or anyone else (like @alphabit/ @SirEverard / @kristof1104)

Thanks in advance :smiley:

When you say that splice isn’t working for genreWeightings do you mean the genreWeightings within a Platforms object?
If so how are you attempting to splice them?

http://puu.sh/6E1Pt/22b0ec1a36.png Seems to work for me?

Another thing to note is that it might be better to just push a new element onto the arrarys rather than splice them. Considering you are going to be adding a genre, so it would be safer regarding your code and how much you would have to change if you kept the order of the genres the same (Even if you do not display them in the same order in the UI)

1 Like

Yes that’s the genreWeightings I mean. But I try to add it in the same way you do. Except that I use it in a for loop (so it will go through all the platforms).

This is the piece of code:

for (var p = 0; p < Platforms.allPlatforms.length; p++) {
	Platforms.allPlatforms[p].genreWeightings.push(1);
};

EDIT:

It’s probably fixed already (needs some testing)

1 Like

Looks good, consider adding a log output just for debugging (remove in release):

console.log(Platforms.allPlatforms[p].genreWeightings);

So:

for (var p = 0; p < Platforms.allPlatforms.length; p++) {
	Platforms.allPlatforms[p].genreWeightings.push(1);
        console.log(Platforms.allPlatforms[p].genreWeightings);
};

and then you can check the output in the console :smile:

Something else you might want to consider (if you haven’t already) is that Platforms.allPlatforms will also display any custom platforms. So you would only want to add the extra weighting for platforms that do not already have one.
i.e. a modder might add a new platform with extra weightings to be compatible with your mod.
So adding a check:

for (var p = 0; p < Platforms.allPlatforms.length; p++) {

    if(Platforms.allPlatforms[p].genreWeightings.length == 6){

	Platforms.allPlatforms[p].genreWeightings.push(1);
        console.log(Platforms.allPlatforms[p].genreWeightings);

    }

};

(or similar)

Yea I’ve already been thinking about that ^^ I’ll add that security later Thank!! :smiley:

1 Like

I wouldn’t add a genreWeighting by just pushing it to an array. It’s better to define a new field on platforms, topics that can map a new weighting based on the id of a genre… otherwise multiple mods can’t add multiple genres and it will be hard to debug any mis-match issues.

1 Like

Hmm @PatrickKlug , so let me see if I get this correctly ^^

I would have to give the platforms/topics a new array with the custom genres in it?
But can I still call those functions in the GameGenre.getGenreWeight etc.?

(I might be late to say this)
YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
DZJENGISKING’s BACK!!!