Add per-weapon VXL turret switching for MultiWeapon units - #2328
Add per-weapon VXL turret switching for MultiWeapon units#2328NukeAtty wants to merge 2 commits into
Conversation
|
The unit will lose its target when you issue an order with a mouse click, so I suspect this will lead to very strange in‑game behavior. |
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
|
I think a timer could be set so that the turret remains active for a period of time after the unit loses its target. |
Units with MultiWeapon=yes and TurretCount>0 now swap their VXL turret and barrel per weapon index. Extra turrets are loaded by naming convention (<ImageFile>turN.vxl / <ImageFile>barlN.vxl) with no art changes; weapons beyond min(WeaponCount, TurretCount) fall back to the default turret.
ac147ab to
fe77bd2
Compare
| - `PassengerDeletion.SoylentMultiplier`: `0.0` -> `1.0` | ||
| - `PassengerDeletion.SoylentAllowedHouses`: `none` -> `enemies` | ||
| - `PassengerDeletion.DisplaySoylentOffset`: `none` -> `all` | ||
| - VXL vehicles can now swap their turret and barrel models per weapon index by using `MultiWeapon` together with `TurretCount`. (by Nuke) |
There was a problem hiding this comment.
Changelog position is incorrect.
| This is essentially designed to restore multi-turrets in RA1, not to help you make a Zantos. Therefore, features like different turrets using different weapons/targeting separately/calculating cooldown separately/having separate health are not within the scope of this function. Please use techno attachment for such requirements. | ||
| ``` | ||
|
|
||
| ### Switch Voxel Turret Depends on MultiWeapon |
There was a problem hiding this comment.
If it does not require any new statements and is used in conjunction with MultiWeapon, then it is best to merge it into the paragraph where the MultiWeapon feature resides.

Adds support for swapping VXL turret and barrel models per weapon index for units using
MultiWeapon=yestogether withTurretCount>0.Summary
MultiWeapon=yes+TurretCount>0now swap their VXL turret and barrel based on the currently selected weapon.<ImageFile>turN.vxl/<ImageFile>barlN.vxl); noartmd.inichanges required.WeaponCountandTurretCount; weapons beyond that range fall back to the default turret.UseTurretShadow=yes.Implementation
UnitTypeExtloads the extra VXL/HVA pairs (LoadMultiWeaponTurrets) and frees them on destruction.UnitClass_AIsetsCurrentTurretNumberfromSelectWeapon.Notes
IsChargeTurret=yes,IsGattling=yesorGunner=yes.