Great!, that worked. Thank you.
I have another question. would modifying the crime gold to be 0, yeild the same result as playerpaycrimegold?
with that I mean, when you issue a playerpaycrimegold, the faction removes the gold, and all dialogue functions work correctly, no guards are wanting to attack you etc. It just works.
With the mod i'm working on, after the player prays at 5 of the 9 divine shrines, a function runs in a quest script that pays the hold factions off.
Here's part of the script that I've been using.
Spoiler
function ShrinesComplete()
int pcrimegold = 0
pcrimegold += CrimeFactionWhiterun.GetCrimeGold()
pcrimegold += CrimeFactionFalkreath.GetCrimeGold()
pcrimegold += CrimeFactionEastmarch.GetCrimeGold()
pcrimegold += CrimeFactionHaafingar.GetCrimeGold()
pcrimegold += CrimeFactionReach.GetCrimeGold()
pcrimegold += CrimeFactionHjaalmarch.GetCrimeGold()
pcrimegold += CrimeFactionPale.GetCrimeGold()
pcrimegold += CrimeFactionRift.GetCrimeGold()
pcrimegold += CrimeFactionWinterhold.GetCrimeGold()
pcrimegold += CrimeFactionOrcs.GetCrimeGold()
PlayerRef.Additem(Gold001, pcrimegold, true) ; give the needed gold to the player silently.
CrimeFactionWhiterun.PlayerPayCrimeGold(false,false)
CrimeFactionFalkreath.PlayerPayCrimeGold(false,false)
CrimeFactionEastmarch.PlayerPayCrimeGold(false,false)
CrimeFactionHaafingar.PlayerPayCrimeGold(false,false)
CrimeFactionReach.PlayerPayCrimeGold(false,false)
CrimeFactionHjaalmarch.PlayerPayCrimeGold(false,false)
CrimeFactionPale.PlayerPayCrimeGold(false,false)
CrimeFactionRift.PlayerPayCrimeGold(false,false)
CrimeFactionWinterhold.PlayerPayCrimeGold(false,false)
CrimeFactionOrcs.PlayerPayCrimeGold(false,false)
debug.messagebox("Your bounty in the holds have been erased.") ; placeholder
EndFunction
Only issue I had with that function is it displays a notification saying how much gold was payed per each faction. So I changed it around a bit using ModCrimeGold.
Spoiler function ShrinesComplete()
int pcrimegold = 0
pcrimegold = CrimeFactionWhiterun.GetCrimeGoldViolent()
CrimeFactionWhiterun.modcrimegold(-pcrimegold,true)
pcrimegold = CrimeFactionWhiterun.GetCrimeGoldNonViolent()
CrimeFactionWhiterun.modcrimegold(-pcrimegold)
pcrimegold = CrimeFactionFalkreath.GetCrimeGoldViolent()
CrimeFactionFalkreath.modcrimegold(-pcrimegold,true)
pcrimegold = CrimeFactionFalkreath.GetCrimeGoldNonViolent()
CrimeFactionFalkreath.modcrimegold(-pcrimegold)
pcrimegold = CrimeFactionEastmarch.GetCrimeGoldViolent()
CrimeFactionEastmarch.modcrimegold(-pcrimegold,true)
pcrimegold = CrimeFactionEastmarch.GetCrimeGoldNonViolent()
CrimeFactionEastmarch.modcrimegold(-pcrimegold)
pcrimegold = CrimeFactionHaafingar.GetCrimeGoldViolent()
CrimeFactionHaafingar.modcrimegold(-pcrimegold,true)
pcrimegold = CrimeFactionHaafingar.GetCrimeGoldNonViolent()
CrimeFactionHaafingar.modcrimegold(-pcrimegold)
pcrimegold = CrimeFactionReach.GetCrimeGoldViolent()
CrimeFactionReach.modcrimegold(-pcrimegold,true)
pcrimegold = CrimeFactionReach.GetCrimeGoldNonViolent()
CrimeFactionReach.modcrimegold(-pcrimegold)
pcrimegold = CrimeFactionHjaalmarch.GetCrimeGoldViolent()
CrimeFactionHjaalmarch.modcrimegold(-pcrimegold,true)
pcrimegold = CrimeFactionHjaalmarch.GetCrimeGoldNonViolent()
CrimeFactionHjaalmarch.modcrimegold(-pcrimegold)
pcrimegold = CrimeFactionPale.GetCrimeGoldViolent()
CrimeFactionPale.modcrimegold(-pcrimegold,true)
pcrimegold = CrimeFactionPale.GetCrimeGoldNonViolent()
CrimeFactionPale.modcrimegold(-pcrimegold)
pcrimegold = CrimeFactionRift.GetCrimeGoldViolent()
CrimeFactionRift.modcrimegold(-pcrimegold,true)
pcrimegold = CrimeFactionRift.GetCrimeGoldNonViolent()
CrimeFactionRift.modcrimegold(-pcrimegold)
pcrimegold = CrimeFactionWinterhold.GetCrimeGoldViolent()
CrimeFactionWinterhold.modcrimegold(-pcrimegold,true)
pcrimegold = CrimeFactionWinterhold.GetCrimeGoldNonViolent()
CrimeFactionWinterhold.modcrimegold(-pcrimegold)
pcrimegold = CrimeFactionOrcs.GetCrimeGoldViolent()
CrimeFactionOrcs.modcrimegold(-pcrimegold,true)
pcrimegold = CrimeFactionOrcs.GetCrimeGoldNonViolent()
CrimeFactionOrcs.modcrimegold(-pcrimegold)
PlayerRef.StopCombatAlarm()
EndFunction
That works great as far as removing the gold from factions and not having it displayed as a notification. I'm just concerned that the game might think there is still gold in the crime factions. If it doesn't and it yeilds the same results as playerpaycrimegold, then I'll just stick with the modify function.
Edit: I have tested both ways in game and the second does work; The stats show no bounty and the guards don't ask for payment. I did have to add the stopcombatalarm though on the second version because the guards would still be in alert mode and try to attack or come after me. While this works for now and in the short run, I'm not sure what the long lasting effects of having the crime gold not be payed off by the player would be.