Dropship Loadout remake#2270
Conversation
- Money updated after closing the window - Chosen units are stored for the future Map action execution - Added map action "CreateDropshipLoadoutTransport" for launching 1 selected dropship. - DropshipLoadout.Carriers for a custom list of dropships. - New tags have the prefix "DropshipLoadout."
If any of these are set then overwrites the default filename used by this window, Extension included too: DropshipLoadout.UpArrow DropshipLoadout.Down DropshipLoadout.Loadout DropshipLoadout.PilotLit DropshipLoadout.Palette DropshipLoadout.Background DropshipLoadout.DGreenList
- New GetAnimationPCX function for returning a std::vector of contiguous PCX files (with sufix 0000.pcx, 0001.pcx, 0002.pcx ...) - New scenario tags: DropshipLoadout.BackgroundPCX DropshipLoadout.UpArrowPCX DropshipLoadout.DownArrowPCX DropshipLoadout.LoadoutPCX DropshipLoadout.PilotLitPCX DropshipLoadout.DGreenListPCX
DropshipLoadout.DGreenListPCX is the animation related to sidebar clicks.
…out window (units, themes, PCX graphics, etc...). Moved GetAnimationPCX() into GeneralUtils.h
…section DropshipLoadout.SidebarCameoLocations DropshipLoadout.DropshipCameoLocations
Added support for tags in map's Basic section & Countries: DropshipLoadout.DGreenAnimationsCount DropshipLoadout.DGreenLocation%d DropshipLoadout.PilotLitLocation DropshipLoadout.LoadoutLocation DropshipLoadout.DownArrowLocation Other details
DropshipLoadout.BuyClickSound= ; Defaults to [AudioVisual] -> GenericClick DropshipLoadout.SellClickSound= ; Defaults to [AudioVisual] -> SellSound DropshipLoadout.ArrowsClickSound= ; Defaults to [AudioVisual] -> GUITabSound
And added documentation.
|
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. |
Otamaa
left a comment
There was a problem hiding this comment.
Pleae review and apply the change requested to the whole code , since the pattern are repeated all over the place , thanks .
|
|
||
| static ShapeButtonClass* CreateShapeButton(unsigned int nID, int nX, int nY, int nWidth, int nHeight, bool bIsAlpha) | ||
| { | ||
| auto const pButton = GameAllocator<ShapeButtonClass>().allocate(1); |
There was a problem hiding this comment.
i dont really understand this part , why dont use GameCreate<ShapeButtonClass> ? , also for the 0x69DD30 are you sure that is correct args ? , the IDB it written like this :
ShapeButtonClass(ShapeButtonClass *this, int id, ShapeHeaderStruct *shape, int x, int y, int w, int h, char a8)
There was a problem hiding this comment.
Yeah , YRPP has the bugged CTOR for sure, but iam not sure where the AI assume it to be the ConverClass* pDrawer since in our IDB there is no such construtor avaible but instead at the 0x69DD30 -> ShapeButtonClass::ShapeButtonClass(int id, ShapeHeaderStruct *shape, int x, int y, int w, int h, char a8) , which is the correct args count of 7 .
Now each transport can have customizable slots istead of following the generic slots size. So one transport can have 1 slot, another 4, another 8... If DropshipLoadout.DropshipN.CameosCount isn't set DropshipLoadout.DropshipCameosCount will ve used as generic fallback.
|
Sorry but I added a new variable that I consider useful for missions: Now each transport can have customizable slots istead of following a generic slots size (DropshipLoadout.DropshipCameosCount). So one transport can have 1 slot, another 4, another 8... |
- For customizing or localizing the interface strings, you can add the following entries to your `.csf` file: - `TXT_DROPSHIP_CREDITS` - The text for the credits/money label. Default value: `Credits: %d` - `TXT_DROPSHIP_START_MISSION` - The text prompting the player to start the mission. Default value: `Press SPACE to start the mission` - `TXT_DROPSHIP_AVAILABLE` - The label text for availability in the tooltip. Default value: `Available: ` - `TXT_DROPSHIP_COST` - The label text for unit cost in the tooltip. Default value: `Cost: `
|
I really forgot unharcode the texts with CSF strings:
|
Previously, when the player's initial units pool became empty (either by launching the transport or selling the units), opening the UI again would check `empty()` and reinitialize the pool from the INI defaults, allowing infinite units. Introduced `DropshipLoadout_InitialUnitsSet` and `DropshipLoadout_SWInitialUnitsSet` flags in `HouseExt` to ensure initialization only runs once per match.


Note: Isn't a logic restoration, is a full remake of the unfinished TS logic but expanded (why not).
Note 2: Due to the long list of variables for customizing this logic please check the documentation of this PR for updated content.
General Features of this single player logic:
Can be opened before the game start, during the game with a map action & with a SW.
You can choose a fixed budget in this window or use the player's own economy.
UI feedback on cameos (blue for dragging, purple to indicate restricted/forbidden, red for selling, green for buying, yellow to indicate the last unit purchased).
Drag-and-drop mechanics: Drag units from the right panel to the transports to buy them. Drag them from the transports back to the right panel to sell them.
Starting units can be set to appear in the transport at no cost to the player.
Fixed units can be set so they cannot be sold.
Each transport can have size limits to prevent heavy units from being loaded.
All SHP graphics can be replaced with their PCX versions.
Tooltips with unit information, including name, availability, cost, and description.
Countries can have their own graphics customization and unit lists that overwrite the map's [Basic] configuration. This doesn't include the Superweapons case.
Map Action 900 to open the Dropship Loadout window during the match. A different list of available units can be displayed each time this map action is called.
Map Action 901 to launch the specified transport (if available). Regarding the initial Team configuration: Although the Taskforce is dynamically generated with the selected transport, the Team must be configured by indicating the starting waypoint used to spawn the transport, and the user must configure the script that the transport will execute.
Superweapons can be used to open this Dropship Loadout window (capped to only 1 transport), and the transport launch can be executed via a separate SW from the one used to open the window. Note that the initial screen & Map actions doesn't share the graphics and unit lists with the superweapons data, both methods are independent.
Can be used any air/ground/Subterranean transport.