Skip to content

Store vehicles to rebel outposts (again)#885

Open
wersal454 wants to merge 3 commits intoAntistasi-Ultimate-Community:unstablefrom
wersal454:garage-vehicles-to-rebel-outposts-№2

Hidden character warning

The head ref may contain hidden characters: "garage-vehicles-to-rebel-outposts-\u21162"
Open

Store vehicles to rebel outposts (again)#885
wersal454 wants to merge 3 commits intoAntistasi-Ultimate-Community:unstablefrom
wersal454:garage-vehicles-to-rebel-outposts-№2

Conversation

@wersal454
Copy link
Copy Markdown

@wersal454 wersal454 commented Apr 12, 2026

What type of PR is this?

  • Bug
  • Change
  • Feature
  • Miscellaneous
Sub-categories:
  • Template
  • Map
  • Config
  • Function
  • Localization

What have you changed, and why?

Information:

Continuation of #390, closed that one because of the conflict fixes fuck up.

This PR extends the ability to assign specific vehicles to rebel outposts (roadblocks, AA, AT, and HMG emplacements). Previously, outposts would always spawn with a default vehicle type. Now, players can choose to either purchase a vehicle from the store or assign one from their garage. The chosen vehicle, its customization, and (for roadblocks) its orientation relative to the barricade are saved persistently and restored when the outpost respawns.

🚗 Vehicle Selection & UI

  • Added new dialogs (vehicleFromGarage.hpp, vehicleFromStore.hpp) and supporting UI functions (fn_UI_vehicleFromGarage.sqf, fn_UI_vehicleFromStore.sqf, fn_UI_buyVehicleTabs.sqf) to allow selection of a specific vehicle class with live 3D preview and detailed stats (crew, weapons, skins).

  • When establishing a roadblock or static emplacement, the commander is prompted to choose between garage and store. If the garage is empty, the store opens automatically.

  • Roadblock placement now includes an option to align the vehicle parallel to the road or facing the barricade.

💾 Persistence & Data Structures

  • New global arrays (roadblocksData, aapostsData, atpostsData, hmgpostsData) store vehicle class, customization, and direction for each outpost type.

  • Updated fn_saveLoop.sqf and fn_loadStat.sqf to serialize and restore this data alongside garrison information.

  • fn_initZones.sqf initializes these arrays and broadcasts them to clients.

🔄 Spawning & Despawning

  • Modified fn_distance.sqf to read saved vehicle data when respawning outposts, falling back to default templates if no data exists.

  • Updated *Distance spawn functions (fn_outpost_createRoadblockDistance.sqf, etc.) to accept vehicle class, customization, and direction parameters, applying them when creating the vehicle.

  • Improved crew assignment: gunners, commanders, and additional turret gunners are now properly seated.

♻️ Disbanding & Refunds

  • fn_garrisonDialog.sqf overhauled for outpost removal:

  • If the vehicle is still alive, it is returned to the garage (via HR_GRG_fnc_addVehicle).

  • If destroyed, a partial refund is granted.

  • The corresponding *Data array entry is cleaned up.

  • Refund percentage increased from 75% to 85%.

🛠️ Support & Utility Functions
Added helper functions for vehicle analysis:

  • fn_getVehicleClassCrew.sqf – extracts crew layout.

  • fn_getVehicleClassSkins.sqf – lists available texture sources.

  • fn_getVehicleWeapons.sqf – returns usable weapons.

  • fn_isUsableWeapon.sqf – filters out non‑weapon devices (smoke launchers, fuel tanks).

  • fn_getVehicleClassComponents.sqf – retrieves animation sources.

  • fn_processVehicleCategory.sqf – populates garage listboxes.

📦 Server & UI Definitions

  • defines.hpp and ids.inc updated with new IDCs and icon macros for garage/store dialogs.

  • dialogs.hpp includes the new dialog headers.

  • fn_initVarServer.sqf declares new server variables for tracking selected vehicles and garage operations.

🧹 Miscellaneous

  • fn_mrkUpdate.sqf now accepts an optional side parameter to force marker side updates (used when ownership changes).

  • fn_ui_setOutpostCost.sqf no longer includes vehicle cost in the initial price estimate (since vehicle is selected separately).

(Yes, I asked LLM to write up the changelog)

How can your changes be tested, or reproduced?

Try spawning rebel outposts (except watch post), you will now have options to use vehicle from garage or buy it from HQ store

When placing roadblocks, you will now have option to select if vehicle should be parallel to the road or not.

Cost of the outposts should now be calculated from vehicle cost from HQ store and cost of the rebel units.

Does this PR include changes not authored by you?

  • No
  • Yes (See below)
Further info:
  • I confirm that I, and by extension this repository, can legally use these third-party changes. (Provide links or author attribution.)

...

Please verify the following (If possible).

* - Mandatory

  • These changes are my own, or I have written permission to use them. *
  • These changes are ready for review, or will be marked as a draft. *
  • I have loaded the mission in LAN host.
  • I have loaded the mission on a dedicated server.

Is further work needed?

  • Needs further testing.
  • Needs further changes.
  • Needs to be converted to a draft.

Please specify which Issue this PR Resolves (If Applicable).

This PR closes #XYZ.


Notes:

Only real ISSUE with this version is UI scaling for garage menu in 1080p (and probably less), functional but looks off. Otherwise everything should work fine.

Signed-off-by: wersal <wroma@bk.ru>
outpost_create functions probably should be merged into one with additional checks and parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant