[QUES] Engine Parts

So, I know how to make custom consoles (Clearly, as I have a mod for that,), custom topics, and (More or less) custom events, my question is… how do I make custom engine parts? (Without UME, darn it!)

If you are using UL it would be

UltimateLib.Research.addEngineResearch({
id: "db4b8cce-3111-40f5-b158-f0b970a4e6df",
name: "128 Player severs",
canResearch: function () {
						var res = true;
						res =   GameManager.company.isLaterOrEqualThan(35, 5, 3);

					return res;
			},
category: "Engine",
categoryDisplayName: "Engine",
v: 14
});

})();

:smiley:

@KizzaGaming Is UL required? I would prefer if I could sue base game functions. But if it is, I’ll deal with it. D:

1 Like

No UL isn’t required, i know how to add custom engine items with UL, but not the modding API

Then how do I use UL, but not ume? DO I just use that code and it works if they have ul, or do I need to do some “fancy footwork?”

1 Like

Yes, UL is basically a more advanced version of the API, just code it and users who have UL will be able to use it (Just remember to add UltimateLib as a dependency in the Package.json

UL is a library that is loaded into GDT just like the gdt-Mod-API is.

UME generates code based on the UL, so you don’t need UME to code your own module using UL.
Simply install and load the UL as a mod, create your mod by coding it like you want and put the UltimateLib as a dependency in your package.json file (like @KizzaGaming said).

1 Like

This is an working example of research item from GDT’s Mod API WIKI:

GDT.addResearchItem(
    {
        id: "Swift Loading",
        name: "Swift loading".localize(),
        v: 4,
        canResearch: function (company) {
            return LevelCalculator.getMissionLevel('Level Design') > 5 //The 'Level Design' level has to 6 or higher
        },
        category: "Level Design",
        categoryDisplayName: "Level Design".localize()
    });
1 Like