Skip to content

feat(api): expand ModelExtras API with comprehensive feature coverage and JSONC exports - #341

Open
CanerKaraca23 wants to merge 1 commit into
user-grinch:mainfrom
CanerKaraca23:feat/api-comprehensive-expansion
Open

CanerKaraca23 wants to merge 1 commit into
user-grinch:mainfrom
CanerKaraca23:feat/api-comprehensive-expansion

Conversation

@CanerKaraca23

Copy link
Copy Markdown
Collaborator

Summary

This pull request significantly expands the public C-ABI exported API (ModelExtrasAPI.h and ModelExtrasAPI.cpp) to provide 100% feature coverage and complete JSONC vehicle configuration access for third-party ASI plugins and external scripts.

Key Additions (161 Total Exported Functions)

  1. JSONC Data & Feature Configuration Accessors:

    • Model info: HasData, GetModelName, GetHandlingId, GetFlags, GetBrakePadSoundOverride, GetDoorChimeSoundOverride
    • Feature flags: HasSirens, HasCarcols, HasExhausts, HasRemap, HasDirt, HasGauges, HasPlates, HasLights, HasRollbackBed, HasRotateDoors, HasSlideDoors, HasRoof, HasSpoiler, HasBackfire, HasWheelHubs, HasExtraWheels, HasBikeChain, HasLeds, HasClock, HasSpotlights
    • Lights & Custom Colors: GetLightColorOn, GetLightColorOff, HasLightType, GetLightHighBeamPointLightMul, GetLightHighBeamShadowMul
    • Gauges: GetGaugeRpmMax, GetGaugeRpmRot, GetGaugeRpmRotMax, GetGaugeSpeedMul, GetGaugeSpeedRotMax
    • Plates: GetPlateText, GetPlateFontColor, GetPlateBgColor, GetPlateShadowColor, GetPlateOutlineColor, GetPlateFormatType
    • Sirens & Spotlights: GetSirenCount, GetSirenModeCount, GetSirenPointCount, GetSirenPointData, GetSpotlightBeamColor, GetSpotlightBeamRadius
    • Doors & Bed: GetSlideDoorAxis, GetSlideDoorMaxTravel, GetRotateDoorAxis, GetRotateDoorMaxAngle, GetRollbackBedSlideAxis, GetRollbackBedSlideMax, GetRollbackBedTiltAxis, GetRollbackBedTiltMax
    • Spoiler, Roof, Backfire, Chain, LEDs: full configuration getters
  2. Real-time Vehicle Feature & Lighting State Getters:

    • IsVehicleFeatureActive (by feature matrix ID), IsLightTypeActive
    • High-beam / Long lights detection: IsLongLightsOn(CVehicle*)
    • Indicator state: GetIndicatorState(CVehicle*), SetIndicatorState(CVehicle*, int)
    • Fog lights, Roof status & progress, Active spoiler status & progress, Rollback bed slide & tilt progress
    • Sliding / Rotating door open fractions
    • License plate text: GetVehiclePlateText(CVehicle*)
    • Remap: GetActiveRemapIndex(CVehicle*), GetTotalRemaps(CVehicle*), GetTextureNames(int, ...)
    • Ped Colors: GetPedColorVariation(CPed*, int)
    • Carcols: GetCarColorVariation(CVehicle*, int)
  3. Core & Material Pipeline Utilities:

    • FindDummies(CVehicle*), ResetMaterials(CVehicle*)
    • GetMaterialColor(CVehicle*, int, unsigned int*, unsigned int*)
    • GetMaterialEmissive(CVehicle*, int, float*)
    • Dynamic render helpers: RegisterCorona, RegisterDirectionalCorona, RegisterPointLight, RegisterHeadlightPointLight, RegisterDirectionalShadow

Compatibility & Safety

  • Full binary and signature compatibility with existing ModelExtrasAPI clients.
  • Clean __declspec(dllexport) extern "C" wrappers.
  • Verified 1:1 signature and AST integrity across .h declarations and .cpp definitions (161/161 matched).

@CanerKaraca23
CanerKaraca23 force-pushed the feat/api-comprehensive-expansion branch from 8452725 to de2e936 Compare September 18, 2026 16:35
@CanerKaraca23

Copy link
Copy Markdown
Collaborator Author

It fails because other PRs needs to be merged before.

@CanerKaraca23
CanerKaraca23 force-pushed the feat/api-comprehensive-expansion branch from b596a08 to 0a6f079 Compare September 18, 2026 22:03
@CanerKaraca23
CanerKaraca23 force-pushed the feat/api-comprehensive-expansion branch from 0a6f079 to f0eb4b6 Compare September 18, 2026 22:08
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