Posted: Mon Mar 17, 2025 2:39 pm Post subject:
How to set the range of InfantryTypes in Occupied buildings
For buildings with CanBeOccupaied=yes and CanOccupayFire=yes , when InfantryTypes enter these buildings, their range will be forcibly changed to the value set by [CombatDamage] OccupayWeaponRange=. This clearly does not meet my expectations. I hope they use the range of their own weapons. But Ares and Phobos seem to have no relevant functions.
However, I found an interesting issue that MO3.3.6 unexpectedly achieved the result I wanted.But when I checked rulesmo.ini, I found that the value of [CombatDamage] OccupayWeaponRange=is still set to 6. It is obvious that MO3.3.6 uses other methods to achieve this function.
So, I would like to seek your help on how to set up this feature in order to achieve it QUICK_EDIT
AFAIK OccupyWeaponRange= doesn't do anything, the games instead uses the range of the OccupyWeapon= and EliteOccupyWeapon= on each infantry as it fires. As G-E said every OccupyWeapon has to have the same range or it will cause issues, so you need to edit all of them to increase the occupy range. _________________
AFAIK OccupyWeaponRange= doesn't do anything, the games instead uses the range of the OccupyWeapon= and EliteOccupyWeapon= on each infantry as it fires. As G-E said every OccupyWeapon has to have the same range or it will cause issues, so you need to edit all of them to increase the occupy range.
In fact, the range of OccupayWeapon is invalid, and all ranges of OccupayWeapon can be set to different values. The range used by Occupated buildings is the value of OccupayWeapon Range=
For example,
[CombatDamage]
OccupyWeaponRange=5
[E1]
primary=weapon1
OccupyWeapon=weapon1
[E2]
primary=weapon2
OccupyWeapon=weapon2
[E3]
primary=weapon3
OccupyWeapon=weapon3
[weapon1]
range=12
[weapon2]
range=15
[weapon3]
range=20
When E1, E2, and E3 occupy a building simultaneously, the range of their weapons will be forcibly changed to 5
I used WIC extension to perfectly solve this problem.
WIC's project address: https://github.com/Sidoupiar/Ra2-WinterIsComing
Its author is Chinese. This is an extension similar to Phobos, which implements many functions and is compatible with Ares and Phobos QUICK_EDIT
In Red Alert 2, occupants use the range from [CombatDamage]>OccupyWeaponRange=
In Yuri's Revenge, the range of each occupant's (Elite)OccupyWeapon= is used instead.
The occupants fire their weapons one after the other, meaning that the building will not fire continuously unless the target falls within the range of all occupants.
In other words, if you have 3 occupants with weapon ranges 9, 12 and 6, and the target is 7 cells away, the occupants will only shoot until it's time for the third one to shoot. Since the target is now out of range of the shooter, the whole building will stop shooting.
This is the reason all occupy weapons even in Yuri's Revenge only have Range=6. They will still get bonuses from elevation and building height since those will be added to all occupants' weapons.
If you have (via Ares) a unit that can only occupy a specific building (that in turn only allows that specific unit in), you can have units that have longer ranges. Buildings that only allow a single occupant are also unaffected by this, so you can have lookout towers and sniper towers that allow 15 range snipers. QUICK_EDIT
Actually that's wrong, OccupyWeaponRange is YR only, in RA2 the range is set by the UC weapons themselves... the difference being the building chooses the weapon not the infantry. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum