Create your own achievement!

It’s very simple. For this example, I create a achievement “You’re monster” with description “Welcome to Apeurture Science Enrichment Center”, is hidden, the player gets it when he create a Portal Game, color green, and when the player gets it, he gets the achievement “Detective” and GLaDOS appears.

GDT.Achievements.youremonster({
    id: "youremonster",
    name: "You're monster".localize("achievement title"),
    description: "Welcome to Aperture Science Enrichment Center",
    isAchieved: function (company) {
        var game = company.gameLog.last;
        return game.name == "Portal" && game.topic == "Sci-Fi" && game.genre == "Adventure" &&
    }
    tint: "#F4B300",
    value: 150,
    hidden: true,
    completed: function (a) {
        document.writeln("<img id=\"glados\" src=\"http://upload.wikimedia.org/wikipedia/en/b/bf/Glados.png\" />") var glados = $("glados");
        for (i = 0, i < glados.height - 10, i++) {
            glados.offset({
                top: i - glados.height(),
                left: (innerWidth / 2) - (glados.width / 2)
            });
            j = i
        }
        for (i = j, i = > 0, i--) {
            glados.offset({
                top: i - glados.height(),
                left: (innerWidth / 2) - (glados.width / 2)
            })
        }
    }
}

If you have any question for the code, you have a “Reply” button :trollface:.

3 Likes

cool :slight_smile:

2 Likes

Nice! Doesnt looks so complicated (Except the GlaDOS`s size), but does that even work?

It’s the code used in the codeNw.js. And this page of modding wiki says it’s very simple to patch codeNw.js.

Oh. Cool.