[Talk] Don't stop developing Expansion Pack

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!!!

he’s a khan of the mongol empire

DONT STOP MAKING EXPANSION PACK MOD UNTIL I DIED!

1 Like

@kingofblox360 He continued development. Please read that kind of stuff before you necro a thread for no reason :wink:

4 Likes