I am trying to add an Achievement in a new mod part and I can’t seem to be able to add it, is it because of the mod-api not having a function?
Here’s the code im using as a Achievement test:
var ACM = {};
(function(){
ACM.addAchievementTest = function(){
id: “Test”,
title: “Test”,
description: “Test Working”,
tint: ‘#78BA00’,
value: 1,
hidden: false,
canEarnMultiple: false,
isAchieved: function(){
var res = true;
res = GameManager.company.gameLog.length >= 50;
return res;
}
};
})();
It has recently been added to UltimateLib
http://forum.greenheartgames.com/t/rel-tools-ultimatesuite-ultimatelib-1-3-1/9855/
http://gdt-ultimatesuite.abesco.de/docs/
http://gdt-ultimatesuite.abesco.de/docs/classes/UltimateLib.Achievements.html
You can use:
var ULAchievementsObject = {
id: "UltimateLib",
title: "UltimateLib",
description: "Played a game with UltimateLib installed.",
isAchieved: function (a) {
return true;
},
tint: "#FFFFFF",
value: 10,
hidden: true,
canEarnMultiple: false
};
UltimateLib.Achievements.add(ULAchievementsObject);
1 Like
yeah but is there any way of adding it without the UltimateLib because I want my mod to be easily installed with a drag and drop meaning one file.
You would add the UltimateLib the same way as you would need to have the gdtModAPI already installed as a module. So that’s not really a big deal. UL targets to ease up exactly this kind of development, so you should really consider it
1 Like
so users who download the mod have to have both Ultimate Lib and mod-api installed?
That’s right. The gdtModAPI and the UltimateLib should be then installed on the system. The number of mods using UL is growing and so will the library over time. So you might want to consider using it, as it would allow you to create mods using less code and easier approaches.
You need to point out the users of your mod that UL is required (like others do) and simply post a link to the thread or download page, so that it is easy for a user to find it.
Example:
Set rounded corners to windows using a radius of 30:
UltimateLib.Visuals.Tweaks.setRoundedWindows(30);
Or to enable all available visual tweaks:
UltimateLib.Visuals.Tweaks.setAllTweaks();
alright because I always seen it as mod-api being something like MineCraft’s ModLoader and UltimateLib being MineCrafts Awesome Forge, that’s how I seen it as.
So when will UltimateLib be its own unique modloading api not needing another mod?
Alphabit why does your mod not work as its own modloading api system instead of depending on the original mod-api?
Because some function in UL use the gdtModAPI.
will can you not implement it into the Utimate Lib so that it becomes fully independent, besides the Game Dev Tycoon game obviously
We have no plans for this, but we will see on a longer term if this would make sense.
It might also depend if and how the official mod API will be extended.
I think that there should be one modloading api and that should be UltimateLib, I know that GHG Devs put great effort into allowing us to make mods but they should allow you to have the modloading api system, but one but thing that I see so far about doing this is that UltimateLib wouldn’t automatically be updated unless GHG had the game fetch the download from a link that never changed.
Yes, that’s true. But when using the UltimateLib, you will get a notification when a new version has been released, so you won’t miss any update. I don’t know what will happen in the future… so let’s see what will happen
1 Like