I am trying to learn modding using UltimateLib by creating simple mods. Right now, I am just seeing if I can successfully add engine research through code. Here is my code:
[code]var Test = {};
(function(){
UltimateLib.Research.addEngineResearch({
id: “4c4c44b0-f512-420f-a47d-9eff2ed55d3f”,
name: “New Engine Research”,
canResearch: function () {
var res = true;
res = GameManager.company.isLaterOrEqualThan(1, 1, 2);
return res;
},
category: "Engine",
categoryDisplayName: "Engine",
v: 1
});
UltimateLib.Research.addEngineResearch({
id: “fhyrte53-45cd-57gh-dhc7-67fhcn174mal”,
name: “Better Engine”,
canReseach: function () {
var res = true;
res = GameManager.company.isLaterOrEqualThan(1, 1, 1);
return res;
},
category: “Engine”,
categoryDisplayName: “Engine”,
v: 2
});
})();
[/code]
The top engine research called “New Engine Research” works just fine. The catch is I used UME to create that one and the second one called “Better Engine” I made myself. I cannot see what I did wrong. Someone please help me with this!
EDIT:
I found what I did wrong. In the second research thing I spelled canResearch like “canReseach.” I forgot the r. My bad.