Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sun Apr 13, 2025 4:44 pm
All times are UTC + 0
How to set the range of InfantryTypes in Occupied buildings
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [6 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
zzl19871012
Civilian


Joined: 12 Feb 2025

PostPosted: Mon Mar 17, 2025 2:39 pm    Post subject:  How to set the range of InfantryTypes in Occupied buildings Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Mar 17, 2025 4:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

They have to have the same range for targetting purposes.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Mar 17, 2025 4:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
zzl19871012
Civilian


Joined: 12 Feb 2025

PostPosted: Wed Mar 19, 2025 4:37 am    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
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

Back to top
View user's profile Send private message
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Fri Apr 11, 2025 8:24 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Apr 11, 2025 9:54 am    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [6 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.4112s ][ Queries: 11 (0.0081s) ][ Debug on ]