UnderKingDuck
Warlord
- Joined
- Jul 15, 2014
- Messages
- 179
Not needed that's just source code for compilers
ok. Thanks.
Not needed that's just source code for compilers
Does anyone else enjoy the symmetry of the last version of vanilla FFH having the pyre zombies/sons of Asnea glitch, to which Tholal himself released an unofficial patch, and the intended-last version of MNAI having this bug with units having the bulb tech ability, for which someone else puts up a patch-patch to fix?
I feel like some great cycle has finally drawn to an end.
Terkhen, I can add you as a developer, so you can commit fixes directly to the repository, if you want.
Tholal, the next time you're online, could you please state whether you plan to continue developing MNAI? I'm not sure how to interpret "final release".
While you wait for Tholal's answer, I could port and upload all the recent PitBoss and interface fixes I coded for ExtraModMod to that repository. When Tholal is back, all fixes (yours and mine) could be contributed as a single zip in order to simplify the whole process.
So, for example, the Haste spell would state "Targets Adept, Warrior and Swordsman" or "Targets 4 units"? This might be good to implement directly for all spells.I am almost ready to release yet another update of my modmod, which uses the PyHelp tags to explain exactly what units may be targeted even for the effects of XML-only spells.
Agreed. Added as an issue in mnai-fixes.The one issue I have with displaying such targets is that the list for promotion-granting spells still includes those units that should not be eligible due to having another promotion which blocks access to the promotion being granted.
This same issue, by the way, also makes spells light up as able to be cast even though they cannot in fact do anything. That is a base FfH2 and MNAI issue, not just something in my modmod. It should probably be changed.
I have to check whether that could break anything, but thanks for the hint.I think the easiest way (for a C++ modder) to solve this would be to edit
bool CvUnit::canAddPromotion(int spell) in CvUnit.cpp around line 16610 so the it checks the unit's promotions and does not return true if any of them have the promotion in question as a (PromotionTypes) GC.getPromotionInfo((PromotionTypes) iI).getPromotionImmune1(), (PromotionTypes) GC.getPromotionInfo((PromotionTypes) iI).getPromotionImmune2(), or (PromotionTypes) GC.getPromotionInfo((PromotionTypes) iI).getPromotionImmune3() of any promotions they already have.
Shouldn't be too hard: If x makes immune to y AND x isn't removed by that spell, y can't be applied.Things could get more complicated though if some modder makes a spell which adds a promotion at the same time as removing a promotion hat grants PromotionImmune to the added promotion. I don't know if it is worth checking for that case too.
Agreed.It would also be very useful if you exposed a function to find the PromotionImmunes granted by a promotion and a function to find all of the promotions to which a unit is immune.
I would very much like it if pretty much every tag in CIV4SpellInfos.xml was exposed to python for the spell info type. That way I would not have to hardcode things like the range of a spell, what promotions it may add/remove, how much damage it may do, ect.
What sort of interface would you like to have for that?I already have such PyHelp functions working in Python, but I wonder if it might be better for the C++ code to handle listing what units/plots will be targeted by the xml effects of spells.
So far I have found one minor bug, which causes temporary terrains to be displayed incorrectly so that it does not look like you are changing them even when you really are.
Why are ordinary units like adepts and disciples able to research technologies? Not only that, but they seem to be completing even advanced techs which would normally take multiple great persons to learn. This needs addressing.
I think I found the commit in which the issue was originally introduced.
In the int CvUnit::getDiscoverResearch(TechTypes eTech) code change, it seems that the intention was to prevent calculating research if the unit has casted a spell (as in that case the value will always be zero). The calculation itself has also been changed to the following:
The key is the std::min line. At that point, iResearch is not initialized. Therefore, if iResearch happens to have a positive value, this method will return a positive research value and CvUnit::canDiscover will return true.
Tholal seems to be away, so I went ahead and prepared a hotfix dll for More Naval AI 2.62. [
Tholal: Sourceforge is still offline, so instead of creating an issue in your repository I'm attaching the modified source code to this post.
While fixing this issue, I found another place for performance improvements.
I feel like some great cycle has finally drawn to an end.
It contains Terkhen's fix (many thanks) and some other fixes to reported and unreported bugs. While Tholal is absent, I will upload bugfixes there.
While you wait for Tholal's answer, I could port and upload all the recent PitBoss and interface fixes I coded for ExtraModMod to that repository. When Tholal is back, all fixes (yours and mine) could be contributed as a single zip in order to simplify the whole process.
Also, since I'm having to reboot anyway, I would be willing to move my code over to bitbucket if it would help with coordination.
Also, since I'm having to reboot anyway, I would be willing to move my code over to bitbucket if it would help with coordination.
Should I just replace the DLL file in the mod folder to make those work?