Yes! I know how to make castle wall scenarios!
Like this, you have the wall terrain, and you dont need a moat! For all tiles inside the wall terrain and all the wall terrain tiles, you set them in python as under list "enter wall" Then you take the wall terrain and make it impassable unless roaded. Then you take all the squares in the list and say (in people, not python):
If a unit is on this square, then it's next move may be on any terrain (including impassable). Now, special units, called ladder men, can walk up to the wall and place a "road" with the graphic of a ladder, and then the terrain is no longer impassable from anywhere. You can tip the ladder by pillaging it, so you are safe again. Only foot units can move up the "road" I think also when on a wall, you must be on a tile with the "road" improvement in order to move to any tile not in the "enter wall" list. (unless you feel like jumping off a wall). I have thought of a new concept for walls. Rather than being one tile, they can (and will) be two (or three, or more). Like this:
Two Tiles....-M
..............-M.ll
M.M.M.M.M.ll........Tile 1
lll.llll.llll.llll.lll...........Tile 2
or
Three.........-M
..............-M.ll
M.M.M.M.M.ll.ll.....Tile 1
lll.llll.llll.llll.lll.ll........Tile 2
lll.llll.llll.llll.lll...........Tile 3
You can only move on M, and when you "build" a ladder, all the lll's in a line have it built on them. I think I will need multiple graphics of walls for this one. One set for being inside the wall looking out, and one for being outside the wall looking in. If that doesn't make sense I can always try to send You a save game of what I mean (from the editor)