I've already mentionned in this other thread that it's possible with a bit of scripting magic to get a complete list of all TF Items in the game and their respective effects, which can be handy for Wiki maintainers. However, being able to manipulate the game without the use of a save editor really is the part I dig the most about it, and I thought maybe some people might enjoy being able to do this as well, so I'm going to put what I know in this thread here and try to explain it as best as I can.
First of all, though, and before I lose anyone who can't figure out what I'm talking about, Fall of Eden is a browser-based game made in Javascript, in such a way that all of the game's state and logic is managed by the browser itself. Most browsers include a developper console (which you can open by pressing F12 or Ctrl+Shift+C and selecting the "Console" tab) to make it easier to check what a webpage or a web application is doing without having to go back and fourth and make change to the code, and this is exactly what we need in order to tinker with FoE.
Word of warning, though : Note that copying and pasting code from the interwebs in this console is generally a very bad idea, and can be used for all sorts of nasty stuff, but everything that can be done in this console is limited to whatever webpage you're on and is cleared once you refresh it. Doing this on https://www.fenoxo.com/play/FoE/foe.html? That's fine, there's nothing on the page except for the game itself. Doing the same thing on Facebook? That's just asking for trouble.
Now let's get started.
Starting a new game or loading up an old one and simply typing player in the console will show you the value of (what else?) the object named "player", which has been created by the game and contains everything it knows about the player character (see screenshot). Since that amounts to quite a bit of stuff, you'll probably need to click it in order to see everything it contains. If you look inside and find the "body" object within, you'll that it actually contains informations on what your character looks like, which is the first thing we'll try to alter. As a quick note, typing player.body returns this part alone (the element named "body" in the "player" object), since the dot operator allows to specify some part of an object.
If we want to quickly change our head and make it into a horse head, no need to do find Rosalina and drink potions all day anymore. If you look at player.body.head, you'll see that there's an element inside with the "race" key. Put simply, everytime the game wants to know what your head looks like, it looks at the race element and compares it to a reference it keeps somewhere else. That "somewhere else" happens to be the Race object. In principle, we could just do something like this :
player.body.head.race = Race.Horse;
...and while it would technically work, you might run into problems later on because your eyes and ears haven't changed alongside the rest of your face. Luckily, as we can see here, the head class, which describes the head object, happens to have a function that will take care of that for you. All you need to do is call it like this :
player.body.head.SetRace(Race.Horse);
And you now have a horse head that looks exactly like your previous head (i.e : Same eye and hair color, no fur if you didn't have any before).
TO BE CONTINUED
Is anyone interested in seeing more of this?
First of all, though, and before I lose anyone who can't figure out what I'm talking about, Fall of Eden is a browser-based game made in Javascript, in such a way that all of the game's state and logic is managed by the browser itself. Most browsers include a developper console (which you can open by pressing F12 or Ctrl+Shift+C and selecting the "Console" tab) to make it easier to check what a webpage or a web application is doing without having to go back and fourth and make change to the code, and this is exactly what we need in order to tinker with FoE.
Word of warning, though : Note that copying and pasting code from the interwebs in this console is generally a very bad idea, and can be used for all sorts of nasty stuff, but everything that can be done in this console is limited to whatever webpage you're on and is cleared once you refresh it. Doing this on https://www.fenoxo.com/play/FoE/foe.html? That's fine, there's nothing on the page except for the game itself. Doing the same thing on Facebook? That's just asking for trouble.
Now let's get started.
Starting a new game or loading up an old one and simply typing player in the console will show you the value of (what else?) the object named "player", which has been created by the game and contains everything it knows about the player character (see screenshot). Since that amounts to quite a bit of stuff, you'll probably need to click it in order to see everything it contains. If you look inside and find the "body" object within, you'll that it actually contains informations on what your character looks like, which is the first thing we'll try to alter. As a quick note, typing player.body returns this part alone (the element named "body" in the "player" object), since the dot operator allows to specify some part of an object.
If we want to quickly change our head and make it into a horse head, no need to do find Rosalina and drink potions all day anymore. If you look at player.body.head, you'll see that there's an element inside with the "race" key. Put simply, everytime the game wants to know what your head looks like, it looks at the race element and compares it to a reference it keeps somewhere else. That "somewhere else" happens to be the Race object. In principle, we could just do something like this :
player.body.head.race = Race.Horse;
...and while it would technically work, you might run into problems later on because your eyes and ears haven't changed alongside the rest of your face. Luckily, as we can see here, the head class, which describes the head object, happens to have a function that will take care of that for you. All you need to do is call it like this :
player.body.head.SetRace(Race.Horse);
And you now have a horse head that looks exactly like your previous head (i.e : Same eye and hair color, no fur if you didn't have any before).
TO BE CONTINUED
Is anyone interested in seeing more of this?
Last edited by a moderator: