Skip to content
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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 @@ -156,6 +156,7 @@ This page lists all the individual contributions to the project by their author.
- Event 606: AttachEffect is attaching to a Techno
- Linked superweapons
- Unit & infantry auto-conversion on ammo change
- Dropship Loadout
- **Starkku**:
- Misc. minor bugfixes & improvements
- AI script actions:
Expand Down
2 changes: 2 additions & 0 deletions Phobos.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@
<ClCompile Include="src\Misc\Hooks.Ares.cpp" />
<ClCompile Include="src\Misc\Hooks.BugFixes.cpp" />
<ClCompile Include="src\Misc\Hooks.Crates.cpp" />
<ClCompile Include="src\Misc\Hooks.DropshipLoadout.cpp" />
<ClCompile Include="src\Misc\Hooks.Gamespeed.cpp" />
<ClCompile Include="src\Misc\Hooks.INIInheritance.cpp" />
<ClCompile Include="src\Misc\Hooks.LaserDraw.cpp" />
Expand Down Expand Up @@ -364,6 +365,7 @@
<!-- src\Misc -->
<ClInclude Include="src\Misc\BlittersFix.h" />
<ClInclude Include="src\Misc\FlyingStrings.h" />
<ClInclude Include="src\Misc\Hooks.DropshipLoadout.h" />
<ClInclude Include="src\Misc\MessageColumn.h" />
<ClInclude Include="src\Misc\PhobosToolTip.h" />
<ClInclude Include="src\Misc\SyncLogging.h" />
Expand Down
2 changes: 1 addition & 1 deletion YRpp
39 changes: 39 additions & 0 deletions docs/AI-Scripting-and-Mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,45 @@ ID=ActionCount,[Action1],802,0,[Unique ID],0,0,0,0,A,[ActionX]
...
```

### `900` Open Dropship Loadout Window

- Opens the customizable Dropship Loadout user interface window for the current player.
- **Note**: The action is only executed in singleplayer Campaign or Skirmish game modes.
- `AllowableUnitsIndex` - The index of the allowable units list (0-based) to use for unit selection. If set to `0`, the default allowable units are used. The lists must be declared under `DropshipLoadout.AllowableUnitsN` (where `N` is the index).
- `IgnoreFixedUnits` - A boolean (`0` or `1`). If set to `1`, any fixed units defined for the dropship loadout are ignored and will not be preloaded/enforced in the loadout window.
- `PreloadCargo` - A boolean (`0` or `1`). If set to `1`, the window will load the previous cargo configuration if available. If set to `0`, the window starts empty.
- `AddUnusedMoneyToPlayer` - A boolean (`0` or `1`). If set to `1`, any leftover money from the loadout screen is added back to the player's main funds. If set to `0`, the unused money is lost.
- `StartingMoney` - The amount of money allocated for selecting units in this loadout window.

In `mycampaign.map`:
```ini
[Actions]
...
ID=ActionCount,[Action1],900,0,[AllowableUnitsIndex],[IgnoreFixedUnits],[PreloadCargo],[AddUnusedMoneyToPlayer],[StartingMoney],A,[ActionX]
...
```

### `901` Create Dropship Loadout Transport

- Spawns the transport carrier corresponding to a specific dropship index with the player's customized dropship loadout cargo.
- The transport carrier is created at the waypoint defined in the Action's `TeamType` (i.e. the `Waypoint` tag of the `TeamType`).
- The team created uses the script defined in the `TeamType`.
- If the `TeamType` has a `VeteranLevel` specified (`2` for Veteran, `3` for Elite), trainable cargo units will be promoted to that level. Already higher veterancy units are not demoted.
- **Note**: The action is only executed in singleplayer Campaign or Skirmish game modes.
- `TeamType` - The TeamType to use for spawning the transport. The transport carrier will be added to this team and will follow its script. The spawn location is determined by the `Waypoint=` setting of this TeamType.
- `DropshipIndex` - The index of the dropship loadout (0-based) to spawn.
- `OverwriteOwner` - A boolean (`0` or `1`). If set to `1`, the owner of the spawned transport carrier is overwritten using the `OwnerIndex` parameter. If set to `0`, the owner will be the house that triggered the action.
- `OwnerIndex` - The house/country index (if `OverwriteOwner` is `1`) to set as the owner of the spawned transport.
- `PersistentCargo` - A boolean (`0` or `1`). If set to `0`, the cargo configuration for this dropship index is cleared after spawning (making it a one-time use transport). If set to `1`, the cargo configuration is preserved and can be spawned again.

In `mycampaign.map`:
```ini
[Actions]
...
ID=ActionCount,[Action1],901,1,[TeamType],[DropshipIndex],[OverwriteOwner],[OwnerIndex],[PersistentCargo],A,[ActionX]
...
```

## Trigger events

### `500-511` Variable comparation
Expand Down
105 changes: 105 additions & 0 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,111 @@ In `rulesmd.ini`:
TabIndex=1 ; integer
```

### Dropship Loadout

Superweapons can be configured to manage customizable cargo deployments. This logic is divided into two distinct configurations:
1. **Launch Dropship**: Spawns the transport carrier and deploys loaded cargo onto the battlefield.
2. **Open Window**: Opens the interactive user interface to purchase and configure cargo.

---

#### Launch Dropship

These parameters configure the superweapon that spawns a transport carrier to deliver your cargo to the battlefield:

* `DropshipLoadout.Launch`: If set to `true`, firing this superweapon launches the dropship transport with its current cargo (utilizing dropship slot `0`).
* `DropshipLoadout.Carrier`: Overrides the transport unit type spawned (e.g. `TSDSHP`).
* `DropshipLoadout.PersistentCargo`: If set to `true`, the selected cargo is preserved across launches. If set to `false`, the cargo configuration is cleared after launch.
* `DropshipLoadout.VeteranLevel`: The veterancy level (`1` for Rookie, `2` for Veteran, `3` for Elite) to promote the cargo units to upon spawning.

In `rulesmd.ini`:
```ini
[SOMESW] ; SuperWeaponType
DropshipLoadout.Launch=false ; boolean
DropshipLoadout.Carrier= ; TechnoType
DropshipLoadout.PersistentCargo=false ; boolean
DropshipLoadout.VeteranLevel=1 ; integer
```

---

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange formatting


#### Open Window

These parameters configure the interactive Dropship Loadout purchase window that opens when the superweapon is fired:

* `DropshipLoadout.OpenWindow`: If set to `true`, firing this superweapon opens the interactive Dropship Loadout configuration window.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our unordered list does not use * but uses - .

* `DropshipLoadout.Money`: Overrides the starting budget allocated for purchasing units. Defaults to `-1` (uses player's current treasury money).
* `DropshipLoadout.PreloadCargo`: If set to `true`, the window preloads the cargo configuration selected in the previous invocation.
* `DropshipLoadout.RememberPurchasedCargo`: If set to `true`, preloaded cargo from a previous loadout window call is treated as "already purchased" (free, does not deduct cost from the new starting money pool, and selling it refunds the cost). If set to `false`, the cost is deducted from the budget at startup (failing the preload if the player cannot afford it).
* `DropshipLoadout.AddUnusedMoneyToPlayer`: If set to `true`, any unused money in the loadout screen will be added back to the player's main funds.
* `DropshipLoadout.AllowableUnits` / `DropshipLoadout.AllowableUnitsN`: A list of TechnoTypes that are allowed to be purchased and loaded. If `N` is omitted, it defines the default allowed units.
* `DropshipLoadout.AllowableUnitMaximums` / `DropshipLoadout.AllowableUnitMaximumsN`: The maximum allowed quantity that can be purchased for each unit in `DropshipLoadout.AllowableUnits` / `DropshipLoadout.AllowableUnitsN`. Use `-1` for unlimited.
* `DropshipLoadout.FixedUnits`: Locked units pre-placed in the dropship cargo slots that cannot be sold or moved.
* `DropshipLoadout.InitialUnits`: Pre-placed units that the player can customize, sell, or refund. They are one-time use and get cleared from the initial pool after launch.
* `DropshipLoadout.SizeLimit`: Passenger capacity/size limit (uses unit `Size=` tags) allowed per cargo slot. If not set, no size limits are enforced by default.
* `DropshipLoadout.Theme`: Soundtrack theme to play while the purchasing window is open.
* `DropshipLoadout.StartEVA`: EVA announcer voice played at window startup.
* `DropshipLoadout.Palette`: Custom `.pal` file to override the default palette (`DROPSHIP.PAL`) used to render the dialog and cameos.
* `DropshipLoadout.BackgroundPCX` / `DropshipLoadout.Background`: Custom PCX / SHP background graphics.
* `DropshipLoadout.UpArrowPCX` / `DropshipLoadout.UpArrow` / `DropshipLoadout.UpArrowLocation`: Navigation scroll arrow graphics and position.
* `DropshipLoadout.DownArrowPCX` / `DropshipLoadout.DownArrow` / `DropshipLoadout.DownArrowLocation`: Navigation scroll arrow graphics and position.
* `DropshipLoadout.LoadoutPCX` / `DropshipLoadout.Loadout` / `DropshipLoadout.LoadoutLocation`: Current loadout selection box graphics and position.
* `DropshipLoadout.PilotLitPCX` / `DropshipLoadout.PilotLit` / `DropshipLoadout.PilotLitLocation`: Status lights graphics and position.
* `DropshipLoadout.SidebarCameosCount` / `DropshipLoadout.SidebarCameoLocationN`: Layout and coordinates for each sidebar cameo slot.
* `DropshipLoadout.DropshipCameosCount` / `DropshipLoadout.Dropship0.CameosCount` / `DropshipLoadout.CameoLocationN`: Layout and coordinates for each cargo slot cameo.
* `DropshipLoadout.DGreenListPCX` / `DropshipLoadout.DGreenList` / `DropshipLoadout.DGreenAnimationsCount` / `DropshipLoadout.DGreenLocationN`: Custom green status indicators and animations.
* `DropshipLoadout.BuyClickSound` / `DropshipLoadout.SellClickSound` / `DropshipLoadout.ArrowsClickSound` / `DropshipLoadout.StartingDragDropSound` / `DropshipLoadout.EndingDragDropSound`: Audio click/drag sound effects.

In `rulesmd.ini`:
```ini
[SOMESW] ; SuperWeaponType
DropshipLoadout.OpenWindow=false ; boolean
DropshipLoadout.Money=-1 ; integer
DropshipLoadout.PreloadCargo=false ; boolean
DropshipLoadout.RememberPurchasedCargo=true ; boolean
DropshipLoadout.AddUnusedMoneyToPlayer=false ; boolean
DropshipLoadout.AllowableUnits= ; List of TechnoTypes
; or
DropshipLoadout.AllowableUnitsN= ; List of TechnoTypes
DropshipLoadout.AllowableUnitMaximums= ; List of integers
; or
DropshipLoadout.AllowableUnitMaximumsN= ; List of integers
DropshipLoadout.FixedUnits= ; List of TechnoTypes
DropshipLoadout.InitialUnits= ; List of TechnoTypes
DropshipLoadout.SizeLimit= ; integer
DropshipLoadout.Theme= ; Theme
DropshipLoadout.StartEVA= ; Vox
DropshipLoadout.Palette= ; filename (.pal)
DropshipLoadout.BackgroundPCX= ; filename (.pcx)
DropshipLoadout.Background= ; filename (.shp)
DropshipLoadout.UpArrowPCX= ; filename (.pcx)
DropshipLoadout.UpArrow= ; filename (.shp)
DropshipLoadout.UpArrowLocation= ; coordinate pair (X,Y)
DropshipLoadout.DownArrowPCX= ; filename (.pcx)
DropshipLoadout.DownArrow= ; filename (.shp)
DropshipLoadout.DownArrowLocation= ; coordinate pair (X,Y)
DropshipLoadout.LoadoutPCX= ; filename (.pcx)
DropshipLoadout.Loadout= ; filename (.shp)
DropshipLoadout.LoadoutLocation= ; coordinate pair (X,Y)
DropshipLoadout.PilotLitPCX= ; filename (.pcx)
DropshipLoadout.PilotLit= ; filename (.shp)
DropshipLoadout.PilotLitLocation= ; coordinate pair (X,Y)
DropshipLoadout.SidebarCameosCount= ; integer
DropshipLoadout.SidebarCameoLocationN= ; coordinate pair (X,Y)
DropshipLoadout.DropshipCameosCount= ; integer
DropshipLoadout.Dropship0.CameosCount= ; integer
DropshipLoadout.CameoLocationN= ; coordinate pair (X,Y)
DropshipLoadout.DGreenListPCX= ; List of filenames (.pcx)
DropshipLoadout.DGreenList= ; List of filenames (.shp)
DropshipLoadout.DGreenAnimationsCount= ; integer
DropshipLoadout.DGreenLocationN= ; coordinate pair (X,Y)
DropshipLoadout.BuyClickSound= ; Sound
DropshipLoadout.SellClickSound= ; Sound
DropshipLoadout.ArrowsClickSound= ; Sound
DropshipLoadout.StartingDragDropSound= ; Sound
DropshipLoadout.EndingDragDropSound= ; Sound
```

### EMPulse settings

- It is possible to customize which weapon a building with `EMPulseCannon=true` fires when an associated `Type=EMPulse` superweapon (**only** if `EMPulse.TargetSelf=false` or omitted) is fired by setting `EMPulse.WeaponIndex`.
Expand Down
Loading
Loading