Originally Posted by
poisoned goat
Hey, sorry for the delay. I wasn't around during the weekend...
I designed the sapping script with a lot of help from Gigantus. Essentially, it's a script that utilizes a console command to blow a hole in the walls of a besieged settlement, much like what siege engines do. It's different from sapping in RTW (if you remember what that looks like) in that there's only 1 hole in the wall, and that hole may appear anywhere, even on the side that's opposite to your army deployment site.
Here's a brief description of how the script works:
Turn 0: Besiege a particular settlement. This script only works on a per-settlement basis, which means that a new script needs to be written for each settlement. It completely lags the game to write 199 scripts, so sapping will only work or certain settlements (Rome, Constantinople etc).
Turn 1: At the start of the turn, if your army is still besieging the settlement, there is a chance for a popup to appear, asking if you would like to recruit sappers for a sum of money. If you do, then you need wait 1 turn to see the results (they need time to do their work). If you don't, then they won't appear for the rest of that siege (the event is reset when the siege ends).
Turn 2: If you accepted the sappers, you'll see the results at the start of this turn. 3 things can happen - 1: The sappers blow a hole in the wall. 2: The sappers damage the walls, but fail to make a proper breach. 3: The sappers die trying. Option 2 is somewhat helpful if you have siege equipment that can damage the walls; option 3 is depressing. And yeah, you don't get your money back for sub-optimal outcomes.
The above description is the script for human players; the AI has its own version of this script that has lower probabilities of triggering, but at zero cost because the AI can't make decisions the same way as a human player would.
This script is pretty cool, but there are many quirks about it that I can't do anything about:
1: Even if there's a gaping hole in the wall, you can't attack the besieged settlement unless you built/brought siege equipment or have a spy opening the gates. This same bug is present when you try to attack a settlement with 100% damage to its walls... However, the AI does not encounter this restriction. Fun times...
2: As I mentioned in the introduction, one script needs to be written for each settlement. The way M2TW reads scripts doesn't allow me to create a "generic" sapping script.
3: If the popup appears and you save/reload without selecting an option, the outcome is the same as a rejection. Not 100% sure on this, will need to test this out. I'll get back to you later tonight.
4: The script can go haywire if the same settlement gets besieged multiple times in succession. The good news is that there's no real downside to this; the sapping script will just stop working for a while, and go back to normal once the settlement stops getting besieged.
5: I can't remember too clearly (been a while since I've messed with the script), but I believe sapping doesn't really work on fortresses/citadels. The console command used only destroys one section of the wall; guess what happens when there's more than 1 layer of walls. I can't run the command multiple times either, because the game only processes a single command.
I hope this answers your question!