AND2 and SVN Bug Reports - A New Dawn 2 ONLY

I just updated to 804, and I can say that Unlimited National Units is definitely on. The national unit limits are completely missing. I even deleted my Civ4.ini file to see if that had an effect, and it didn't.

The option is gone. Here is the code, in fact:

Code:
bool CvPlayer::isUnitClassMaxedOut(UnitClassTypes eIndex, int iExtra) const
{
        FAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");
        FAssertMsg(eIndex < GC.getNumUnitClassInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");

        if (!isNationalUnitClass(eIndex))
        {
                return false;
        }
        
        if (!GC.getUnitClassInfo(eIndex).isUnlimitedException())
        {
                return false;
        }
        
        FAssertMsg(getUnitClassCount(eIndex) <= GC.getUnitClassInfo(eIndex).getMaxPlayerInstances(), "getUnitClassCount is expected to be less than maximum bound of MaxPlayerInstances (invalid index)");

        return ((getUnitClassCount(eIndex) + iExtra) >= GC.getUnitClassInfo(eIndex).getMaxPlayerInstances());
}

This makes me wonder if the XML is setting isUnlimitedException to true.
 
Rev 805 bug: I can't bombard with Ballistas. In my save game, I have an army stack near the French city of Lyons. Both Archer Bombard and Range Bombard are turned on in the BUG options. Archers are bombarding fine, but Ballistas cannot.
 
Rev 805 bug: I can't bombard with Ballistas. In my save game, I have an army stack near the French city of Lyons. Both Archer Bombard and Range Bombard are turned on in the BUG options. Archers are bombarding fine, but Ballistas cannot.

Ballista's bombard rate is set to 0. Changing this to a non-negative number unlocks ranged bombarding as well as regular bombarding.

See the XML tag "iBombardRate" on units.

When it comes to bugs like this, I can't really do anything more than report.

I figured it out, it is actually really obvious. See this bit:

Code:
        if (!GC.getUnitClassInfo(eIndex).isUnlimitedException())

The condition is the opposite of what it should be. A unit class should be NOT maxed out, if it is the exception. So removing the "!" operator in the code fixes the bug.
 
Ballista's bombard rate is set to 0. Changing this to a non-negative number unlocks ranged bombarding as well as regular bombarding.

See the XML tag "iBombardRate" on units.

I'm not trying to use that mechanic. I'm trying to use the DCM Bombardment, and I'm fairly certain it worked at one point. I deliberately don't want Ballista to be able to bombard defenses. You have to either choose between Rams and Ballistas, or wait until Catapults to get a unit that can do both. Grenadier has the same problem; it's supposed to have a ranged attack by the XML, but in-game it doesn't. I know I fooled around with Grenadier at one point and I could get the bombardment to work if I made it an Archery class unit.

I suspect this might be the problem in both cases; I found this looking through CvUnit.cpp. Do you know what the test I put in blue does? Especially that stray number 1 before the last two parentheses?
Code:
bool CvUnit::canArcherBombard(const CvPlot* pPlot) const
{
	if(!GC.isDCM_ARCHER_BOMBARD())
	{
		return false;
	}
	[COLOR="Blue"]if (!(GC.getUnitInfo(getUnitType()).getUnitCombatType() == (UnitCombatTypes)1))[/COLOR]
	{
		return false;
	}
	if (isMadeAttack())
	{
		return false;
	}
	if (isCargo())
	{
		return false;
	}
	return true;
}
 
I'm not trying to use that mechanic. I'm trying to use the DCM Bombardment, and I'm fairly certain it worked at one point.

Nope, it's the bombard percent. I checked. Here is the code that checks to see if a unit can range bombard:

Code:
bool CvUnit::canRBombard(const CvPlot* pPlot) const
{

	if (!GC.isDCM_RANGE_BOMBARD())
	{
		return false;
	}

	if(getDCMBombRange() < 1)
	{
        return false;
	}

	if (getDomainType() == DOMAIN_AIR)
	{
		return false;
	}
	// RevolutionDCM - end

	[COLOR="Red"]if (bombardRate() <= 0)[/COLOR]
	{
		return false;
	}

	if (isMadeAttack())
	{
		return false;
	}

	if (isCargo())
	{
		return false;
	}

	return true;
}

Edit: Maybe I am misunderstanding. You want to archer bombard, not range bombard? They are separate things...

I suspect this might be the problem in both cases; I found this looking through CvUnit.cpp. Do you know what the test I put in blue does? Especially that stray number 1 before the last two parentheses?

Yes. Any unit with a unit combat type that is not 1 (the second unit combat in the UnitCombat XML... since we count from base 0) can not range bombard. That line should be removed.
 
Edit: Maybe I am misunderstanding. You want to archer bombard, not range bombard? They are separate things...

Yes, basically I want Archer Bombard available for all units that have that <iDCMBombRange> greater than 0. The only units that would have this ability in the first place would be Slinger/Archer/Longbow/Crossbow, Grenadier/Modern Grenadier, and Ballista, but I'd like to have that as an option.
 
Here we go again! Three Gems depleting on same turn. Also one Gem mine exhausted in Summer 1616. See Event log.

Buck

Buck my friend why don't you just stop using that option? If it doesn't enhance your game play pleasure but just ups your frustration don't use it.

There so much else to do in the mod besides having to fiddle with precious resources disappearing on you. Sounds totally UN-Fun to me. And has went beyond being just a challenge too. Just sayin'.

JosEPh
 
Expenses seem to be calculating in error

Spoiler :


It say's I have 33 units in Enemy territory, I have Zero in enemy, but 4 in Neutral, 2 Great Generals and 2 workers, who I'm looking to delete once I take a city.

Spoiler :


Just to show the true situation of my unit deployment.

it seems to be registering all my units, residing in my cities, as being in enemy territory.

I've now set the science slider at Zero, and losing 54 :gold: with only 4 Cities, another AI has 12 cities, so it seems to be only affecting the human or Korea maybe (who I am)

Save attached.
 
Expenses seem to be calculating in error

Post a save.

Buck my friend why don't you just stop using that option? If it doesn't enhance your game play pleasure but just ups your frustration don't use it.

There so much else to do in the mod besides having to fiddle with precious resources disappearing on you. Sounds totally UN-Fun to me. And has went beyond being just a challenge too. Just sayin'.

JosEPh


I said the exact same thing earlier. Some people are just masochists I guess. :p
 
I think the AI is taking the "stack units to protect resources" a bit too seriously. These are AI stacks on a single resource.

View attachment 382061View attachment 382062

Yeah I saw that earlier. The AI is instructed to only keep 1 unit on resources, but if the unit is already part of a stack, it drags the entire stack along.

I'll make sure they split off the stack.
 
Expenses seem to be calculating in error

Spoiler :


It say's I have 33 units in Enemy territory, I have Zero in enemy, but 4 in Neutral, 2 Great Generals and 2 workers, who I'm looking to delete once I take a city.

Spoiler :


Just to show the true situation of my unit deployment.

it seems to be registering all my units, residing in my cities, as being in enemy territory.

I've now set the science slider at Zero, and losing 54 :gold: with only 4 Cities, another AI has 12 cities, so it seems to be only affecting the human or Korea maybe (who I am)

Save attached.

This is now fixed in Rev 808. I have no idea why this is occurring, but my temporary fix corrects the number of outside each turn. Advance one turn and it will be corrected.
 
Must of missed where you had given up on finding this one. I will follow you and Joseph suggestion.
I haven't given up... although Afforess doesn't like that option, I still would like to fix it :) I simply haven't had enough time to look into the problem.

Edit: anyway to avoid frustration, I suggest you and others don't use it until further notice, unless you're prepared to this kind of behaviour
 
I ran into a repeating CTD. The game crashes whenever I end the current turn. This is updated to rev 812. I started the game a few revisions ago, got the crash a few minutes ago, updated my current version, and still got the crash. Savegame and minidump files are in the zip.
 
Am I the only one, ranged Bombard seems to have been turned off, and not enabled for Archery units??

Previously I was being range bombarded by the AI and was able to do it myself, now neither is happening.

Also strange happenings with the end/home key's on keyboard, they won't switch between cities, or will get stuck between the capital and my 2nd city. Or will only move down the list,and get stuck in capital, 2nd city. Only way is to hit home key, or city up to move off 2nd city to next one on list.

SVN 812.
 
Back
Top Bottom