Game.Clock
Alias of xsGetTimeData
__SFCodeObj.call("Game.Clock"):String
No arguments.
Returns String (JSON)
Same as xsGetTimeData.
Player data read from the game's own structures, as JSON strings. These calls take no arguments and work while the Pip-Boy is closed.
They return {"status":"inactive"} while the provider is disabled, and {"status":"pending","reason":"<reason>"} while the data cannot be read yet, for example on the main menu. Each entry lists its pending reason. A delivered value that cannot be returned produces {"status":"error","reason":"invalid_request"}.
Alias of xsGetTimeData
__SFCodeObj.call("Game.Clock"):String
No arguments.
String (JSON)Same as xsGetTimeData.
Result of a Game.* call as an ActionScript object
__SFCodeObj.call("Game.GetAS3Object", name:String):Object
| Name | Type | Description |
|---|---|---|
name | String | One of Game.Clock, Game.GetCollections, Game.GetInventory,
Game.GetPerks, Game.GetPlayerInfo, Game.GetQuests,
Game.GetSpecial or Game.GetStatus. |
ObjectThe JSON that name returns, already decoded: the same fields, and
the same status objects while the provider is inactive or pending.
Integers that fit an int are int, other numbers are Number.
Returns undefined for any other name. While the provider returns the same JSON, each call returns the same object without decoding it again, so treat the object as read-only: a change made to it is seen by later calls. To detect a change, compare the values you read, not the object reference. Each movie gets its own objects.
Example
var status:Object = __SFCodeObj.call("Game.GetAS3Object", "Game.GetStatus");
if (status != null && status.status == null) {
trace(status.HP.cur, status.HP.max);
}Current SPECIAL values (Steam only)
__SFCodeObj.call("Game.GetSpecial"):String
No arguments.
String (JSON)| Field | Type | Description |
|---|---|---|
S | int | |
P | int | |
E | int | |
C | int | |
I | int | |
A | int | |
L | int | |
details | Array | |
details[].name | String | |
details[].value | int | |
details[].bonus | int | |
details[].description | String |
Sample result
{"S":10,"P":4,"E":5,"C":3,"I":6,"A":15,"L":13,"details":[{"name":"Strength","value":10,"bonus":0,"description":"..."}]}Values include buffs and debuffs, truncated toward zero as the Pip-Boy shows them. Works while the Pip-Boy is closed. Pending reason special before a local player exists.
Player vitals from the Pip-Boy header and STAT page
__SFCodeObj.call("Game.GetStatus"):String
No arguments.
String (JSON)| Field | Type | Description |
|---|---|---|
HP | Object | |
HP.cur | Number | |
HP.max | Number | |
AP | Object | |
AP.cur | Number | |
AP.max | Number | |
rads | Number | |
hunger | Number | |
thirst | Number | |
carryWeight | Object | |
carryWeight.cur | Number | |
carryWeight.max | Number | |
carryWeight.limit | Number or null | null when there is no absolute limit. |
caps | int | |
limbs | Object | Current condition; 0 is crippled. |
limbs.head | Number | |
limbs.leftArm | Number | |
limbs.rightArm | Number | |
limbs.leftLeg | Number | |
limbs.rightLeg | Number | |
flags | Object | |
flags.headCrippled | Boolean | |
flags.leftArmCrippled | Boolean | |
flags.rightArmCrippled | Boolean | |
flags.leftLegCrippled | Boolean | |
flags.rightLegCrippled | Boolean | |
flags.irradiated | Boolean | |
flags.ghoul | Boolean | |
flags.pipBoyLightOn 0.4.34+ | Boolean | true while the Pip-Boy light is on. |
flags.isFemale 0.4.35+ | Boolean | true when the character's sex is female, as the game's GetIsSex condition reads it. |
resist | Object | Summed the way the STAT page sums them. |
resist.damage | int | |
resist.poison | int | |
resist.fire | int | |
resist.energy | int | |
resist.cryo | int | |
resist.radiation | int | |
date | Object or null | The game's calendar, or null before it exists. |
date.year | int | |
date.month | int | |
date.day | int | |
date.hour | int | |
date.minute | int | |
weaponDamage | Array or null | Damage rows of the equipped weapons; null while the inventory is changing. |
weaponDamage[].type | int | Game damage type id. 7 is a timed effect. |
weaponDamage[].value | Number | |
weaponDamage[].duration | Number | Seconds, for timed effects. |
Sample result
{"HP":{"cur":210.5,"max":275},"AP":{"cur":90,"max":120},"rads":45,"hunger":80,"thirst":65,"carryWeight":{"cur":180,"max":240,"limit":1740},"caps":3271}HP.max is the radiation-reduced maximum. AP.max is the current AP with damage removed. hunger and thirst are the game's Food and Water values. irradiated is set at 60% of the lethal rads setting. Pending reason: status.
Name, level and XP
__SFCodeObj.call("Game.GetPlayerInfo"):String
No arguments.
String (JSON)| Field | Type | Description |
|---|---|---|
name | String | |
level | int | |
xp | Object | |
xp.total | int | Cumulative experience. |
xp.current | int | Experience into the current level. |
xp.next | int | Experience the level needs. |
progress | Number | Fraction the HUD bar shows. 0 to 1. |
Sample result
{"name":"...","level":42,"xp":{"total":51234,"current":1234,"next":5000},"progress":0.25}name can be empty. Pending reason: player_info.
Perk cards
__SFCodeObj.call("Game.GetPerks"):String
No arguments.
String (JSON)| Field | Type | Description |
|---|---|---|
perks | Array | |
perks[].name | String | |
perks[].perkId | int | |
perks[].uniqueId | int | |
perks[].rank | int | |
perks[].maxRank | int | |
perks[].pointCost | int | |
perks[].levelRequirement | int | |
perks[].raceRestriction | int | 0 any race, 1 non-ghouls only, 2 ghouls only. |
perks[].gameMode | int | 1 for Nuclear Winter cards. |
perks[].special | String or null | |
perks[].equipped | Boolean | |
perks[].animated | Boolean | |
perks[].description | String | |
perks[].flavorText | String |
Pending reason: perks.
Quest objectives the Pip-Boy lists
__SFCodeObj.call("Game.GetQuests"):String
No arguments.
String (JSON)| Field | Type | Description |
|---|---|---|
quests | Array | |
quests[].name | String | |
quests[].formId | int | |
quests[].type | int | |
quests[].swfFile | String | |
quests[].active | Boolean | |
quests[].enabled | Boolean | |
quests[].completed | Boolean | |
quests[].canBeRejected | Boolean | |
quests[].objectives | Array | |
quests[].objectives[].index | int | |
quests[].objectives[].text | String | |
quests[].objectives[].completed | Boolean | |
quests[].objectives[].failed | Boolean | |
quests[].objectives[].orWithPrevious | Boolean |
type is the game's quest type byte, which picks the Pip-Boy tab. Objective text has its tags expanded as in the Pip-Boy. Objectives are sorted by index. Pending reason: quests.
Carried items
__SFCodeObj.call("Game.GetInventory"):String
No arguments.
String (JSON)| Field | Type | Description |
|---|---|---|
items | Array | |
items[].name | String | |
items[].handle | int | |
items[].count | int | |
items[].weight | Number | |
items[].value | Number | |
items[].equipState | int | One of 0, 1. |
items[].filterFlag | int | |
items[].legendaryStars | int | |
items[].itemLevel | int | |
items[].durability | Number | |
items[].currentHealth | Number | |
items[].maximumHealth | Number | |
items[].favorite | Boolean | |
items[].legendary | Boolean | |
items[].transferLocked | Boolean | |
items[].canBeTransferLocked | Boolean | |
items[].questItem | Boolean | |
items[].canFavorite | Boolean | |
items[].taggedForSearch | Boolean | |
items[].canDrop | Boolean | |
items[].canDestroy | Boolean | |
items[].hasUniqueEffect | Boolean | |
items[].damage | Array | Weapons only. Zero rows are left out. |
items[].damage[].type | int | Game damage type id. 7 is a timed effect. |
items[].damage[].value | Number | |
items[].damage[].duration | Number | Seconds, for timed effects. |
items[].rateOfFire | Number or null | |
items[].range | Number or null | |
items[].accuracy | Number or null | |
items[].apCost | Number | |
items[].resist | Array | Armor only. |
items[].resist[].type | int | Game damage type id. 7 is a timed effect. |
items[].resist[].value | Number | |
items[].resist[].duration | Number | Seconds, for timed effects. |
items[].weaponType | int | Weapons only. 255 and 0 to 6 melee, 7 to 9 ranged, 10 grenade or thrown, 11 mine. |
items[].armorSlots | uint | Armor only. Biped slot mask of the base form; bit n is slot n+30, for example bit 11 torso, 12 left arm, 13 right arm, 14 left leg, 15 right leg. |
items[].keywords | Array | Weapons and armor only. Form IDs of the base form's keywords, for example 0x0004A0A0 WeaponTypePistol or 0x0004D8A1 ArmorTypePower. |
weight and value are per unit. handle is the server item handle. filterFlag is the Pip-Boy filter bitmask. Weapons also have damage, rateOfFire, range, accuracy (null for weapon types whose item card omits them), apCost and weaponType; armor has resist.
armorSlots and keywords need Address Library IDs 326 to 332; with an older database they are left out. keywords lists the base form's keywords and those of its parent keyword forms, not keywords that modifications add, so a pistol that a stock mod turns into a rifle keeps WeaponTypePistol. The slot mask also comes from the base form only.
While the game is changing the inventory, the previous list is returned. While the stored item list is unchanged, the previous result is returned for up to one second, so condition and perk-adjusted values can be up to one second old. Pending reason: inventory.
Collectibles the STAT page lists
__SFCodeObj.call("Game.GetCollections"):String
No arguments.
String (JSON)| Field | Type | Description |
|---|---|---|
collections | Array | |
collections[].name | String | |
collections[].formId | int | |
collections[].owned | int | |
collections[].capacity | int | |
collections[].description | String |
Sample result
{"collections":[{"name":"Bobblehead: Luck","formId":4097,"owned":3,"capacity":0,"description":"..."}]}capacity 0 means no limit. Pending reason: collections.