Hmmm… I’m not sure, I am able to do this in the original code, but that is illegal. I might take a look and try something to add more options then the default ones. But this may also cause some trouble when multiple people are doing this since it’s an array (it may get confusing from here) and the v’s don’t have id’s or something. So i don’t think it’s possible to add more v values and distribute your/my mod. I’m sorry : (
According to GitHub, a update for the Mod API just came out 26 minutes ago. (https://github.com/greenheartgames/gdt-modAPI)
I am happy to announce that a new beta version is available now and should update automatically. There are some changes which should make our lives easier.
First of all the modConfig file is gone. All package.json files are parsed automatically to determine which mods are available.
In the main menu of the game is a new button ‘Mods’. There you can enable/disable mods (restart required afterwards).
All mods are loaded in the displayed order. Dependency checks are done automatically. (Mods displayed red: dependency missing)
Great job @DanielKlug and @PatrickKlug, I love what you do to help improve the quallity of modding ^^
Btw. I was about to make some changes to the gdt.AddResearchItem so there’s a table with all the costs per V level
Still no modding for me yet
Thanks @DzjengisKhan. Regarding multiple v values in research items. This is not possible because every research item is a unique item and can only get researched once. That means if you want to have for instance (Headset V1, V2, V3 and V4) you need to add 4 different items. (at least the name, v value and canResearch function should be different)
I got Could Not Parse package.json for all of the mods I had installed including my mod:
Mods I had Installed:
- Ciber mod
- ExpansionPack
- gdt-modAPI
- jason-modAPI
- venomous-modAPI (my mod)
Sorry I should have mentioned that before. Most of the package.json files are invalid.
3 reasons I saw:
- "version: “0.1.0”, instead of “version”: “0.1.0”,
- comma missing somewhere (most of the time at the end of the line)
- “main” : “./scriptfile.js”, the scriptfile is wrong written or without fileextension
@DanielKlug i don’t know what’s wrong with my mod. It keeps giving me the error, I mentioned above.
Code:
{
"id" : "Mod",
"name" : "Game Dev Tycoon Mod",
"version: "0.9.7",
"author":"Josh Zimmer(Turntablelover) <darthcoolness@gmail.com>",
"description" : "Mod for Game Dev Tycoon",
"url" : "https://github.com/Turntablelover/Game-Dev-Tycoon-Mod",
"main" : "./source.js",
"dependencies" : {
"gdt-modAPI":"0.1.x"
}
}
@DanielKlug I knew that ^^ But i mean a table were all the costs of the research when it has v: 1, so it would be like:
v:1 10 8000 20000 10 10000
But then for v: 1, 2, 4, 6, 8, 10, 12, 14
@DzjengisKhan as far as I understand this is just added info on the wiki, right? you can add/modify the wiki if you wish. only code-changes need to go through a pull request.
@DzjengisKhan Do the new topics show up in the topic menu? They’re not showing up when I start a new game (a longer topics list)…
Also @PatrickKlug I don’t understand modding and the same thing happened to me that happened to @Venomous (errors on certain mods), so how would I fix this? And on a random note GDT is a great game!
The problems @Venomous encountered were all syntax errors or simply misplaced files. Modding GDT does require a basic knowledge of JavaScript and there is no easy fix for problems that arise because of a lack of JS knowledge.
Having said that we and the community are usually happy to help but you will have to provide more helpful details on what exact errors you encounter.
@PatrickKlug It said that it could not parse morematari, moreninvento, Ciber mod, and OPC mod when I start the game.
You probably have old versions of the mod because the mod owners have to update the package.json for the mod to work. Download the newest version of your mods and you most likely don’t have errors anymore.
I downloaded the latest versions, so I guess I’ll just have to wait for them to update… Wait, I didn’t check yet… Maybe they updated!
Quick question, how do I enable mods? I’ve downloaded all the mods and placed them in the mods folder, but when I start the game I can’t enable them.