[QUE] How to get Topics working in my Mod

How can I get Topics working in my mod, that I am currently coding.

You can look at my mod’s code at https://github.com/Turntablelover/Game-Dev-Tycoon-Mod

I shall take a look for you then ^^ do you get an error btw?

Ok so the basic format of a topic is this:

GDT.addTopics([
		{
		    id: "Alternate World",
		    name: "Alternate World".localize("game topic"),
		    genreWeightings: [0.7, 1, 0.9, 1, 0.8, 0.8],
			audienceWeightings: [0.7, 0.9, 1]
		}
]

And then you have an optional missionOverrides function you can add to it but I wont bother you with than.

In my case, i’ve put this around it:

ExpPack.addTopic = function () {
	GDT.addTopics([
		{
		    id: "Alternate World",
		    name: "Alternate World".localize("game topic"),
		    genreWeightings: [0.7, 1, 0.9, 1, 0.8, 0.8],
			audienceWeightings: [0.7, 0.9, 1]
		}
         ]);
};

then in your loader function you add the line: ExpPack.addTopic();

@DzjengisKhan I got a error

  1. Uncaught Syntax Error: Unexpected end of input

hm… is you github project latest version?

@DzjengisKhan it’s the current public version, 0.9.1.

The development version is 0.9.2, and it hasn’t been pushed to GitHub yet for public download.

You can download the development version, 0.9.2, at https://db.tt/dcDRYgbr

I’ll check it in a moment, but i’m busy with something very important for modding in general a.t.m. Can you guess what it is?

a Modding Website

Hmmm… guess that makes 2 things xD