from Github:
Assert: route cost is 0 #121
Spoiler Github discussion :
alberts2 commented Sep 7, 2019
A zero or negative route movement cost is definitely invalid. Some random events can lead to negative values from getRouteChange.
billw2012 commented Sep 7, 2019
The only way I see to reconcile those two statements is to simply cap the route cost at a minimum of 1. Is that correct?
alberts2 commented Sep 7, 2019
Yes and find out why these random events don't work correctly.
billw2012 commented Sep 7, 2019
Ah I thought you meant the events were intended to do that. If they are not meant to drop getRouteChange below zero, then I shouldn't cap the route cost (thus hiding the problem even though it is still there), but instead leave the assert and fix the underlying bug.
alberts2 commented Sep 7, 2019
For some reason some events get executed multiple times and that leads to things like negative movement costs.
Here's the bts quest that is mentioned
Spoiler :
Code:######## INTERSTATE ########### def canTriggerInterstate(argsList): kTriggeredData = argsList[0] trigger = GC.getEventTriggerInfo(kTriggeredData.eTrigger) player = GC.getPlayer(kTriggeredData.ePlayer) if not player.isCivic(GC.getInfoTypeForString("CIVIC_LIBERAL")): return False return True def getHelpInterstate(argsList): iEvent = argsList[0] kTriggeredData = argsList[1] szHelp = TRNSLTR.getText("TXT_KEY_UNIT_MOVEMENT", (1, GC.getRouteInfo(GC.getInfoTypeForString("ROUTE_MODERN_ROAD")).getTextKey())) return szHelp def applyInterstate(argsList): iEvent = argsList[0] kTriggeredData = argsList[1] player = GC.getPlayer(kTriggeredData.ePlayer) team = GC.getTeam(player.getTeam()) iRoad = GC.getInfoTypeForString("ROUTE_MODERN_ROAD") team.changeRouteChange(iRoad, -5)
Looks like there is probably no a bug (last line). This quest just needs a tweak.
The bug is that the event is executed multiple times until the movement costs become negative. It should only be executed once.