Difference between revisions of "Modding"

From AAGRINDER wiki
Jump to navigationJump to search
(add ladders, floating, duplicating, and tell more about gravity)
(move old hax to past exploits)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Gravity ==
+
== Important disclaimer ==
  
In AAGRINDER, gravity is an illusion. If you don't want to, you don't have to follow it!
+
<span style="color:red">Please note that modded clients are against the rules on some servers.</span> See the [[Server list|server list]], or [[Setting up a server|create your own server]]!</p>
  
This means that the server doesn't enforce gravity. It's all happening client-side, so if you modify your client, you don't have to fall down if there is no block below you. Note that you can't simply move up in thin air, but it's still quite useful in about every situation <del>except if maze made update that broke it</del>.
+
== ??? ==
  
At the moment, AAGRINDER is played in a browser [[https://store.xkcd.com/products/citation-needed-sticker-pack citation needed]]. Firefox unfortunately doesn't allow you to modify the JavaScript you want to run manually it seems, but Chromium can do it using its developer console (F12). For privacy, it's better if you use [https://github.com/Eloston/ungoogled-chromium ungoogled-chromium] instead of normal Chromium though!
+
Please make up new hax and put them here
  
To disable gravity, you'll want to only process fall events when you want that. The code below is a replacement for the lines 300 through 3XX of the `GameLogic.js` file that will reject fall events unless you hold the up button (w), except if you are in water.
+
== Past exploits ==
  
 +
=== Gravity ===
  
(a [[ghost]] ate the code, or fyfy hasn't pasted it yet)
+
In AAGRINDER, gravity is an illusion. If you don't want to, you don't have to follow it!
  
It's quite the hacky code and I'm sure maze would think it's bad but that's okay
+
This means that the server doesn't enforce gravity. It's all happening client-side, so if you modify your client, you don't have to fall down if there is no block below you. Note that you can't simply move up in thin air, but it's still quite useful in about every situation <del>except if maze made update that broke it</del>.
  
== Duplicating oneself ==
+
At the moment, AAGRINDER is played in a browser [[https://store.xkcd.com/products/citation-needed-sticker-pack citation needed]]. Firefox unfortunately doesn't allow you to modify the JavaScript you want to run manually it seems, but Chromium can do it using its developer console (F12). For privacy, it's better if you use [https://github.com/Eloston/ungoogled-chromium ungoogled-chromium] instead of normal Chromium though!
  
You can log in multiple times with the same username but different capitalizations. For example, maze might also simultaniously log in as Maze and mAze and maZe and mazE and MAze and MaZe and MazE and mAzE and maZE and MAZe and MaZE and MAzE and mAZE and MAZE.
+
To disable gravity, you'll want to only process fall events when you want that. The code below is a replacement for the lines 300 through 307 of the GameLogic.js file that will reject fall events unless you hold the up button (w), except if you are in water.  
  
Does anyone know how inventories work exactly then? Do all different capitalizations have their own ones? Please try it out and add it here
+
    'f':(view, data)=>{
 +
        const x = view.player.x;
 +
        const y = view.player.y;
 +
        if (!data.j) { // do gravity if jump is held
 +
            isThisWater = view.getBlock(x, y);
 +
            isWater = isThisWater === 'w';
 +
            if (!isWater) { // do gravity in water
 +
                view.reject(); // don't gravity!
 +
            }
 +
        }
 +
 
 +
This is unfortunately '''not allowed''' on the main server.
  
== Currently imaginable exploits ==
 
  
 
=== Floating upwards ===
 
=== Floating upwards ===
 
If you apply gravityhax while on the login screen, you can notice that you'll be able to jump after logging in, even if you are floating in the air. Theoretically, this could be exploited to float upwards by signing out and in again whenever you want to go up.
 
If you apply gravityhax while on the login screen, you can notice that you'll be able to jump after logging in, even if you are floating in the air. Theoretically, this could be exploited to float upwards by signing out and in again whenever you want to go up.
  
It's a bad idea though because that would spam the chat with logout and login messages. Don't do it.
+
It's a bad idea though because that would spam the chat with logout and login messages and drain the server's resources as it would have to constantly send your client a lot of terrain. Don't do it!
 +
 
 +
=== Ladders ===
 +
 
 +
In the past, when logging out while standing inside a block, you would immediately be moved up until you'd no longer be inside a block once logging in again. Due to this behaviour, it was possible to log out in a ladder of H blocks and log back in to arrive at the top of it. Maze [https://gitlab.com/MRAAGH/aagrinder/commit/9356a941c10492db46691861cfb66b498c44a39b fixed this on September 10th] though.
  
== Past exploits ==
+
=== Duplicating oneself ===
  
=== Ladders ===
+
You could log in multiple times with the same username but different capitalizations. For example, maze could also simultaneously log in as Maze and mAze and maZe and mazE and MAze and MaZe and MazE and mAzE and maZE and MAZe and MaZE and MAzE and mAZE and MAZE.
  
In the past, when logging out while standing inside a block, you would immediately be moved up until you'd no longer be inside a block once logging in again. Due to this behaviour, it was possible to log out in a ladder of H blocks and log back in to arrive at the top of it. This was fixed some time ago though.
+
Maze [https://gitlab.com/MRAAGH/aagrinder/commit/aa741afb85fe232b2c66055632653a6531dc6cb3 fixed this on October 6th, 2019], before anybody figured out how inventories worked exactly.

Latest revision as of 16:14, 13 September 2020

Important disclaimer[edit]

Please note that modded clients are against the rules on some servers. See the server list, or create your own server!

???[edit]

Please make up new hax and put them here

Past exploits[edit]

Gravity[edit]

In AAGRINDER, gravity is an illusion. If you don't want to, you don't have to follow it!

This means that the server doesn't enforce gravity. It's all happening client-side, so if you modify your client, you don't have to fall down if there is no block below you. Note that you can't simply move up in thin air, but it's still quite useful in about every situation except if maze made update that broke it.

At the moment, AAGRINDER is played in a browser [citation needed]. Firefox unfortunately doesn't allow you to modify the JavaScript you want to run manually it seems, but Chromium can do it using its developer console (F12). For privacy, it's better if you use ungoogled-chromium instead of normal Chromium though!

To disable gravity, you'll want to only process fall events when you want that. The code below is a replacement for the lines 300 through 307 of the GameLogic.js file that will reject fall events unless you hold the up button (w), except if you are in water.

    'f':(view, data)=>{
        const x = view.player.x;
        const y = view.player.y;
        if (!data.j) { // do gravity if jump is held
            isThisWater = view.getBlock(x, y);
            isWater = isThisWater === 'w';
            if (!isWater) { // do gravity in water
                view.reject(); // don't gravity!
            }
        }

This is unfortunately not allowed on the main server.


Floating upwards[edit]

If you apply gravityhax while on the login screen, you can notice that you'll be able to jump after logging in, even if you are floating in the air. Theoretically, this could be exploited to float upwards by signing out and in again whenever you want to go up.

It's a bad idea though because that would spam the chat with logout and login messages and drain the server's resources as it would have to constantly send your client a lot of terrain. Don't do it!

Ladders[edit]

In the past, when logging out while standing inside a block, you would immediately be moved up until you'd no longer be inside a block once logging in again. Due to this behaviour, it was possible to log out in a ladder of H blocks and log back in to arrive at the top of it. Maze fixed this on September 10th though.

Duplicating oneself[edit]

You could log in multiple times with the same username but different capitalizations. For example, maze could also simultaneously log in as Maze and mAze and maZe and mazE and MAze and MaZe and MazE and mAzE and maZE and MAZe and MaZE and MAzE and mAZE and MAZE.

Maze fixed this on October 6th, 2019, before anybody figured out how inventories worked exactly.