...
Example is from the example ObjectToJson from a spawned NPC.
Field
Maximum hit points
GetMaxHitPoints
. Is the "No Permanent Death" option in the creature blueprint (Stops "blowing up" and chunking effects), but the opposite - if it is unticked this will be 1, if ticked it will be 0
| Key Name | JSON Type | nwscript Type | Example | nwscript Get | nwscript Set | Description and Notes |
|---|---|---|---|---|---|---|
| Age | int | int | 0 | GetAge | It appears NPCs can have an age, it just defaults to 0. You could use JSON to set it, although age isn't really used by the game. | |
| AmbientAnimState | byte | int | 0 | Instanced information about what animation the creature is doing | ||
| AnimationDay | dword | int | 0 | Presumably day of the month the animation will end | ||
| AnimationTime | dword | int | 0 | Presumably milliseconds the animation will end | ||
| Appearance_Head | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | Head appearance ID |
| Appearance_Type | word | int | 1 | GetAppearanceType | SetCreatureAppearanceType | appearance.2da line identifier |
| AreaId | dword | object | 1 | |||
| ArmorClass | short | int | 13 | GetAC | ||
| ArmorPart_RFoot | byte | int | 1 | |||
| BaseAttackBonus | byte | int | 0 | GetBaseAttackBonus | ||
| BodyBag | byte | int | 0 | See bodybag.2da for what this integer refers to | ||
| BodyBagId | dword | object | 2130706432 (OBJECT_INVALID) | Presumably if they have a "Lootable corpse" it's the body bag spawned in relation to this creature if they're dead, so the body can be removed if this is. 2130706432 is "invalid object". | ||
| BodyPart_Belt | byte | int | 0 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_LBicep | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_LFArm | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_LFoot | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_LHand | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_LShin | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_LShoul | byte | int | 0 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_LThigh | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_Neck | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_Pelvis | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_RBicep | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_RFArm | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_RHand | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_RShin | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_RShoul | byte | int | 0 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_RThigh | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| BodyPart_Torso | byte | int | 1 | GetCreatureBodyPart | SetCreatureBodyPart | |
| Cha | byte | int | 10 | GetAbilityScore | Charisma | |
| ChallengeRating | float | float | 1.0 | GetChallengeRating | Note the toolset has the default assigned rating plus an adjustment value, which is compiled into a final value in game which this is. | |
| ClassList | list | json | GetClassByPosition | The list contains the json array for a class, level, and their memorised spells and spell school/domain choices. See secondary table below. | ||
| Color_Hair | byte | int | 1 | |||
| Color_Skin | byte | int | 1 | |||
| Color_Tattoo1 | byte | int | 1 | |||
| Color_Tattoo2 | byte | int | 1 | |||
| CombatInfo | struct | json | This contains a number of combat-related pieces of info like weapons equipped, damage dice applicable to certain slots, arcane spell failure etc.. Nothing too exciting. | |||
| CombatRoundData | struct | struct | This presumably is only populated in combat - in a save game this would contain things like "I'm currently attacking creature ID xxx" | |||
| Con | byte | int | 14 | GetAbilityScore | Consitution | |
| Conversation | resref | string | testnpc | Dialogue file resref; may be useful with BeginConversation etc. | ||
| CreatnScrptFird | byte | int | 1 | Not sure | ||
| CreatureSize | byte | int | 3 | GetCreatureSize | Ususally tied to appearance.2da line | |
| CurrentHitPoints | short | int | 4 | GetCurrentHitPoints | SetCurrentHitPoints | |
| DataMigration | int | int | 1 | Not sure, presumably migration from 1.69 data | ||
| DeadSelectable | byte | int | 0 | SetIsDestroyable | Selectable by Dead property of the creature. You can only set this not get it in default nwscript. | |
| DecayTime | dword | int | 5000 | Presumably milliseconds to decay corpse. In the toolset you can only use seconds, default is 5, so this is in miliseconds. | ||
| Deity | cexostring | string | GetDeity | SetDeity | Not able to be set in the toolset (And likely stripped) but nwscript can set it for PCs and NPCs. | |
| Description | cexolocstring | json | { } | Needs testing; probably localised string(s) for description field, so array value 0 would be English. | ||
| DescriptionOverr | cexostring | GetDescription | SetDescription | Override description presumably when SetDescription is used | ||
| DetectMode | byte | int | 0 | SetActionMode | Noting as per usual Elves (which this is) who have "passive == active" detect modes will have this always set to 0. | |
| Dex | byte | int | 14 | GetAbilityScore | Dexterity. | |
| Disarmable | byte | int | 1 | GetIsCreatureDisarmable | General disarmable flag on the creature properties. | |
| EncounterObject | dword | object | 2130706432 (OBJECT_INVALID) | This presumably is "if I was spawned from an encounter, this is what object to tell I've died when I die". It likely is used to validate GetIsEncounterCreature but there is no usual way to get this object. | ||
| Equip_ItemList | list | json | List of equipped items, eg; your crossbow in your hand. Rather large and involved array. | |||
| Experience | dword | int | 0 | May be copied from PCs with ObjectToJson, needs testing. NPCs do not usually have experience obviously. | ||
| FactionID | word | int | 4 | ChangeToStandardFaction(for 1 - 4) | This is the internal faction ID. Faction IDs apart from the base 4 are generated on starting the module but shouldn't change after that, and are otherwise not retrievable. | |
| FamiliarName | cexostring | string | GetFamiliarName | PCs get the option of setting this during levelup, NPCs do not (it's stripped from the toolset UTC generated files). You can workaround setting this by spawning the familiar then using SetName on it. | ||
| FamiliarType | int | int | 0 | GetFamiliarCreatureType | Index into hen_familiar.2da but cannot be set in toolset (it's stripped) but NPCs can validly have one. | |
| FeatList | list | json | Current feats the creature has. Not sure if it is altered on levelup and down or what. | |||
| FirstName | cexolocstring | json → json first value 0 → string | TestNPC (After checking array) | The creatures first name, localised array though so you need to parse the entry to get the language ID you need. Note GetName gets FristName + " " + LastName, although conversations can generate tokens which are only the first name. | ||
| FootstepType | int | int | -1 | GetFootstepType | SetFootstepType | No need for JSON, although interestingly it defaults to -1 apparently if not set (so it auto looks up the right value from appearance.2da I guess) |
| FortSaveThrow | char | int | 1 | GetFortitudeSavingThrow | Fortitude Saving Throw. | |
| Gender | byte | int | 0 | GetGender | Finally you might be able to do a belt of gender swap (with NPCs at least!) | |
| Gold | dword | int | 0 | GetGold | GiveGoldToCreature, TakeGoldFromCreature | |
| GoodEvil | byte | int | 100 | GetGoodEvilValue | AdjustAlignment | Good/Evil alignment value. |
| HitPoints | short | int | 4 |
| This is Max Hit Points - constitution bonuses apparently, so the base rolls of the creatures levelups (like d4 = 4 for this Wizard) plus additional HP from the UTC file. See MaxHitPoints for the "true" maximum hit points. | ||||||
| Int | byte | int | 16 | GetAbilityScore | Intelligence value | |
| Interruptable | byte | int | 1 | Is the "No Interrupt" flag on the creature blueprint. | ||
| IsCommandable | byte | int | 1 | GetCommandable | SetCommandable | Commandable flag, note the engine commonly sets this (effects, functions the game does) a lot. |
| IsDM | byte | int | 0 | GetIsDM | Probably would break things if you flag an NPC as a DM. Or it'll ignore it. | |
| IsDestroyable | byte | int | 1 | SetIsDestroyable | Can only set this not get this in nwscript |
| ; it stops DestroyObject from running on the creature, and helps with lootable/raisable corpses. | ||||||
| IsImmortal | byte | int | 0 | GetImmortal | SetImmortal | Immortality flag |
| IsPC | byte | int | 0 | GetIsPC | If they are a PC. Not sure if DM possession messes with this. | |
| IsRaiseable | byte | int | 1 | SetIsDestroyable | Allows raising of this creature via. EffectRessurection presumably. Can't get this only set it in default nwscript. | |
| ItemList | list | json | All the items in their inventory with all sorts of arrays for properties and everything else. Likely even in a small inventory to be the majority of the json. Also in nwscript you can edit items very easily so little use for this. | |||
| LastName | cexolocstring | json → json first value 0 → string | "" | The creatures last name, localised array though so you need to parse the entry to get the language ID you need. Note GetName gets FristName + " " + LastName, although conversations can generate tokens which are only the last name. | ||
| LawfulChaotic | byte | int | 0 | GetLawChaosValue | AdjustAlignment | Lawful/Chaos alignment value. |
| Listening | byte | int | 0 | SetListening | Can only set if they're listening not get if they are. Applies to listening strings used by the AI mainly. | |
| Lootable | byte | int | 0 | GetLootable | SetLootable | Is the "Leaves Lootable Corpse" setting in the toolset, but can be set (before their killed) via. nwscript |
| MClassLevUpIn | byte | int | 0 | Not sure, something to do with multiclassing | ||
| MasterID | dword | object | 2130706432 (OBJECT_INVALID) | GetMaster | AddHenchman and others | The master object. There are like other fields to classify the creature. |
| MaxHitPoints | short | int | 5 | GetMaxHitPoints | This appears to be HitPoints + Constitution bonuses/penalties. | |
| MiscVisuals | struct | json | Contains HiLite colour info and Mouse Cursor info. See SetObjectHiliteColor and SetObjectMouseCursor | |||
| MovementRate | byte | int | 4 | GetMovementRate | Index into creaturespeed.2da - see Creature Movement. | |
| NaturalAC | byte | int | 0 | Will be added onto the AC of the creature (See ArmorClass for the total). Presumably is equal to the amount set in the toolset on the creature properties. Not sure if altered by levelups in Dragon Disciple etc. | ||
| NoPermDeath | byte | int | 0 | Is the "No Permanent Death" option in the toolset on a creature. Will stop them exploding from damage/death, but otherwise does not affect DestroyObject. | ||
| OverrideBAB | byte | int | 0 | SetBaseAttackBonus / RestoreBaseAttackBonus | Unlike what the function and name mentions it actually is the amount of base attacks granted to a creature with the function SetBaseAttackBonus. | |
| PM_IsPolymorphed | byte | int | 0 | Are they under the effect of EffectPolymorph. Presumably has additional fields when polymorphed. | ||
| PerceptionList | list | json | A list of active things the creature perceives, so a list of objects they can see/hear. | |||
| Phenotype | int | int | 0 | GetPhenoType | SetPhenoType | Creatures phenotype |
| Plot | byte | int | 0 | GetPlotFlag | SetPlotFlag | Plot flag |
| PortraitId | word | int | 36 | GetPortraitId | SetPortraitId | Index into portraits.2da. |
| PregameCurrent | short | int | 5 | No idea but matches MaxHitPoints | ||
| Race | byte | int | 1 | GetRacialType | racialtypes.2da line ID, may allow changing racial type (but you'd need to manually alter some of the other bits - such as stats, feats, etc.) | |
| RefSaveThrow | char | int | 3 | GetReflexSavingThrow | Reflex Saving Throw | |
ClassList
This is part of the ClassList json part.
...