Command & Conquer™ Remastered Collection

Command & Conquer™ Remastered Collection

[TD] 🛠 NCO 🛠 (RULES.INI 📃 & Lua Scripting ⚙)
LUA Event Ideas
So, I saw that you (djfdyuruiry) were planning on adding more Lua events other than the On_Win, On_Fail etc. I thought I would throw some ideas up for a good modding API - tho I admit I have no clue how difficult any of these would be to implement:

// Actions, either Autonomous or Manually by player
On_Move
On_Shoot
On_Kill
On_Destroy_Structure
On_Take_Damage
On_Idle
On_Guard
On_Stop
On_Force_Fire
On_Force_Move
On_Enter_Repair_Facility
On_Enter_Refinery
On_Enter_Helipad
On_Any_Order
On_Reached_Destination
On_Death
On_Death_By_Tiberium
On_Unit_Repair
On_Unit_Repaired
On_Unit_Sold
On_Structure_Repair
On_Strucutre_Repaired
On_Structure_Sold
On_Landed
On_Ammo_Loaded
On_Ammo_Full
On_Cargo_Loaded
On_Cargo_Full
On_Tiberium_Growth

// Engineer
On_Capture_Attempt
On_Capture_Success

// Harvester & Money
On_Harvester_Built
On_Harvester_Lost
On_Harvester_Start
On_Harvester_Full
On_Credits_Up
On_Credits_Down
On_Silos_Needed
On_Insufficient_Funds

// Construction
On_Infantry_Queue_Add
On_Infantry_Queue_Remove
On_Infantry_Queue_Hold
On_Vehicle_Queue_Add
On_Vehicle_Queue_Remove
On_Vehicle_Queue_Hold
On_Unit_Ready
On_Construction_Complete
On_Construction_Cancelled
On_PowerPlant_Built
On_PowerPlant_Lost
On_Advanced_PowerPlant_Built
On_Advanced_PowerPlant_Lost
On_Refinery_Built
On_Refinery_Lost
On_Barracks_Built
On_Barracks_Lost
On_HandOfNod_Built
On_HandOfNod_Lost
On_WeaponsFactory_Built
On_WeaponsFactory_Lost
On_Airstrip_Built
On_Airstrip_Lost
On_CommCenter_Built
On_CommCenter_Lost
On_Advanced_CommCenter_Built
On_Advanced_CommCenter_Lost
On_TempleOfNod_Built
On_TempleOfNod_Lost
On_Silo_Built
On_Silo_Lost
On_Helipad_Built
On_Helipad_Lost
On_Repair_Facility_Built
On_Repair_Facility_Lost

// Defenses
On_GuardTower_Built
On_GuardTower_Lost
On_Advanced_GuardTower_Built
On_Advanced_GuardTower_Lost
On_Turret_Built
On_Turret_Lost
On_Obelisk_Built
On_Obelisk_Lost
On_SAM_Site_Built
On_SAM_Site_Lost

// Fences
On_Sandbags_Built
On_Sandbags_Lost
On_ChainLink_Built
On_ChainLink_Lost
On_Concrete_Built
On_Concrete_Lost

// Categories
On_Structure_Built
On_Structure_Lost
On_Fence_Built
On_Fence_Lost
On_Infantry_Built
On_Infantry_Lost
On_Vehicle_Built
On_Vehicle_Lost
On_Aircraft_Built
On_Aircraft_Lost
On_Any_Built
On_Any_Lost

// Superweapons
On_AirStrike_Possible
On_AirStrike_Ready
On_AirStrike_Fired
On_AirStrike_Hit
On_IonCannon_Possible
On_IonCannon_Ready
On_IonCannon_Fired
On_IonCannon_Hit
On_Nuke_Possible
On_Nuke_Ready
On_Nuke_Fired
On_Nuke_Hit
On_AnySuper_Possible
On_AnySuper_Ready
On_AnySuper_Fired
On_AnySuper_Hit
< >
Εμφάνιση 1-6 από 6 σχόλια
These look pretty solid ideas as a set of events - I will come back to this when I have time. Watch this space :)
It might make more sense to have a few core events like On_Build and On_Destroy that pass in kn own parameters for things like house, building/unit, etc.

Having to code multiple event hooks for what (in my reading) seem to be singular functions in the DLL code might make it hard to maintain the mapping.

Plus, if we do get to the point where we're able to add new units/factions/buildings, having events hard-coded to the current default set of objects will make mod making and logic wiring a lot harder.

Source and SourceMod are a pretty good guide here - a smaller number of hooks, with an expandable and extensible set of parameters which can pass all the needed data and references back and forth, will likely work better here.
James Broderland  [δημιουργός] 4 Ιουλ 2020, 18:24 
I agree with you @jballou - always thought of this being as generic as possible. Should be `on thing` and then the thing is passed in the handler to make it's own decisions about it. Nothing stopping a potential modder writing a library in lua that does the unit specific bindings if they really wanted them.
Well, by default, the event should have some data packet with it, and include a return pointer or whatever the proper way to interrupt and set the task list/data in return.

I sent a friend request btw, I did a lot of mods and community tooling for Insurgency, I might be able to help a bit on your project.
FYI: I have started implementing some of these, I will post a link to the GitHub issue when I come up with a preliminary list. We can review, and refine the list from there.
< >
Εμφάνιση 1-6 από 6 σχόλια
Ανά σελίδα: 1530 50