|
GRW ScriptHook 0.11.0
Plugin API for Ghost Recon Wildlands
|
Health, resources, skill points, stealth and ammo. More...
Macros | |
| #define | SH_RES_FOOD 0 |
| The four crafting resources, by name. | |
| #define | SH_RES_GASOLINE 1 |
| #define | SH_RES_MEDICINE 2 |
| #define | SH_RES_COMMS 3 |
Functions | |
| SH_API int | ShGetHealthPlayer (uint32_t *cur, uint32_t *max) |
| Health, local player. | |
| SH_API int | ShSetHealthPlayer (uint32_t value) |
| SH_API int | ShSetGodModePlayer (int on) |
| SH_API int | ShDamagePlayer (uint32_t amount) |
| Damage through the engine's own path, so death runs its real sequence. | |
| SH_API int | ShKillPlayer (void) |
| SH_API int | ShSetCannotDiePlayer (int on) |
| Floors at the downed state instead of dying. | |
| SH_API void | ShInvalidateHealth (void) |
| SH_API int | ShGetHealthEntity (uint64_t entity, uint32_t *cur, uint32_t *max) |
| Entity targeted variants. | |
| SH_API int | ShSetHealthEntity (uint64_t entity, uint32_t value) |
| SH_API int | ShSetGodModeEntity (uint64_t entity, int on) |
| SH_API int | ShStatRead (uint64_t stat, uint32_t *out) |
| Protected ints, the general stat storage: four bit planes and an XOR key. | |
| SH_API int | ShStatWrite (uint64_t stat, uint32_t value) |
| SH_API int | ShGetResource (int which, uint32_t *out) |
| SH_API int | ShSetResource (int which, uint32_t value) |
| SH_API int | ShSetAllResources (uint32_t value) |
| SH_API int | ShGetSkillPoints (uint32_t *out) |
| Skill points, a plain int rather than a protected one. | |
| SH_API int | ShSetSkillPoints (uint32_t value) |
| SH_API int | ShSetVisibility (float factor) |
| Visibility to enemies. | |
| SH_API int | ShGetVisibility (float *out) |
| SH_API int | ShGetAmmo (int slot, uint32_t *out) |
| Ammo by weapon slot: 0 primary, 1 second, 2 sidearm. | |
| SH_API int | ShSetAmmo (int slot, uint32_t value) |
Health, resources, skill points, stealth and ammo.
| #define SH_RES_FOOD 0 |
The four crafting resources, by name.
| #define SH_RES_GASOLINE 1 |
| #define SH_RES_MEDICINE 2 |
| #define SH_RES_COMMS 3 |
| SH_API int ShGetHealthPlayer | ( | uint32_t * | cur, |
| uint32_t * | max ) |
Health, local player.
The API owns the reference: it resolves and caches internally, plugins never hold one.
| SH_API int ShSetHealthPlayer | ( | uint32_t | value | ) |
| SH_API int ShSetGodModePlayer | ( | int | on | ) |
| SH_API int ShDamagePlayer | ( | uint32_t | amount | ) |
Damage through the engine's own path, so death runs its real sequence.
Queued onto the game thread.
| SH_API int ShKillPlayer | ( | void | ) |
| SH_API int ShSetCannotDiePlayer | ( | int | on | ) |
Floors at the downed state instead of dying.
| SH_API void ShInvalidateHealth | ( | void | ) |
| SH_API int ShGetHealthEntity | ( | uint64_t | entity, |
| uint32_t * | cur, | ||
| uint32_t * | max ) |
Entity targeted variants.
The entity comes from the enumerator, never from a raw pointer a plugin invented.
| SH_API int ShSetHealthEntity | ( | uint64_t | entity, |
| uint32_t | value ) |
| SH_API int ShSetGodModeEntity | ( | uint64_t | entity, |
| int | on ) |
| SH_API int ShStatRead | ( | uint64_t | stat, |
| uint32_t * | out ) |
Protected ints, the general stat storage: four bit planes and an XOR key.
Health, resources, skill points, XP.
| SH_API int ShStatWrite | ( | uint64_t | stat, |
| uint32_t | value ) |
| SH_API int ShGetResource | ( | int | which, |
| uint32_t * | out ) |
| SH_API int ShSetResource | ( | int | which, |
| uint32_t | value ) |
| SH_API int ShSetAllResources | ( | uint32_t | value | ) |
| SH_API int ShGetSkillPoints | ( | uint32_t * | out | ) |
Skill points, a plain int rather than a protected one.
| SH_API int ShSetSkillPoints | ( | uint32_t | value | ) |
| SH_API int ShSetVisibility | ( | float | factor | ) |
Visibility to enemies.
1 normal, 0 invisible, 0.5 halves the detection range, above 1 is easier to spot.
| SH_API int ShGetVisibility | ( | float * | out | ) |
| SH_API int ShGetAmmo | ( | int | slot, |
| uint32_t * | out ) |
Ammo by weapon slot: 0 primary, 1 second, 2 sidearm.
| SH_API int ShSetAmmo | ( | int | slot, |
| uint32_t | value ) |