Commit Graph

235 Commits

Author SHA1 Message Date
Applevangelist ab6d4cb9b9 #POINT Added Box Scan Method
#CTLD Added options for beacon frequency preset when adding a zone
2026-03-21 12:22:05 +01:00
Applevangelist 4367a91d4b #VARIOUS - Added Speaker options for HOUND 2026-03-07 18:17:23 +01:00
leka1986 2cedcff73c Update CTLD.lua
Removed C-130 from the Messaging Unloaded by ground crew.

Scheduler for batch building is now 0 to make each set build it's own  with it's engineer. He will despawn after 30 seconds after build.

Shorter message for C-130 airdrop buildstarted.
2026-03-06 20:16:21 +01:00
leka1986 d30377a7b1 Remove C-130J-30 specific notes from CTLD.lua
Removed notes specific to C-130J-30 workflow from CTLD.lua.
2026-03-04 21:47:27 +01:00
leka1986 750ad6b5b9 Update CTLD.lua
Fixed comments that looked weird in the website.
2026-03-04 21:44:46 +01:00
Thomas 2d4d4e3865 Merge branch 'develop' into master-ng 2026-03-04 12:01:31 +01:00
leka1986 85b582d6dd Update CTLD.lua
- Added C-130 DynamicCargo auto-build adapter inside CTLD core.
- New CTLD options:
  - `UseC130DynamicCargoAutoBuild = false` (default off)
  - `C130DynamicCargoAutoBuildMergeSeconds = 10`
- Hooked C-130 set registration into CTLD `Get Crates` flow (buildable cargo only: `VEHICLE` / `FOB`).
- Added CTLD internal set/entry tracking for C-130 crates:
  - map crate spawn -> dynamic cargo loaded/unloaded -> landed.
- Wired DynamicCargo event handling in CTLD:
  - on loaded: map to the correct CTLD set entry.
  - on unloaded: mark landed and create/rebind CTLD cargo proxy for build handoff.
  - on removed before landed: mark set failed and clean it.
- Added set completion logic:
  - build starts only when all crates in set are landed.
  - helper infantry is spawned and CTLD engineer build path is used.
- Added merge window batching by owner:
  - close drops from same C-130 can be processed together (one handoff window).
- Added scoped filtering in `_BuildCrates` for this path:
  - prevents counting unrelated nearby crates during engineer auto-build.
- Added cleanup paths for completed/failed/stale sets and stop lifecycle cleanup.
- Added/updated docs in section `2.2` for:
  - what the feature does,
  - required settings,
  - usage example,
  - and the important note that this applies to CTLD `Get Crates` cargo (not C-130 Loadsheet cargo).

**Behavior note**

- Default behavior is unchanged unless `UseC130DynamicCargoAutoBuild` is enabled.
2026-03-03 19:35:17 +01:00
Thomas 8968add126 Merge pull request #2528 from Rolln-dev/Rolln/ParamsCleanup
UPDATE: FUNCTIONAL, NAVIGATION, OPS, SOUND, UTILITIES and WRAPPER function params
2026-03-03 06:25:56 +01:00
Rolln-dev 4e910fcd7a UPDATE: OPS function params
- Added (Optional) to param descriptions for params that have default values
2026-03-02 20:48:54 -07:00
leka1986 c65d93dd73 Revert "Update CTLD.lua" 2026-03-02 22:23:48 +01:00
Thomas c346eb7acc Update CTLD.lua 2026-03-02 16:24:29 +01:00
Applevangelist 3d6bd4ea54 #Fix some missing localizations 2026-03-01 14:03:13 +01:00
Thomas fe0f0a0190 Update CTLD.lua 2026-02-28 18:33:35 +01:00
Thomas 180d861426 Update CTLD.lua 2026-02-28 17:36:48 +01:00
leka1986 052f055bbf Update CTLD.lua
Added:  function CTLD:AddStaticsCargoFromType(Name,TypeName,Mass,Stock,SubCategory,DontShowInMenu,Location,UnitTypes,Category,ShapeName,ResourceMap,DisplayName)
Added:  function CTLD:CanGetTroops, this is a final check for outside hooks, if player have conditions.


Reworked cargo placement in the case of none ship.
Cargo will be placed and sizes are depended on the cargo type, this can be further tweaked under the function GetCrates. This is applied to all types of cargo and all type of units.

Removed "Get" from the menu if the UseC130LoadAndUnload is true, player choose now the amount of cargo, then they will spawn. Same is for the Chinook if GCLoading is enabled.

Increased the UH-60L_DAP crate limit to 2 and the weight limit to 3500.

C130basetype is now independent of UseC130LoadAndUnload true / false. It will always be cds_crate for the C-130, and players can change it to whatever.
2026-02-22 13:25:42 +01:00
Thomas 843ef4d9d2 Update CTLD.lua 2026-02-15 13:32:57 +01:00
Applevangelist 1830b4c752 #CONTROLLABLE
- Added OptionAllowFormationSideSwap()
- Added OptionAIRunwayLineup()
2026-02-06 16:28:11 +01:00
smiki bd64d084e9 Optimizations 2026-02-05 10:49:48 +01:00
leka1986 41503ae625 Update CTLD.lua
fixed menu getting deleted.
2026-01-24 18:00:25 +01:00
leka1986 49332fafec Fixed bugs
Fixed bugs for load troops.

Added Mi-8 to the prevention method for ignoring what is inside when trying to build crates.

Removed return self if the player is trying to build stuff that is outside the helicopter or C-130, while he still have stuff inside. Cargo will be built but it will ignore what is inside.

Removed the menu "Others" if there is no sub category involved for that type. If user have crates subcat but not troops subcat, it won't show "others".
2026-01-22 18:45:23 +01:00
Applevangelist 7a3ea2918d #SEAD/#MANTIS - Adding functions for non-suppression of groups capable of HARM defense
#CTLD/#CSAR - Added data for A/M-H6J
2026-01-22 12:35:16 +01:00
leka1986 aed2f1d8a9 Enhance troop loading logic and messaging
noticed a bug, I could load troops outside the zone when choosing amount. I could also load without the door was even checked.

Combined the troop drop to one message instead of multiple messages for each dropped group.
2026-01-05 04:18:57 +01:00
leka1986 3504797147 Update CTLD.lua
Fixed so the Engineer can remove all the items when he is building from an airdrop.

Added a function that I use, CanGetCrates, it's a check before getting it if the conditions are met.

Added small fixes where calling FindCratesNearBy would remove the units when it's called by the function RemoveCratesNearBy when it was checking the surroundings and it should ignore what is inside. In the case of C-130 and the CH-47.

Added how many crates are dropped when getting statics.

Expanded OnAfterTroopsRTB to accept chunk, ie the number of units which is returned.
2026-01-05 03:43:28 +01:00
leka1986 448d668b44 Bug fixes and functions.
Fixed a bug where units could still get items all though not in load zone.

Added CanGetCrates, it's a function where user can hook custom conditions.

Added CanGetUnits, same as the above.

Added CanBuildCrates, same as the first one.
2025-12-24 00:00:30 +01:00
Applevangelist 8c0e021e82 #CTLD - Make FSM event CratesDropped useable for tasking 2025-12-23 17:16:57 +01:00
leka1986 6a13e593ec Update CTLD.lua
Added:
OnAfrerGetCrates, Only triggers when player uses "Get"

Added:
OnAfterRemoveCratedNearBy, Only triggers when player actively uses Remove crates near by or remove units near by.

Added: 
Partial load. currently, if a player land 3 crates (Farp) and want to partially load another farp, even though it can not fit, some want to load partially, this allows for it. 
Player will be able to see what actually fits in the menu, but if they want, they can open the menu again, select the item, then it will say "Get" "Crates limit reached" and "Partially load"

Added:
AddStaticsCargo can now accept a last parms, UnitType, this parm will make the cargo only visible in the menu to that passed unitType.

Removed Get and Load from CH-47 for the statics if enableChinookGCLoading is enabled. This will make it less confusing, as it didn't allow players do load anything except Ground crew for statics.
2025-12-19 18:44:13 +01:00
leka1986 795f58dc9b Update CTLD.lua
Fixing error when the savefile loads statics in the onafterLoad, it blows up.

attempt to call method 'GetStaticResourceMap' (a nil value)
2025-12-15 22:42:29 +01:00
leka1986 25daa67554 Update CTLD.lua
Fixed error when using Dynamic cargo 
"concatenate local 'gname'"

and the AddStaticCargo did not respect the template staticType.
2025-12-15 17:29:54 +01:00
leka1986 948158e85a Update CTLD.lua
Fixed bugs, 

Added RemoveStockUnits.

Tested and tested, works as intended.
2025-12-11 11:27:05 +01:00
leka1986 878eaf4301 Added Get Units and New stuff for the C-130J
Added

* UseC130LoadAndUnload toggle, false by default.
* C130basetype = "cds_crate" -- only for the C-130
* Extended AddCratesCargo & AddCratesCargoNoMove with another parms where we can force Typename for the static for the C-130, even though a parms passed before it with another shape. the last parms will still be forced only if the unit is C-130J. else, the last parms will not be used.

Example usage:
Foothold_ctld:AddCratesCargo("FARP",{"CTLD_TROOP_FOB"},CTLD_CARGO.Enum.FOB,3,1500,10, "FARP",nil,nil,nil,"Cargos","ammo_cargo",nil, "cds_crate")
Blocked the build of crates if still inside C-130J and CH-47F using 15 Meters for the C-130 and 5 meters for the CH-47.

ListCargo will now display what's inside besed on _GetUnitCapabilities / 2


** Manage Units, New menu only for the C-130J.

* New menu under CTLD. Get Units, Remove units nearby.
* Addunits function.
function CTLD:AddUnits(Name,Templates,Type,Stock,SubCategory,UnitTypes)
Example usage.

Foothold_ctld:AddUnits("Humvee",{"CTLD_CARGO_HMMWV"},CTLD_CARGO.Enum.VEHICLE,10, "ANTI TANK")

Those will be placed on a safe distance using same method as crates based on length and (idx-1)*2.5 + length.

* Added FSM, OnAfterUnitsSpawn. No internal, only Hook.

* Added 3 functions,
AddStockUnits
SetStockUnits
GetStockUnits

Added documents.
2025-12-09 19:45:56 +01:00
Applevangelist 049529ecf0 #CTLD Allow hover extracting Troop objects 2025-12-07 13:02:17 +01:00
leka1986 e873b097cf Convert cargo type to string for logging
Concatenate local 'type' Nil value
2025-12-06 10:10:18 +01:00
Applevangelist 30c6937910 #CTLD Fix find crates also looking into static cargos 2025-11-28 12:48:26 +01:00
Applevangelist 22097987dc #CTLD, #DYNAMICCARGO - C-130j-30 additions 2025-11-09 14:43:11 +01:00
leka1986 7b44e7a3f6 Update CTLD.lua
Removed quantity menu if there is only one set.
2025-11-09 02:16:02 +01:00
leka1986 aa4cf37aed Clean up comments in CTLD.lua
Removed unnecessary comment lines in CTLD.lua.
2025-11-08 02:52:23 +01:00
leka1986 caf2b4e736 Update CTLD.lua
Added ability to drop "Sets" from 2 and up will be sets, else it will be like before.

Changed _PackCratesNearby to handle all cargo within the range instead of the nearest.
2025-11-08 02:47:56 +01:00
leka1986 e9237146a3 Update CTLD.lua
Fixed a bug. 

When dropping crates, while choosing "Drop and build" The first drop will put the crate into a crate that can be loaded but a second later, that crate will be cleaned up due to build. This makes sure that the crates are not in the "load crates" list.
2025-11-04 20:09:48 +01:00
Shafik 2f39e38264 [ADDED] CTLD. option to load back crates from save file. 2025-11-04 11:32:24 +02:00
Shafik db54672fbd [ADDED] CTLD. option to load back crates from save file. 2025-11-04 11:30:59 +02:00
Thomas c2a630dabd Update CTLD.lua
Cargo counters by @lekaa
2025-11-02 17:56:55 +01:00
Applevangelist 86798ae9ea #CTLD - fix 2025-10-24 16:27:17 +02:00
leka1986 8c07573f8f Update CTLD.lua 2025-10-24 16:13:18 +02:00
leka1986 f3af0262df Update CTLD.lua
Added Crates amount to the menus and AddCratesCargoNoMove.
2025-10-24 14:02:06 +02:00
Applevangelist 69e6497655 #CTLD - Small fix for subcats 2025-10-12 17:23:54 +02:00
Thomas b2cc3e5329 Merge pull request #2413 from leka1986/master
Master
2025-10-09 17:41:07 +02:00
leka1986 3a61581608 #Added a new option ( true by default), returntroopstobase. If set to false, troops would not return to base when dropped at load zone. 2025-10-09 17:33:15 +02:00
smiki 48b51f21de [FIXED] CTLD. Memory leak adding zones of the same name and type
[FIXED] CSAR. nil pointer
2025-10-08 13:15:22 +02:00
smiki aec69884dc [ADDED] CTLD. UH-60L DAP default unit capability 2025-09-26 15:13:03 +02:00
Applevangelist 8fb4d4c7c6 #CTLD - add CratesPickedUp at one more point 2025-09-25 12:13:29 +02:00