[PYTHON/MOD-COMP] A* Pathfinder + Move Highlighter

Well, in my case it makes no different because I'm adding the 'starting' plot manualy to the list and it's only for calculating the costs and the time for the road prodject.
I'm not sure, whether I understand you completely ...

example:
'starting' plot is hills, target plot is adjacent plains, calculated costs 2, correct 1
'starting' plot is plains, target plot is adjacent hills, calculated costs 1, correct 2

So I don't get how adding the 'starting' plot manually avoids wrong results ... The error occurs within executing 1 line of code - I suppose or even claim, this line has to be changed!

(in fact, this line has to be expanded, because the shown bug masks another, but then it works like a dream. 12monkeys did a great job: as a whole the mod is superb!!)

PS. maybe you build your "Imperial Roads" on existing "normal" roads ... (then there is no difference ... 1/2 or 1/3 in both directions) ??
 
well, my starting plot and my end plot is always a city... (so yes, almost always a road; and not adjacent)
but even with the bug in the a* tool i my case it would only cause a slightly wrong calculated cost for the roads (in the worst case) that nobody would ever notice - but never mind, it is not important for the imperial roads module, but it IS important for my next module i have in mind - so thx for the fix
 
Ooops, I forgot to post some screen shots I had prepared.
 

Attachments

  • hightLightPicts.zip
    3 MB · Views: 143
Top Bottom