Increased archer bombard range?

50caliber

Warlord
Joined
Nov 15, 2006
Messages
118
Is there a way to customize archer bombard range?

Example:
Archer archer bombard range 1
Longbowman archer bombard range 2
Catapult archer bombard range 3
Artillery archer bombard range 4

A longbowman should have a longer range than an archer etc..

I looked in globaldefinesalt and unitinfos but couldn't find a place to increase the range of specific units
 
It looks to me that archer bombardment can't be increased above 1 without a DLL edit. The <iDCMBombRange> XML tag is supposed to control the range of bombardment, but I went looking through the source files and I found this in CvUnit.cpp:

Spoiler :
Code:
bool CvUnit::canArcherBombardAt(const CvPlot* pPlot, int iX, int iY) const
{
    CvPlot* pTargetPlot;
    if (!canArcherBombard(pPlot))
    {
        return false;
    }

    if(iX < 0 || iY < 0)
    {
        return false;
    }
    pTargetPlot = GC.getMapINLINE().plotINLINE(iX, iY);

    if (plotDistance(pPlot->getX_INLINE(), pPlot->getY_INLINE(), pTargetPlot->getX_INLINE(), pTargetPlot->getY_INLINE()) > 1)
    {
        return false;
    }
    if(pTargetPlot->getNumVisibleEnemyDefenders(this) == 0)
    {
        return false;
    }
    if (pTargetPlot->isOwned())
    {
        if(pTargetPlot->getTeam() != getTeam())
        {
            if (!atWar(pTargetPlot->getTeam(), getTeam()))
            {
                return false;
            }
        }
    }
    return true;
}

The important line is the
if (plotDistance(pPlot->getX_INLINE(), pPlot->getY_INLINE(), pTargetPlot->getX_INLINE(), pTargetPlot->getY_INLINE()) > 1).
It seems to me that you cannot archer bombard past range 1 and that this line is responsible.

I can read the source files that go into the DLL, but I can't make any changes. I don't have the skills to do that, but I'm considering learning how to.
 
I wouldnt recommend letting archers bombard over tiles anyway, its unrealistic, considering that depending on map size each tile represents dozens to hundreds of square miles. Its just plain weird, orders of magnitude weird.
 
Is there a way to customize archer bombard range?

Example:
Archer archer bombard range 1
Longbowman archer bombard range 2
Catapult archer bombard range 3
Artillery archer bombard range 4

A longbowman should have a longer range than an archer etc..

I looked in globaldefinesalt and unitinfos but couldn't find a place to increase the range of specific units

Well.. its possible but like Urza said not very realistic..

If you really wish to play like this you can do it via unitinfos xml-file. Find responding units there and then change <iAirRange>0</iAirRange> to 1-3 depending range you wish.
After that you have to set ranged attack damage this tag <iAirCombat>0</iAirCombat> and se max ranged attack damage % on this tag <iAirCombatLimit>0</iAirCombatLimit>. 75 means max 75% damage and so on..

I never play ranged bombardment on and dont know how that work with that option on.. propably it work.
 
I think it works fine as is. The rate of success rises as the unit is upgraded.

Slingers have the lowest success rate, meaning they have to fight close range.
Archers are next, a longer range.
Longbows have the highest rate, meaning they hit at greatest ranges.

Then you have Artillery,
1 tile, for most.
2 tiles for later mobile artillery, or Non Line Of Sight (NLOS) cannons.

Its realistic now, you just need to adjust your view point of mind set on how it works.
 
It looks to me that archer bombardment can't be increased above 1 without a DLL edit. The <iDCMBombRange> XML tag is supposed to control the range of bombardment, but I went looking through the source files and I found this in CvUnit.cpp:

Spoiler :
Code:
bool CvUnit::canArcherBombardAt(const CvPlot* pPlot, int iX, int iY) const
{
    CvPlot* pTargetPlot;
    if (!canArcherBombard(pPlot))
    {
        return false;
    }

    if(iX < 0 || iY < 0)
    {
        return false;
    }
    pTargetPlot = GC.getMapINLINE().plotINLINE(iX, iY);

    if (plotDistance(pPlot->getX_INLINE(), pPlot->getY_INLINE(), pTargetPlot->getX_INLINE(), pTargetPlot->getY_INLINE()) > 1)
    {
        return false;
    }
    if(pTargetPlot->getNumVisibleEnemyDefenders(this) == 0)
    {
        return false;
    }
    if (pTargetPlot->isOwned())
    {
        if(pTargetPlot->getTeam() != getTeam())
        {
            if (!atWar(pTargetPlot->getTeam(), getTeam()))
            {
                return false;
            }
        }
    }
    return true;
}

The important line is the
if (plotDistance(pPlot->getX_INLINE(), pPlot->getY_INLINE(), pTargetPlot->getX_INLINE(), pTargetPlot->getY_INLINE()) > 1).
It seems to me that you cannot archer bombard past range 1 and that this line is responsible.

I can read the source files that go into the DLL, but I can't make any changes. I don't have the skills to do that, but I'm considering learning how to.












If you learn how to it would be appreciated, thanks for the reply
 
It looks to me that archer bombardment can't be increased above 1 without a DLL edit. The <iDCMBombRange> XML tag is supposed to control the range of bombardment, but I went looking through the source files and I found this in CvUnit.cpp:

Spoiler :
Code:
bool CvUnit::canArcherBombardAt(const CvPlot* pPlot, int iX, int iY) const
{
    CvPlot* pTargetPlot;
    if (!canArcherBombard(pPlot))
    {
        return false;
    }

    if(iX < 0 || iY < 0)
    {
        return false;
    }
    pTargetPlot = GC.getMapINLINE().plotINLINE(iX, iY);

    if (plotDistance(pPlot->getX_INLINE(), pPlot->getY_INLINE(), pTargetPlot->getX_INLINE(), pTargetPlot->getY_INLINE()) > 1)
    {
        return false;
    }
    if(pTargetPlot->getNumVisibleEnemyDefenders(this) == 0)
    {
        return false;
    }
    if (pTargetPlot->isOwned())
    {
        if(pTargetPlot->getTeam() != getTeam())
        {
            if (!atWar(pTargetPlot->getTeam(), getTeam()))
            {
                return false;
            }
        }
    }
    return true;
}

The important line is the
if (plotDistance(pPlot->getX_INLINE(), pPlot->getY_INLINE(), pTargetPlot->getX_INLINE(), pTargetPlot->getY_INLINE()) > 1).
It seems to me that you cannot archer bombard past range 1 and that this line is responsible.

I can read the source files that go into the DLL, but I can't make any changes. I don't have the skills to do that, but I'm considering learning how to.







My goal is to try to mod ROM AND where I can have large open field battles where terrain, and range vs strength, are more important, and its not just two giant stacks of doom fighting each other on two tiles.

So far:

1. Play on gigantic map
2. Increase min city range to 6 (or higher) in globaldefines to create lots of land for open field battles.
3. Add new culture levels to culturelevelinfo so that all of the land on the map can still be claimed (larger borders for each city).
4. Max units per tile 1 in bug mode menu so there is no stack of doom, and each unit fights individually.
5. Decrease ranged unit strength, and increase their range, so that they will attack from afar (archer bombard and ranged bombardment).
6. Increase the strength of melee units so that they will be the ones on the front lines fighting each other at close range.

The only way I can make this work is to be able to increase the range of the ranged units. I can increase the bombard range and accuracy of the siege units in unitinfos,
<iDCMBombRange>1</iDCMBombRange>
<iDCMBombAccuracy>80</iDCMBombAccuracy>
but that still doesn't solve increasing the archer bombard range for archer bombard in the bug mode menu...
 
Top Bottom