Skip to content
Kenneth edited this page Jan 25, 2021 · 7 revisions

GDT.addTopics (defined in https://github.com/greenheartgames/gdt-modAPI/blob/master/api/topics.js) allows adding one or more topics to the game.

Example usage:

GDT.addTopics([
	{ 
		id: "Assassin", 
		name: "Assassin".localize("game topic"), 
		genreWeightings: [1, 0.7, 1, .6, .8, .7], 
		audienceWeightings: [0.6, 0.9, 1] 
	}
]);

For an explanation on genreWeightings and audienceWeightings see Weightings.

You can also provide an iconUrl for a topic which should be 256x256 pixels. If it is not provided the 'generic.png' under \images\topic icons will be used instead. If you still haven't trouble to locate the URL of the image, here's an example.

iconUrl: "./mods/aMod/img/assassin.png"

Advanced uses

For finely controlling how a topic is judged during development and review, you can provide the optional missionOverrides property. See missionOverrides for an example and explanation.

Clone this wiki locally