Let me start out by saying that I’m very impressed by your efforts and skill. 🙂
... before diving straight into the nerdy stuff:
What are the average- and worst-case sizes of your open list?
I’m asking because the K-Mod Pathfinder (refactored and improved by @f1rpo for the Advanced Civ Mod...
You're on the right track but you'll have to deal with some issues 1) Will the int version replace the bool version, if so you may want to migrate the existing savegame format. 2) Will the modifier from the int version be additive ? I suppose that's easier since you could have two separate tech...
IMHO, the easiest way to generalize the movement limit would probably be to have kTeam.isExtendMovementLimits() return an int rather than a bool which you could then use a as a modifier rather than an on/off toggle.
I wanted to amend my reply but then I saw that our eminent modder, @f1rpo had joined in :) . I did edit my message which originally stated that I assumed that the UI pathfinder would use the MOVE_IGNORE_DANGER flag which turned out to be a flawed assumption!. Like @f1rpo pointed out, this flag...
I've pushed a fix to the WTP develop branch. The ship was stuck in Port Royal because it lacked a valid "Europe" destination plot—a requirement both to prevent it from getting stuck and to allow its order to be changed—so it remained immobile indefinitely. 🤣
Hi @Leoreth ,
Your code looks fine to me at a glance but there are a couple of additions that may be helpful:
- area check to exclude non-reachable cities in other areas. This is strictly speaking not necessary but should be helpful as an optimization.
- usage of MOVE_IGNORE_DANGER may be...
It is probably a state management issue with respect to the "relocation" process (for lack of a better description). I'll have a look at it this weekend.
A while back, I implemented hypothetical pathfinding to address this issue and similar ones. This feature allows us to verify if a valid path exists using the unit's actual movement abilities before creating the unit. For example, we might require a viable path to either a city on the same...
Perhaps it was captured by a privateer or pirate and then came into the possession of the wild animals team? Or perhaps a dodgy event?
I've observed that animals sometimes flee to Europe when threatened or injured, which is likely the same issue. I have a fix for this in one of my many branches...
Interesting, in WTP AI_isAnyWaterDanger is only used for water plots. In fact the MOVE_IGNORE_DANGER uses a domain check like this to detemine domain-approporiate danger.
if (kGroup.getDomainType() == DOMAIN_SEA)
{
if (kPlayer.AI_getWaterDanger(pPlot...
Hi @f1rpo
I'm currently busy merging AdvCiv with WTP and had a look at the following code:
int CvPlayerAI::AI_getWaterDanger(CvPlot const& kPlot, int iRange,
int iMaxCount) const // advc.opt
{
PROFILE_FUNC();
FAssert(iMaxCount > 0); // advc.opt (use MAX_INT for infinity)...
Strange was probably not the correct term 🤣, I admit. It was just that it looked curious, given the current code page I was using. Fortunately the issue seems to have been resolved in develop.
In related news, earlier today I pushed a fix for a CTD that sometimes happen when an AI player is...
@ExcellentOne
I was able to fight and win the WoI with the lastest develop. The cutscene played just fine. I noticed some "strange" characters though, are you playing with russian or another non-western localization. If so, it could be code-page related.
Could you try with develop or with plain...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.