Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ This page lists all the individual contributions to the project by their author.
- Unit & infantry auto-conversion on ammo change
- Restore the ScriptType action#24 `Play speech` from Tiberian Sun
- Modify ammo on impact
- Flying production
- **Starkku**:
- Misc. minor bugfixes & improvements
- AI script actions:
Expand Down
33 changes: 33 additions & 0 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,39 @@ In `artmd.ini`:
FLHKEY.BurstN= ; integer - Forward,Lateral,Height. FLHKey refers to weapon-specific FLH key name and N is zero-based burst shot index.
```

### Flying production

- Now you can allow produced units to spawn directly in the air at customizable altitudes and locations without being constrained by traditional factory ground exit paths.
- `FlyingProduction` controls whether this unit type uses flying production.
- `FlyingProduction.SpawnHeight` determines the initial spawn altitude in leptons along the Z-axis. If resolved to 0 or negative, flying production will not be used and the unit exits normally.
- `FlyingProduction.PlayFactoryAnim` controls whether the producing factory plays its unloading door/exit animation.
- `FlyingProduction.SpawnAnim` specifies an animation to play at the aerial spawn coordinates when the unit is created.
- `FlyingProduction.SpawnAnim.AttachedToObject` determines whether `FlyingProduction.SpawnAnim` is attached to the spawned unit and follows its movement.
- `FlyingProduction.SpawnAt` accepts a list of BuildingTypes indicating where the unit should spawn, evaluated in priority order from left to right. When multiple buildings of that type exist, it prioritizes the producing factory itself if it matches, then any building marked as primary, and otherwise the closest one to the producing factory. If none of the candidate buildings exist or are alive, it falls back to the producing factory.
- `FlyingProduction.RallyPointFromSpawnBuilding` determines whether the unit targets the spawn building's rally point instead of the producing factory's rally point.
- `FlyingProduction.SpawnOffset` on `[BuildingType]` sets a 2D coordinate offset in leptons (X, Y) relative to the center of the structure for positioning the spawn point.
- `FlyingProduction.SpawnHeight` on `[BuildingType]` overrides the spawn altitude for units appearing at this structure.
- `FlyingProduction.SpawnFacing` on `[BuildingType]` specifies the facing (0-255) the unit takes upon spawning, as well as the exit direction if no rally point exists.
- `FlyingProduction.RallyPoint` on `[BuildingType]` enables rally point placement on structures that are not standard vehicle or infantry factories (e.g. helipads or towers), allowing them to establish a rally point with EVA confirmation and tactical line.

In `rulesmd.ini`:
```ini
[SOMETECHNO] ; TechnoType
FlyingProduction=false ; boolean
FlyingProduction.SpawnHeight= ; integer, defaults to FlightLevel or [General] -> FlightLevel
FlyingProduction.PlayFactoryAnim=false ; boolean
FlyingProduction.SpawnAnim= ; AnimType
FlyingProduction.SpawnAnim.AttachedToObject=false ; boolean
FlyingProduction.SpawnAt= ; List of BuildingTypes
FlyingProduction.RallyPointFromSpawnBuilding=false ; boolean

[SOMEBUILDING] ; BuildingType
FlyingProduction.SpawnOffset=0,0 ; Point2D, leptons
FlyingProduction.SpawnHeight= ; integer, defaults to the spawned unit's FlyingProduction.SpawnHeight
FlyingProduction.SpawnFacing= ; DirType (0-255), defaults to the building's facing (128 / South)
FlyingProduction.RallyPoint=false ; boolean
```

### Forcing specific weapon against certain targets

![image](_static/images/underwater-new-attack-tag.gif)
Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ HideShakeEffects=false ; boolean
:open:

#### New:
- [Flying production](New-or-Enhanced-Logics.md#flying-production) (by FS-21)
- [Customized transport plane for teams](AI-Scripting-and-Mapping.md#customized-transport-plane-for-teams) (by FlyStar)
- [Modify ammo on impact](New-or-Enhanced-Logics.md#modify-ammo-on-impact) (by FS-21)
- [Customize ivan bomb visibility](Fixed-or-Improved-Logics.md#customize-ivan-bomb-visibility) (by NetsuNegi)
Expand Down
4 changes: 4 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/CREDITS.po
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ msgstr "复原了《泰伯利亚之日》中的动作脚本 `24 - 播放语音`"
msgid "Modify ammo on impact"
msgstr "修改弹药弹头"

msgid "Flying production"
msgstr "飞行生产"

msgid "**Starkku**:"
msgstr "**Starkku**:"

Expand Down Expand Up @@ -3308,3 +3311,4 @@ msgid ""
"houses"
msgstr "**weiyongxuan** - 扩展 `CanTargetHouses` 以允许瞄准中立所属方"


42 changes: 42 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po
Original file line number Diff line number Diff line change
Expand Up @@ -7572,3 +7572,45 @@ msgid ""
"the weapon to be able to fire at cells containing no TechnoTypes."
msgstr "`CanTarget` 要求明确列出 `all` 或 `empty` 才能对不包含任何科技类型的单元格开火。"

msgid "Flying production"
msgstr "飞行生产"

msgid ""
"Now you can allow produced units to spawn directly in the air at customizable altitudes and locations without being constrained by traditional factory ground exit paths."
msgstr ""
"现在你可以允许生产出的单位直接在空中指定高度和位置生成,而不再受传统工厂地面出厂路径的限制。"

msgid "`FlyingProduction` controls whether this unit type uses flying production."
msgstr "`FlyingProduction` 控制此单位类型是否启用飞行生产逻辑。"

msgid "`FlyingProduction.SpawnHeight` determines the initial spawn altitude in leptons along the Z-axis. If resolved to 0 or negative, flying production will not be used and the unit exits normally."
msgstr "`FlyingProduction.SpawnHeight` 决定沿 Z 轴的初始生成高度(以 lepton 为单位)。如果最终解析为 0 或负数,则不会使用飞行生产逻辑(单位将正常从地面出厂)。"

msgid "`FlyingProduction.PlayFactoryAnim` controls whether the producing factory plays its unloading door/exit animation."
msgstr "`FlyingProduction.PlayFactoryAnim` 控制生产该单位的工厂是否播放卸载/开门动画。"

msgid "`FlyingProduction.SpawnAnim` specifies an animation to play at the aerial spawn coordinates when the unit is created."
msgstr "`FlyingProduction.SpawnAnim` 指定单位生成时在空中生成坐标处播放的动画。"

msgid "`FlyingProduction.SpawnAnim.AttachedToObject` determines whether `FlyingProduction.SpawnAnim` is attached to the spawned unit and follows its movement."
msgstr "`FlyingProduction.SpawnAnim.AttachedToObject` 决定 `FlyingProduction.SpawnAnim` 是否附加到生成的单位上并随其移动。"

msgid "`FlyingProduction.SpawnAt` accepts a list of BuildingTypes indicating where the unit should spawn, evaluated in priority order from left to right. When multiple buildings of that type exist, it prioritizes the producing factory itself if it matches, then any building marked as primary, and otherwise the closest one to the producing factory. If none of the candidate buildings exist or are alive, it falls back to the producing factory."
msgstr "`FlyingProduction.SpawnAt` 接受一个 BuildingType 列表,按从左至右的优先级顺序判断单位应在哪些建筑处生成。当存在多个该类型的建筑时,若生产该单位的工厂自身匹配则直接优先使用,其次优先选择被设为主要建筑(Primary)的建筑,否则选择距生产工厂最近的建筑。如果列表中候选建筑均不存在或已损毁,则回退至生产该单位的工厂。"

msgid "`FlyingProduction.RallyPointFromSpawnBuilding` determines whether the unit targets the spawn building's rally point instead of the producing factory's rally point."
msgstr "`FlyingProduction.RallyPointFromSpawnBuilding` 决定单位是否以实际生成建筑的集结点(Rally Point)为目标,而不是生产工厂的集结点。"

msgid "`FlyingProduction.SpawnOffset` on `[BuildingType]` sets a 2D coordinate offset in leptons (X, Y) relative to the center of the structure for positioning the spawn point."
msgstr "`[BuildingType]` 上的 `FlyingProduction.SpawnOffset` 设置相对于建筑中心的 2D 坐标偏移(X, Y,以 lepton 为单位),用于精确定位生成点。"

msgid "`FlyingProduction.SpawnHeight` on `[BuildingType]` overrides the spawn altitude for units appearing at this structure."
msgstr "`[BuildingType]` 上的 `FlyingProduction.SpawnHeight` 覆盖在此建筑处生成的单位的生成高度。"

msgid "`FlyingProduction.SpawnFacing` on `[BuildingType]` specifies the facing (0-255) the unit takes upon spawning, as well as the exit direction if no rally point exists."
msgstr "`[BuildingType]` 上的 `FlyingProduction.SpawnFacing` 指定单位生成时的朝向(0-255),若无集结点则同时作为离开建筑的移动方向。"

msgid "`FlyingProduction.RallyPoint` on `[BuildingType]` enables rally point placement on structures that are not standard vehicle or infantry factories (e.g. helipads or towers), allowing them to establish a rally point with EVA confirmation and tactical line."
msgstr "`[BuildingType]` 上的 `FlyingProduction.RallyPoint` 允许在非传统车辆或步兵工厂的建筑(如停机坪、防御塔等)上设置集结点,支持 EVA 语音确认及战术虚线显示。"


4 changes: 4 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/Whats-New.po
Original file line number Diff line number Diff line change
Expand Up @@ -6696,3 +6696,7 @@ msgstr "现在侧边栏拓展工具条可以超出侧边栏边界(by Belonit
msgid "Lifted stupidly small limit for tooltip character amount (by Belonit)"
msgstr "解除了拓展工具条字符数量小得愚蠢的上限(by Belonit)"

msgid "[Flying production](New-or-Enhanced-Logics.md#flying-production) (by FS-21)"
msgstr "[飞行生产](New-or-Enhanced-Logics.md#flying-production)(by FS-21)"


1 change: 1 addition & 0 deletions src/Ext/Building/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,6 @@ class BuildingExt final : public TechnoExt, public Detach::Listener<BuildingClas
static void __fastcall KickOutClone(std::pair<TechnoTypeClass*, HouseClass*>& info, void*, BuildingClass* pFactory);
static int GetTurretFrame(BuildingClass* pThis);
static bool BuildingOnline(BuildingClass* pThis);
static bool TrySpawnFlyingProduction(BuildingClass* pFactory, TechnoClass* pProduction);
};

Loading
Loading