Diagonal walls only work when the player is actually rubbing up against the wall though.
It may not be clear what I'm trying to accomplish... but for example, if I had a sloped area that was 16 pixels wide, and 256 pixels from diagonal edge to diagonal edge, I wouldn't want the player to just walk straight across it without moving diagonally, but at that size it would be entirely possible to miss both edges, which is where the walls would be.
Its difficult to explain exactly what circumstances this would be used aside from simply pointing out that I need some raised platforms on a section of floor, and it won't look right if the player traverses them as if they were flat.
This problem seems really hard because it requires to modify the input direction and use a different one. In order to avoid a lot of complicated code and to accomplish this, we could try to use some tricky trick, or at least that is what I would do. I propose the following trick, which is not perfect but it is quite close to be so:
1) The idea is, again, to use some of the four diagonal walls to make the hero rub against them: "wall_top_right", "wall_top_left", "wall_bottom_left", "wall_bottom_right". In this example I am gonna assume that the hero enters the stairs from the left (so he has right direction) and the stairs go in direction top-right.
2) Since we want to allow the hero to enter from any possible coordinate, we should disable those tiles and enable them in the correct position when the hero enters the stairs, i.e., when he starts overlapping them. To do that, you can use two (or more if necessary) custom entities, with no sprite, with modified ground of diagonal type; you just add them the type of solid diagonal ground you need and enable them in the correct position. The hero would be stuck between these two entities and would walk in the correct direction because he would be rubbing them when walking to the left or right. Note that custom entities can have any position, not only multiples of 8, so this should be doable.
3) To allow the hero move in "up" and "down" directions, we could use a collision test or timer to check the direction of the hero. If he is "up" or "down", then we change the position of the custom entities, one to the left and one to the right of the hero, and we change their modified ground to "wall", so that the hero is again stuck between them but this time he is only allowed to move up and down. In the same manner, if we detect that the hero has changed direction to left or right, then we restore the position and ground type of the custom entities to the previous case (the diagonal one). (When testing/debugging this solution, I recommend you to add a sprite to the custom entities to see them and check if they are in the correct position.)
Possible issues:
-The hero cannot walk diagonally if he is facing up or down direction. In particular, there would be a wrong behavior if the hero is walking laterally, for instance when he is in "loading_walking" animation with the sword.
-Enemies that follow the hero could be stuck between these custom entities when they appear. So you should put some barrier at the entrance of the stairs that cannot be traversed by enemies, which would obstruct them entering the stairs.
Possible advantage:
-The Pegasus built-in boots could work to run through the stairs.