Priority in Mods

Hello, this is a question to all modders out there who have actually messed with the source code and to the developers themselves. In adding new platforms or topics for example with the same id does one specifically take priority as I saw a post by Patrick mentioning about if multiple id’s of a topic only one will be put into game.
So does the mod get priority or is it the original source code. As if the mod takes priority it would make my life a lot easier than changing around the entire method to change a couple simple lines in the code. Thank you :smile:

can you give me a specific example of what you are trying to do?

Mainly trying to change the date in which the default consoles are released, along with adding an additional aspect to all the topics.
So having the NES and Commodore 64 released much later and putting in the first and second generation of consoles into the game while keeping the timeline historically correct.

The best way to do this is to override certain properties of pre-defined objects.

For platforms, I’ve described the technique here:

To change the Gameling you would have to do something like this:

var gameling = Platforms.allPlatforms.first(function(p){return p.id == 'Gameling';});
if (gameling){
	gameling.platformRetireDate = '';//set to custom date.
}

For topics, you can access them through the Topics.topics array.

Ok thank you that is all that I needed to know

To your original question:

When adding topics, duplicate topics (judged by the id) will simply be ignored. Whoever adds the topic first, wins.

For platforms, duplicate ids are not allowed and will cause an error.

2 Likes