*Shameless Necropost*
I came across this thread when I had a similar problem with my own mod. It has to do with the way the speech is dealt with.
Because there are different voices for most races (and two genders, of course), the game must find a way to differentiate between the different character who are talking, so as to avoid an orc having an imperial voice, or a man having a woman's voice.
For all the arresting guard topics, there is the condition
GetIsRace Imperial == 1
. This means that only Imperials can say these lines, and hence all guards in the base game are Imperials. (This gave me a lot of trouble in my mod, when guards in one city could arrest you, but not the other)
There are two ways to fix this problem, and it all depends on whether you want to do some voice-overs or not (Presumably if you've made a whole town, you're willing to do that)
The first (and easiest) way is simply to open up the filtered dialogue screen (Characters>Filtered Dialogue), then in the topics tab, scroll down to GREETING and find all the things the guards say (They are sorted under 'Crime' in the quest column) and then add a new condition to it:
GetIsRace [Your Custom Race] == 1
You will also need to check the 'Or' box on both your new statement and the old one pertaining to Imperials. This method will make your guards have an Imperial voice, which could be ok if your race is similar to Imperials.
The Second method will be a lot more time consuming. You will actually need to create all the things you want your guards to say from scratch. To do this, open up the GREETING topic in the same way as above, then right click inside the box and select 'New'. From there you can type what you want the guards to say into the box for 'Response Text'. You can also record the voice-over and set the facial expression here, but I wont go into how to do that. Once that's done, click OK.
Next, in the box titled 'Resulting Script' put the following script in:
Set Crime.PCBounty to Player.GetCrimeGoldMessage "Current Bounty: %.0f" Crime.PCBounty, 10
This will make the player's bounty appear in the top left of the screen.
Next, in the Conditions box, put the following conditions:
GetIsRace [Your Race] == 1 Not run on TargetIsPlayerInJail == 0 Not run on TargetCanPayCrimeGold == 1 Run on TargetGetCrimeGold > 0 Run on TargetIsGuard == 1 Not run on Target
All those should be self-explanatory.
Next, in the choices tab, add the topics: 'ServeSentence', 'ResistArrest' and 'PayGoldForCrime'. This will bring up the usual choices when the player gets caught.
Finally, check the random box if you want to have different greetings each time you're arrested.
You will also need to make topics for each of the choices the player can make. Use the same method as above, but put the replies in the ServeSentence, ResistArrest and PayGoldForCrime sections respectively.
Also, you will need to add these scripts to each reply's resulting script box:
ServeSentence:
Player.GotoJailAnvilPCCellDoorRef.LockBravilPCCellDoorRef.LockBrumaPCCellDoorRef.LockCheydinhalPCCellDoorRef.LockChorrolPCCellDoorRef.LockICPCCellDoorRef.LockLeyawiinPCCellDoorRef.LockSkingradPCCellDoorRef.Lock
Note: If you make a new jail, add the door reference to this list with a .Lock suffix.
ResistArrest
ModDisposition Player -10StartCombat Player
PayGoldForCrime
player.PayFine
Hopefully this will clear up any trouble for people who have this problem in future.
P.S. This will also need to be done if you want to have guards of non-custom races (Such as Nords), as these aren't available in the base game.