I don’t know how to add specific researches (in lab)(JavaScript) normaly I say : GDT.addResearchItem(
But this will not add in lab. Can I say GDT.addRdbResearchItem ?
If not please tell me how because on github dosen’t say
You know GreenHeart has a mod engine that lets you do all that right?
What engine ? UME ? This is severely outed. Or?
The api does not specifically explain how to make research for the R&D lab. I’m pretty sure if you add the right things to your research, it will work.
To figure out what you need, you’ll have to look through the source code. Specifically, search for “opportunityInternet” (with the quotes). It’s the id of the first R&D research.
From the look of things, the main thing your need is a variable in your research called “targetZone” to be set to 2, though there are many other things you need, so looking at the source would be best. If you still can’t figure it out, I’ll try putting together a little guide for you another day.
If you can add a guide for me it would be great !! And if you can can check my code because it give’s me an error (syntax error) and I don’t know how to fix it :
http://www.mediafire.com/download/y62lv4ahlqlss1d/FutureExpansionPack_V2.rar
And I have a question : why everyone say that Ultimatelib is outed and it dosen’t work in the newest version ? I made a mod (FutureExpansionPack 1.0.0a) with UME and it works for me and it’s very simple (I use 1.5.25 version of GDT)
I don’t know about Ultimatelib since I only started modding a week ago, but I presume it’s cause it was made before a major updated that broke some of the code. You may be using code from it that still works or something.
As for looking over your whole mod, I don’t really have time to do everything, but I will look into making that tutorial for you. I’ll probably post it as its own topic so it’s easy to see for others who might need it.
(However, if someone else already knew the answer which is neither in the api nor anywhere explained on this forum, it would save me a lot of time.)
Oh, looking over this code really quick, your topics have two }'s after them… except the first one. Pretty sure that would cause it to give you errors. Syntax errors are the worst
Also, changed my mind about making a separate post. Here is what you need for R&D research:
- If using api, you need all the things for a normal research (id, name, v, canResearch, category, & categoryDisplayName). Otherwise, I’m pretty sure you just need id, name, & canResearch.
- pointsCost: cost in R&D points till research is done
- iconUri: this is a file path to the icon for the Research
- description: this is the description shown on the R&D screen
- targetZone: pretty sure this has to be 2.
- complete: a function that is run once the research is complete. Good for pushing notifications about what the player just researched.
And that’s it (I think). I don’t know what happens if you use the api to add R&D Research since the api requires things that aren’t used by R&D, and I don’t have time to test it.
Let me know how things go. Good luck with your mod!