so,the goblin must bring along the logs to crossing the moat....
i think they must bring caravan....
thats why i suggested "rope ladders". every goblin can carry one or two ropes with them to "construct a rope ladder" down into moats or up onto a wall they cant get past without it.
i think the correct way to calculate where the invaders would place this is to first identify the "outer walls" (this can be a moat, a built wall or a door) i think a "paintbucket fill" sort of calculation has to be preformed, the same as the depot accessibility tester works then finding the closest inner layer of walls they can reach and start siegeing that one appropriately (for doors and walls battering ram, moats: fascines or a bridge tunnel with mantalet depending on dept)
well this would require tons of scripts to "calculate whats where etc" and i am pretty sure the players could abuse it somehow with tricky wall placement.
(and as if goblins would care much about high architecture tunnels)
the simpler idea is to just allow "constructions (walls, doors) to be attacked" and to take damage depending on the material its made of and the material that attacks it.
so monsters could simply attack walls and either get tired of attacking as they cant breach them so they move around a bit more and try another place (depends on intelligence i guess).
or when they carry ropes, they can build rope ladders next to constructions they cant get up/down/around like a wall or a moat.
damaged but not destroyed constructions could be repaired. (constructions would be either "working/damaged/ or destroyed". damaged constructions could take longer to use (i.e. a ladder) and maybe hurt the user. and damaged walls are easyer to break through with attacks.)
well for a water/magma filled moat its more complicated...
they cant "build rope ladders or attack it".... and when they "fill up" (what still would be a more or less usefull solution for water/magma obstacles" they might flood half the map with water/magma while they fill up some spaces of the moat.
building a floor tile over water from a chopped down tree or dug out stone could work there (building something to get around the obstacle, here a floor tile instead of a ladder from ropes").
where on magma moats.... well.. maybe they carry waterskins like our military does and can use these to get water to cool down the magma and then build a floor over it?
-----
as other idea: "able to build siege camps" (like the ones in the "stronghold 2" games)
from where they can gather stone/wood and build ladders/catapults/ rams etc...
could be similar to the kennels, a 6x6 workshop that they build near the border where they enter when they siege.
coudl be some workshop/stockpile construction like:
ssswww
ssswww
ssswww
gggWWW
gggWWW
gggWWW
s=stone stockpile
w=wood stockpile
g=finishes siege goods stockpile
W=siege workshop to build siege equipment
ladders could be similar to ropes just out of gathered wood, when they are out of ropes.
a ram could either be:
-like a wagon that can slowly attack... (people could easyly avoid the attack but it does huge damage to constructions nearby)
-or a small one like a carried weapon that has bonus vs constructions but is quite useless in combat. (i.e. a huge slow blunt weapon) but could be thrown on the ground when in combat to equip a weapon, and picked up after combat again.
------
regarding "fill in":
they could gather dirt like the "gather sand zone".
and throw that dirt down holes like the "fill pond zone"... where the dirt falls down like water does. and creates a ramp when it falls on empty ground or creates a filled dirt tile when it falls on a ramp tile.