diff --git a/_module/are/adventurers_inn.are.json b/_module/are/adventurers_inn.are.json index ca3f81c9..c6fb493a 100644 --- a/_module/are/adventurers_inn.are.json +++ b/_module/are/adventurers_inn.are.json @@ -677,7 +677,7 @@ }, "Version": { "type": "dword", - "value": 77 + "value": 80 }, "Width": { "type": "int", diff --git a/_module/are/faction_zoo.are.json b/_module/are/faction_zoo.are.json index 637a3338..f6d4dd43 100644 --- a/_module/are/faction_zoo.are.json +++ b/_module/are/faction_zoo.are.json @@ -2913,7 +2913,7 @@ }, "Version": { "type": "dword", - "value": 22 + "value": 23 }, "Width": { "type": "int", diff --git a/_module/are/ifm_pc_rooms.are.json b/_module/are/ifm_pc_rooms.are.json new file mode 100644 index 00000000..2a79d2f9 --- /dev/null +++ b/_module/are/ifm_pc_rooms.are.json @@ -0,0 +1,346 @@ +{ + "__data_type": "ARE ", + "ChanceLightning": { + "type": "int", + "value": 0 + }, + "ChanceRain": { + "type": "int", + "value": 0 + }, + "ChanceSnow": { + "type": "int", + "value": 0 + }, + "Comments": { + "type": "cexostring", + "value": "City of Baleas: Inn of the Flying Monkey - Your Room" + }, + "Creator_ID": { + "type": "int", + "value": -1 + }, + "DayNightCycle": { + "type": "byte", + "value": 0 + }, + "Expansion_List": { + "type": "list", + "value": [] + }, + "Flags": { + "type": "dword", + "value": 1 + }, + "FogClipDist": { + "type": "float", + "value": 45.0 + }, + "Height": { + "type": "int", + "value": 2 + }, + "ID": { + "type": "int", + "value": -1 + }, + "IsNight": { + "type": "byte", + "value": 1 + }, + "LightingScheme": { + "type": "byte", + "value": 13 + }, + "LoadScreenID": { + "type": "word", + "value": 47 + }, + "ModListenCheck": { + "type": "int", + "value": 0 + }, + "ModSpotCheck": { + "type": "int", + "value": 0 + }, + "MoonAmbientColor": { + "type": "dword", + "value": 2960685 + }, + "MoonDiffuseColor": { + "type": "dword", + "value": 6457991 + }, + "MoonFogAmount": { + "type": "byte", + "value": 5 + }, + "MoonFogColor": { + "type": "dword", + "value": 0 + }, + "MoonShadows": { + "type": "byte", + "value": 0 + }, + "Name": { + "type": "cexolocstring", + "value": { + "0": "City of Baleas: Inn of the Flying Monkey, Your Room" + } + }, + "NoRest": { + "type": "byte", + "value": 0 + }, + "OnEnter": { + "type": "resref", + "value": "" + }, + "OnExit": { + "type": "resref", + "value": "" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "PlayerVsPlayer": { + "type": "byte", + "value": 0 + }, + "ResRef": { + "type": "resref", + "value": "ifm_pc_rooms" + }, + "ShadowOpacity": { + "type": "byte", + "value": 60 + }, + "SkyBox": { + "type": "byte", + "value": 0 + }, + "SunAmbientColor": { + "type": "dword", + "value": 0 + }, + "SunDiffuseColor": { + "type": "dword", + "value": 0 + }, + "SunFogAmount": { + "type": "byte", + "value": 0 + }, + "SunFogColor": { + "type": "dword", + "value": 0 + }, + "SunShadows": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "IFM_PC_ROOMS" + }, + "Tile_List": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Tile_AnimLoop1": { + "type": "byte", + "value": 1 + }, + "Tile_AnimLoop2": { + "type": "byte", + "value": 1 + }, + "Tile_AnimLoop3": { + "type": "byte", + "value": 1 + }, + "Tile_Height": { + "type": "int", + "value": 0 + }, + "Tile_ID": { + "type": "int", + "value": 94 + }, + "Tile_MainLight1": { + "type": "byte", + "value": 4 + }, + "Tile_MainLight2": { + "type": "byte", + "value": 13 + }, + "Tile_Orientation": { + "type": "int", + "value": 0 + }, + "Tile_SrcLight1": { + "type": "byte", + "value": 3 + }, + "Tile_SrcLight2": { + "type": "byte", + "value": 3 + } + }, + { + "__struct_id": 1, + "Tile_AnimLoop1": { + "type": "byte", + "value": 1 + }, + "Tile_AnimLoop2": { + "type": "byte", + "value": 1 + }, + "Tile_AnimLoop3": { + "type": "byte", + "value": 1 + }, + "Tile_Height": { + "type": "int", + "value": 0 + }, + "Tile_ID": { + "type": "int", + "value": 94 + }, + "Tile_MainLight1": { + "type": "byte", + "value": 30 + }, + "Tile_MainLight2": { + "type": "byte", + "value": 13 + }, + "Tile_Orientation": { + "type": "int", + "value": 0 + }, + "Tile_SrcLight1": { + "type": "byte", + "value": 2 + }, + "Tile_SrcLight2": { + "type": "byte", + "value": 2 + } + }, + { + "__struct_id": 1, + "Tile_AnimLoop1": { + "type": "byte", + "value": 1 + }, + "Tile_AnimLoop2": { + "type": "byte", + "value": 1 + }, + "Tile_AnimLoop3": { + "type": "byte", + "value": 1 + }, + "Tile_Height": { + "type": "int", + "value": 0 + }, + "Tile_ID": { + "type": "int", + "value": 94 + }, + "Tile_MainLight1": { + "type": "byte", + "value": 4 + }, + "Tile_MainLight2": { + "type": "byte", + "value": 13 + }, + "Tile_Orientation": { + "type": "int", + "value": 3 + }, + "Tile_SrcLight1": { + "type": "byte", + "value": 2 + }, + "Tile_SrcLight2": { + "type": "byte", + "value": 2 + } + }, + { + "__struct_id": 1, + "Tile_AnimLoop1": { + "type": "byte", + "value": 1 + }, + "Tile_AnimLoop2": { + "type": "byte", + "value": 1 + }, + "Tile_AnimLoop3": { + "type": "byte", + "value": 1 + }, + "Tile_Height": { + "type": "int", + "value": 0 + }, + "Tile_ID": { + "type": "int", + "value": 191 + }, + "Tile_MainLight1": { + "type": "byte", + "value": 30 + }, + "Tile_MainLight2": { + "type": "byte", + "value": 14 + }, + "Tile_Orientation": { + "type": "int", + "value": 0 + }, + "Tile_SrcLight1": { + "type": "byte", + "value": 3 + }, + "Tile_SrcLight2": { + "type": "byte", + "value": 3 + } + } + ] + }, + "Tileset": { + "type": "resref", + "value": "tin01" + }, + "Version": { + "type": "dword", + "value": 9 + }, + "Width": { + "type": "int", + "value": 2 + }, + "WindPower": { + "type": "int", + "value": 0 + } +} diff --git a/_module/are/innoftheflyingmo.are.json b/_module/are/innoftheflyingmo.are.json index 3a11826d..1b92aa1d 100644 --- a/_module/are/innoftheflyingmo.are.json +++ b/_module/are/innoftheflyingmo.are.json @@ -92,7 +92,7 @@ }, "NoRest": { "type": "byte", - "value": 0 + "value": 1 }, "OnEnter": { "type": "resref", @@ -2913,7 +2913,7 @@ }, "Version": { "type": "dword", - "value": 14 + "value": 17 }, "Width": { "type": "int", diff --git a/_module/are/starting_area.are.json b/_module/are/starting_area.are.json index 81f65848..814744b3 100644 --- a/_module/are/starting_area.are.json +++ b/_module/are/starting_area.are.json @@ -1709,7 +1709,7 @@ }, "Version": { "type": "dword", - "value": 83 + "value": 84 }, "Width": { "type": "int", diff --git a/_module/dlg/doorcv_inn_room.dlg.json b/_module/dlg/doorcv_inn_room.dlg.json new file mode 100644 index 00000000..06e76d2a --- /dev/null +++ b/_module/dlg/doorcv_inn_room.dlg.json @@ -0,0 +1,235 @@ +{ + "__data_type": "DLG ", + "DelayEntry": { + "type": "dword", + "value": 0 + }, + "DelayReply": { + "type": "dword", + "value": 0 + }, + "EndConverAbort": { + "type": "resref", + "value": "nw_walk_wp" + }, + "EndConversation": { + "type": "resref", + "value": "nw_walk_wp" + }, + "EntryList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ActionParams": { + "type": "list", + "value": [] + }, + "Animation": { + "type": "dword", + "value": 0 + }, + "AnimLoop": { + "type": "byte", + "value": 1 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Delay": { + "type": "dword", + "value": 4294967295 + }, + "Quest": { + "type": "cexostring", + "value": "" + }, + "RepliesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Active": { + "type": "resref", + "value": "" + }, + "ConditionParams": { + "type": "list", + "value": [] + }, + "Index": { + "type": "dword", + "value": 1 + }, + "IsChild": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 1, + "Active": { + "type": "resref", + "value": "" + }, + "ConditionParams": { + "type": "list", + "value": [] + }, + "Index": { + "type": "dword", + "value": 0 + }, + "IsChild": { + "type": "byte", + "value": 0 + } + } + ] + }, + "Script": { + "type": "resref", + "value": "" + }, + "Sound": { + "type": "resref", + "value": "" + }, + "Speaker": { + "type": "cexostring", + "value": "" + }, + "Text": { + "type": "cexolocstring", + "value": { + "0": "This door leads up to your room, would you like to go there now?" + } + } + } + ] + }, + "NumWords": { + "type": "dword", + "value": 26 + }, + "PreventZoomIn": { + "type": "byte", + "value": 0 + }, + "ReplyList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ActionParams": { + "type": "list", + "value": [] + }, + "Animation": { + "type": "dword", + "value": 0 + }, + "AnimLoop": { + "type": "byte", + "value": 1 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Delay": { + "type": "dword", + "value": 4294967295 + }, + "EntriesList": { + "type": "list", + "value": [] + }, + "Quest": { + "type": "cexostring", + "value": "" + }, + "Script": { + "type": "resref", + "value": "" + }, + "Sound": { + "type": "resref", + "value": "" + }, + "Text": { + "type": "cexolocstring", + "value": { + "0": "No, not just yet." + } + } + }, + { + "__struct_id": 1, + "ActionParams": { + "type": "list", + "value": [] + }, + "Animation": { + "type": "dword", + "value": 0 + }, + "AnimLoop": { + "type": "byte", + "value": 1 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Delay": { + "type": "dword", + "value": 4294967295 + }, + "EntriesList": { + "type": "list", + "value": [] + }, + "Quest": { + "type": "cexostring", + "value": "" + }, + "Script": { + "type": "resref", + "value": "at_enter_pc_room" + }, + "Sound": { + "type": "resref", + "value": "" + }, + "Text": { + "type": "cexolocstring", + "value": { + "0": "Yes, I think it's time for some rest." + } + } + } + ] + }, + "StartingList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Active": { + "type": "resref", + "value": "" + }, + "ConditionParams": { + "type": "list", + "value": [] + }, + "Index": { + "type": "dword", + "value": 0 + } + } + ] + } +} diff --git a/_module/gic/adventurers_inn.gic.json b/_module/gic/adventurers_inn.gic.json index 2a84fc71..302bf4aa 100644 --- a/_module/gic/adventurers_inn.gic.json +++ b/_module/gic/adventurers_inn.gic.json @@ -2,7 +2,57 @@ "__data_type": "GIC ", "Creature List": { "type": "list", - "value": [] + "value": [ + { + "__struct_id": 4, + "Comment": { + "type": "cexostring", + "value": "" + } + }, + { + "__struct_id": 4, + "Comment": { + "type": "cexostring", + "value": "" + } + }, + { + "__struct_id": 4, + "Comment": { + "type": "cexostring", + "value": "" + } + }, + { + "__struct_id": 4, + "Comment": { + "type": "cexostring", + "value": "" + } + }, + { + "__struct_id": 4, + "Comment": { + "type": "cexostring", + "value": "" + } + }, + { + "__struct_id": 4, + "Comment": { + "type": "cexostring", + "value": "" + } + }, + { + "__struct_id": 4, + "Comment": { + "type": "cexostring", + "value": "" + } + } + ] }, "Door List": { "type": "list", @@ -183,14 +233,6 @@ }, "WaypointList": { "type": "list", - "value": [ - { - "__struct_id": 5, - "Comment": { - "type": "cexostring", - "value": "This waypoint is used for respawning a PC if the option of a custom location is set." - } - } - ] + "value": [] } } diff --git a/_module/gic/ifm_pc_rooms.gic.json b/_module/gic/ifm_pc_rooms.gic.json new file mode 100644 index 00000000..bbdc1ede --- /dev/null +++ b/_module/gic/ifm_pc_rooms.gic.json @@ -0,0 +1,111 @@ +{ + "__data_type": "GIC ", + "Creature List": { + "type": "list", + "value": [] + }, + "Door List": { + "type": "list", + "value": [ + { + "__struct_id": 8, + "Comment": { + "type": "cexostring", + "value": "Strong Door" + } + } + ] + }, + "Encounter List": { + "type": "list", + "value": [] + }, + "List": { + "type": "list", + "value": [] + }, + "Placeable List": { + "type": "list", + "value": [ + { + "__struct_id": 9, + "Comment": { + "type": "cexostring", + "value": "volition's Bio Placeables by volition\r\n" + } + }, + { + "__struct_id": 9, + "Comment": { + "type": "cexostring", + "value": "" + } + }, + { + "__struct_id": 9, + "Comment": { + "type": "cexostring", + "value": "" + } + }, + { + "__struct_id": 9, + "Comment": { + "type": "cexostring", + "value": "Low treasure script." + } + }, + { + "__struct_id": 9, + "Comment": { + "type": "cexostring", + "value": "Chair that one can sit on.\r\n\r\nCreated by Shir'le E. Illios\r\nshirle@drowwanderer.com\r\nhttp://chosen.drowwanderer.com\r\n" + } + }, + { + "__struct_id": 9, + "Comment": { + "type": "cexostring", + "value": "TCC - Interiors\r\nby The_NWNCCC" + } + }, + { + "__struct_id": 9, + "Comment": { + "type": "cexostring", + "value": "Source: Bathroom Fixtures by Lisa" + } + }, + { + "__struct_id": 9, + "Comment": { + "type": "cexostring", + "value": "Charlie's Oriental Placables v1.0 by Charlie\r\n" + } + }, + { + "__struct_id": 9, + "Comment": { + "type": "cexostring", + "value": "" + } + } + ] + }, + "SoundList": { + "type": "list", + "value": [] + }, + "StoreList": { + "type": "list", + "value": [] + }, + "TriggerList": { + "type": "list", + "value": [] + }, + "WaypointList": { + "type": "list", + "value": [] + } +} diff --git a/_module/gic/innoftheflyingmo.gic.json b/_module/gic/innoftheflyingmo.gic.json index 384642dc..1e1aa1ce 100644 --- a/_module/gic/innoftheflyingmo.gic.json +++ b/_module/gic/innoftheflyingmo.gic.json @@ -22,6 +22,13 @@ "Door List": { "type": "list", "value": [ + { + "__struct_id": 8, + "Comment": { + "type": "cexostring", + "value": "Strong Door" + } + }, { "__struct_id": 8, "Comment": { @@ -143,6 +150,13 @@ "type": "cexostring", "value": "This is the default waypoint you may place to set a Spawn point for the BESIE PW Spawner tool.\r\n1. Place a PW Spawner tool anywhere in the area.\r\n2. Set all other parameters on the PW Spawner tool according to the instructions found in the comments sections on that tool.\r\n3. Change the tag of this waypoint to match the Will Save number of the tool. ie. if the Will Save of the PW Spawner is 2 then change the tag of this Waypoint to \"PWS02\"\r\n4. Add any special behavior designators to the end of the tag ie. \"PWS02s2s1\". See the following table for behavior designators:\r\n\r\nBehavior designators:\r\ns1 - Do not return to spawn point after chasing an enemy (or moving for any other reason). This should be set if the creature spawned here has waypoints to walk or to POST.\r\ns2 - Random Walk. This creature will randomly walk a small patrol area via the RandomWalk() function.\r\ns3 - Sit. The creature will sit on the ground instead of standing (provided he has a sitting animation).\r\ns4 - No Regeneration. The Creature will not regenerate hitpoints. Note, this does NOT prevent a creature who regenerates naturally or due to some other source from regenerating.\r\ns5 - Only at day. Only spawn this creature during dawn or day.\r\ns6 - Only at night. Only spawn this creature during dusk or night.\r\nb## - Begin Time. Spawn in at this time.\r\ne## - End Time - Spawn out at this time.\r\n(note: do not use e or b with s5 or s6)\r\nt## - Territroy. If the creature goes outside of this territory range it will teleport back to the spawn point when not in combat. NOTE: Can NOT be set below 30 meters. If set below 30 meters it will default to 30." } + }, + { + "__struct_id": 5, + "Comment": { + "type": "cexostring", + "value": "This is the default waypoint you may place to set a patrol path for a creature or NPC.\r\n1. Create the creature and either use its current Tag or fill in a new one.\r\n2. Place or make sure the WalkWayPoints() is within the body of the On Spawn script for the creature.\r\n3. Place a series of waypoints along the route you wish the creature to walk.\r\n4. Select all of the newly created waypoints and right click. Choose the Create Set option.\r\n5. The waypoint set will have a set name of \"WP_\" + NPC Tag. Thus if an NPC with the Tag \"Guard\" will have a waypoint set called \"WP_Guard\". Note that Tags are case sensitive." + } } ] } diff --git a/_module/git/adventurers_inn.git.json b/_module/git/adventurers_inn.git.json index d9be4cff..da7c0db3 100644 --- a/_module/git/adventurers_inn.git.json +++ b/_module/git/adventurers_inn.git.json @@ -45,7 +45,6464 @@ }, "Creature List": { "type": "list", - "value": [] + "value": [ + { + "__struct_id": 4, + "Appearance_Type": { + "type": "word", + "value": 348 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 6 + }, + "ChallengeRating": { + "type": "float", + "value": 2.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 12 + }, + "ClassLevel": { + "type": "short", + "value": 3 + } + } + ] + }, + "Con": { + "type": "byte", + "value": 15 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 13 + }, + "DecayTime": { + "type": "dword", + "value": 0 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 12381, + "type": "cexolocstring", + "value": {} + }, + "Dex": { + "type": "byte", + "value": 13 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 16384, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 32768, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 7.353306974588865e-024 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 65536, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 69 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 500 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13238, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 8 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPS005" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewps005" + }, + "XOrientation": { + "type": "float", + "value": 7.349911717252794e-024 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 28 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 291 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + } + ] + }, + "FirstName": { + "id": 12382, + "type": "cexolocstring", + "value": {} + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 2 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 13 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 19 + }, + "NaturalAC": { + "type": "byte", + "value": 2 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 578 + }, + "Race": { + "type": "byte", + "value": 8 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "nw_c2_default5" + }, + "ScriptDamaged": { + "type": "resref", + "value": "nw_c2_default6" + }, + "ScriptDeath": { + "type": "resref", + "value": "nw_c2_default7" + }, + "ScriptDialogue": { + "type": "resref", + "value": "nw_c2_default4" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "nw_c2_default8" + }, + "ScriptEndRound": { + "type": "resref", + "value": "nw_c2_default3" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "nw_c2_default1" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "nw_c2_defaulte" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "nw_c2_default2" + }, + "ScriptRested": { + "type": "resref", + "value": "nw_c2_defaulta" + }, + "ScriptSpawn": { + "type": "resref", + "value": "nw_c2_default9" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "nw_c2_defaultb" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "nw_c2_defaultd" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 7 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 7 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 0 + }, + "Str": { + "type": "byte", + "value": 19 + }, + "Subrace": { + "type": "cexostring", + "value": "" + }, + "Tag": { + "type": "cexostring", + "value": "NW_BEARBLCK" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_bearblck" + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 12 + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": 18.43215751647949 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": 14.77241039276123 + }, + "ZPosition": { + "type": "float", + "value": 1.9073486328125e-006 + } + }, + { + "__struct_id": 4, + "Appearance_Type": { + "type": "word", + "value": 86 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 8 + }, + "ChallengeRating": { + "type": "float", + "value": 0.25 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 14 + }, + "ClassLevel": { + "type": "short", + "value": 1 + } + } + ] + }, + "Con": { + "type": "byte", + "value": 11 + }, + "Conversation": { + "type": "resref", + "value": "cv_charmed" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 4 + }, + "DecayTime": { + "type": "dword", + "value": 5000 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 12565, + "type": "cexolocstring", + "value": {} + }, + "Dex": { + "type": "byte", + "value": 8 + }, + "Disarmable": { + "type": "byte", + "value": 1 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 16, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 47 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 16 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "id": 1541, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 11 + }, + "ModelPart2": { + "type": "byte", + "value": 11 + }, + "ModelPart3": { + "type": "byte", + "value": 11 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_WBLMS001" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_wblms001" + }, + "XOrientation": { + "type": "float", + "value": 7.01069621701706e-042 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 8 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 46 + } + } + ] + }, + "FirstName": { + "id": 12567, + "type": "cexolocstring", + "value": {} + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 0 + }, + "GoodEvil": { + "type": "byte", + "value": 0 + }, + "HitPoints": { + "type": "short", + "value": 4 + }, + "Int": { + "type": "byte", + "value": 10 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 4 + }, + "NaturalAC": { + "type": "byte", + "value": 0 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 222 + }, + "Race": { + "type": "byte", + "value": 12 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "nw_c2_default5" + }, + "ScriptDamaged": { + "type": "resref", + "value": "nw_c2_default6" + }, + "ScriptDeath": { + "type": "resref", + "value": "nw_c2_default7" + }, + "ScriptDialogue": { + "type": "resref", + "value": "nw_c2_default4" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "nw_c2_default8" + }, + "ScriptEndRound": { + "type": "resref", + "value": "nw_c2_default3" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "nw_c2_default1" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "nw_c2_defaulte" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "nw_c2_default2" + }, + "ScriptRested": { + "type": "resref", + "value": "nw_c2_defaulta" + }, + "ScriptSpawn": { + "type": "resref", + "value": "nw_c2_default9" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "nw_c2_defaultb" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "nw_c2_defaultd" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 3 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 3 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 44 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 0 + }, + "Str": { + "type": "byte", + "value": 8 + }, + "Subrace": { + "type": "cexostring", + "value": "" + }, + "Tag": { + "type": "cexostring", + "value": "NW_GOBLINA" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "goblina001" + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 11 + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": 17.34973907470703 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": 14.54048347473145 + }, + "ZPosition": { + "type": "float", + "value": 0.0 + } + }, + { + "__struct_id": 4, + "Appearance_Type": { + "type": "word", + "value": 347 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 6 + }, + "ChallengeRating": { + "type": "float", + "value": 2.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 12 + }, + "ClassLevel": { + "type": "short", + "value": 3 + } + } + ] + }, + "Con": { + "type": "byte", + "value": 15 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 13 + }, + "DecayTime": { + "type": "dword", + "value": 0 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 12381, + "type": "cexolocstring", + "value": {} + }, + "Dex": { + "type": "byte", + "value": 13 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 16384, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 32768, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 65536, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 69 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 500 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13238, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 8 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPS005" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewps005" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 28 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 291 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + } + ] + }, + "FirstName": { + "id": 12382, + "type": "cexolocstring", + "value": {} + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 2 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 13 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 19 + }, + "NaturalAC": { + "type": "byte", + "value": 2 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 577 + }, + "Race": { + "type": "byte", + "value": 8 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "nw_c2_default5" + }, + "ScriptDamaged": { + "type": "resref", + "value": "nw_c2_default6" + }, + "ScriptDeath": { + "type": "resref", + "value": "nw_c2_default7" + }, + "ScriptDialogue": { + "type": "resref", + "value": "nw_c2_default4" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "nw_c2_default8" + }, + "ScriptEndRound": { + "type": "resref", + "value": "nw_c2_default3" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "nw_c2_default1" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "nw_c2_defaulte" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "nw_c2_default2" + }, + "ScriptRested": { + "type": "resref", + "value": "nw_c2_defaulta" + }, + "ScriptSpawn": { + "type": "resref", + "value": "nw_c2_default9" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "nw_c2_defaultb" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "nw_c2_defaultd" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 7 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 7 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 0 + }, + "Str": { + "type": "byte", + "value": 19 + }, + "Subrace": { + "type": "cexostring", + "value": "" + }, + "Tag": { + "type": "cexostring", + "value": "NW_BEARBLCK" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_bearblck" + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 12 + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": 19.54906463623047 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": 14.65606498718262 + }, + "ZPosition": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 4, + "Appearance_Type": { + "type": "word", + "value": 346 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 6 + }, + "ChallengeRating": { + "type": "float", + "value": 2.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 12 + }, + "ClassLevel": { + "type": "short", + "value": 3 + } + } + ] + }, + "Con": { + "type": "byte", + "value": 15 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 13 + }, + "DecayTime": { + "type": "dword", + "value": 0 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 12381, + "type": "cexolocstring", + "value": {} + }, + "Dex": { + "type": "byte", + "value": 13 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 16384, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 32768, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 65536, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 69 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 500 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13238, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 8 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPS005" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewps005" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 28 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 291 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + } + ] + }, + "FirstName": { + "id": 12382, + "type": "cexolocstring", + "value": {} + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 2 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 13 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 19 + }, + "NaturalAC": { + "type": "byte", + "value": 2 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 577 + }, + "Race": { + "type": "byte", + "value": 8 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "nw_c2_default5" + }, + "ScriptDamaged": { + "type": "resref", + "value": "nw_c2_default6" + }, + "ScriptDeath": { + "type": "resref", + "value": "nw_c2_default7" + }, + "ScriptDialogue": { + "type": "resref", + "value": "nw_c2_default4" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "nw_c2_default8" + }, + "ScriptEndRound": { + "type": "resref", + "value": "nw_c2_default3" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "nw_c2_default1" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "nw_c2_defaulte" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "nw_c2_default2" + }, + "ScriptRested": { + "type": "resref", + "value": "nw_c2_defaulta" + }, + "ScriptSpawn": { + "type": "resref", + "value": "nw_c2_default9" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "nw_c2_defaultb" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "nw_c2_defaultd" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 7 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 7 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 0 + }, + "Str": { + "type": "byte", + "value": 19 + }, + "Subrace": { + "type": "cexostring", + "value": "" + }, + "Tag": { + "type": "cexostring", + "value": "NW_BEARBLCK" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_bearblck" + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 12 + }, + "XOrientation": { + "type": "float", + "value": 1.754501778013256e-021 + }, + "XPosition": { + "type": "float", + "value": 20.64703178405762 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": 14.71267032623291 + }, + "ZPosition": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 4, + "Appearance_Type": { + "type": "word", + "value": 345 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 6 + }, + "ChallengeRating": { + "type": "float", + "value": 2.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 12 + }, + "ClassLevel": { + "type": "short", + "value": 3 + } + } + ] + }, + "Con": { + "type": "byte", + "value": 15 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 13 + }, + "DecayTime": { + "type": "dword", + "value": 0 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 12381, + "type": "cexolocstring", + "value": {} + }, + "Dex": { + "type": "byte", + "value": 13 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 16384, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 32768, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 65536, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 69 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 500 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13238, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 8 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPS005" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewps005" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 28 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 291 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + } + ] + }, + "FirstName": { + "id": 12382, + "type": "cexolocstring", + "value": {} + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 2 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 13 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 19 + }, + "NaturalAC": { + "type": "byte", + "value": 2 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 577 + }, + "Race": { + "type": "byte", + "value": 8 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "nw_c2_default5" + }, + "ScriptDamaged": { + "type": "resref", + "value": "nw_c2_default6" + }, + "ScriptDeath": { + "type": "resref", + "value": "nw_c2_default7" + }, + "ScriptDialogue": { + "type": "resref", + "value": "nw_c2_default4" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "nw_c2_default8" + }, + "ScriptEndRound": { + "type": "resref", + "value": "nw_c2_default3" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "nw_c2_default1" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "nw_c2_defaulte" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "nw_c2_default2" + }, + "ScriptRested": { + "type": "resref", + "value": "nw_c2_defaulta" + }, + "ScriptSpawn": { + "type": "resref", + "value": "nw_c2_default9" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "nw_c2_defaultb" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "nw_c2_defaultd" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 7 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 7 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 0 + }, + "Str": { + "type": "byte", + "value": 19 + }, + "Subrace": { + "type": "cexostring", + "value": "" + }, + "Tag": { + "type": "cexostring", + "value": "NW_BEARBLCK" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_bearblck" + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 12 + }, + "XOrientation": { + "type": "float", + "value": 2.426705579160499e-021 + }, + "XPosition": { + "type": "float", + "value": 21.87508583068848 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": 14.7796688079834 + }, + "ZPosition": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 4, + "Appearance_Type": { + "type": "word", + "value": 344 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 6 + }, + "ChallengeRating": { + "type": "float", + "value": 2.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 12 + }, + "ClassLevel": { + "type": "short", + "value": 3 + } + } + ] + }, + "Con": { + "type": "byte", + "value": 15 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 13 + }, + "DecayTime": { + "type": "dword", + "value": 0 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 12381, + "type": "cexolocstring", + "value": {} + }, + "Dex": { + "type": "byte", + "value": 13 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 16384, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 32768, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 65536, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 69 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 500 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13238, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 8 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPS005" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewps005" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 28 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 291 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + } + ] + }, + "FirstName": { + "id": 12382, + "type": "cexolocstring", + "value": {} + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 2 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 13 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 19 + }, + "NaturalAC": { + "type": "byte", + "value": 2 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 577 + }, + "Race": { + "type": "byte", + "value": 8 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "nw_c2_default5" + }, + "ScriptDamaged": { + "type": "resref", + "value": "nw_c2_default6" + }, + "ScriptDeath": { + "type": "resref", + "value": "nw_c2_default7" + }, + "ScriptDialogue": { + "type": "resref", + "value": "nw_c2_default4" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "nw_c2_default8" + }, + "ScriptEndRound": { + "type": "resref", + "value": "nw_c2_default3" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "nw_c2_default1" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "nw_c2_defaulte" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "nw_c2_default2" + }, + "ScriptRested": { + "type": "resref", + "value": "nw_c2_defaulta" + }, + "ScriptSpawn": { + "type": "resref", + "value": "nw_c2_default9" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "nw_c2_defaultb" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "nw_c2_defaultd" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 7 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 7 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 0 + }, + "Str": { + "type": "byte", + "value": 19 + }, + "Subrace": { + "type": "cexostring", + "value": "" + }, + "Tag": { + "type": "cexostring", + "value": "NW_BEARBLCK" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_bearblck" + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 12 + }, + "XOrientation": { + "type": "float", + "value": 1.270696439310635e-021 + }, + "XPosition": { + "type": "float", + "value": 16.30051040649414 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": 14.72562313079834 + }, + "ZPosition": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 4, + "Appearance_Type": { + "type": "word", + "value": 343 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 6 + }, + "ChallengeRating": { + "type": "float", + "value": 2.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 12 + }, + "ClassLevel": { + "type": "short", + "value": 3 + } + } + ] + }, + "Con": { + "type": "byte", + "value": 15 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 13 + }, + "DecayTime": { + "type": "dword", + "value": 0 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 12381, + "type": "cexolocstring", + "value": {} + }, + "Dex": { + "type": "byte", + "value": 13 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 16384, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 32768, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 320 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13284, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPSP026" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewpsp026" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + }, + { + "__struct_id": 65536, + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 69 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Cost": { + "type": "dword", + "value": 500 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 0 + }, + "LocalizedName": { + "id": 13238, + "type": "cexolocstring", + "value": {} + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 8 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "NW_IT_CREWPS005" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_it_crewps005" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": -1.0 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": -1.0 + }, + "ZPosition": { + "type": "float", + "value": -1.0 + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 28 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 291 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + } + ] + }, + "FirstName": { + "id": 12382, + "type": "cexolocstring", + "value": {} + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 2 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 13 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 19 + }, + "NaturalAC": { + "type": "byte", + "value": 2 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 577 + }, + "Race": { + "type": "byte", + "value": 8 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "nw_c2_default5" + }, + "ScriptDamaged": { + "type": "resref", + "value": "nw_c2_default6" + }, + "ScriptDeath": { + "type": "resref", + "value": "nw_c2_default7" + }, + "ScriptDialogue": { + "type": "resref", + "value": "nw_c2_default4" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "nw_c2_default8" + }, + "ScriptEndRound": { + "type": "resref", + "value": "nw_c2_default3" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "nw_c2_default1" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "nw_c2_defaulte" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "nw_c2_default2" + }, + "ScriptRested": { + "type": "resref", + "value": "nw_c2_defaulta" + }, + "ScriptSpawn": { + "type": "resref", + "value": "nw_c2_default9" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "nw_c2_defaultb" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "nw_c2_defaultd" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 7 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 7 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 0 + }, + "Str": { + "type": "byte", + "value": 19 + }, + "Subrace": { + "type": "cexostring", + "value": "" + }, + "Tag": { + "type": "cexostring", + "value": "NW_BEARBLCK" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_bearblck" + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 12 + }, + "XOrientation": { + "type": "float", + "value": 5.056861141363303e-019 + }, + "XPosition": { + "type": "float", + "value": 23.44981384277344 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": 16.29898262023926 + }, + "ZPosition": { + "type": "float", + "value": -5.7220458984375e-006 + } + } + ] }, "Door List": { "type": "list", @@ -4118,69 +10575,6 @@ }, "WaypointList": { "type": "list", - "value": [ - { - "__struct_id": 5, - "Appearance": { - "type": "byte", - "value": 1 - }, - "Description": { - "type": "cexolocstring", - "value": {} - }, - "HasMapNote": { - "type": "byte", - "value": 0 - }, - "LinkedTo": { - "type": "cexostring", - "value": "" - }, - "LocalizedName": { - "id": 14817, - "type": "cexolocstring", - "value": { - "0": "Respawn Location" - } - }, - "MapNote": { - "type": "cexolocstring", - "value": {} - }, - "MapNoteEnabled": { - "type": "byte", - "value": 1 - }, - "Tag": { - "type": "cexostring", - "value": "wp_respawn_loc" - }, - "TemplateResRef": { - "type": "resref", - "value": "waypoint001" - }, - "XOrientation": { - "type": "float", - "value": -5.157785835763207e-006 - }, - "XPosition": { - "type": "float", - "value": 16.56000137329102 - }, - "YOrientation": { - "type": "float", - "value": -1.0 - }, - "YPosition": { - "type": "float", - "value": 15.8717794418335 - }, - "ZPosition": { - "type": "float", - "value": -5.7220458984375e-006 - } - } - ] + "value": [] } } diff --git a/_module/git/ifm_pc_rooms.git.json b/_module/git/ifm_pc_rooms.git.json new file mode 100644 index 00000000..e4503714 --- /dev/null +++ b/_module/git/ifm_pc_rooms.git.json @@ -0,0 +1,2342 @@ +{ + "__data_type": "GIT ", + "AreaProperties": { + "__struct_id": 100, + "type": "struct", + "value": { + "__struct_id": 100, + "AmbientSndDay": { + "type": "int", + "value": 72 + }, + "AmbientSndDayVol": { + "type": "int", + "value": 32 + }, + "AmbientSndNight": { + "type": "int", + "value": 107 + }, + "AmbientSndNitVol": { + "type": "int", + "value": 12 + }, + "EnvAudio": { + "type": "int", + "value": 2 + }, + "MusicBattle": { + "type": "int", + "value": 40 + }, + "MusicDay": { + "type": "int", + "value": 25 + }, + "MusicDelay": { + "type": "int", + "value": 45000 + }, + "MusicNight": { + "type": "int", + "value": 25 + } + } + }, + "Creature List": { + "type": "list", + "value": [] + }, + "Door List": { + "type": "list", + "value": [ + { + "__struct_id": 8, + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 0 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "Bearing": { + "type": "float", + "value": 0.0 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CurrentHP": { + "type": "short", + "value": 15 + }, + "Description": { + "id": 9078, + "type": "cexolocstring", + "value": { + "0": "The only exit from your room at the Flying Monkey." + } + }, + "DisarmDC": { + "type": "byte", + "value": 15 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 16 + }, + "GenericType_New": { + "type": "dword", + "value": 12 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HP": { + "type": "short", + "value": 15 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 0 + }, + "LinkedTo": { + "type": "cexostring", + "value": "pcrooms2inn" + }, + "LinkedToFlags": { + "type": "byte", + "value": 2 + }, + "LoadScreenID": { + "type": "word", + "value": 42 + }, + "Lockable": { + "type": "byte", + "value": 0 + }, + "Locked": { + "type": "byte", + "value": 0 + }, + "LocName": { + "id": 5349, + "type": "cexolocstring", + "value": { + "0": "Door" + } + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "se_door_death" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnFailToOpen": { + "type": "resref", + "value": "door_fail2open" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "ra_close_door" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 18 + }, + "Plot": { + "type": "byte", + "value": 1 + }, + "PortraitId": { + "type": "word", + "value": 0 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "pcrooms2inn" + }, + "TemplateResRef": { + "type": "resref", + "value": "x3_door_wood002" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Will": { + "type": "byte", + "value": 0 + }, + "X": { + "type": "float", + "value": 15.0 + }, + "Y": { + "type": "float", + "value": 20.0 + }, + "Z": { + "type": "float", + "value": 0.0 + } + } + ] + }, + "Encounter List": { + "type": "list", + "value": [] + }, + "List": { + "type": "list", + "value": [] + }, + "Placeable List": { + "type": "list", + "value": [ + { + "__struct_id": 9, + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 2802 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "Bearing": { + "type": "float", + "value": 0.7853981852531433 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CurrentHP": { + "type": "short", + "value": 10 + }, + "Description": { + "id": 16813643, + "type": "cexolocstring", + "value": {} + }, + "DisarmDC": { + "type": "byte", + "value": 0 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 5 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HasInventory": { + "type": "byte", + "value": 0 + }, + "HP": { + "type": "short", + "value": 10 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 0 + }, + "Lockable": { + "type": "byte", + "value": 1 + }, + "Locked": { + "type": "byte", + "value": 0 + }, + "LocName": { + "id": 16811120, + "type": "cexolocstring", + "value": {} + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnInvDisturbed": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUsed": { + "type": "resref", + "value": "" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 408 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Static": { + "type": "byte", + "value": 1 + }, + "Tag": { + "type": "cexostring", + "value": "ZEP_BED002" + }, + "TemplateResRef": { + "type": "resref", + "value": "zep_bed002" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Type": { + "type": "byte", + "value": 0 + }, + "Useable": { + "type": "byte", + "value": 0 + }, + "Will": { + "type": "byte", + "value": 0 + }, + "X": { + "type": "float", + "value": 16.78469085693359 + }, + "Y": { + "type": "float", + "value": 13.20924949645996 + }, + "Z": { + "type": "float", + "value": 0.009990006685256958 + } + }, + { + "__struct_id": 9, + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 0 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "Bearing": { + "type": "float", + "value": 1.570796251296997 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CurrentHP": { + "type": "short", + "value": 15 + }, + "Description": { + "id": 14548, + "type": "cexolocstring", + "value": { + "0": "This looks like a safe place to stoe your belongings, for now." + } + }, + "DisarmDC": { + "type": "byte", + "value": 15 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 16 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HasInventory": { + "type": "byte", + "value": 0 + }, + "HP": { + "type": "short", + "value": 15 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 0 + }, + "Lockable": { + "type": "byte", + "value": 0 + }, + "Locked": { + "type": "byte", + "value": 0 + }, + "LocName": { + "id": 14549, + "type": "cexolocstring", + "value": {} + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnInvDisturbed": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUsed": { + "type": "resref", + "value": "obj_us_chest" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 18 + }, + "Plot": { + "type": "byte", + "value": 1 + }, + "PortraitId": { + "type": "word", + "value": 358 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Static": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "Armoire" + }, + "TemplateResRef": { + "type": "resref", + "value": "plc_armoire" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Type": { + "type": "byte", + "value": 0 + }, + "Useable": { + "type": "byte", + "value": 1 + }, + "Will": { + "type": "byte", + "value": 0 + }, + "X": { + "type": "float", + "value": 11.45763397216797 + }, + "Y": { + "type": "float", + "value": 16.69826316833496 + }, + "Z": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 9, + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 2207 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "Bearing": { + "type": "float", + "value": 0.8590291738510132 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CurrentHP": { + "type": "short", + "value": 15 + }, + "Description": { + "id": 16810932, + "type": "cexolocstring", + "value": { + "0": "You see yourself in the mirror." + } + }, + "DisarmDC": { + "type": "byte", + "value": 15 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 16 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HasInventory": { + "type": "byte", + "value": 0 + }, + "HP": { + "type": "short", + "value": 15 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 0 + }, + "Lockable": { + "type": "byte", + "value": 0 + }, + "Locked": { + "type": "byte", + "value": 0 + }, + "LocName": { + "id": 16812334, + "type": "cexolocstring", + "value": { + "0": "Mirror" + } + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnInvDisturbed": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUsed": { + "type": "resref", + "value": "sob_examine002" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 18 + }, + "Plot": { + "type": "byte", + "value": 1 + }, + "PortraitId": { + "type": "word", + "value": 2558 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Static": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "ZEP_MIRROR005" + }, + "TemplateResRef": { + "type": "resref", + "value": "zep_mirror005" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Type": { + "type": "byte", + "value": 0 + }, + "Useable": { + "type": "byte", + "value": 1 + }, + "Will": { + "type": "byte", + "value": 0 + }, + "X": { + "type": "float", + "value": 11.54697418212891 + }, + "Y": { + "type": "float", + "value": 18.48270606994629 + }, + "Z": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 9, + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 12 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "Bearing": { + "type": "float", + "value": -1.570796251296997 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CurrentHP": { + "type": "short", + "value": 15 + }, + "Description": { + "id": 14607, + "type": "cexolocstring", + "value": {} + }, + "DisarmDC": { + "type": "byte", + "value": 15 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 16 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HasInventory": { + "type": "byte", + "value": 0 + }, + "HP": { + "type": "short", + "value": 15 + }, + "Interruptable": { + "type": "byte", + "value": 0 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 0 + }, + "Lockable": { + "type": "byte", + "value": 0 + }, + "Locked": { + "type": "byte", + "value": 0 + }, + "LocName": { + "id": 5655, + "type": "cexolocstring", + "value": {} + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "nw_o2_generallow" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnInvDisturbed": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "nw_o2_generallow" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUsed": { + "type": "resref", + "value": "" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 18 + }, + "Plot": { + "type": "byte", + "value": 1 + }, + "PortraitId": { + "type": "word", + "value": 370 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Static": { + "type": "byte", + "value": 1 + }, + "Tag": { + "type": "cexostring", + "value": "Desk" + }, + "TemplateResRef": { + "type": "resref", + "value": "plc_desk" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Type": { + "type": "byte", + "value": 0 + }, + "Useable": { + "type": "byte", + "value": 0 + }, + "Will": { + "type": "byte", + "value": 0 + }, + "X": { + "type": "float", + "value": 18.48391151428223 + }, + "Y": { + "type": "float", + "value": 17.2309455871582 + }, + "Z": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 9, + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 179 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "Bearing": { + "type": "float", + "value": 1.006291270256043 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CurrentHP": { + "type": "short", + "value": 15 + }, + "Description": { + "id": 14593, + "type": "cexolocstring", + "value": { + "0": "It is a simple chair but the grace of its lines speaks to the quality of its craftmanship." + } + }, + "DisarmDC": { + "type": "byte", + "value": 15 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 16 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HasInventory": { + "type": "byte", + "value": 0 + }, + "HP": { + "type": "short", + "value": 15 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 0 + }, + "Lockable": { + "type": "byte", + "value": 0 + }, + "Locked": { + "type": "byte", + "value": 0 + }, + "LocName": { + "id": 5822, + "type": "cexolocstring", + "value": { + "0": "Chair" + } + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnInvDisturbed": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUsed": { + "type": "resref", + "value": "sei_sit" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 18 + }, + "Plot": { + "type": "byte", + "value": 1 + }, + "PortraitId": { + "type": "word", + "value": 537 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Static": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "Chair" + }, + "TemplateResRef": { + "type": "resref", + "value": "chair001" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Type": { + "type": "byte", + "value": 0 + }, + "Useable": { + "type": "byte", + "value": 1 + }, + "Will": { + "type": "byte", + "value": 0 + }, + "X": { + "type": "float", + "value": 17.41463851928711 + }, + "Y": { + "type": "float", + "value": 17.40582275390625 + }, + "Z": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 9, + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 2813 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "Bearing": { + "type": "float", + "value": 2.012582778930664 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CurrentHP": { + "type": "short", + "value": 10 + }, + "Description": { + "id": 16813707, + "type": "cexolocstring", + "value": {} + }, + "DisarmDC": { + "type": "byte", + "value": 0 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 5 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HasInventory": { + "type": "byte", + "value": 0 + }, + "HP": { + "type": "short", + "value": 10 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 0 + }, + "Lockable": { + "type": "byte", + "value": 1 + }, + "Locked": { + "type": "byte", + "value": 0 + }, + "LocName": { + "id": 16813470, + "type": "cexolocstring", + "value": {} + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnInvDisturbed": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUsed": { + "type": "resref", + "value": "" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 1 + }, + "PortraitId": { + "type": "word", + "value": 2564 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Static": { + "type": "byte", + "value": 1 + }, + "Tag": { + "type": "cexostring", + "value": "ZEP_TUB002" + }, + "TemplateResRef": { + "type": "resref", + "value": "zep_tub002" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Type": { + "type": "byte", + "value": 0 + }, + "Useable": { + "type": "byte", + "value": 0 + }, + "Will": { + "type": "byte", + "value": 0 + }, + "X": { + "type": "float", + "value": 12.91908931732178 + }, + "Y": { + "type": "float", + "value": 11.65272808074951 + }, + "Z": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 9, + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 2298 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "Bearing": { + "type": "float", + "value": 0.0 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CurrentHP": { + "type": "short", + "value": 15 + }, + "Description": { + "id": 16810931, + "type": "cexolocstring", + "value": {} + }, + "DisarmDC": { + "type": "byte", + "value": 15 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 16 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HasInventory": { + "type": "byte", + "value": 0 + }, + "HP": { + "type": "short", + "value": 15 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 0 + }, + "Lockable": { + "type": "byte", + "value": 0 + }, + "Locked": { + "type": "byte", + "value": 0 + }, + "LocName": { + "id": 16813468, + "type": "cexolocstring", + "value": {} + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnInvDisturbed": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUsed": { + "type": "resref", + "value": "" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 18 + }, + "Plot": { + "type": "byte", + "value": 1 + }, + "PortraitId": { + "type": "word", + "value": 2563 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Static": { + "type": "byte", + "value": 1 + }, + "Tag": { + "type": "cexostring", + "value": "ZEP_STONEBSIN003" + }, + "TemplateResRef": { + "type": "resref", + "value": "zep_stonebsin003" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Type": { + "type": "byte", + "value": 0 + }, + "Useable": { + "type": "byte", + "value": 0 + }, + "Will": { + "type": "byte", + "value": 0 + }, + "X": { + "type": "float", + "value": 11.57714176177979 + }, + "Y": { + "type": "float", + "value": 11.53489303588867 + }, + "Z": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 9, + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 2976 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "Bearing": { + "type": "float", + "value": 0.3681553304195404 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CurrentHP": { + "type": "short", + "value": 2 + }, + "Description": { + "id": 16813656, + "type": "cexolocstring", + "value": {} + }, + "DisarmDC": { + "type": "byte", + "value": 0 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 5 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HasInventory": { + "type": "byte", + "value": 0 + }, + "HP": { + "type": "short", + "value": 2 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 0 + }, + "Lockable": { + "type": "byte", + "value": 1 + }, + "Locked": { + "type": "byte", + "value": 0 + }, + "LocName": { + "id": 16812700, + "type": "cexolocstring", + "value": {} + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnInvDisturbed": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUsed": { + "type": "resref", + "value": "" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 1 + }, + "PortraitId": { + "type": "word", + "value": 2500 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Static": { + "type": "byte", + "value": 1 + }, + "Tag": { + "type": "cexostring", + "value": "ZEP_SCREEN014" + }, + "TemplateResRef": { + "type": "resref", + "value": "zep_screen014" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Type": { + "type": "byte", + "value": 0 + }, + "Useable": { + "type": "byte", + "value": 0 + }, + "Will": { + "type": "byte", + "value": 0 + }, + "X": { + "type": "float", + "value": 12.03563499450684 + }, + "Y": { + "type": "float", + "value": 13.57882213592529 + }, + "Z": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 9, + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 1914 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "Bearing": { + "type": "float", + "value": -0.0 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CurrentHP": { + "type": "short", + "value": 15 + }, + "Description": { + "id": 16813674, + "type": "cexolocstring", + "value": { + "0": "A simple throw rug adorns the floor, faded and worn with use." + } + }, + "DisarmDC": { + "type": "byte", + "value": 15 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 16 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HasInventory": { + "type": "byte", + "value": 0 + }, + "HP": { + "type": "short", + "value": 15 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 0 + }, + "Lockable": { + "type": "byte", + "value": 0 + }, + "Locked": { + "type": "byte", + "value": 0 + }, + "LocName": { + "id": 16813108, + "type": "cexolocstring", + "value": {} + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnInvDisturbed": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUsed": { + "type": "resref", + "value": "" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 18 + }, + "Plot": { + "type": "byte", + "value": 1 + }, + "PortraitId": { + "type": "word", + "value": 533 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Static": { + "type": "byte", + "value": 1 + }, + "Tag": { + "type": "cexostring", + "value": "PC_ROOM_MAT" + }, + "TemplateResRef": { + "type": "resref", + "value": "zep_throwrug058" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Type": { + "type": "byte", + "value": 0 + }, + "Useable": { + "type": "byte", + "value": 0 + }, + "Will": { + "type": "byte", + "value": 0 + }, + "X": { + "type": "float", + "value": 14.99641227722168 + }, + "Y": { + "type": "float", + "value": 18.76378059387207 + }, + "Z": { + "type": "float", + "value": -5.7220458984375e-006 + } + } + ] + }, + "SoundList": { + "type": "list", + "value": [] + }, + "StoreList": { + "type": "list", + "value": [] + }, + "TriggerList": { + "type": "list", + "value": [] + }, + "WaypointList": { + "type": "list", + "value": [] + } +} diff --git a/_module/git/innoftheflyingmo.git.json b/_module/git/innoftheflyingmo.git.json index c584d010..da829a27 100644 --- a/_module/git/innoftheflyingmo.git.json +++ b/_module/git/innoftheflyingmo.git.json @@ -1718,6 +1718,227 @@ "type": "float", "value": 0.0 } + }, + { + "__struct_id": 8, + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 0 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "Bearing": { + "type": "float", + "value": -3.141592264175415 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Conversation": { + "type": "resref", + "value": "doorcv_inn_room" + }, + "CurrentHP": { + "type": "short", + "value": 15 + }, + "Description": { + "id": 9078, + "type": "cexolocstring", + "value": { + "0": "This door leads to the inn rooms above." + } + }, + "DisarmDC": { + "type": "byte", + "value": 15 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 16 + }, + "GenericType_New": { + "type": "dword", + "value": 12 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HP": { + "type": "short", + "value": 15 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 1 + }, + "LinkedTo": { + "type": "cexostring", + "value": "" + }, + "LinkedToFlags": { + "type": "byte", + "value": 0 + }, + "LoadScreenID": { + "type": "word", + "value": 0 + }, + "Lockable": { + "type": "byte", + "value": 0 + }, + "Locked": { + "type": "byte", + "value": 1 + }, + "LocName": { + "id": 5349, + "type": "cexolocstring", + "value": { + "0": "Door" + } + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "x2_door_death" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnFailToOpen": { + "type": "resref", + "value": "cv_inn_door" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 18 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 2624 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "inn2pcrooms" + }, + "TemplateResRef": { + "type": "resref", + "value": "x3_door_wood002" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Will": { + "type": "byte", + "value": 0 + }, + "X": { + "type": "float", + "value": 65.0 + }, + "Y": { + "type": "float", + "value": 15.01000022888184 + }, + "Z": { + "type": "float", + "value": 1.399999976158142 + } } ] }, @@ -4103,6 +4324,68 @@ "type": "float", "value": 0.009992599487304688 } + }, + { + "__struct_id": 5, + "Appearance": { + "type": "byte", + "value": 1 + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "HasMapNote": { + "type": "byte", + "value": 1 + }, + "LinkedTo": { + "type": "cexostring", + "value": "" + }, + "LocalizedName": { + "id": 14817, + "type": "cexolocstring", + "value": {} + }, + "MapNote": { + "type": "cexolocstring", + "value": { + "0": "Rooms" + } + }, + "MapNoteEnabled": { + "type": "byte", + "value": 1 + }, + "Tag": { + "type": "cexostring", + "value": "pcrooms2inn" + }, + "TemplateResRef": { + "type": "resref", + "value": "nw_waypoint001" + }, + "XOrientation": { + "type": "float", + "value": 0.0 + }, + "XPosition": { + "type": "float", + "value": 64.93525695800781 + }, + "YOrientation": { + "type": "float", + "value": 1.0 + }, + "YPosition": { + "type": "float", + "value": 18.06479835510254 + }, + "ZPosition": { + "type": "float", + "value": 0.002738118171691895 + } } ] } diff --git a/_module/ifo/module.ifo.json b/_module/ifo/module.ifo.json index a09ff71e..b943ca5b 100644 --- a/_module/ifo/module.ifo.json +++ b/_module/ifo/module.ifo.json @@ -1749,6 +1749,13 @@ "type": "resref", "value": "dml_trollmound" } + }, + { + "__struct_id": 6, + "Area_Name": { + "type": "resref", + "value": "ifm_pc_rooms" + } } ] }, @@ -2152,7 +2159,7 @@ }, "Mod_OnClientLeav": { "type": "resref", - "value": "prc_onleave" + "value": "hif_onleave" }, "Mod_OnCutsnAbort": { "type": "resref", @@ -2992,7 +2999,7 @@ }, "Value": { "type": "int", - "value": 0 + "value": 1 } }, { @@ -3172,7 +3179,7 @@ }, "Value": { "type": "int", - "value": 1 + "value": 0 } }, { @@ -3235,51 +3242,6 @@ "value": 0 } }, - { - "__struct_id": 0, - "Name": { - "type": "cexostring", - "value": "PRC_XP_GROUP_BONUS" - }, - "Type": { - "type": "dword", - "value": 1 - }, - "Value": { - "type": "int", - "value": 10 - } - }, - { - "__struct_id": 0, - "Name": { - "type": "cexostring", - "value": "PRC_XP_MUST_BE_IN_AREA" - }, - "Type": { - "type": "dword", - "value": 1 - }, - "Value": { - "type": "int", - "value": 1 - } - }, - { - "__struct_id": 0, - "Name": { - "type": "cexostring", - "value": "PRC_XP_MAX_LEVEL_DIFF" - }, - "Type": { - "type": "dword", - "value": 1 - }, - "Value": { - "type": "int", - "value": 7 - } - }, { "__struct_id": 0, "Name": { @@ -3549,6 +3511,21 @@ "type": "int", "value": 0 } + }, + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "PRC_DISABLE_SWITCH_CHANGING_CONVO" + }, + "Type": { + "type": "dword", + "value": 1 + }, + "Value": { + "type": "int", + "value": 1 + } } ] } diff --git a/_module/itp/creaturepalcus.itp.json b/_module/itp/creaturepalcus.itp.json index b072c25c..8274fecb 100644 --- a/_module/itp/creaturepalcus.itp.json +++ b/_module/itp/creaturepalcus.itp.json @@ -2756,6 +2756,63 @@ "value": 16816496 } }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 3.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Hostile" + }, + "NAME": { + "type": "cexostring", + "value": "Weasel, Dire: 03 HD" + }, + "RESREF": { + "type": "resref", + "value": "direweasel001" + } + }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 4.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Hostile" + }, + "NAME": { + "type": "cexostring", + "value": "Weasel, Dire: 06 HD" + }, + "RESREF": { + "type": "resref", + "value": "direweasel002" + } + }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 8.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Hostile" + }, + "NAME": { + "type": "cexostring", + "value": "Weasel, Dire: 10 HD" + }, + "RESREF": { + "type": "resref", + "value": "direweasel003" + } + }, { "__struct_id": 0, "CR": { @@ -10707,6 +10764,63 @@ "value": "ra_basilisk001" } }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 4.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Hostile" + }, + "NAME": { + "type": "cexostring", + "value": "Cockatrice [RA]: 05 HD" + }, + "RESREF": { + "type": "resref", + "value": "ra_cockatrice001" + } + }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 8.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Hostile" + }, + "NAME": { + "type": "cexostring", + "value": "Cockatrice [RA]: 10 HD" + }, + "RESREF": { + "type": "resref", + "value": "ra_cockatrice002" + } + }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 12.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Hostile" + }, + "NAME": { + "type": "cexostring", + "value": "Cockatrice [RA]: 15 HD" + }, + "RESREF": { + "type": "resref", + "value": "ra_cockatrice003" + } + }, { "__struct_id": 0, "CR": { @@ -13643,7 +13757,26 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 4.0 + "value": 5.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Hostile" + }, + "NAME": { + "type": "cexostring", + "value": "Imp: 03 HD" + }, + "RESREF": { + "type": "resref", + "value": "ra_imp001" + } + }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 5.0 }, "FACTION": { "type": "cexostring", diff --git a/_module/itp/itempalcus.itp.json b/_module/itp/itempalcus.itp.json index e2c14988..a19096d9 100644 --- a/_module/itp/itempalcus.itp.json +++ b/_module/itp/itempalcus.itp.json @@ -4101,6 +4101,28 @@ "value": "cobra_c_bite_40" } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "Cockatrice Bite" + }, + "RESREF": { + "type": "resref", + "value": "ra_cocktrc_bite" + } + }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "Cockatrice Bite (Medium)" + }, + "RESREF": { + "type": "resref", + "value": "ra_cocktrc_bite2" + } + }, { "__struct_id": 0, "NAME": { @@ -4145,6 +4167,17 @@ "value": 16807404 } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "Dire Weasel Bite" + }, + "RESREF": { + "type": "resref", + "value": "cr_bite_weasel01" + } + }, { "__struct_id": 0, "NAME": { @@ -36154,6 +36187,17 @@ "value": 191 } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "Dagger of Collision +5" + }, + "RESREF": { + "type": "resref", + "value": "ra_wpswdg_collis" + } + }, { "__struct_id": 0, "NAME": { @@ -36209,17 +36253,6 @@ "value": "ra_wmswdg_slkeen" } }, - { - "__struct_id": 0, - "NAME": { - "type": "cexostring", - "value": "RA_WPSWDG_COLLIS" - }, - "RESREF": { - "type": "resref", - "value": "ra_wpswdg_collis" - } - }, { "__struct_id": 0, "NAME": { diff --git a/_module/itp/placeablepalcus.itp.json b/_module/itp/placeablepalcus.itp.json index 12f1066d..0d9bf41b 100644 --- a/_module/itp/placeablepalcus.itp.json +++ b/_module/itp/placeablepalcus.itp.json @@ -8698,6 +8698,17 @@ "value": 5348 } }, + { + "__struct_id": 0, + "RESREF": { + "type": "resref", + "value": "persist_chest" + }, + "STRREF": { + "type": "dword", + "value": 5348 + } + }, { "__struct_id": 0, "RESREF": { @@ -11875,17 +11886,6 @@ "value": 52998 } }, - { - "__struct_id": 0, - "NAME": { - "type": "cexostring", - "value": "Boulder" - }, - "RESREF": { - "type": "resref", - "value": "boulder003" - } - }, { "__struct_id": 0, "RESREF": { diff --git a/_module/ncs/10aboat1.ncs b/_module/ncs/10aboat1.ncs index aa35e60e..79de2e34 100644 Binary files a/_module/ncs/10aboat1.ncs and b/_module/ncs/10aboat1.ncs differ diff --git a/_module/ncs/10ariver1.ncs b/_module/ncs/10ariver1.ncs index c8be58a3..78e8c78b 100644 Binary files a/_module/ncs/10ariver1.ncs and b/_module/ncs/10ariver1.ncs differ diff --git a/_module/ncs/10ariver2.ncs b/_module/ncs/10ariver2.ncs index 840106aa..53f8da2c 100644 Binary files a/_module/ncs/10ariver2.ncs and b/_module/ncs/10ariver2.ncs differ diff --git a/_module/ncs/10ariver3.ncs b/_module/ncs/10ariver3.ncs index 76242cdc..b7721f59 100644 Binary files a/_module/ncs/10ariver3.ncs and b/_module/ncs/10ariver3.ncs differ diff --git a/_module/ncs/10ariver4.ncs b/_module/ncs/10ariver4.ncs index b3ff4701..5113f06b 100644 Binary files a/_module/ncs/10ariver4.ncs and b/_module/ncs/10ariver4.ncs differ diff --git a/_module/ncs/10ariver5.ncs b/_module/ncs/10ariver5.ncs index a5237855..216fa3a8 100644 Binary files a/_module/ncs/10ariver5.ncs and b/_module/ncs/10ariver5.ncs differ diff --git a/_module/ncs/10ariver6.ncs b/_module/ncs/10ariver6.ncs index 393cfb84..d34d152c 100644 Binary files a/_module/ncs/10ariver6.ncs and b/_module/ncs/10ariver6.ncs differ diff --git a/_module/ncs/10asmlaked1.ncs b/_module/ncs/10asmlaked1.ncs index d66c1773..7cff340d 100644 Binary files a/_module/ncs/10asmlaked1.ncs and b/_module/ncs/10asmlaked1.ncs differ diff --git a/_module/ncs/10asmlaked2.ncs b/_module/ncs/10asmlaked2.ncs index 1fb21133..9d046900 100644 Binary files a/_module/ncs/10asmlaked2.ncs and b/_module/ncs/10asmlaked2.ncs differ diff --git a/_module/ncs/11diving.ncs b/_module/ncs/11diving.ncs index 9327d25a..ecab1310 100644 Binary files a/_module/ncs/11diving.ncs and b/_module/ncs/11diving.ncs differ diff --git a/_module/ncs/11river1.ncs b/_module/ncs/11river1.ncs index e751fae9..ef81c871 100644 Binary files a/_module/ncs/11river1.ncs and b/_module/ncs/11river1.ncs differ diff --git a/_module/ncs/11river2.ncs b/_module/ncs/11river2.ncs index 555c14e1..2831aac3 100644 Binary files a/_module/ncs/11river2.ncs and b/_module/ncs/11river2.ncs differ diff --git a/_module/ncs/11river3.ncs b/_module/ncs/11river3.ncs index 3df36a1e..efb82e8e 100644 Binary files a/_module/ncs/11river3.ncs and b/_module/ncs/11river3.ncs differ diff --git a/_module/ncs/11river4.ncs b/_module/ncs/11river4.ncs index 5a12c92e..4b667b58 100644 Binary files a/_module/ncs/11river4.ncs and b/_module/ncs/11river4.ncs differ diff --git a/_module/ncs/12aboat2.ncs b/_module/ncs/12aboat2.ncs index 64cf844c..3f0d7cd6 100644 Binary files a/_module/ncs/12aboat2.ncs and b/_module/ncs/12aboat2.ncs differ diff --git a/_module/ncs/12ahermit1.ncs b/_module/ncs/12ahermit1.ncs index d4cee795..2ba4d89a 100644 Binary files a/_module/ncs/12ahermit1.ncs and b/_module/ncs/12ahermit1.ncs differ diff --git a/_module/ncs/12ahermit2.ncs b/_module/ncs/12ahermit2.ncs index 3fd9cd6d..e4b26f4f 100644 Binary files a/_module/ncs/12ahermit2.ncs and b/_module/ncs/12ahermit2.ncs differ diff --git a/_module/ncs/12totarpit.ncs b/_module/ncs/12totarpit.ncs index f334afcd..02a24533 100644 Binary files a/_module/ncs/12totarpit.ncs and b/_module/ncs/12totarpit.ncs differ diff --git a/_module/ncs/1riverto9.ncs b/_module/ncs/1riverto9.ncs index 9b6b6c23..072485aa 100644 Binary files a/_module/ncs/1riverto9.ncs and b/_module/ncs/1riverto9.ncs differ diff --git a/_module/ncs/3aholedoor.ncs b/_module/ncs/3aholedoor.ncs index fc89e467..d7aeb7b5 100644 Binary files a/_module/ncs/3aholedoor.ncs and b/_module/ncs/3aholedoor.ncs differ diff --git a/_module/ncs/3holesdoor.ncs b/_module/ncs/3holesdoor.ncs index e5b3dc57..23dc00fd 100644 Binary files a/_module/ncs/3holesdoor.ncs and b/_module/ncs/3holesdoor.ncs differ diff --git a/_module/ncs/3holesdoor2.ncs b/_module/ncs/3holesdoor2.ncs index 922bc8a9..039bca69 100644 Binary files a/_module/ncs/3holesdoor2.ncs and b/_module/ncs/3holesdoor2.ncs differ diff --git a/_module/ncs/3statued.ncs b/_module/ncs/3statued.ncs index a8587c77..e87187b4 100644 Binary files a/_module/ncs/3statued.ncs and b/_module/ncs/3statued.ncs differ diff --git a/_module/ncs/3statuesid1.ncs b/_module/ncs/3statuesid1.ncs index c39d9b09..7da7814a 100644 Binary files a/_module/ncs/3statuesid1.ncs and b/_module/ncs/3statuesid1.ncs differ diff --git a/_module/ncs/3statuesid2.ncs b/_module/ncs/3statuesid2.ncs index aa18d976..d400bbac 100644 Binary files a/_module/ncs/3statuesid2.ncs and b/_module/ncs/3statuesid2.ncs differ diff --git a/_module/ncs/3statuesid3.ncs b/_module/ncs/3statuesid3.ncs index ab816019..8c5a68c2 100644 Binary files a/_module/ncs/3statuesid3.ncs and b/_module/ncs/3statuesid3.ncs differ diff --git a/_module/ncs/3statuesidx.ncs b/_module/ncs/3statuesidx.ncs index 16cdbc0c..af5c16ee 100644 Binary files a/_module/ncs/3statuesidx.ncs and b/_module/ncs/3statuesidx.ncs differ diff --git a/_module/ncs/4ariver1.ncs b/_module/ncs/4ariver1.ncs index 1f6cb532..9afe05c7 100644 Binary files a/_module/ncs/4ariver1.ncs and b/_module/ncs/4ariver1.ncs differ diff --git a/_module/ncs/5to14jump.ncs b/_module/ncs/5to14jump.ncs index 636d2c3c..d6f16c7e 100644 Binary files a/_module/ncs/5to14jump.ncs and b/_module/ncs/5to14jump.ncs differ diff --git a/_module/ncs/69_henchrt_enter.ncs b/_module/ncs/69_henchrt_enter.ncs index bd251035..6d915970 100644 Binary files a/_module/ncs/69_henchrt_enter.ncs and b/_module/ncs/69_henchrt_enter.ncs differ diff --git a/_module/ncs/at_enter_pc_room.ncs b/_module/ncs/at_enter_pc_room.ncs new file mode 100644 index 00000000..9c8ac9bf Binary files /dev/null and b/_module/ncs/at_enter_pc_room.ncs differ diff --git a/_module/ncs/cv_inn_door.ncs b/_module/ncs/cv_inn_door.ncs new file mode 100644 index 00000000..182d664d Binary files /dev/null and b/_module/ncs/cv_inn_door.ncs differ diff --git a/_module/ncs/gobsgone.ncs b/_module/ncs/gobsgone.ncs index e3f9f2e5..4347d0ea 100644 Binary files a/_module/ncs/gobsgone.ncs and b/_module/ncs/gobsgone.ncs differ diff --git a/_module/ncs/hif_onleave.ncs b/_module/ncs/hif_onleave.ncs new file mode 100644 index 00000000..dac3c095 Binary files /dev/null and b/_module/ncs/hif_onleave.ncs differ diff --git a/_module/ncs/mod_gui.ncs b/_module/ncs/mod_gui.ncs new file mode 100644 index 00000000..2609e4cf Binary files /dev/null and b/_module/ncs/mod_gui.ncs differ diff --git a/_module/ncs/mod_nui.ncs b/_module/ncs/mod_nui.ncs new file mode 100644 index 00000000..0e955a0d Binary files /dev/null and b/_module/ncs/mod_nui.ncs differ diff --git a/_module/ncs/mod_target.ncs b/_module/ncs/mod_target.ncs new file mode 100644 index 00000000..1651bbbd Binary files /dev/null and b/_module/ncs/mod_target.ncs differ diff --git a/_module/ncs/obj_us_chest.ncs b/_module/ncs/obj_us_chest.ncs new file mode 100644 index 00000000..748b045f Binary files /dev/null and b/_module/ncs/obj_us_chest.ncs differ diff --git a/_module/ncs/oc_persist.ncs b/_module/ncs/oc_persist.ncs new file mode 100644 index 00000000..15c273d7 Binary files /dev/null and b/_module/ncs/oc_persist.ncs differ diff --git a/_module/ncs/oo_persist.ncs b/_module/ncs/oo_persist.ncs new file mode 100644 index 00000000..0671c782 Binary files /dev/null and b/_module/ncs/oo_persist.ncs differ diff --git a/_module/ncs/ra_ai_heartbeat.ncs b/_module/ncs/ra_ai_heartbeat.ncs index ce0b2ccf..cb30e17b 100644 Binary files a/_module/ncs/ra_ai_heartbeat.ncs and b/_module/ncs/ra_ai_heartbeat.ncs differ diff --git a/_module/ncs/ra_ai_ondamaged.ncs b/_module/ncs/ra_ai_ondamaged.ncs index c298ffb0..68df56e6 100644 Binary files a/_module/ncs/ra_ai_ondamaged.ncs and b/_module/ncs/ra_ai_ondamaged.ncs differ diff --git a/_module/ncs/ra_cocktrc_bite.ncs b/_module/ncs/ra_cocktrc_bite.ncs new file mode 100644 index 00000000..aa5fd55f Binary files /dev/null and b/_module/ncs/ra_cocktrc_bite.ncs differ diff --git a/_module/ncs/ra_mod_onenter.ncs b/_module/ncs/ra_mod_onenter.ncs index 95046e84..12ff2f9c 100644 Binary files a/_module/ncs/ra_mod_onenter.ncs and b/_module/ncs/ra_mod_onenter.ncs differ diff --git a/_module/ncs/sob_examine001.ncs b/_module/ncs/sob_examine001.ncs new file mode 100644 index 00000000..c4791cae Binary files /dev/null and b/_module/ncs/sob_examine001.ncs differ diff --git a/_module/ncs/sob_examine002.ncs b/_module/ncs/sob_examine002.ncs new file mode 100644 index 00000000..26d4486a Binary files /dev/null and b/_module/ncs/sob_examine002.ncs differ diff --git a/_module/ncs/sob_examine003.ncs b/_module/ncs/sob_examine003.ncs new file mode 100644 index 00000000..89402c3e Binary files /dev/null and b/_module/ncs/sob_examine003.ncs differ diff --git a/_module/ncs/sob_examine004.ncs b/_module/ncs/sob_examine004.ncs new file mode 100644 index 00000000..d1cf0b41 Binary files /dev/null and b/_module/ncs/sob_examine004.ncs differ diff --git a/_module/ncs/x2_def_spawn.ncs b/_module/ncs/x2_def_spawn.ncs index 403d7ece..300898bc 100644 Binary files a/_module/ncs/x2_def_spawn.ncs and b/_module/ncs/x2_def_spawn.ncs differ diff --git a/_module/ncs/x2_mod_def_load.ncs b/_module/ncs/x2_mod_def_load.ncs index 8fd02480..b27dc462 100644 Binary files a/_module/ncs/x2_mod_def_load.ncs and b/_module/ncs/x2_mod_def_load.ncs differ diff --git a/_module/nss/at_enter_pc_room.nss b/_module/nss/at_enter_pc_room.nss new file mode 100644 index 00000000..e69555a6 --- /dev/null +++ b/_module/nss/at_enter_pc_room.nss @@ -0,0 +1,52 @@ +void main() +{ +//:: Declare major variables + object oPC = GetPCSpeaker(); + object oBaseArea = GetObjectByTag("IFM_PC_ROOMS"); + + string sPCName = GetName(oPC); + string sBaseResRef = GetResRef(oBaseArea); + string sBaseName = GetName(oBaseArea); + string sNewTag = sPCName+sBaseResRef; + string sNewName = sPCName+"'s Room at the Flying Monkey"; + +//:: Create instanced area from player's information + CreateArea(sBaseResRef, sNewTag, sNewName); + +//:: Get information about new area instance + object oNewRoom = GetObjectByTag(sNewTag); + string sNewResRef = GetResRef(oNewRoom); + + + location lEntry = GetLocation(GetObjectByTag("PC_ROOM_MAT")); + + +//:: Create entry waypoint in new area instance + CreateObject(OBJECT_TYPE_WAYPOINT, "nw_waypoint001", lEntry, FALSE, "WP_"+sNewTag); + +//:: Make sure the area is valid + + + object oTarget; + location lTarget; + oTarget = GetWaypointByTag("WP_"+sNewTag); + + lTarget = GetLocation(oTarget); + +//only do the jump if the location is valid. +//though not flawless, we just check if it is in a valid area. +//the script will stop if the location isn't valid - meaning that +//nothing put after the teleport will fire either. +//the current location won't be stored, either + + if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) + { + SendMessageToPC(oPC, "Warning: Area does not exist!"); + return; + } + + AssignCommand(oPC, ClearAllActions()); + + AssignCommand(oPC, ActionJumpToLocation(lTarget)); + +} diff --git a/_module/nss/cv_inn_door.nss b/_module/nss/cv_inn_door.nss new file mode 100644 index 00000000..a9bb023c --- /dev/null +++ b/_module/nss/cv_inn_door.nss @@ -0,0 +1,10 @@ +void main() +{ + +object oPC = GetClickingObject(); + +if (!GetIsPC(oPC)) return; + +ActionStartConversation(oPC, ""); + +} diff --git a/_module/nss/hif_onleave.nss b/_module/nss/hif_onleave.nss new file mode 100644 index 00000000..788ea164 --- /dev/null +++ b/_module/nss/hif_onleave.nss @@ -0,0 +1,10 @@ +#include "inc_tictactoe" + +void main() +{ + object oPlayer = GetExitingObject(); + + TTT_HandlePlayerExit(oPlayer); + + ExecuteScript("prc_onleave", oPlayer); +} diff --git a/_module/nss/inc_blackjack.nss b/_module/nss/inc_blackjack.nss new file mode 100644 index 00000000..813cd1fd --- /dev/null +++ b/_module/nss/inc_blackjack.nss @@ -0,0 +1,1104 @@ +/* + Blackjack NUI Game + Created By: Daz +*/ + +#include "inc_nui" + +// CONFIGURATION +const int BJ_MAX_BET = 500; +const int BJ_DOUBLE_DOWN_MIN_POINTS = 9; +const int BJ_DOUBLE_DOWN_MAX_POINTS = 11; +const int BJ_DOUBLE_DOWN_EXCEED_MAX_BET = TRUE; +const int BJ_DEALER_STAND_VALUE = 17; +const float BJ_DEALER_TURN_DELAY_MIN = 0.75f; +const int BJ_DEALER_TURN_DELAY_RANDOM = 75; +const int BJ_HAND_NUM_CARDS = 6; +// ***** + +const string BJ_WINDOW_ID = "BJ_GAME"; +const string BJ_WINDOW_JSON = "BJ_WINDOW_JSON"; +const string BJ_WINDOW_GEOMETRY = "BJ_WINDOW_GEOMETRY"; +const float BJ_WINDOW_MINIMUM_WIDTH = 100.0f; +const float BJ_WINDOW_HEIGHT = 600.0f; +const float BJ_BUTTON_WIDTH = 125.0f; +const float BJ_CARD_WIDTH = 100.0f; +const float BJ_CARD_HEIGHT = 145.0f; + +const int BJ_BLACKJACK_VALUE = 21; + +const int BJ_DRAW_CARD_RANDOM = -1; +const int BJ_DRAW_CARD_TOP = 0; + +const string BJ_DECK_JSON = "BJ_DECK_JSON"; +const string BJ_PLAYER_HAND = "player"; +const string BJ_DEALER_HAND = "dealer"; + +const string BJ_CARD_BACK = "pc_back"; +const string BJ_CARD_BLANK = "pc_blank"; +const string BJ_PLAYER_CARD_PREFIX = "pcard_"; +const string BJ_DEALER_CARD_PREFIX = "dcard_"; + +const string BJ_ID_BUTTON_HIT = "btn_hit"; +const string BJ_ID_BUTTON_DEAL = "btn_deal"; +const string BJ_ID_BUTTON_STAND = "btn_stand"; +const string BJ_ID_BUTTON_BET = "btn_bet"; +const string BJ_ID_BUTTON_DOUBLE_DOWN = "btn_doubledown"; + +const string BJ_BIND_DEALER_NAME = "dealer_name"; +const string BJ_BIND_DEALER_POINTS = "dealer_points"; +const string BJ_BIND_PLAYER_NAME = "player_name"; +const string BJ_BIND_PLAYER_POINTS = "player_points"; +const string BJ_BIND_INFO_TEXT = "info_text"; +const string BJ_BIND_BET_AMOUNT = "bet_amount"; +const string BJ_BIND_BET_AMOUNT_VISIBLE = "bet_amount_v"; +const string BJ_BIND_GOLD_RESULT = "gold_result"; +const string BJ_BIND_CURRENT_BET = "current_bet"; +const string BJ_BIND_STATS_TOOLTIP = "stats"; + +const string BJ_PLAYER_STATS = "BJ_PLAYER_STATS"; +const int BJ_STATS_TYPE_TOTAL = 0; +const int BJ_STATS_TYPE_WINS = 1; +const int BJ_STATS_TYPE_DRAWS = 2; +const int BJ_STATS_TYPE_LOSSES = 3; + +const string BJ_BIND_BUTTON_VISIBLE_HIT = "btn_hit_v"; +const string BJ_BIND_BUTTON_VISIBLE_DEAL = "btn_deal_v"; +const string BJ_BIND_BUTTON_VISIBLE_STAND = "btn_stand_v"; +const string BJ_BIND_BUTTON_VISIBLE_BET = "btn_bet_v"; +const string BJ_BIND_BUTTON_VISIBLE_DOUBLE_DOWN = "btn_doubledown_v"; +const string BJ_BIND_BUTTON_ENABLED_HIT = "btn_hit_e"; +const string BJ_BIND_BUTTON_ENABLED_DEAL = "btn_deal_e"; +const string BJ_BIND_BUTTON_ENABLED_STAND = "btn_stand_e"; +const string BJ_BIND_BUTTON_ENABLED_BET = "btn_bet_e"; +const string BJ_BIND_BUTTON_ENABLED_DOUBLE_DOWN = "btn_doubledown_e"; + +const string BJ_GAME_STATE = "BJ_GAME_STATE"; +const int BJ_GAME_STATE_NONE = 0; +const int BJ_GAME_STATE_DEAL_CARDS = 1; +const int BJ_GAME_STATE_PLAYER_TURN = 2; +const int BJ_GAME_STATE_DEALER_TURN = 3; +const int BJ_GAME_STATE_GAME_OVER = 4; + +const int BJ_DEALER_TURN_NONE = 0; +const int BJ_DEALER_TURN_REVEAL_CARD = 1; +const int BJ_DEALER_TURN_DRAW_CARD = 2; +const int BJ_DEALER_TURN_CHECK_POINTS = 3; + +const int BJ_DEAL_CARDS_START = 0; +const int BJ_DEAL_CARDS_PEEK = 5; + +json BJ_NuiCard(string sPrefix, int nCard); +json BJ_GetWindowJson(); +int BJ_GetWindowId(object oPlayer); +json BJ_GetUserData(object oPlayer); +void BJ_SetUserData(object oPlayer, string sKey, json jData); +void BJ_DeleteUserData(object oPlayer, string sKey); +void BJ_ToggleButton(object oPlayer, string sButton, int bEnabled); +void BJ_SetDealer(object oPlayer, object oDealer); +object BJ_GetDealer(object oPlayer); +string BJ_GetDealerName(object oPlayer); +json BJ_CreateDeck(); +void BJ_SetDeck(object oPlayer, json jDeck); +json BJ_GetDeck(object oPlayer); +void BJ_DeleteDeck(object oPlayer); +void BJ_ShuffleDeck(object oPlayer); +void BJ_SetHand(object oPlayer, string sHand, json jHand); +json BJ_GetHand(object oPlayer, string sHand); +void BJ_DeleteHand(object oPlayer, string sHand); +void BJ_InsertCardIntoHand(object oPlayer, string sHand, json jCard); +void BJ_SetHandAces(object oPlayer, string sHand, int nAces); +int BJ_GetHandAces(object oPlayer, string sHand); +void BJ_DeleteHandAces(object oPlayer, string sHand); +void BJ_IncreaseHandAces(object oPlayer, string sHand); +void BJ_ResetHands(object oPlayer); +string BJ_GetCardImage(json jCard); +int BJ_GetCardIsAce(json jCard); +int BJ_GetHandIsBlackjack(object oPlayer, string sHand); +json BJ_GetCardFromDeck(object oPlayer, int nIndex); +void BJ_DrawCard(object oPlayer, string sHand); +int BJ_CreateGameWindow(object oPlayer); +void BJ_SetPlayerName(object oPlayer, int nToken, string sName); +void BJ_SetPlayerPoints(object oPlayer, int nToken, int nPoints); +void BJ_SetDealerName(object oPlayer, int nToken, string sName); +void BJ_SetDealerPoints(object oPlayer, int nTokenn, int nPoints); +void BJ_SetInfoText(object oPlayer, int nToken, string sText); +void BJ_SetGoldResultText(object oPlayer, int nToken, string sResult); +void BJ_SetCurrentBetText(object oPlayer, int nToken, string sCurrentBet); +void BJ_SetCard(object oPlayer, int nToken, string sPrefix, int nCard, string sImage); +void BJ_BlankCards(object oPlayer, int nToken); +void BJ_StartGame(object oPlayer, object oDealer); +void BJ_EndGame(object oPlayer); +void BJ_HandleNUIEvents(object oPlayer, int nToken, string sType, string sElement, int nArrayIndex, json jPayload); +void BJ_SetGameState(object oPlayer, int nState, string sInfoText = "", float fBetResultMultiplier = 0.0f); +int BJ_GetGameState(object oPlayer); +void BJ_DeleteGameState(object oPlayer); +float BJ_GetDealerTurnDelay(); +void BJ_HandleDealerTurn(object oPlayer, int nToken, int nCurrentState); +void BJ_HandleDealCards(object oPlayer, int nToken, int nCurrentState); +void BJ_UpdateCards(object oPlayer, int nToken); +int BJ_GetCardValue(json jCard); +int BJ_GetHandPoints(object oPlayer, string sHand); +void BJ_UpdatePoints(object oPlayer, int nToken); +void BJ_ToggleBetInput(object oPlayer, int nToken, int bVisible); +int BJ_GetBet(object oPlayer); +void BJ_SetBet(object oPlayer, int nBet); +void BJ_DeleteBet(object oPlayer); +void BJ_IncreaseBet(object oPlayer, int nIncrease); +void BJ_SettleBet(object oPlayer, int nToken, float fMultiplier); +void BJ_PlaySound(object oPlayer, string sSound); +int BJ_GetPlayerCanDoubleDown(object oPlayer); +json BJ_CreateStatsObject(); +json BJ_GetStats(object oPlayer); +void BJ_SetStats(object oPlayer, json jStats); +void BJ_UpdateStats(object oPlayer, int nType); +void BJ_UpdateStatsTooltip(object oPlayer, int nToken); + +json BJ_NuiCard(string sPrefix, int nCard) +{ + string sCard = sPrefix + IntToString(nCard); + json jImage = NuiImage(NuiBind(sCard), JsonInt(NUI_ASPECT_EXACTSCALED), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_MIDDLE)); + jImage = NuiWidth(jImage, BJ_CARD_WIDTH); + jImage = NuiHeight(jImage, BJ_CARD_HEIGHT); + + return jImage; +} + +json BJ_GetWindowJson() +{ + json jWindow = GetLocalJson(GetModule(), BJ_WINDOW_JSON); + if (!JsonGetType(jWindow)) + { + json jCol; + json jRow; + + jCol = JsonArray(); + + jRow = JsonArray(); + { + json jDealerPoints = NuiHeader(NuiBind(BJ_BIND_DEALER_POINTS), 30.0f, 30.0f); + jDealerPoints = NuiTooltip(jDealerPoints, JsonString("Dealer Points")); + jRow = JsonArrayInsert(jRow, jDealerPoints); + + json jDealerName = NuiHeader(NuiBind(BJ_BIND_DEALER_NAME), 30.0f); + jRow = JsonArrayInsert(jRow, jDealerName); + } + jCol = NuiInsertRow(jCol, jRow); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiSpacer()); + int nCard; + for (nCard = 0; nCard < BJ_HAND_NUM_CARDS; nCard++) + { + jRow = JsonArrayInsert(jRow, BJ_NuiCard(BJ_DEALER_CARD_PREFIX, nCard)); + } + jRow = JsonArrayInsert(jRow, NuiSpacer()); + } + jCol = NuiInsertRow(jCol, jRow); + + jCol = NuiInsertRow(jCol, JsonArrayInsert(JsonArray(), NuiSpacer())); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiLabel(NuiBind(BJ_BIND_INFO_TEXT), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_MIDDLE))); + } + jCol = NuiInsertRow(jCol, jRow); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiLabel(NuiBind(BJ_BIND_GOLD_RESULT), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_MIDDLE))); + } + jCol = NuiInsertRow(jCol, jRow); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jBetInput = NuiTextEdit(JsonString("Amount..."), NuiBind(BJ_BIND_BET_AMOUNT), GetStringLength(IntToString(BJ_MAX_BET)), FALSE); + jBetInput = NuiVisible(jBetInput, NuiBind(BJ_BIND_BET_AMOUNT_VISIBLE)); + jBetInput = NuiWidth(jBetInput, 100.0f); + jBetInput = NuiHeight(jBetInput, 30.0f); + jRow = JsonArrayInsert(jRow, jBetInput); + + json jBetButton = NuiButton(JsonString("Bet")); + jBetButton = NuiTooltip(jBetButton, JsonString("Max " + IntToString(BJ_MAX_BET) + " gold, all bets are final!")); + jBetButton = NuiId(jBetButton, BJ_ID_BUTTON_BET); + jBetButton = NuiEnabled(jBetButton, NuiBind(BJ_BIND_BUTTON_ENABLED_BET)); + jBetButton = NuiVisible(jBetButton, NuiBind(BJ_BIND_BUTTON_VISIBLE_BET)); + jBetButton = NuiWidth(jBetButton, 100.0f); + jBetButton = NuiHeight(jBetButton, 30.0f); + jRow = JsonArrayInsert(jRow, jBetButton); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + } + jCol = NuiInsertRow(jCol, jRow); + + jCol = NuiInsertRow(jCol, JsonArrayInsert(JsonArray(), NuiSpacer())); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiSpacer()); + int nCard; + for (nCard = 0; nCard < BJ_HAND_NUM_CARDS; nCard++) + { + jRow = JsonArrayInsert(jRow, BJ_NuiCard(BJ_PLAYER_CARD_PREFIX, nCard)); + } + jRow = JsonArrayInsert(jRow, NuiSpacer()); + } + jCol = NuiInsertRow(jCol, jRow); + + jRow = JsonArray(); + { + json jPlayerPoints = NuiHeader(NuiBind(BJ_BIND_PLAYER_POINTS), 30.0f, 30.0f); + jPlayerPoints = NuiTooltip(jPlayerPoints, JsonString("Player Points")); + jRow = JsonArrayInsert(jRow, jPlayerPoints); + + json jPlayerName = NuiHeader(NuiBind(BJ_BIND_PLAYER_NAME), 30.0f); + jPlayerName = NuiTooltip(jPlayerName, NuiBind(BJ_BIND_STATS_TOOLTIP)); + jRow = JsonArrayInsert(jRow, jPlayerName); + + json jPlayerBet = NuiHeader(NuiBind(BJ_BIND_CURRENT_BET), 30.0f, 125.0f); + jRow = JsonArrayInsert(jRow, jPlayerBet); + } + jCol = NuiInsertRow(jCol, jRow); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jDealButton = NuiButton(JsonString("Deal")); + jDealButton = NuiId(jDealButton, BJ_ID_BUTTON_DEAL); + jDealButton = NuiEnabled(jDealButton, NuiBind(BJ_BIND_BUTTON_ENABLED_DEAL)); + jDealButton = NuiVisible(jDealButton, NuiBind(BJ_BIND_BUTTON_VISIBLE_DEAL)); + jDealButton = NuiWidth(jDealButton, BJ_BUTTON_WIDTH); + jDealButton = NuiHeight(jDealButton, 30.0f); + jRow = JsonArrayInsert(jRow, jDealButton); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jHitButton = NuiButton(JsonString("Hit")); + jHitButton = NuiId(jHitButton, BJ_ID_BUTTON_HIT); + jHitButton = NuiEnabled(jHitButton, NuiBind(BJ_BIND_BUTTON_ENABLED_HIT)); + jHitButton = NuiVisible(jHitButton, NuiBind(BJ_BIND_BUTTON_VISIBLE_HIT)); + jHitButton = NuiWidth(jHitButton, BJ_BUTTON_WIDTH); + jHitButton = NuiHeight(jHitButton, 30.0f); + jRow = JsonArrayInsert(jRow, jHitButton); + + json jDoubleDownButton = NuiButton(JsonString("Double Down")); + jDoubleDownButton = NuiId(jDoubleDownButton, BJ_ID_BUTTON_DOUBLE_DOWN); + jDoubleDownButton = NuiEnabled(jDoubleDownButton, NuiBind(BJ_BIND_BUTTON_ENABLED_DOUBLE_DOWN)); + jDoubleDownButton = NuiVisible(jDoubleDownButton, NuiBind(BJ_BIND_BUTTON_VISIBLE_DOUBLE_DOWN)); + jDoubleDownButton = NuiWidth(jDoubleDownButton, BJ_BUTTON_WIDTH); + jDoubleDownButton = NuiHeight(jDoubleDownButton, 30.0f); + jRow = JsonArrayInsert(jRow, jDoubleDownButton); + + json jStandButton = NuiButton(JsonString("Stand")); + jStandButton = NuiId(jStandButton, BJ_ID_BUTTON_STAND); + jStandButton = NuiEnabled(jStandButton, NuiBind(BJ_BIND_BUTTON_ENABLED_STAND)); + jStandButton = NuiVisible(jStandButton, NuiBind(BJ_BIND_BUTTON_VISIBLE_STAND)); + jStandButton = NuiWidth(jStandButton, BJ_BUTTON_WIDTH); + jStandButton = NuiHeight(jStandButton, 30.0f); + jRow = JsonArrayInsert(jRow, jStandButton); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + } + jCol = NuiInsertRow(jCol, jRow); + + json jRoot = NuiCol(jCol); + jWindow = NuiWindow(jRoot, JsonString("Blackjack"), NuiBind(NUI_WINDOW_GEOMETRY_BIND), JsonBool(FALSE), JsonNull(), JsonBool(TRUE), JsonBool(FALSE), JsonBool(TRUE)); + SetLocalJson(GetModule(), BJ_WINDOW_JSON, jWindow); + PrintString(JsonDump(jWindow)); + } + + return jWindow; +} + +json BJ_CreateDeck() +{ + json jDeck = GetLocalJson(GetModule(), BJ_DECK_JSON); + + if (!JsonGetType(jDeck)) + { + jDeck = JsonArray(); + + json jSuits = JsonArray(); + jSuits = JsonArrayInsert(jSuits, JsonString("clubs")); + jSuits = JsonArrayInsert(jSuits, JsonString("diamonds")); + jSuits = JsonArrayInsert(jSuits, JsonString("hearts")); + jSuits = JsonArrayInsert(jSuits, JsonString("spades")); + json jValues = JsonArray(); + jValues = JsonArrayInsert(jValues, JsonString("2")); + jValues = JsonArrayInsert(jValues, JsonString("3")); + jValues = JsonArrayInsert(jValues, JsonString("4")); + jValues = JsonArrayInsert(jValues, JsonString("5")); + jValues = JsonArrayInsert(jValues, JsonString("6")); + jValues = JsonArrayInsert(jValues, JsonString("7")); + jValues = JsonArrayInsert(jValues, JsonString("8")); + jValues = JsonArrayInsert(jValues, JsonString("9")); + jValues = JsonArrayInsert(jValues, JsonString("10")); + jValues = JsonArrayInsert(jValues, JsonString("j")); + jValues = JsonArrayInsert(jValues, JsonString("q")); + jValues = JsonArrayInsert(jValues, JsonString("k")); + jValues = JsonArrayInsert(jValues, JsonString("a")); + + int nSuit, nNumSuits = JsonGetLength(jSuits); + int nValue, nNumValues = JsonGetLength(jValues); + for (nSuit = 0; nSuit < nNumSuits; nSuit++) + { + for (nValue = 0; nValue < nNumValues; nValue++) + { + json jCard = JsonObject(); + jCard = JsonObjectSet(jCard, "suit", JsonArrayGet(jSuits, nSuit)); + jCard = JsonObjectSet(jCard, "value", JsonArrayGet(jValues, nValue)); + jDeck = JsonArrayInsert(jDeck, jCard); + } + } + + SetLocalJson(GetModule(), BJ_DECK_JSON, jDeck); + } + + return jDeck; +} + +int BJ_GetWindowId(object oPlayer) +{ + return NuiFindWindow(oPlayer, BJ_WINDOW_ID); +} + +json BJ_GetUserData(object oPlayer) +{ + json jUserData = NuiGetUserData(oPlayer, NuiFindWindow(oPlayer, BJ_WINDOW_ID)); + return !JsonGetType(jUserData) ? JsonObject() : jUserData; +} + +void BJ_SetUserData(object oPlayer, string sKey, json jData) +{ + NuiSetUserData(oPlayer, NuiFindWindow(oPlayer, BJ_WINDOW_ID), JsonObjectSet(BJ_GetUserData(oPlayer), sKey, jData)); +} + +void BJ_DeleteUserData(object oPlayer, string sKey) +{ + NuiSetUserData(oPlayer, NuiFindWindow(oPlayer, BJ_WINDOW_ID), JsonObjectDel(BJ_GetUserData(oPlayer), sKey)); +} + +void BJ_ToggleButton(object oPlayer, string sButton, int bEnabled) +{ + NuiSetBind(oPlayer, BJ_GetWindowId(oPlayer), sButton + "_e", JsonBool(bEnabled)); + NuiSetBind(oPlayer, BJ_GetWindowId(oPlayer), sButton + "_v", JsonBool(bEnabled)); +} + +void BJ_SetDealer(object oPlayer, object oDealer) +{ + BJ_SetUserData(oPlayer, "dealer", JsonString(ObjectToString(oDealer))); +} + +object BJ_GetDealer(object oPlayer) +{ + return StringToObject(JsonGetString(JsonObjectGet(BJ_GetUserData(oPlayer), "dealer"))); +} + +string BJ_GetDealerName(object oPlayer) +{ + return GetName(BJ_GetDealer(oPlayer)); +} + +void BJ_SetDeck(object oPlayer, json jDeck) +{ + BJ_SetUserData(oPlayer, "deck", jDeck); +} + +json BJ_GetDeck(object oPlayer) +{ + return JsonObjectGet(BJ_GetUserData(oPlayer), "deck"); +} + +void BJ_DeleteDeck(object oPlayer) +{ + BJ_DeleteUserData(oPlayer, "deck"); +} + +void BJ_ShuffleDeck(object oPlayer) +{ + json jDeck = JsonArray(); + int nCard, nNumCards = JsonGetLength(BJ_GetDeck(oPlayer)); + for (nCard = 0; nCard < nNumCards; nCard++) + { + jDeck = JsonArrayInsert(jDeck, BJ_GetCardFromDeck(oPlayer, BJ_DRAW_CARD_RANDOM)); + } + + BJ_SetDeck(oPlayer, jDeck); +} + +void BJ_SetHand(object oPlayer, string sHand, json jHand) +{ + BJ_SetUserData(oPlayer, "hand_" + sHand, jHand); +} + +json BJ_GetHand(object oPlayer, string sHand) +{ + json jHand = JsonObjectGet(BJ_GetUserData(oPlayer), "hand_" + sHand); + return !JsonGetType(jHand) ? JsonArray() : jHand; +} + +void BJ_DeleteHand(object oPlayer, string sHand) +{ + BJ_DeleteUserData(oPlayer, "hand_" + sHand); +} + +void BJ_InsertCardIntoHand(object oPlayer, string sHand, json jCard) +{ + json jHand = BJ_GetHand(oPlayer, sHand); + jHand = JsonArrayInsert(jHand, jCard); + BJ_SetHand(oPlayer, sHand, jHand); +} + +void BJ_SetHandAces(object oPlayer, string sHand, int nAces) +{ + BJ_SetUserData(oPlayer, "aces_" + sHand, JsonInt(nAces)); +} + +int BJ_GetHandAces(object oPlayer, string sHand) +{ + return JsonGetInt(JsonObjectGet(BJ_GetUserData(oPlayer), "aces_" + sHand)); +} + +void BJ_DeleteHandAces(object oPlayer, string sHand) +{ + BJ_DeleteUserData(oPlayer, "aces_" + sHand); +} + +void BJ_IncreaseHandAces(object oPlayer, string sHand) +{ + BJ_SetHandAces(oPlayer, sHand, BJ_GetHandAces(oPlayer, sHand) + 1); +} + +void BJ_ResetHands(object oPlayer) +{ + BJ_DeleteHand(oPlayer, BJ_PLAYER_HAND); + BJ_DeleteHand(oPlayer, BJ_DEALER_HAND); + BJ_DeleteHandAces(oPlayer, BJ_PLAYER_HAND); + BJ_DeleteHandAces(oPlayer, BJ_DEALER_HAND); +} + +string BJ_GetCardImage(json jCard) +{ + return "pc_" + JsonGetString(JsonObjectGet(jCard, "value")) + "_" + JsonGetString(JsonObjectGet(jCard, "suit")); +} + +int BJ_GetCardIsAce(json jCard) +{ + return JsonGetString(JsonObjectGet(jCard, "value")) == "a"; +} + +int BJ_GetHandIsBlackjack(object oPlayer, string sHand) +{ + json jHand = BJ_GetHand(oPlayer, sHand); + + if (JsonGetLength(jHand) != 2) + return FALSE; + + return (BJ_GetCardValue(JsonArrayGet(jHand, 0)) + BJ_GetCardValue(JsonArrayGet(jHand, 1))) == BJ_BLACKJACK_VALUE; +} + +json BJ_GetCardFromDeck(object oPlayer, int nDrawType) +{ + json jDeck = BJ_GetDeck(oPlayer); + int nCard = nDrawType == BJ_DRAW_CARD_RANDOM ? Random(JsonGetLength(jDeck)) : 0; + json jCard = JsonArrayGet(jDeck, nCard); + + BJ_SetDeck(oPlayer, JsonArrayDel(jDeck, nCard)); + + return jCard; +} + +void BJ_DrawCard(object oPlayer, string sHand) +{ + json jCard = BJ_GetCardFromDeck(oPlayer, BJ_DRAW_CARD_TOP); + BJ_InsertCardIntoHand(oPlayer, sHand, jCard); + + if (BJ_GetCardIsAce(jCard)) + BJ_IncreaseHandAces(oPlayer, sHand); + + BJ_PlaySound(oPlayer, "it_paper"); +} + +int BJ_CreateGameWindow(object oPlayer) +{ + int nToken = NuiCreate(oPlayer, BJ_GetWindowJson(), BJ_WINDOW_ID); + + json jGeometry = GetLocalJson(oPlayer, BJ_WINDOW_GEOMETRY); + if (!JsonGetType(jGeometry)) + jGeometry = NuiGetCenteredGeometryRect(oPlayer, BJ_WINDOW_MINIMUM_WIDTH + (BJ_HAND_NUM_CARDS * BJ_CARD_WIDTH), BJ_WINDOW_HEIGHT); + + NuiSetBindWatch(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, TRUE); + NuiSetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, jGeometry); + + return nToken; +} + +void BJ_SetPlayerName(object oPlayer, int nToken, string sName) +{ + NuiSetBind(oPlayer, nToken, BJ_BIND_PLAYER_NAME, JsonString(sName)); +} + +void BJ_SetPlayerPoints(object oPlayer, int nToken, int nPoints) +{ + NuiSetBind(oPlayer, nToken, BJ_BIND_PLAYER_POINTS, JsonString(IntToString(nPoints))); +} + +void BJ_SetDealerName(object oPlayer, int nToken, string sName) +{ + NuiSetBind(oPlayer, nToken, BJ_BIND_DEALER_NAME, JsonString(sName)); +} + +void BJ_SetDealerPoints(object oPlayer, int nToken, int nPoints) +{ + NuiSetBind(oPlayer, nToken, BJ_BIND_DEALER_POINTS, JsonString(IntToString(nPoints))); +} + +void BJ_SetInfoText(object oPlayer, int nToken, string sText) +{ + NuiSetBind(oPlayer, nToken, BJ_BIND_INFO_TEXT, JsonString(sText)); +} + +void BJ_SetGoldResultText(object oPlayer, int nToken, string sResult) +{ + NuiSetBind(oPlayer, nToken, BJ_BIND_GOLD_RESULT, JsonString(sResult)); +} + +void BJ_SetCurrentBetText(object oPlayer, int nToken, string sCurrentBet) +{ + NuiSetBind(oPlayer, nToken, BJ_BIND_CURRENT_BET, JsonString(sCurrentBet)); +} + +void BJ_SetCard(object oPlayer, int nToken, string sPrefix, int nCard, string sImage) +{ + NuiSetBind(oPlayer, nToken, sPrefix + IntToString(nCard), JsonString(sImage)); +} + +void BJ_BlankCards(object oPlayer, int nToken) +{ + int nCard; + for (nCard = 0; nCard < BJ_HAND_NUM_CARDS; nCard++) + { + BJ_SetCard(oPlayer, nToken, BJ_PLAYER_CARD_PREFIX, nCard, BJ_CARD_BLANK); + BJ_SetCard(oPlayer, nToken, BJ_DEALER_CARD_PREFIX, nCard, BJ_CARD_BLANK); + } +} + +void BJ_StartGame(object oPlayer, object oDealer) +{ + int nToken = BJ_GetWindowId(oPlayer); + if (nToken) + return; + + SetGuiPanelDisabled(oPlayer, GUI_PANEL_GOLD_INVENTORY, TRUE); + SetGuiPanelDisabled(oPlayer, GUI_PANEL_GOLD_BARTER, TRUE); + + nToken = BJ_CreateGameWindow(oPlayer); + + BJ_SetDealer(oPlayer, oDealer); + BJ_SetDealerName(oPlayer, nToken, BJ_GetDealerName(oPlayer)); + BJ_SetPlayerName(oPlayer, nToken, GetName(oPlayer)); + + BJ_SetGameState(oPlayer, BJ_GAME_STATE_NONE, "Click the Deal button to play Blackjack!"); +} + +void BJ_EndGame(object oPlayer) +{ + SetGuiPanelDisabled(oPlayer, GUI_PANEL_GOLD_INVENTORY, FALSE); + SetGuiPanelDisabled(oPlayer, GUI_PANEL_GOLD_BARTER, FALSE); +} + +void BJ_HandleNUIEvents(object oPlayer, int nToken, string sType, string sElement, int nArrayIndex, json jPayload) +{ + if (sType == NUI_EVENT_CLICK) + { + int nGameState = BJ_GetGameState(oPlayer); + + if (sElement == BJ_ID_BUTTON_HIT) + { + if (nGameState != BJ_GAME_STATE_PLAYER_TURN) + return; + + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_DOUBLE_DOWN, FALSE); + BJ_DrawCard(oPlayer, BJ_PLAYER_HAND); + + if (BJ_GetHandPoints(oPlayer, BJ_PLAYER_HAND) > BJ_BLACKJACK_VALUE) + { + BJ_SetGameState(oPlayer, BJ_GAME_STATE_GAME_OVER, "Bust! You lose!", 0.0f); + } + else + { + BJ_UpdateCards(oPlayer, nToken); + BJ_UpdatePoints(oPlayer, nToken); + } + + } + else if (sElement == BJ_ID_BUTTON_STAND) + { + if (nGameState != BJ_GAME_STATE_PLAYER_TURN) + return; + + BJ_SetGameState(oPlayer, BJ_GAME_STATE_DEALER_TURN); + } + else if (sElement == BJ_ID_BUTTON_DEAL) + { + if (nGameState != BJ_GAME_STATE_NONE && nGameState != BJ_GAME_STATE_GAME_OVER) + return; + + BJ_SetGameState(oPlayer, BJ_GAME_STATE_DEAL_CARDS); + } + else if (sElement == BJ_ID_BUTTON_BET) + { + if (nGameState != BJ_GAME_STATE_NONE && nGameState != BJ_GAME_STATE_GAME_OVER) + return; + + int nAmount = StringToInt(JsonGetString(NuiGetBind(oPlayer, nToken, BJ_BIND_BET_AMOUNT))); + if (nAmount > 0) + { + int nGold = GetGold(oPlayer); + int nMaxBetLeft = BJ_MAX_BET - BJ_GetBet(oPlayer); + nAmount = nAmount > nGold ? nGold : nAmount; + nAmount = nAmount > BJ_MAX_BET ? BJ_MAX_BET : nAmount; + nAmount = nAmount > nMaxBetLeft ? nMaxBetLeft : nAmount; + + if (nAmount > 0) + { + AssignCommand(oPlayer, TakeGoldFromCreature(nAmount, oPlayer, TRUE)); + BJ_IncreaseBet(oPlayer, nAmount); + } + } + + NuiSetBind(oPlayer, nToken, BJ_BIND_BET_AMOUNT, JsonString("")); + } + else if (sElement == BJ_ID_BUTTON_DOUBLE_DOWN) + { + if (nGameState != BJ_GAME_STATE_PLAYER_TURN || !BJ_GetPlayerCanDoubleDown(oPlayer)) + return; + + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_DOUBLE_DOWN, FALSE); + + int nBet = BJ_GetBet(oPlayer); + BJ_IncreaseBet(oPlayer, nBet); + AssignCommand(oPlayer, TakeGoldFromCreature(nBet, oPlayer, TRUE)); + + BJ_DrawCard(oPlayer, BJ_PLAYER_HAND); + + if (BJ_GetHandPoints(oPlayer, BJ_PLAYER_HAND) > BJ_BLACKJACK_VALUE) + BJ_SetGameState(oPlayer, BJ_GAME_STATE_GAME_OVER, "Bust! You lose!", 0.0f); + else + BJ_SetGameState(oPlayer, BJ_GAME_STATE_DEALER_TURN); + } + } + else if (sType == NUI_EVENT_CLOSE) + { + if (sElement == NUI_WINDOW_ROOT_GROUP) + { + BJ_EndGame(oPlayer); + } + } + else if (sType == NUI_EVENT_WATCH) + { + if (sElement == NUI_WINDOW_GEOMETRY_BIND) + { + SetLocalJson(oPlayer, BJ_WINDOW_GEOMETRY, NuiGetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND)); + } + } +} + +void BJ_SetGameState(object oPlayer, int nState, string sInfoText = "", float fBetResultMultiplier = 0.0f) +{ + BJ_SetUserData(oPlayer, "gamestate", JsonInt(nState)); + int nToken = BJ_GetWindowId(oPlayer); + BJ_SetInfoText(oPlayer, nToken, sInfoText); + + switch (nState) + { + case BJ_GAME_STATE_NONE: + { + BJ_BlankCards(oPlayer, nToken); + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_DEAL, TRUE); + BJ_SetBet(oPlayer, 0); + BJ_ToggleBetInput(oPlayer, nToken, TRUE); + BJ_UpdatePoints(oPlayer, nToken); + BJ_UpdateStatsTooltip(oPlayer, nToken); + break; + } + + case BJ_GAME_STATE_DEAL_CARDS: + { + BJ_HandleDealCards(oPlayer, nToken, BJ_DEAL_CARDS_START); + break; + } + + case BJ_GAME_STATE_PLAYER_TURN: + { + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_DEAL, FALSE); + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_HIT, TRUE); + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_STAND, TRUE); + if (BJ_GetPlayerCanDoubleDown(oPlayer)) + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_DOUBLE_DOWN, TRUE); + break; + } + + case BJ_GAME_STATE_DEALER_TURN: + { + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_DEAL, FALSE); + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_HIT, FALSE); + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_STAND, FALSE); + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_DOUBLE_DOWN, FALSE); + + DelayCommand(BJ_GetDealerTurnDelay(), BJ_HandleDealerTurn(oPlayer, nToken, BJ_DEALER_TURN_REVEAL_CARD)); + break; + } + + case BJ_GAME_STATE_GAME_OVER: + { + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_DEAL, TRUE); + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_HIT, FALSE); + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_STAND, FALSE); + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_DOUBLE_DOWN, FALSE); + + BJ_SettleBet(oPlayer, nToken, fBetResultMultiplier); + BJ_SetBet(oPlayer, 0); + BJ_ToggleBetInput(oPlayer, nToken, TRUE); + + BJ_UpdateCards(oPlayer, nToken); + BJ_UpdatePoints(oPlayer, nToken); + + int nStatsType = fBetResultMultiplier == 1.0f ? BJ_STATS_TYPE_DRAWS : fBetResultMultiplier == 0.0f ? BJ_STATS_TYPE_LOSSES : BJ_STATS_TYPE_WINS; + BJ_UpdateStats(oPlayer, nStatsType); + BJ_UpdateStatsTooltip(oPlayer, nToken); + break; + } + } +} + +int BJ_GetGameState(object oPlayer) +{ + return JsonGetInt(JsonObjectGet(BJ_GetUserData(oPlayer), "gamestate")); +} + +void BJ_DeleteGameState(object oPlayer) +{ + BJ_DeleteUserData(oPlayer, "gamestate"); +} + +float BJ_GetDealerTurnDelay() +{ + return BJ_DEALER_TURN_DELAY_MIN + (IntToFloat(Random(BJ_DEALER_TURN_DELAY_RANDOM)) / 100.0f); +} + +void BJ_HandleDealerTurn(object oPlayer, int nToken, int nCurrentState) +{ + if (BJ_GetGameState(oPlayer) != BJ_GAME_STATE_DEALER_TURN || BJ_GetWindowId(oPlayer) != nToken) + return; + + int nNextState = BJ_DEALER_TURN_NONE; + + if (nCurrentState == BJ_DEALER_TURN_REVEAL_CARD) + { + BJ_UpdateCards(oPlayer, nToken); + BJ_UpdatePoints(oPlayer, nToken); + nNextState = BJ_GetHandPoints(oPlayer, BJ_DEALER_HAND) < BJ_DEALER_STAND_VALUE ? BJ_DEALER_TURN_DRAW_CARD : BJ_DEALER_TURN_CHECK_POINTS; + } + else if (nCurrentState == BJ_DEALER_TURN_DRAW_CARD) + { + BJ_DrawCard(oPlayer, BJ_DEALER_HAND); + BJ_UpdateCards(oPlayer, nToken); + BJ_UpdatePoints(oPlayer, nToken); + + nNextState = BJ_GetHandPoints(oPlayer, BJ_DEALER_HAND) < BJ_DEALER_STAND_VALUE ? BJ_DEALER_TURN_DRAW_CARD : BJ_DEALER_TURN_CHECK_POINTS; + } + else if (nCurrentState == BJ_DEALER_TURN_CHECK_POINTS) + { + int nDealerPoints = BJ_GetHandPoints(oPlayer, BJ_DEALER_HAND); + if (nDealerPoints > BJ_BLACKJACK_VALUE) + { + BJ_SetGameState(oPlayer, BJ_GAME_STATE_GAME_OVER, BJ_GetDealerName(oPlayer) + " busts! You win!", 2.0f); + } + else + { + int nPlayerPoints = BJ_GetHandPoints(oPlayer, BJ_PLAYER_HAND); + + if (nDealerPoints == nPlayerPoints) + { + BJ_SetGameState(oPlayer, BJ_GAME_STATE_GAME_OVER, "Push! Nobody wins or loses!", 1.0f); + } + else if (nDealerPoints > nPlayerPoints) + { + BJ_SetGameState(oPlayer, BJ_GAME_STATE_GAME_OVER, BJ_GetDealerName(oPlayer) + " wins!", 0.0f); + } + else + { + BJ_SetGameState(oPlayer, BJ_GAME_STATE_GAME_OVER, "You win!", 2.0f); + } + } + } + + if (nNextState) + DelayCommand(BJ_GetDealerTurnDelay(), BJ_HandleDealerTurn(oPlayer, nToken, nNextState)); +} + +void BJ_HandleDealCards(object oPlayer, int nToken, int nCurrentState) +{ + if (BJ_GetGameState(oPlayer) != BJ_GAME_STATE_DEAL_CARDS || BJ_GetWindowId(oPlayer) != nToken) + return; + + switch (nCurrentState) + { + case BJ_DEAL_CARDS_START: + { + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_DEAL, FALSE); + BJ_ToggleBetInput(oPlayer, nToken, FALSE); + BJ_BlankCards(oPlayer, nToken); + BJ_SetGoldResultText(oPlayer, nToken, ""); + BJ_SetDeck(oPlayer, BJ_CreateDeck()); + BJ_ShuffleDeck(oPlayer); + BJ_ResetHands(oPlayer); + break; + } + + case 1: + case 2: + case 3: + case 4: + { + string sHand = nCurrentState > 2 ? BJ_DEALER_HAND : BJ_PLAYER_HAND; + BJ_DrawCard(oPlayer, sHand); + BJ_UpdateCards(oPlayer, nToken); + BJ_UpdatePoints(oPlayer, nToken); + break; + } + + case BJ_DEAL_CARDS_PEEK: + { + float fDelay = 0.0f; + + if (BJ_GetHandPoints(oPlayer, BJ_DEALER_HAND) >= 10) + { + fDelay = BJ_GetDealerTurnDelay() + 0.5f; + string sDealerName = BJ_GetDealerName(oPlayer); + BJ_SetInfoText(oPlayer, nToken, sDealerName + " peeks at their card..."); + + if (BJ_GetHandIsBlackjack(oPlayer, BJ_DEALER_HAND)) + { + if (BJ_GetHandIsBlackjack(oPlayer, BJ_PLAYER_HAND)) + DelayCommand(fDelay, BJ_SetGameState(oPlayer, BJ_GAME_STATE_GAME_OVER, "Push! Nobody wins or loses!", 1.0f)); + else + DelayCommand(fDelay, BJ_SetGameState(oPlayer, BJ_GAME_STATE_GAME_OVER, sDealerName + " has a Blackjack! You lose!", 0.0f)); + + return; + } + } + + if (BJ_GetHandIsBlackjack(oPlayer, BJ_PLAYER_HAND)) + { + if (fDelay > 0.0f) + DelayCommand(fDelay, BJ_SetGameState(oPlayer, BJ_GAME_STATE_GAME_OVER, "Blackjack! You win!", 2.5f)); + else + BJ_SetGameState(oPlayer, BJ_GAME_STATE_GAME_OVER, "Blackjack! You win!", 2.5f); + } + else + { + if (fDelay > 0.0f) + DelayCommand(fDelay, BJ_SetGameState(oPlayer, BJ_GAME_STATE_PLAYER_TURN)); + else + BJ_SetGameState(oPlayer, BJ_GAME_STATE_PLAYER_TURN); + } + + return; + } + } + + if (nCurrentState < BJ_DEAL_CARDS_PEEK) + DelayCommand(BJ_GetDealerTurnDelay(), BJ_HandleDealCards(oPlayer, nToken, ++nCurrentState)); +} + +void BJ_UpdateCards(object oPlayer, int nToken) +{ + int nGameState = BJ_GetGameState(oPlayer); + json jPlayerHand = BJ_GetHand(oPlayer, BJ_PLAYER_HAND); + json jDealerHand = BJ_GetHand(oPlayer, BJ_DEALER_HAND); + + int nCard, nNumCards = JsonGetLength(jPlayerHand); + for (nCard = 0; nCard < nNumCards; nCard++) + { + BJ_SetCard(oPlayer, nToken, BJ_PLAYER_CARD_PREFIX, nCard, BJ_GetCardImage(JsonArrayGet(jPlayerHand, nCard))); + } + + nNumCards = JsonGetLength(jDealerHand); + for (nCard = 0; nCard < nNumCards; nCard++) + { + if (nCard > 0 && (nGameState == BJ_GAME_STATE_DEAL_CARDS || nGameState == BJ_GAME_STATE_PLAYER_TURN)) + BJ_SetCard(oPlayer, nToken, BJ_DEALER_CARD_PREFIX, nCard, BJ_CARD_BACK); + else + BJ_SetCard(oPlayer, nToken, BJ_DEALER_CARD_PREFIX, nCard, BJ_GetCardImage(JsonArrayGet(jDealerHand, nCard))); + } +} + +int BJ_GetCardValue(json jCard) +{ + string sValue = JsonGetString(JsonObjectGet(jCard, "value")); + + if (sValue == "a") + return 11; + else if (sValue == "k" || sValue == "q" || sValue == "j") + return 10; + else + return StringToInt(sValue); +} + +int BJ_GetHandPoints(object oPlayer, string sHand) +{ + int nGameState = BJ_GetGameState(oPlayer); + json jHand = BJ_GetHand(oPlayer, sHand); + + if (sHand == BJ_DEALER_HAND && (nGameState == BJ_GAME_STATE_DEAL_CARDS || nGameState == BJ_GAME_STATE_PLAYER_TURN)) + { + return BJ_GetCardValue(JsonArrayGet(jHand, 0)); + } + + int nPoints = 0, nCard, nNumCards = JsonGetLength(jHand); + for (nCard = 0; nCard < nNumCards; nCard++) + { + nPoints += BJ_GetCardValue(JsonArrayGet(jHand, nCard)); + } + + int nNumAces = BJ_GetHandAces(oPlayer, sHand); + while (nNumAces > 0 && nPoints > BJ_BLACKJACK_VALUE) + { + nPoints -= 10; + nNumAces--; + } + + return nPoints; +} + +void BJ_UpdatePoints(object oPlayer, int nToken) +{ + BJ_SetPlayerPoints(oPlayer, nToken, BJ_GetHandPoints(oPlayer, BJ_PLAYER_HAND)); + BJ_SetDealerPoints(oPlayer, nToken, BJ_GetHandPoints(oPlayer, BJ_DEALER_HAND)); +} + +void BJ_ToggleBetInput(object oPlayer, int nToken, int bVisible) +{ + if (bVisible) + bVisible = GetGold(oPlayer); + + BJ_ToggleButton(oPlayer, BJ_ID_BUTTON_BET, bVisible); + NuiSetBind(oPlayer, nToken, BJ_BIND_BET_AMOUNT_VISIBLE, JsonBool(bVisible)); +} + +int BJ_GetBet(object oPlayer) +{ + return JsonGetInt(JsonObjectGet(BJ_GetUserData(oPlayer), "bet")); +} + +void BJ_SetBet(object oPlayer, int nBet) +{ + BJ_SetUserData(oPlayer, "bet", JsonInt(nBet)); + BJ_SetCurrentBetText(oPlayer, BJ_GetWindowId(oPlayer), "Bet: " + IntToString(nBet)); +} + +void BJ_DeleteBet(object oPlayer) +{ + BJ_DeleteUserData(oPlayer, "bet"); +} + +void BJ_IncreaseBet(object oPlayer, int nIncrease) +{ + BJ_SetBet(oPlayer, BJ_GetBet(oPlayer) + nIncrease); +} + +void BJ_SettleBet(object oPlayer, int nToken, float fMultiplier) +{ + int nBet = BJ_GetBet(oPlayer); + + if (nBet > 0) + { + int nResult = FloatToInt(nBet * fMultiplier); + + if (nResult) + { + BJ_SetGoldResultText(oPlayer, nToken, "Gold: +" + IntToString(nResult)); + GiveGoldToCreature(oPlayer, nResult); + BJ_PlaySound(oPlayer, "it_coins"); + } + else + { + BJ_SetGoldResultText(oPlayer, nToken, "Gold: -" + IntToString(nBet)); + } + } +} + +void BJ_PlaySound(object oPlayer, string sSound) +{ + AssignCommand(oPlayer, PlaySound(sSound)); +} + +int BJ_GetPlayerCanDoubleDown(object oPlayer) +{ + int nBet = BJ_GetBet(oPlayer); + int nHandValue = BJ_GetHandPoints(oPlayer, BJ_PLAYER_HAND); + int nGold = GetGold(oPlayer); + + return nBet > 0 && + nGold >= nBet && + (nHandValue >= BJ_DOUBLE_DOWN_MIN_POINTS && nHandValue <= BJ_DOUBLE_DOWN_MAX_POINTS) && + (BJ_DOUBLE_DOWN_EXCEED_MAX_BET || ((nBet * 2) <= BJ_MAX_BET)); +} + +json BJ_CreateStatsObject() +{ + json jStats = JsonArray(); + jStats = JsonArrayInsert(jStats, JsonInt(0)); + jStats = JsonArrayInsert(jStats, JsonInt(0)); + jStats = JsonArrayInsert(jStats, JsonInt(0)); + jStats = JsonArrayInsert(jStats, JsonInt(0)); + + return jStats; +} + +json BJ_GetStats(object oPlayer) +{ + json jStats = GetCampaignJson("BJ_" + GetPCPublicCDKey(oPlayer, TRUE), BJ_PLAYER_STATS); + return !JsonGetType(jStats) ? BJ_CreateStatsObject() : jStats; +} + +void BJ_SetStats(object oPlayer, json jStats) +{ + SetCampaignJson("BJ_" + GetPCPublicCDKey(oPlayer, TRUE), BJ_PLAYER_STATS, jStats); +} + +void BJ_UpdateStats(object oPlayer, int nType) +{ + json jStats = BJ_GetStats(oPlayer); + jStats = JsonArraySet(jStats, BJ_STATS_TYPE_TOTAL, JsonInt(JsonGetInt(JsonArrayGet(jStats, BJ_STATS_TYPE_TOTAL)) + 1)); + jStats = JsonArraySet(jStats, nType, JsonInt(JsonGetInt(JsonArrayGet(jStats, nType)) + 1)); + BJ_SetStats(oPlayer, jStats); +} + +void BJ_UpdateStatsTooltip(object oPlayer, int nToken) +{ + json jStats = BJ_GetStats(oPlayer); + int nTotal = JsonGetInt(JsonArrayGet(jStats, BJ_STATS_TYPE_TOTAL)); + int nWins = JsonGetInt(JsonArrayGet(jStats, BJ_STATS_TYPE_WINS)); + int nDraws = JsonGetInt(JsonArrayGet(jStats, BJ_STATS_TYPE_DRAWS)); + int nLosses = JsonGetInt(JsonArrayGet(jStats, BJ_STATS_TYPE_LOSSES)); + + string sStats = "Total: 0 | Wins: 0 (0.00%) | Draws: 0 (0.00%) | Losses: 0 (0.00%)"; + + if (nTotal) + { + sStats = "Total: " + IntToString(nTotal) + + " | Wins: " + IntToString(nWins) + " (" + FloatToString((IntToFloat(nWins) / IntToFloat(nTotal)) * 100.0f , 0, 2) + "%)" + + " | Draws: " + IntToString(nDraws) + " (" + FloatToString((IntToFloat(nDraws) / IntToFloat(nTotal)) * 100.0f , 0, 2) + "%)" + + " | Losses: " + IntToString(nLosses) + " (" + FloatToString((IntToFloat(nLosses) / IntToFloat(nTotal)) * 100.0f , 0, 2) + "%)"; + } + + NuiSetBind(oPlayer, nToken, BJ_BIND_STATS_TOOLTIP, JsonString(sStats)); +} + diff --git a/_module/nss/inc_examine.nss b/_module/nss/inc_examine.nss new file mode 100644 index 00000000..2a296480 --- /dev/null +++ b/_module/nss/inc_examine.nss @@ -0,0 +1,494 @@ +/* + Examine NUI Windows + Created By: Daz +*/ + +#include "inc_nui" +#include "inc_util" + +const string EXAMINE_NUI_WINDOW_ID = "EXAMINEWINDOW"; +const string EXAMINE_WINDOW_GEOMETRY_JSON = "EXAMINE_WINDOW_GEOMETRY_JSON"; +const string EXAMINE_GENERIC_WINDOW_JSON = "EXAMINE_GENERIC_WINDOW_JSON"; +const string EXAMINE_ITEM_WINDOW_JSON = "EXAMINE_ITEM_WINDOW_JSON"; + +const string EXAMINE_CURRENT_WINDOW_TYPE = "EXAMINE_CURRENT_WINDOW_TYPE"; +const string EXAMINE_CURRENT_OBJECT = "EXAMINE_CURRENT_OBJECT"; + +const float EXAMINE_GENERIC_WINDOW_WIDTH = 500.0f; +const float EXAMINE_GENERIC_WINDOW_HEIGHT = 255.0f; + +const float EXAMINE_ITEM_WINDOW_WIDTH = 500.0f; +const float EXAMINE_ITEM_WINDOW_HEIGHT = 400.0f; + +void Examine_DisablePanels(object oPlayer); +json Examine_GetWindowJson(int nPanel); +json Examine_GetGenericWindowJson(); +json Examine_GetItemWindowJson(); +float Examine_GetWindowWidth(int nPanel); +float Examine_GetWindowHeight(int nPanel); + +void Examine_HandleGUIEvents(object oPlayer, object oTarget, int nPanel); +void Examine_HandleNUIEvents(object oPlayer, int nToken, string sType, string sElement, int nArrayIndex); + +void Examine_SetData(object oPlayer, int nToken, object oTarget, int nPanel); +void Examine_SetGenericData(object oPlayer, int nToken, object oTarget, int nPanel); +string Examine_GetItemPropertyString(itemproperty ip); +void Examine_SetItemData(object oPlayer, int nToken, object oItem); + + +void Examine_DisablePanels(object oPlayer) +{ + SetGuiPanelDisabled(oPlayer, GUI_PANEL_EXAMINE_CREATURE, TRUE); + SetGuiPanelDisabled(oPlayer, GUI_PANEL_EXAMINE_ITEM, TRUE); + SetGuiPanelDisabled(oPlayer, GUI_PANEL_EXAMINE_PLACEABLE, TRUE); + SetGuiPanelDisabled(oPlayer, GUI_PANEL_EXAMINE_DOOR, TRUE); +} + +json Examine_GetWindowJson(int nPanel) +{ + json jWindow; + switch (nPanel) + { + case GUI_PANEL_EXAMINE_CREATURE: + case GUI_PANEL_EXAMINE_PLACEABLE: + case GUI_PANEL_EXAMINE_DOOR: + jWindow = Examine_GetGenericWindowJson(); + break; + case GUI_PANEL_EXAMINE_ITEM: + jWindow = Examine_GetItemWindowJson(); + break; + } + + return jWindow; +} + +json Examine_GetGenericWindowJson() +{ + json jRoot = GetLocalJson(GetModule(), EXAMINE_GENERIC_WINDOW_JSON); + if (jRoot == JsonNull()) + { + json jCol = JsonArray(), jRow; + jRow = JsonArray(); + { + json jSubCol, jSubRow; + + jSubCol = JsonArray(); + // Image + jSubRow = JsonArray(); + { + json jImage = NuiImage(NuiBind("image_1"), JsonInt(NUI_ASPECT_EXACTSCALED), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_TOP)); + jImage = NuiWidth(jImage, 64.0f); + jImage = NuiHeight(jImage, 100.0f); + jSubRow = JsonArrayInsert(jSubRow, jImage); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + + // Spacer + jSubRow = JsonArray(); + { + jSubRow = JsonArrayInsert(jSubRow, NuiSpacer()); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + jRow = JsonArrayInsert(jRow, NuiCol(jSubCol)); + + jSubCol = JsonArray(); + // Description Label + jSubRow = JsonArray(); + { + json jHeader = NuiHeader(JsonString("Description")); + jSubRow = JsonArrayInsert(jSubRow, jHeader); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + + // Description Text + jSubRow = JsonArray(); + { + json jDescription = NuiText(NuiBind("description")); + jDescription = NuiHeight(jDescription, 160.0f); + jSubRow = JsonArrayInsert(jSubRow, jDescription); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + + // Spacer + jSubRow = JsonArray(); + { + jSubRow = JsonArrayInsert(jSubRow, NuiSpacer()); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + jRow = JsonArrayInsert(jRow, NuiCol(jSubCol)); + } + jCol = NuiInsertRow(jCol, jRow); + + jRoot = NuiCol(jCol); + SetLocalJson(GetModule(), EXAMINE_GENERIC_WINDOW_JSON, jRoot); + } + + return jRoot; +} + +json Examine_GetItemWindowJson() +{ + json jRoot = GetLocalJson(GetModule(), EXAMINE_ITEM_WINDOW_JSON); + if (jRoot == JsonNull()) + { + json jCol = JsonArray(), jRow; + jRow = JsonArray(); + { + json jSubCol, jSubRow; + + jSubCol = JsonArray(); + // Image + jSubRow = JsonArray(); + { + json jImage = NuiImage(NuiBind("image_1"), JsonInt(NUI_ASPECT_EXACTSCALED), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_TOP)); + json jRect = NuiRect(0.0f, 0.0f, 64.0f, 192.0f); + json jDrawList = JsonArray(); + jDrawList = JsonArrayInsert(jDrawList, NuiDrawListImage(NuiBind("complex_item"), NuiBind("image_2"), jRect, JsonInt(NUI_ASPECT_EXACTSCALED), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_TOP))); + jDrawList = JsonArrayInsert(jDrawList, NuiDrawListImage(NuiBind("complex_item"), NuiBind("image_3"), jRect, JsonInt(NUI_ASPECT_EXACTSCALED), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_TOP))); + jImage = NuiDrawList(jImage, JsonBool(TRUE), jDrawList); + jImage = NuiWidth(jImage, 64.0f); + jImage = NuiHeight(jImage, 192.0f); + jSubRow = JsonArrayInsert(jSubRow, jImage); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + + // Button? + jSubRow = JsonArray(); + { + json jButton = NuiButton(JsonString("Button?")); + jButton = NuiId(jButton, "btn_button"); + jButton = NuiWidth(jButton, 64.0f); + jButton = NuiHeight(jButton, 35.0f); + jSubRow = JsonArrayInsert(jSubRow, jButton); + } + //jSubCol = NuiInsertRow(jSubCol, jSubRow); + + // Spacer + jSubRow = JsonArray(); + { + jSubRow = JsonArrayInsert(jSubRow, NuiSpacer()); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + jRow = JsonArrayInsert(jRow, NuiCol(jSubCol)); + + jSubCol = JsonArray(); + // Description Label + jSubRow = JsonArray(); + { + json jHeader = NuiHeader(JsonString("Description")); + jSubRow = JsonArrayInsert(jSubRow, jHeader); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + + // Description Text + jSubRow = JsonArray(); + { + json jDescription = NuiText(NuiBind("description")); + jDescription = NuiHeight(jDescription, 160.0f); + jSubRow = JsonArrayInsert(jSubRow, jDescription); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + + // Item Properties Label + jSubRow = JsonArray(); + { + json jHeader = NuiHeader(JsonString("Item Properties")); + jSubRow = JsonArrayInsert(jSubRow, jHeader); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + + // Item Properties List + jSubRow = JsonArray(); + { + json jListTemplate = JsonArray(); + { + json jLabel = NuiLabel(NuiBind("property"), JsonInt(NUI_HALIGN_LEFT), JsonInt(NUI_VALIGN_MIDDLE)); + jLabel = NuiStyleForegroundColor(jLabel, NuiBind("color")); + jListTemplate = JsonArrayInsert(jListTemplate, NuiListTemplateCell(jLabel, 0.0f, TRUE)); + } + json jList = NuiList(jListTemplate, NuiBind("property"), 16.0f); + jList = NuiHeight(jList, 105.0f); + jSubRow = JsonArrayInsert(jSubRow, jList); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + + // Spacer + jSubRow = JsonArray(); + { + jSubRow = JsonArrayInsert(jSubRow, NuiSpacer()); + } + jSubCol = NuiInsertRow(jSubCol, jSubRow); + jRow = JsonArrayInsert(jRow, NuiCol(jSubCol)); + } + jCol = NuiInsertRow(jCol, jRow); + + jRoot = NuiCol(jCol); + SetLocalJson(GetModule(), EXAMINE_ITEM_WINDOW_JSON, jRoot); + } + + return jRoot; +} + +float Examine_GetWindowWidth(int nPanel) +{ + float fWidth; + switch (nPanel) + { + case GUI_PANEL_EXAMINE_CREATURE: + case GUI_PANEL_EXAMINE_PLACEABLE: + case GUI_PANEL_EXAMINE_DOOR: + fWidth = EXAMINE_GENERIC_WINDOW_WIDTH; + break; + case GUI_PANEL_EXAMINE_ITEM: + fWidth = EXAMINE_ITEM_WINDOW_WIDTH; + break; + } + + return fWidth; +} + +float Examine_GetWindowHeight(int nPanel) +{ + float fHeight; + switch (nPanel) + { + case GUI_PANEL_EXAMINE_CREATURE: + case GUI_PANEL_EXAMINE_PLACEABLE: + case GUI_PANEL_EXAMINE_DOOR: + fHeight = EXAMINE_GENERIC_WINDOW_HEIGHT; + break; + case GUI_PANEL_EXAMINE_ITEM: + fHeight = EXAMINE_ITEM_WINDOW_HEIGHT; + break; + } + + return fHeight; +} + +void Examine_HandleGUIEvents(object oPlayer, object oTarget, int nPanel) +{ + json jGeometry = GetLocalJson(oPlayer, EXAMINE_WINDOW_GEOMETRY_JSON); + + int nToken = NuiFindWindow(oPlayer, EXAMINE_NUI_WINDOW_ID); + if (nToken) + { + if (GetLocalObject(oPlayer, EXAMINE_CURRENT_OBJECT) == oTarget) + return; + + int bIsItemExamine = nPanel == GUI_PANEL_EXAMINE_ITEM; + int nCurrentWindowType = GetLocalInt(oPlayer, EXAMINE_CURRENT_WINDOW_TYPE); + + if (bIsItemExamine && nCurrentWindowType != GUI_PANEL_EXAMINE_ITEM) + { + NuiSetGroupLayout(oPlayer, nToken, NUI_WINDOW_ROOT_GROUP, Examine_GetWindowJson(nPanel)); + NuiSetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, NuiSetRectHeight(jGeometry, Examine_GetWindowHeight(nPanel))); + } + else if (!bIsItemExamine && nCurrentWindowType == GUI_PANEL_EXAMINE_ITEM) + { + NuiSetGroupLayout(oPlayer, nToken, NUI_WINDOW_ROOT_GROUP, Examine_GetWindowJson(nPanel)); + NuiSetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, NuiSetRectHeight(jGeometry, Examine_GetWindowHeight(nPanel))); + } + + Examine_SetData(oPlayer, nToken, oTarget, nPanel); + + SetLocalInt(oPlayer, EXAMINE_CURRENT_WINDOW_TYPE, nPanel); + SetLocalObject(oPlayer, EXAMINE_CURRENT_OBJECT, oTarget); + + return; + } + + json jRoot = Examine_GetWindowJson(nPanel); + json jWindow = NuiWindow(jRoot, NuiBind(NUI_WINDOW_TITLE_BIND), NuiBind(NUI_WINDOW_GEOMETRY_BIND), JsonBool(FALSE), JsonNull(), JsonBool(TRUE), JsonBool(FALSE), JsonBool(TRUE)); + + float fWidth = Examine_GetWindowWidth(nPanel); + float fHeight = Examine_GetWindowHeight(nPanel); + + if (jGeometry == JsonNull()) + jGeometry = NuiGetCenteredGeometryRect(oPlayer, fWidth, fHeight); + else + { + jGeometry = NuiSetRectWidth(jGeometry, fWidth); + jGeometry = NuiSetRectHeight(jGeometry, fHeight); + } + + nToken = NuiCreate(oPlayer, jWindow, EXAMINE_NUI_WINDOW_ID); + + NuiSetBindWatch(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, TRUE); + NuiSetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, jGeometry); + + Examine_SetData(oPlayer, nToken, oTarget, nPanel); + + SetLocalInt(oPlayer, EXAMINE_CURRENT_WINDOW_TYPE, nPanel); + SetLocalObject(oPlayer, EXAMINE_CURRENT_OBJECT, oTarget); +} + +void Examine_HandleNUIEvents(object oPlayer, int nToken, string sType, string sElement, int nArrayIndex) +{ + if (sType == NUI_EVENT_CLOSE) + { + DeleteLocalInt(oPlayer, EXAMINE_CURRENT_WINDOW_TYPE); + DeleteLocalObject(oPlayer, EXAMINE_CURRENT_OBJECT); + } + else if (sType == NUI_EVENT_WATCH) + { + if (sElement == NUI_WINDOW_GEOMETRY_BIND) + { + SetLocalJson(oPlayer, EXAMINE_WINDOW_GEOMETRY_JSON, NuiGetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND)); + } + } +} + +int Examine_HandleIdentifyItem(object oPlayer, object oItem) +{ + int bIdentified = GetIdentified(oItem); + + if (!bIdentified) + { + int nIdentifySkillRank = GetSkillRank(SKILL_LORE, oPlayer); + + if (nIdentifySkillRank < 0) + return FALSE; + if (nIdentifySkillRank > 55) + { + SetIdentified(oItem, TRUE); + return TRUE; + } + + int nMaxItemGPValue = StringToInt(Get2DAString("skillvsitemcost", "DeviceCostMax", nIdentifySkillRank)); + + SetIdentified(oItem, TRUE); + bIdentified = GetGoldPieceValue(oItem) <= nMaxItemGPValue; + SetIdentified(oItem, bIdentified); + } + + return bIdentified; +} + +void Examine_SetData(object oPlayer, int nToken, object oTarget, int nPanel) +{ + Examine_SetGenericData(oPlayer, nToken, oTarget, nPanel); + + if (nPanel == GUI_PANEL_EXAMINE_ITEM) + Examine_SetItemData(oPlayer, nToken, oTarget); +} + +void Examine_SetGenericData(object oPlayer, int nToken, object oTarget, int nPanel) +{ + string sTitle, sDescription; + json jImage1, jImage2, jImage3; + int bComplexItem = FALSE; + switch (nPanel) + { + case GUI_PANEL_EXAMINE_CREATURE: + case GUI_PANEL_EXAMINE_PLACEABLE: + case GUI_PANEL_EXAMINE_DOOR: + { + sTitle = GetName(oTarget); + jImage1 = JsonString(GetPortraitResRef(oTarget) + "m"); + sDescription = GetDescription(oTarget); + break; + } + + case GUI_PANEL_EXAMINE_ITEM: + { + int bIdentified = Examine_HandleIdentifyItem(oPlayer, oTarget); + int nBaseItemType = GetBaseItemType(oTarget); + sTitle = Util_GetItemName(oTarget, bIdentified); + + json jItem = ObjectToJson(oTarget); + json jComplexIconData = Util_GetComplexIconData(jItem, nBaseItemType); + + if (JsonGetType(jComplexIconData)) + { + jImage1 = JsonObjectGet(jComplexIconData, "bottom"); + jImage2 = JsonObjectGet(jComplexIconData, "middle"); + jImage3 = JsonObjectGet(jComplexIconData, "top"); + bComplexItem = TRUE; + } + else + { + jImage1 = JsonString(Util_GetIconResref(oTarget, jItem, nBaseItemType)); + } + + sDescription = GetDescription(oTarget, FALSE, bIdentified); + + int nStatsStrRef = StringToInt(Get2DAString("baseitems", "BaseItemStatRef", nBaseItemType)); + if (nStatsStrRef) + { + sDescription += "\n\n" + GetStringByStrRef(nStatsStrRef); + } + break; + } + } + + NuiSetBind(oPlayer, nToken, NUI_WINDOW_TITLE_BIND, JsonString(sTitle)); + NuiSetBind(oPlayer, nToken, "image_1", jImage1); + + if (bComplexItem) + { + NuiSetBind(oPlayer, nToken, "image_2", jImage2); + NuiSetBind(oPlayer, nToken, "image_3", jImage3); + } + + NuiSetBind(oPlayer, nToken, "complex_item", JsonBool(bComplexItem)); + NuiSetBind(oPlayer, nToken, "description", JsonString(sDescription)); +} + +string Examine_GetItemPropertyString(itemproperty ip) +{ + int nType = GetItemPropertyType(ip); + string sName = GetStringByStrRef(StringToInt(Get2DAString("itempropdef", "GameStrRef", nType))); + + int nSubType = GetItemPropertySubType(ip); + if(nSubType != -1) + { + string sSubTypeResRef = Get2DAString("itempropdef", "SubTypeResRef", nType); + int nStrRef = StringToInt(Get2DAString(sSubTypeResRef, "Name", nSubType)); + if(nStrRef) + sName += " " + GetStringByStrRef(nStrRef); + } + + int nParam1 = GetItemPropertyParam1(ip); + if(nParam1 != -1) + { + string sParamResRef = Get2DAString("iprp_paramtable", "TableResRef", nParam1); + string sSubTypeResRef = Get2DAString("itempropdef", "SubTypeResRef", nType); + string sTableResRef = Get2DAString(sSubTypeResRef, "TableResRef", nParam1); + int nStrRef = StringToInt(Get2DAString(sParamResRef, "Name", GetItemPropertyParam1Value(ip))); + if(nStrRef) + sName += " " + GetStringByStrRef(nStrRef); + } + + int nCostTable = GetItemPropertyCostTable(ip); + if(nCostTable != -1) + { + string sCostTableResRef = Get2DAString("iprp_costtable", "Name", nCostTable); + int nStrRef = StringToInt(Get2DAString(sCostTableResRef, "Name", GetItemPropertyCostTableValue(ip))); + if(nStrRef) + sName += " " + GetStringByStrRef(nStrRef); + } + + return sName; +} + +void Examine_SetItemData(object oPlayer, int nToken, object oItem) +{ + int bIdentified = GetIdentified(oItem); + json jProperties = JsonArray(); + json jColors = JsonArray(); + + if (bIdentified) + { + itemproperty ip = GetFirstItemProperty(oItem); + while (GetIsItemPropertyValid(ip)) + { + jProperties = JsonArrayInsert(jProperties, JsonString(Examine_GetItemPropertyString(ip))); + jColors = JsonArrayInsert(jColors, GetItemPropertyDurationType(ip) == DURATION_TYPE_TEMPORARY ? NuiColor(0, 0, 255) : NuiColor(255, 255, 255)); + ip = GetNextItemProperty(oItem); + } + } + + NuiSetBind(oPlayer, nToken, "property", jProperties); + NuiSetBind(oPlayer, nToken, "color", jColors); +} + diff --git a/_module/nss/inc_gennui.nss b/_module/nss/inc_gennui.nss new file mode 100644 index 00000000..a77ac8e4 --- /dev/null +++ b/_module/nss/inc_gennui.nss @@ -0,0 +1,300 @@ +/* + Generic NUI Windows + Created By: Daz +*/ + +#include "inc_nui" + +const string GNW_WINDOW_PREFIX = "GNW"; +const string GNW_OK_CANCEL_WINDOW = "OKCANCEL"; +const string GNW_OPTIONS_WINDOW = "OPTIONS"; +const string GNW_INFO_WINDOW = "INFO"; +const string GNW_MENU_WINDOW = "MENU"; + +// Call this in your EVENT_SCRIPT_MODULE_ON_NUI_EVENT script +void GNW_HandleNUIEvents(); +void GNW_ShowOkCancelWindow(object oPlayer, string sText, string sOkAction, string sCancelAction); +json GNW_AddOption(json jOptions, string sLabel, string sVarName, object oTarget); +void GNW_ShowOptionsWindow(object oPlayer, string sTitle, json jOptions); +void GNW_ShowInfoWindow(object oPlayer, string sTitle, string sText); + +void GNW_HandleNUIEvents() +{ + object oPlayer = NuiGetEventPlayer(); + int nToken = NuiGetEventWindow(); + string sWindowId = NuiGetWindowId(oPlayer, nToken); + + if (GetStringLeft(sWindowId, GetStringLength(GNW_WINDOW_PREFIX)) != GNW_WINDOW_PREFIX) + return; + + string sType = NuiGetEventType(); + string sElement = NuiGetEventElement(); + + if (sWindowId == GNW_WINDOW_PREFIX + GNW_OK_CANCEL_WINDOW) + { + if (sType == "click") + { + if (sElement == "btn_ok") + { + ExecuteScriptChunk(GetLocalString(oPlayer, GNW_WINDOW_PREFIX + GNW_OK_CANCEL_WINDOW + "_OKACTION"), oPlayer); + NuiDestroy(oPlayer, nToken); + } + else if (sElement == "btn_cancel") + { + ExecuteScriptChunk(GetLocalString(oPlayer, GNW_WINDOW_PREFIX + GNW_OK_CANCEL_WINDOW + "_CANCELACTION"), oPlayer); + NuiDestroy(oPlayer, nToken); + } + } + else if (sType == "close") + { + ExecuteScriptChunk(GetLocalString(oPlayer, GNW_WINDOW_PREFIX + GNW_OK_CANCEL_WINDOW + "_CANCELACTION"), oPlayer); + } + } + else if (sWindowId == GNW_WINDOW_PREFIX + GNW_OPTIONS_WINDOW) + { + if (sType == "click") + { + if (sElement == "btn_ok") + { + NuiDestroy(oPlayer, nToken); + } + } + else if (sType == "watch") + { + json jOptions = GetLocalJson(oPlayer, GNW_WINDOW_PREFIX + GNW_OPTIONS_WINDOW); + json jChecked = NuiGetBind(oPlayer, nToken, "checked"); + int nOption, nNumOptions = JsonGetLength(jOptions); + + for (nOption = 0; nOption < nNumOptions; nOption++) + { + json jOption = JsonArrayGet(jOptions, nOption); + string sVarName = JsonGetString(JsonObjectGet(jOption, "varname")); + object oTarget = StringToObject(JsonGetString(JsonObjectGet(jOption, "target"))); + int bCurrentValue = GetLocalInt(oTarget, sVarName); + int bNewValue = JsonGetInt(JsonArrayGet(jChecked, nOption)); + + if (bCurrentValue != bNewValue) + { + SetLocalInt(oTarget, sVarName, bNewValue); + SendMessageToPC(oPlayer, "Setting '" + sVarName + "' on " + GetName(oTarget) + " to " + IntToString(bNewValue)); + } + } + } + } + else if (sWindowId == GNW_WINDOW_PREFIX + GNW_INFO_WINDOW) + { + if (sType == "click") + { + if (sElement == "btn_ok") + { + NuiDestroy(oPlayer, nToken); + } + } + } + else if (sWindowId == GNW_WINDOW_PREFIX + GNW_MENU_WINDOW) + { + if (sType == "click") + { + if (sElement == "btn_menu") + { + int bSelected = JsonGetInt(NuiGetBind(oPlayer, nToken, "btn_menu")); + + SendMessageToPC(oPlayer, "Menu: " + (bSelected ? "Open" : "Close")); + } + } + } + +} + +void GNW_ShowOkCancelWindow(object oPlayer, string sText, string sOkAction, string sCancelAction) +{ + object oModule = GetModule(); + json jWindow = GetLocalJson(oModule, GNW_WINDOW_PREFIX + GNW_OK_CANCEL_WINDOW); + if (jWindow == JsonNull()) + { + json jCol; + json jRow; + + jCol = JsonArray(); + + jRow = JsonArray(); + { + json jText = NuiText(NuiBind("text")); + jRow = JsonArrayInsert(jRow, jText); + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + jRow = JsonArray(); + { + json jButtonCancel = NuiButton(JsonString("Cancel")); + jButtonCancel = NuiId(jButtonCancel, "btn_cancel"); + jButtonCancel = NuiWidth(jButtonCancel, 100.0f); + jButtonCancel = NuiHeight(jButtonCancel, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonCancel); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jButtonOK = NuiButton(JsonString("OK")); + jButtonOK = NuiId(jButtonOK, "btn_ok"); + jButtonOK = NuiWidth(jButtonOK, 100.0f); + jButtonOK = NuiHeight(jButtonOK, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonOK); + + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + json jRoot = NuiCol(jCol); + jWindow = NuiWindow(jRoot, JsonBool(FALSE), NuiRect(-1.0f, -1.0f, 400.0f, 200.0f), JsonBool(FALSE), JsonBool(FALSE), JsonBool(FALSE), JsonBool(FALSE), JsonBool(TRUE)); + SetLocalJson(oModule, GNW_WINDOW_PREFIX + GNW_OK_CANCEL_WINDOW, jWindow); + } + + int nToken = NuiCreate(oPlayer, jWindow, GNW_WINDOW_PREFIX + GNW_OK_CANCEL_WINDOW); + + NuiSetBind(oPlayer, nToken, "text", JsonString(sText)); + SetLocalString(oPlayer, GNW_WINDOW_PREFIX + GNW_OK_CANCEL_WINDOW + "_OKACTION", sOkAction); + SetLocalString(oPlayer, GNW_WINDOW_PREFIX + GNW_OK_CANCEL_WINDOW + "_CANCELACTION", sCancelAction); +} + +json GNW_AddOption(json jOptions, string sLabel, string sVarName, object oTarget) +{ + json jOption = JsonObject(); + jOption = JsonObjectSet(jOption, "label", JsonString(sLabel)); + jOption = JsonObjectSet(jOption, "varname", JsonString(sVarName)); + jOption = JsonObjectSet(jOption, "target", JsonString(ObjectToString(oTarget))); + return JsonArrayInsert(jOptions, jOption); +} + +void GNW_ShowOptionsWindow(object oPlayer, string sTitle, json jOptions) +{ + object oModule = GetModule(); + json jWindow = GetLocalJson(oModule, GNW_WINDOW_PREFIX + GNW_OPTIONS_WINDOW); + if (jWindow == JsonNull()) + { + json jCol; + json jRow; + + jCol = JsonArray(); + + jRow = JsonArray(); + { + json jListTemplate = JsonArray(); + { + json jCheck = NuiCheck(NuiBind("labels"), NuiBind("checked")); + jListTemplate = JsonArrayInsert(jListTemplate, NuiListTemplateCell(jCheck, 0.0f, TRUE)); + } + jRow = JsonArrayInsert(jRow, NuiList(jListTemplate, NuiBind("checked"), 15.0f)); + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiSpacer()); + json jButtonOK = NuiButton(JsonString("OK")); + jButtonOK = NuiId(jButtonOK, "btn_ok"); + jButtonOK = NuiWidth(jButtonOK, 100.0f); + jButtonOK = NuiHeight(jButtonOK, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonOK); + + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + json jRoot = NuiCol(jCol); + jWindow = NuiWindow(jRoot, NuiBind("title"), NuiRect(-1.0f, -1.0f, 350.0f, 300.0f), JsonBool(FALSE), JsonNull(), JsonBool(TRUE), JsonBool(FALSE), JsonBool(TRUE)); + SetLocalJson(oModule, GNW_WINDOW_PREFIX + GNW_OPTIONS_WINDOW, jWindow); + } + + int nToken = NuiCreate(oPlayer, jWindow, GNW_WINDOW_PREFIX + GNW_OPTIONS_WINDOW); + + SetLocalJson(oPlayer, GNW_WINDOW_PREFIX + GNW_OPTIONS_WINDOW, jOptions); + NuiSetBind(oPlayer, nToken, "title", JsonString(sTitle)); + + json jLabels = JsonArray(); + json jChecked = JsonArray(); + int nOption, nNumOptions = JsonGetLength(jOptions); + for (nOption = 0; nOption < nNumOptions; nOption++) + { + json jOption = JsonArrayGet(jOptions, nOption); + json jLabel = JsonObjectGet(jOption, "label"); + string sVarName = JsonGetString(JsonObjectGet(jOption, "varname")); + object oTarget = StringToObject(JsonGetString(JsonObjectGet(jOption, "target"))); + + jLabels = JsonArrayInsert(jLabels, jLabel); + jChecked = JsonArrayInsert(jChecked, JsonBool(GetLocalInt(oTarget, sVarName))); + } + + NuiSetBind(oPlayer, nToken, "labels", jLabels); + NuiSetBind(oPlayer, nToken, "checked", jChecked); + NuiSetBindWatch(oPlayer, nToken, "checked", TRUE); +} + +void GNW_ShowInfoWindow(object oPlayer, string sTitle, string sText) +{ + object oModule = GetModule(); + json jWindow = GetLocalJson(oModule, GNW_WINDOW_PREFIX + GNW_INFO_WINDOW); + if (jWindow == JsonNull()) + { + json jCol; + json jRow; + + jCol = JsonArray(); + + jRow = JsonArray(); + { + json jText = NuiText(NuiBind("text")); + jRow = JsonArrayInsert(jRow, jText); + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jButtonOK = NuiButton(JsonString("OK")); + jButtonOK = NuiId(jButtonOK, "btn_ok"); + jButtonOK = NuiWidth(jButtonOK, 100.0f); + jButtonOK = NuiHeight(jButtonOK, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonOK); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + json jRoot = NuiCol(jCol); + jWindow = NuiWindow(jRoot, NuiBind("title"), NuiRect(-1.0f, -1.0f, 400.0f, 200.0f), JsonBool(FALSE), JsonNull(), JsonBool(TRUE), JsonBool(FALSE), JsonBool(TRUE)); + SetLocalJson(oModule, GNW_WINDOW_PREFIX + GNW_INFO_WINDOW, jWindow); + } + + int nToken = NuiCreate(oPlayer, jWindow, GNW_WINDOW_PREFIX + GNW_INFO_WINDOW); + + NuiSetBind(oPlayer, nToken, "title", JsonString(sTitle)); + NuiSetBind(oPlayer, nToken, "text", JsonString(sText)); +} + + +void GNW_ShowMenuButton(object oPlayer) +{ + object oModule = GetModule(); + json jWindow = GetLocalJson(oModule, GNW_WINDOW_PREFIX + GNW_MENU_WINDOW); + if (jWindow == JsonNull()) + { + json jButton = NuiButtonSelect(JsonString("Menu"), NuiBind("btn_menu")); + jButton = NuiId(jButton, "btn_menu"); + jButton = NuiMargin(jButton, 0.0f); + jButton = NuiWidth(jButton, 72.0f); + jButton = NuiHeight(jButton, 28.0f); + jButton = NuiGroup(jButton, FALSE, NUI_SCROLLBARS_NONE); + jButton = NuiMargin(jButton, 0.0f); + + jWindow = NuiWindow(jButton, JsonBool(FALSE), NuiBind(NUI_WINDOW_GEOMETRY_BIND), JsonBool(FALSE), JsonBool(FALSE), JsonBool(FALSE), JsonBool(TRUE), JsonBool(FALSE)); + SetLocalJson(oModule, GNW_WINDOW_PREFIX + GNW_INFO_WINDOW, jWindow); + } + + int nToken = NuiCreate(oPlayer, jWindow, GNW_WINDOW_PREFIX + GNW_MENU_WINDOW); + + float fGuiScale = IntToFloat(GetPlayerDeviceProperty(oPlayer, PLAYER_DEVICE_PROPERTY_GUI_SCALE)) / 100.0f; + float fX = IntToFloat(GetPlayerDeviceProperty(oPlayer, PLAYER_DEVICE_PROPERTY_GUI_WIDTH)) - (80.0f * fGuiScale); + float fY = IntToFloat(GetPlayerDeviceProperty(oPlayer, PLAYER_DEVICE_PROPERTY_GUI_HEIGHT)) - (166.0f * fGuiScale); + + NuiSetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, NuiRect(fX, fY, 80.0f, 36.0f)); +} + diff --git a/_module/nss/inc_nui.nss b/_module/nss/inc_nui.nss new file mode 100644 index 00000000..9a7264ae --- /dev/null +++ b/_module/nss/inc_nui.nss @@ -0,0 +1,68 @@ +/* + Various NUI Helpers + Created By: Daz +*/ + +#include "nw_inc_nui" + +const string NUI_WINDOW_ROOT_GROUP = "_window_"; + +const string NUI_WINDOW_TITLE_BIND = "wd_title"; +const string NUI_WINDOW_GEOMETRY_BIND = "wd_geometry"; + +const string NUI_EVENT_OPEN = "open"; +const string NUI_EVENT_CLOSE = "close"; +const string NUI_EVENT_CLICK = "click"; +const string NUI_EVENT_WATCH = "watch"; +const string NUI_EVENT_MOUSEDOWN = "mousedown"; +const string NUI_EVENT_MOUSEUP = "mouseup"; +const string NUI_EVENT_MOUSESCROLL = "mousescroll"; + +json NuiGetCenteredGeometryRect(object oPlayer, float fWindowWidth, float fWindowHeight); +json NuiSetRectWidth(json jRect, float fWidth); +json NuiSetRectHeight(json jRect, float fHeight); +json NuiInsertRow(json jCol, json jRow); +json NuiHeader(json jHeader, float fHeight = 24.0f, float fWidth = 0.0f); +float NuiGetMouseScrollDelta(json jPayload); + +json NuiGetCenteredGeometryRect(object oPlayer, float fWindowWidth, float fWindowHeight) +{ + float fGuiScale = IntToFloat(GetPlayerDeviceProperty(oPlayer, PLAYER_DEVICE_PROPERTY_GUI_SCALE)) / 100.0f; + + float fX = IntToFloat(GetPlayerDeviceProperty(oPlayer, PLAYER_DEVICE_PROPERTY_GUI_WIDTH) / 2) - ((fWindowWidth * 0.5f) * fGuiScale); + float fY = IntToFloat(GetPlayerDeviceProperty(oPlayer, PLAYER_DEVICE_PROPERTY_GUI_HEIGHT) / 2) - ((fWindowHeight * 0.5f) * fGuiScale); + + return NuiRect(fX, fY, fWindowWidth, fWindowHeight); +} + +json NuiSetRectWidth(json jRect, float fWidth) +{ + return JsonObjectSet(jRect, "w", JsonFloat(fWidth)); +} + +json NuiSetRectHeight(json jRect, float fHeight) +{ + return JsonObjectSet(jRect, "h", JsonFloat(fHeight)); +} + +json NuiInsertRow(json jCol, json jRow) +{ + return JsonArrayInsert(jCol, NuiRow(jRow)); +} + +json NuiHeader(json jHeader, float fHeight = 24.0f, float fWidth = 0.0f) +{ + json jLabel = NuiLabel(jHeader, JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_MIDDLE)); + jLabel = NuiGroup(jLabel, TRUE, NUI_SCROLLBARS_NONE); + jLabel = NuiHeight(jLabel, fHeight); + + if (fWidth > 0.0f) + jLabel = NuiWidth(jLabel, fWidth); + + return jLabel; +} + +float NuiGetMouseScrollDelta(json jPayload) +{ + return JsonGetFloat(JsonObjectGet(JsonObjectGet(jPayload, "mouse_scroll"), "y")); +} diff --git a/_module/nss/inc_perchest.nss b/_module/nss/inc_perchest.nss new file mode 100644 index 00000000..28f65cca --- /dev/null +++ b/_module/nss/inc_perchest.nss @@ -0,0 +1,561 @@ +/* + NUI Persistent Chest System + Created By: Daz +*/ + +#include "inc_nui" +#include "inc_util" + +//void main (){} + +const string PC_NUI_WINDOW_ID = "PCWINDOW"; +const string PC_NUI_GOLD_WINDOW_ID = "PCGOLDWINDOW"; +const string PC_UUID_ARRAY = "PC_UUID_ARRAY"; +const string PC_WINDOW_JSON = "PC_WINDOW_JSON"; +const string PC_GOLD_WINDOW_JSON = "PC_GOLD_WINDOW_JSON"; +const string PC_TARGETING_MODE = "PC_TARGETING_MODE"; +const string PC_GEOMETRY_JSON = "PC_GEOMETRY_JSON"; +const string PC_SEARCH_STRING = "PC_SEARCH_STRING"; + +const int PC_MAX_ITEMS = 500; // The max number of items a player can store in their chest +const int PC_ITEM_WITHDRAW_BATCH = 5; // How many items to deserialize at the same time +const float PC_ITEM_WITHDRAW_DELAY = 0.25f; // The delay between deserialization batches +const int PC_USE_SEARCH_BUTTON = FALSE; // Set to true to use a Search button instead of searching on text change +const int PC_SAVE_ITEM_OBJECT_STATE = TRUE; // Save local variables / temporary itemproperties when serializing items +const int PC_OPEN_INVENTORY_WINDOW = TRUE; // Open the inventory when opening a persistent chest + +string PC_GetDatabaseName(object oPlayer); +string PC_GetTableName(object oPlayer); +void PC_InitializeDatabase(object oPlayer); +void PC_CreateNUIWindow(object oPlayer, int bOpenInventory = PC_OPEN_INVENTORY_WINDOW); +void PC_EnterDepositMode(object oPlayer); +void PC_HandleNUIEvents(object oPlayer, string sWindowId, int nToken, string sType, string sElement, int nArrayIndex); +int PC_GetStoredItemAmount(object oPlayer); +void PC_HandleDepositEvent(object oPlayer, object oItem, vector vPosition); +void PC_UpdateItemList(object oPlayer, int nToken); +void PC_WithdrawItems(object oPlayer, int nToken); + +int PC_GetStoredGold(object oPlayer); +void PC_SetStoredGold(object oPlayer, int nGold); +void PC_ModifyStoredGold(object oPlayer, int nAmount); +void PC_UpdateGoldData(object oPlayer, int nToken); +void PC_CreateNUIGoldWindow(object oPlayer); + +string PC_GetDatabaseName(object oPlayer) +{ + return "PC_" + GetPCPublicCDKey(oPlayer, TRUE); +} + +string PC_GetTableName(object oPlayer) +{ + return "PC_ITEMS"; +} + +void PC_InitializeDatabase(object oPlayer) +{// Boring database stuff + string sDatabase = PC_GetDatabaseName(oPlayer); + string sTable = PC_GetTableName(oPlayer); + string sQuery = "SELECT name FROM sqlite_master WHERE type='table' AND name=@table;"; + sqlquery sql = SqlPrepareQueryCampaign(sDatabase, sQuery); + SqlBindString(sql, "@table", sTable); + + if (!SqlStep(sql)) + { + string sQuery = "CREATE TABLE IF NOT EXISTS " + sTable + " (" + + "item_uuid TEXT NOT NULL, " + + "item_name TEXT NOT NULL, " + + "item_baseitem INTEGER NOT NULL, " + + "item_stacksize INTEGER NOT NULL, " + + "item_iconresref TEXT NOT NULL, " + + "item_data TEXT_NOT NULL, " + + "PRIMARY KEY(item_uuid));"; + sqlquery sql = SqlPrepareQueryCampaign(sDatabase, sQuery); + SqlStep(sql); + } +} + +void PC_CreateNUIWindow(object oPlayer, int bOpenInventory = PC_OPEN_INVENTORY_WINDOW) +{ + if (NuiFindWindow(oPlayer, PC_NUI_WINDOW_ID)) + return;// Don't re-open the window if it is already open + + PC_InitializeDatabase(oPlayer); + + json jWindow = GetLocalJson(GetModule(), PC_WINDOW_JSON); + if (jWindow == JsonNull()) + {// For efficiency, we only build the window json once and store it in a local json on the module + json jCol;// Our main column to hold all the rows + json jRow;// A reusable row + + jCol = JsonArray();// Create an array to hold our rows + + jRow = JsonArray();// Create an array to hold our row elements + {// Our first row only has a progress bar to indicate the amount of items stored + json jProgress = NuiProgress(NuiBind("progress"));// The actual progress of the progress bar is bound to 'progress' + jProgress = NuiTooltip(jProgress, NuiBind("progress_tooltip"));// Here we add a tooltip and its bind to update it + jRow = JsonArrayInsert(jRow, jProgress); + + json jButtonGold = NuiButtonImage(JsonString("iit_gold_001")); + jButtonGold = NuiTooltip(jButtonGold, NuiBind("gold_tooltip")); + jButtonGold = NuiId(jButtonGold, "btn_gold"); + jButtonGold = NuiWidth(jButtonGold, 35.0f); + jButtonGold = NuiHeight(jButtonGold, 35.0f); + //jRow = JsonArrayInsert(jRow, jButtonGold); + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow));// Add the row to the column + + jRow = JsonArray(); + {// The second row has the search bar, a clear button, and if enabled, a search button + json jSearch = NuiTextEdit(JsonString("Search..."), NuiBind("search"), 64, FALSE);// A simple search bar, we bind whatever the user types to 'search' + jRow = JsonArrayInsert(jRow, jSearch); + + json jClearButton = NuiButton(JsonString("X")); + jClearButton = NuiId(jClearButton, "btn_clear");// We give the button an id so we can get its click event + jClearButton = NuiEnabled(jClearButton, NuiBind("btn_clear"));// Here we enable the enabling or disabling of the button.. :D bound to 'btn_clear' + jClearButton = NuiWidth(jClearButton, 35.0f);// Width... + jClearButton = NuiHeight(jClearButton, 35.0f);// Height... + jRow = JsonArrayInsert(jRow, jClearButton); + + if (PC_USE_SEARCH_BUTTON) + { + json jSearchButton = NuiButton(JsonString("Search")); + jSearchButton = NuiId(jSearchButton, "btn_search"); + jSearchButton = NuiWidth(jSearchButton, 100.0f); + jSearchButton = NuiHeight(jSearchButton, 35.0f); + jRow = JsonArrayInsert(jRow, jSearchButton); + } + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + jRow = JsonArray(); + {// The third row has the item list, here we also create the template for every list item to use + json jListTemplate = JsonArray(); + { + json jImage = NuiImage(NuiBind("icons"), JsonInt(NUI_ASPECT_FIT100), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_TOP)); + jImage = NuiMargin(jImage, 0.0f); + jImage = NuiTooltip(jImage, NuiBind("tooltips")); + jImage = NuiGroup(jImage, TRUE, NUI_SCROLLBARS_NONE); + jListTemplate = JsonArrayInsert(jListTemplate, NuiListTemplateCell(jImage, 32.0f, FALSE)); + + json jCheck = NuiCheck(NuiBind("names"), NuiBind("selected")); + jListTemplate = JsonArrayInsert(jListTemplate, NuiListTemplateCell(jCheck, 0.0f, TRUE)); + } + json jList = NuiList(jListTemplate, NuiBind("icons"), 32.0f); + jRow = JsonArrayInsert(jRow, jList); + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + jRow = JsonArray(); + {// The final row has a bunch of buttons, exciting + json jButtonWithdraw = NuiButton(JsonString("Withdraw")); + jButtonWithdraw = NuiId(jButtonWithdraw, "btn_withdraw"); + jButtonWithdraw = NuiEnabled(jButtonWithdraw, NuiBind("btn_withdraw")); + jButtonWithdraw = NuiWidth(jButtonWithdraw, 100.0f); + jButtonWithdraw = NuiHeight(jButtonWithdraw, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonWithdraw); + + json jButtonDeposit = NuiButton(JsonString("Deposit")); + jButtonDeposit = NuiId(jButtonDeposit, "btn_deposit"); + jButtonDeposit = NuiEnabled(jButtonDeposit, NuiBind("btn_deposit")); + jButtonDeposit = NuiWidth(jButtonDeposit, 100.0f); + jButtonDeposit = NuiHeight(jButtonDeposit, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonDeposit); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jButtonClose = NuiButton(JsonString("Close")); + jButtonClose = NuiId(jButtonClose, "btn_close"); + jButtonClose = NuiWidth(jButtonClose, 100.0f); + jButtonClose = NuiHeight(jButtonClose, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonClose); + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + json jRoot = NuiCol(jCol);// Turn our column variable into a column + // Bind the window title and geometry, disable resizing and set collapsed to false + jWindow = NuiWindow(jRoot, NuiBind(NUI_WINDOW_TITLE_BIND), NuiBind(NUI_WINDOW_GEOMETRY_BIND), JsonBool(FALSE), JsonNull(), JsonBool(TRUE), JsonBool(FALSE), JsonBool(TRUE)); + SetLocalJson(GetModule(), PC_WINDOW_JSON, jWindow);// Store the created window for reuse + } + + // We let the user move the window and it'll save the position in a local + // In the case of the local not existing we position the window in its default position + json jGeometry = GetLocalJson(oPlayer, PC_GEOMETRY_JSON); + if (jGeometry == JsonNull()) + jGeometry = NuiRect(400.0f, 0.0f, 400.0f, 500.0f); + + // Actually create the window for the player! + int nToken = NuiCreate(oPlayer, jWindow, PC_NUI_WINDOW_ID); + + // If the search button is not enabled we watch the search bind for changes in the search box + NuiSetBindWatch(oPlayer, nToken, "search", !PC_USE_SEARCH_BUTTON); + // Watch for players moving the window + NuiSetBindWatch(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, TRUE); + // Here we set the initial window position, either to the default position or wherever the player last left it + NuiSetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, jGeometry); + // Setting the window title + NuiSetBind(oPlayer, nToken, NUI_WINDOW_TITLE_BIND, JsonString(GetName(oPlayer) + "'s Persistent Chest")); + // We clear the search bar, this'll invoke the watch event, if enabled, where we do some other stuff + NuiSetBind(oPlayer, nToken, "search", JsonString("")); + // Enable or disable the clear button depending on if we have the search button enabled + // If the search button is disabled we only enable it if the search bar actually has text + NuiSetBind(oPlayer, nToken, "btn_clear", JsonBool(PC_USE_SEARCH_BUTTON)); + + if (PC_USE_SEARCH_BUTTON) + { + DeleteLocalString(oPlayer, PC_SEARCH_STRING); + PC_UpdateItemList(oPlayer, nToken); + } + + PC_UpdateGoldData(oPlayer, nToken); + + if (bOpenInventory) + PopUpGUIPanel(oPlayer, GUI_PANEL_INVENTORY); +} + +void PC_EnterDepositMode(object oPlayer) +{ + SetLocalInt(oPlayer, PC_TARGETING_MODE, TRUE); + EnterTargetingMode(oPlayer, OBJECT_TYPE_ITEM); +} + +void PC_HandleNUIEvents(object oPlayer, string sWindowId, int nToken, string sType, string sElement, int nArrayIndex) +{ + if (sWindowId == PC_NUI_WINDOW_ID) + { + if (sType == NUI_EVENT_CLICK) + { + if (sElement == "btn_withdraw") + {// The withdraw button is clicked, withdraw some items + PC_WithdrawItems(oPlayer, nToken); + } + else if (sElement == "btn_deposit") + {// The deposit button is clicked, enter deposit mode + PC_EnterDepositMode(oPlayer); + } + else if (sElement == "btn_close") + {// Murder the poor window + NuiDestroy(oPlayer, nToken); + + nToken = NuiFindWindow(oPlayer, PC_NUI_GOLD_WINDOW_ID); + if (nToken) + NuiDestroy(oPlayer, nToken); + } + else if (sElement == "btn_search") + {// Handle the search button if enabled + SetLocalString(oPlayer, PC_SEARCH_STRING, JsonGetString(NuiGetBind(oPlayer, nToken, "search"))); + PC_UpdateItemList(oPlayer, nToken); + } + else if (sElement == "btn_clear") + {// Handle the clear button + NuiSetBind(oPlayer, nToken, "search", JsonString("")); + + if (PC_USE_SEARCH_BUTTON) + { + DeleteLocalString(oPlayer, PC_SEARCH_STRING); + PC_UpdateItemList(oPlayer, nToken); + } + } + else if (sElement == "btn_gold") + { + PC_CreateNUIGoldWindow(oPlayer); + } + } + else if (sType == NUI_EVENT_WATCH) + { + if (sElement == NUI_WINDOW_GEOMETRY_BIND) + {// Whenever the geometry of the window changes this watch event will fire, we just get the bind's value and store it in a local + SetLocalJson(oPlayer, PC_GEOMETRY_JSON, NuiGetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND)); + } + else if (sElement == "search") + {// Whenever the player types in the search bar this watch event fires, we enable or disable the clear button depending on string length and set the search string in a local + string sSearch = JsonGetString(NuiGetBind(oPlayer, nToken, "search")); + + NuiSetBind(oPlayer, nToken, "btn_clear", JsonBool(GetStringLength(sSearch))); + SetLocalString(oPlayer, PC_SEARCH_STRING, sSearch); + PC_UpdateItemList(oPlayer, nToken); + } + } + else if (sType == NUI_EVENT_CLOSE) + { + nToken = NuiFindWindow(oPlayer, PC_NUI_GOLD_WINDOW_ID); + if (nToken) + NuiDestroy(oPlayer, nToken); + } + } + else if (sWindowId == PC_NUI_GOLD_WINDOW_ID) + { + if (sType == NUI_EVENT_CLICK) + { + if (sElement == "btn_deposit") + { + //SendMessageToPC(oPlayer, "Depositing: " + JsonGetString(NuiGetBind(oPlayer, nToken, "amount")) + " gold"); + } + else if (sElement == "btn_close") + { + NuiDestroy(oPlayer, nToken); + } + } + } +} + +int PC_GetStoredItemAmount(object oPlayer) +{// Wrapper to get the number of stored items + string sQuery = "SELECT COUNT(*) FROM " + PC_GetTableName(oPlayer); + sqlquery sql = SqlPrepareQueryCampaign(PC_GetDatabaseName(oPlayer), sQuery); + return SqlStep(sql) ? SqlGetInt(sql, 0) : 0; +} + +void PC_HandleDepositEvent(object oPlayer, object oItem, vector vPosition) +{// This function is fired in the module on player target event + if (!GetLocalInt(oPlayer, PC_TARGETING_MODE))// Make sure it only fires if we're actually depositing an item + return; + + DeleteLocalInt(oPlayer, PC_TARGETING_MODE); + + if (!GetIsObjectValid(oItem) || GetLocalInt(oItem, "PC_ITEM_DESTROYED") || GetObjectType(oItem) != OBJECT_TYPE_ITEM) + return;// Check the validness of the item + + if (GetItemPossessor(oItem) != oPlayer) + {// Check if we actually own the item + SendMessageToPC(oPlayer, "You do not own '" + GetName(oItem) + "'"); + return; + } + + int nStoredItems = PC_GetStoredItemAmount(oPlayer); + if (nStoredItems >= PC_MAX_ITEMS) + {// Check if we have space... + SendMessageToPC(oPlayer, "Your persistent chest is full, withdraw an item first."); + return; + } + + // Here we grab a bunch of data and actually store stuff in the database + // We store the item as json because we need that to get some additional icon data anyway + string sItemUUID = GetObjectUUID(oItem); + int nItemBaseItem = GetBaseItemType(oItem); + string sItemName = Util_GetItemName(oItem, GetIdentified(oItem)); + int nItemStackSize = GetItemStackSize(oItem); + json jItemData = ObjectToJson(oItem, PC_SAVE_ITEM_OBJECT_STATE); + string sItemIconResRef = Util_GetIconResref(oItem, jItemData, nItemBaseItem); + string sQuery = "INSERT INTO " + PC_GetTableName(oPlayer) + + "(item_uuid, item_name, item_baseitem, item_stacksize, item_iconresref, item_data) " + + "VALUES(@item_uuid, @item_name, @item_baseitem, @item_stacksize, @item_iconresref, @item_data);"; + sqlquery sql = SqlPrepareQueryCampaign(PC_GetDatabaseName(oPlayer), sQuery); + + SqlBindString(sql, "@item_uuid", sItemUUID); + SqlBindString(sql, "@item_name", sItemName); + SqlBindInt(sql, "@item_baseitem", nItemBaseItem); + SqlBindInt(sql, "@item_stacksize", nItemStackSize); + SqlBindString(sql, "@item_iconresref", sItemIconResRef); + SqlBindJson(sql, "@item_data", jItemData); + SqlStep(sql); + + int nToken = NuiFindWindow(oPlayer, PC_NUI_WINDOW_ID); + if (nToken) + {// Check if the window is still open, if so update the item list and enter targeting mode again if we still have space + PC_UpdateItemList(oPlayer, nToken); + + if(++nStoredItems != PC_MAX_ITEMS) + { + PC_EnterDepositMode(oPlayer); + } + } + + // Dunno if this is needed but maybe somehow the player clicks on an item before it is destroyed, we'll try to prevent that + SetLocalInt(oItem, "PC_ITEM_DESTROYED", TRUE); + DestroyObject(oItem); +} + +void PC_UpdateItemList(object oPlayer, int nToken) +{ + json jUUIDArray = JsonArray();// This array is stored on the player so we can map an array index to an items UUID + json jNamesArray = JsonArray();// This array is for the list and stores all the names of the items + json jTooltipArray = JsonArray();// This array is for the list and stores all the baseitem tooltips of the items + json jIconsArray = JsonArray();// This array is for the list and stores all the icons of the items + json jSelectedArray = JsonArray();// This array is for the list and stores wether an item is selected or not + + int nNumItems = PC_GetStoredItemAmount(oPlayer); + string sSearch = GetLocalString(oPlayer, PC_SEARCH_STRING); + string sQuery = "SELECT item_uuid, item_name, item_baseitem, item_stacksize, item_iconresref FROM " + + PC_GetTableName(oPlayer) + (sSearch != "" ? " WHERE item_name LIKE @search" : "") +" ORDER BY item_baseitem ASC, item_name ASC;"; + sqlquery sql = SqlPrepareQueryCampaign(PC_GetDatabaseName(oPlayer), sQuery); + + if (sSearch != "") + SqlBindString(sql, "@search", "%" + sSearch + "%"); + + while (SqlStep(sql)) + {// Loop all items + string sUUID = SqlGetString(sql, 0); + string sName = SqlGetString(sql, 1); + int nBaseItem = SqlGetInt(sql, 2); + int nStackSize = SqlGetInt(sql, 3); + string sIconResRef = SqlGetString(sql, 4); + + jUUIDArray = JsonArrayInsert(jUUIDArray, JsonString(sUUID));// Store its UUId + jNamesArray = JsonArrayInsert(jNamesArray, JsonString(sName + (nStackSize > 1 ? " (x" + IntToString(nStackSize) + ")" : "")));// Store its name and stacksize if >1 + jTooltipArray = JsonArrayInsert(jTooltipArray, JsonString(GetStringByStrRef(StringToInt(Get2DAString("baseitems", "Name", nBaseItem)))));// Store the tooltip + jIconsArray = JsonArrayInsert(jIconsArray, JsonString(sIconResRef));// Store the icon + jSelectedArray = JsonArrayInsert(jSelectedArray, JsonBool(FALSE));// Set the item as not selected + } + + SetLocalJson(oPlayer, PC_UUID_ARRAY, jUUIDArray);// We save this array on the player for later use + // Set the list binds to the new arrays + NuiSetBind(oPlayer, nToken, "icons", jIconsArray); + NuiSetBind(oPlayer, nToken, "names", jNamesArray); + NuiSetBind(oPlayer, nToken, "tooltips", jTooltipArray); + NuiSetBind(oPlayer, nToken, "selected", jSelectedArray); + + // Update our progress tracker and its tooltip + NuiSetBind(oPlayer, nToken, "progress", JsonFloat(IntToFloat(nNumItems) / IntToFloat(PC_MAX_ITEMS))); + NuiSetBind(oPlayer, nToken, "progress_tooltip", JsonString(IntToString(nNumItems) + " / " + IntToString(PC_MAX_ITEMS) + " Items Stored")); + + // Disable or enable the withdraw and deposit buttons depending on item amounts + NuiSetBind(oPlayer, nToken, "btn_withdraw", JsonBool(nNumItems > 0)); + NuiSetBind(oPlayer, nToken, "btn_deposit", JsonBool(nNumItems < PC_MAX_ITEMS)); +} + +void VoidJsonToObject(json jObject, location locLocation, object oOwner = OBJECT_INVALID, int bLoadObjectState = FALSE) +{ + JsonToObject(jObject, locLocation, oOwner, bLoadObjectState); +} + +void PC_WithdrawItems(object oPlayer, int nToken) +{ + json jSelected = NuiGetBind(oPlayer, nToken, "selected");// This gets the array of selected items + + int nNumItems = JsonGetLength(jSelected); + if (!nNumItems)// Why bother doing anything if we have no items stored + return; + + string sDatabase = PC_GetDatabaseName(oPlayer); + string sTable = PC_GetTableName(oPlayer); + string sSelectQuery = "SELECT item_data FROM " + sTable + " WHERE item_uuid=@uuid;"; + string sDeleteQuery = "DELETE FROM " + sTable + " WHERE item_uuid=@uuid;"; + json jUUIDs = GetLocalJson(oPlayer, PC_UUID_ARRAY);// Get our array index <-> uuid map + location locPlayer = GetLocation(oPlayer); + int nItem, nWithdrawnItems = 0; + float fDelay = PC_ITEM_WITHDRAW_DELAY; + sqlquery sql; + + for (nItem = 0; nItem < nNumItems; nItem++) + {// Loop all items, this will need improving for big amounts of items + if (JsonGetInt(JsonArrayGet(jSelected, nItem))) + {// Check if the item is selected, if so we withdraw it + string sUUID = JsonGetString(JsonArrayGet(jUUIDs, nItem));// Use the index of the item to get its uuid from the array we stored earlier + sql = SqlPrepareQueryCampaign(sDatabase, sSelectQuery); + SqlBindString(sql, "@uuid", sUUID); + + if (SqlStep(sql)) + { + json jItem = SqlGetJson(sql, 0); + sql = SqlPrepareQueryCampaign(sDatabase, sDeleteQuery);// Delete the database entry of the item + SqlBindString(sql, "@uuid", sUUID); + SqlStep(sql); + + DelayCommand(fDelay, VoidJsonToObject(jItem, locPlayer, oPlayer, PC_SAVE_ITEM_OBJECT_STATE)); + nWithdrawnItems++; + } + } + + if (nWithdrawnItems == PC_ITEM_WITHDRAW_BATCH) + {// Here we do some stuff to not withdraw all items at once + nWithdrawnItems = 0; + fDelay += PC_ITEM_WITHDRAW_DELAY; + } + } + // Finally update the item list again + PC_UpdateItemList(oPlayer, nToken); +} + +int PC_GetStoredGold(object oPlayer) +{ + return GetCampaignInt(PC_GetTableName(oPlayer), "PC_GOLD"); +} + +void PC_SetStoredGold(object oPlayer, int nGold) +{ + SetCampaignInt(PC_GetTableName(oPlayer), "PC_GOLD", nGold); +} + +void PC_ModifyStoredGold(object oPlayer, int nAmount) +{ + PC_SetStoredGold(oPlayer, PC_GetStoredGold(oPlayer) + nAmount); +} + +void PC_UpdateGoldData(object oPlayer, int nToken) +{ + NuiSetBind(oPlayer, nToken, "gold_tooltip", JsonString("Gold: " + IntToString(PC_GetStoredGold(oPlayer)))); +} + +void PC_CreateNUIGoldWindow(object oPlayer) +{ + if (NuiFindWindow(oPlayer, PC_NUI_GOLD_WINDOW_ID)) + return; + + json jWindow = GetLocalJson(GetModule(), PC_GOLD_WINDOW_JSON); + if (jWindow == JsonNull()) + { + json jCol; + json jRow; + + jCol = JsonArray(); + + jRow = JsonArray(); + { + json jTextEdit = NuiTextEdit(JsonString("Amount..."), NuiBind("amount"), 10, FALSE); + jTextEdit = NuiWidth(jTextEdit, 110.0f); + jRow = JsonArrayInsert(jRow, jTextEdit); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jButtonWithdraw = NuiButton(JsonString("Withdraw")); + jButtonWithdraw = NuiId(jButtonWithdraw, "btn_withdraw"); + jButtonWithdraw = NuiEnabled(jButtonWithdraw, NuiBind("btn_withdraw")); + jButtonWithdraw = NuiWidth(jButtonWithdraw, 90.0f); + jButtonWithdraw = NuiHeight(jButtonWithdraw, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonWithdraw); + + json jButtonDeposit = NuiButton(JsonString("Deposit")); + jButtonDeposit = NuiId(jButtonDeposit, "btn_deposit"); + jButtonDeposit = NuiEnabled(jButtonDeposit, NuiBind("btn_deposit")); + jButtonDeposit = NuiWidth(jButtonDeposit, 90.0f); + jButtonDeposit = NuiHeight(jButtonDeposit, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonDeposit); + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + jRow = JsonArray(); + { + json jImage = NuiImage(JsonString("iit_gold_001"), JsonInt(NUI_ASPECT_FIT100), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_TOP)); + jImage = NuiGroup(jImage, FALSE, NUI_SCROLLBARS_NONE); + jImage = NuiWidth(jImage, 35.0f); + jImage = NuiHeight(jImage, 35.0f); + jRow = JsonArrayInsert(jRow, jImage); + + json jLabel = NuiLabel(JsonString("Gold: "), JsonInt(NUI_HALIGN_LEFT), JsonInt(NUI_VALIGN_MIDDLE)); + jLabel = NuiWidth(jLabel, 40.0f); + jRow = JsonArrayInsert(jRow, jLabel); + + json jAmount = NuiLabel(NuiBind("stored_gold"), JsonInt(NUI_HALIGN_LEFT), JsonInt(NUI_VALIGN_MIDDLE)); + jAmount = NuiWidth(jAmount, 100.0f); + jRow = JsonArrayInsert(jRow, jAmount); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jButtonDeposit = NuiButton(JsonString("Close")); + jButtonDeposit = NuiId(jButtonDeposit, "btn_close"); + jButtonDeposit = NuiWidth(jButtonDeposit, 90.0f); + jButtonDeposit = NuiHeight(jButtonDeposit, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonDeposit); + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + json jRoot = NuiCol(jCol); + jWindow = NuiWindow(jRoot, JsonBool(FALSE), NuiRect(-1.0f, -1.0f, 375.0f, 135.0f), JsonBool(FALSE), JsonBool(FALSE), JsonBool(FALSE), JsonBool(FALSE), JsonBool(TRUE)); + SetLocalJson(GetModule(), PC_GOLD_WINDOW_JSON, jWindow); + } + + int nToken = NuiCreate(oPlayer, jWindow, PC_NUI_GOLD_WINDOW_ID); + + NuiSetBind(oPlayer, nToken, "stored_gold", JsonString("5000000")); +} + diff --git a/_module/nss/inc_tictactoe.nss b/_module/nss/inc_tictactoe.nss new file mode 100644 index 00000000..f53d11b3 --- /dev/null +++ b/_module/nss/inc_tictactoe.nss @@ -0,0 +1,660 @@ +/* + Multiplayer TicTacToe NUI Game + Created By: Daz +*/ + +#include "inc_nui" +#include "inc_util" + +const string TTT_WINDOW_ID = "TTT_GAME"; +const string TTT_WINDOW_JSON = "TTT_WINDOW_JSON"; +const string TTT_WINDOW_GEOMETRY = "TTT_WINDOW_GEOMETRY"; +const float TTT_WINDOW_WIDTH = 400.0f; +const float TTT_WINDOW_HEIGHT = 340.0f; + +const float TTT_LINE_LENGTH = 50.0f; +const float TTT_LINE_THICKNESS = 10.0f; +const string TTT_GRID_LINE_LEFT = "ttt_ll"; +const string TTT_GRID_LINE_RIGHT = "ttt_lr"; +const string TTT_GRID_LINE_TOP = "ttt_lt"; +const string TTT_GRID_LINE_BOTTOM = "ttt_lb"; +const string TTT_GRID_LINE_CENTER = "ttt_lc"; +const string TTT_GRID_LINE_VERTICAL = "ttt_lmv"; +const string TTT_GRID_LINE_HORIZONTAL = "ttt_lmh"; + +const string TTT_BIND_HEADER_TEXT = "header_text"; +const string TTT_BIND_PORTRAIT_ONE = "po_player1"; +const string TTT_BIND_PORTRAIT_TWO = "po_player2"; +const string TTT_BIND_INFO_TEXT = "info_text"; +const string TTT_BIND_BUTTON_RESTART = "btn_restart"; + +const string TTT_IMAGE_BLANK = "ttt_blank"; +const string TTT_IMAGE_CIRCLE = "ttt_circle"; +const string TTT_IMAGE_CROSS = "ttt_cross"; + +const string TTT_CELL_PREFIX = "ttt_cell_"; +const int TTT_NUM_CELLS = 9; + +const string TTT_CELL_VALUE_BLANK = ""; +const string TTT_CELL_VALUE_CIRCLE = "O"; +const string TTT_CELL_VALUE_CROSS = "X"; + +const string TTT_BOARD = "TTT_BOARD"; +const string TTT_PLAYER_ID = "TTT_PLAYER_ID"; +const string TTT_PLAYER_ONE = "TTT_PLAYER_ONE"; +const string TTT_PLAYER_TWO = "TTT_PLAYER_TWO"; + +const string TTT_CURRENT_PLAYER = "TTT_CURRENT_PLAYER"; + +const string TTT_WIN_CONDITIONS = "TTT_WIN_CONDITIONS"; +const string TTT_GRID_STATE = "TTT_GRID_STATE"; + +const string TTT_GAME_STATE = "TTT_GAME_STATE"; +const int TTT_GAME_STATE_NONE = 0; +const int TTT_GAME_STATE_WAITING = 1; +const int TTT_GAME_STATE_PLAYING = 2; +const int TTT_GAME_STATE_GAME_OVER = 3; + +string TTT_IntToCellString(int nCell); +json TTT_InsertGridLine(json jCol, string sImage, float fWidth, float fHeight); +json TTT_InsertGridCell(json jCol, int nCell); +json TTT_GetTicTacToeGridJson(); +json TTT_GetWindowJson(); +void TTT_SetRestartButtonEnabled(object oGame, int bEnabled); +int TTT_GetPlayerWindowToken(object oPlayer); +void TTT_SetGame(object oPlayer, object oGame); +object TTT_GetGame(object oPlayer); +void TTT_DeleteGame(object oPlayer); +void TTT_SetPlayerId(object oPlayer, string sPlayerId); +string TTT_GetPlayerId(object oPlayer); +void TTT_DeletePlayerId(object oPlayer); +void TTT_SetPlayer(object oGame, string sPlayerId, object oPlayer); +object TTT_GetPlayer(object oGame, string sPlayerId); +void TTT_DeletePlayer(object oGame, string sPlayerId); +void TTT_SetCurrentPlayer(object oGame, object oPlayer); +object TTT_GetCurrentPlayer(object oGame); +string TTT_GetCurrentPlayerSymbol(object oGame); +object TTT_GetOpponent(object oGame); +object TTT_GetValidatedPlayer(object oGame, string sPlayerId); +int TTT_GetIsPlayerValid(object oGame, string sPlayerId); +int TTT_GetNumPlayers(object oGame); +string TTT_GetFreePlayerId(object oGame); +object TTT_GetSinglePlayer(object oGame); +void TTT_UpdateBind(object oPlayer, string sBindName, json jValue); +void TTT_UpdateBindsForPlayers(object oGame, string sBindName, json jValue); +int TTT_CreateGameWindow(object oPlayer); +void TTT_UpdateStaticBinds(object oGame); +void TTT_UpdateGridCellBind(object oGame, int nCell, json jImage); +string TTT_GetImageFromSymbol(string sSymbol); +void TTT_UpdateGridBinds(object oGame); +void TTT_UpdateInfoTextBind(object oGame, string sText); +void TTT_AddPlayerToGame(object oPlayer, object oGame = OBJECT_SELF); +void TTT_HandleNUIEvents(object oPlayer, int nToken, string sType, string sElement, int nArrayIndex, json jPayload); +json TTT_InsertWinCondition(json jWinConditions, int nValueA, int nValueB, int nValueC); +json TTT_GetWinConditions(); +json TTT_GetGridState(object oGame); +void TTT_SetGridState(object oGame, json jGridState); +void TTT_ClearGridState(object oGame); +string TTT_GetGridStateCell(object oGame, int nCell); +void TTT_SetGridStateCell(object oGame, int nCell, string sValue); +int TTT_GetGameState(object oGame); +void TTT_SetGameState(object oGame, int nGameState, string sInfoText); +void TTT_UpdateGameState(object oGame); +int TTT_GetIsDraw(object oGame); +int TTT_GetIsWin(object oGame); +void TTT_RestartGame(object oGame); +void TTT_RemovePlayerFromGame(object oGame, object oPlayer); +void TTT_HandlePlayerExit(object oPlayer); + +string TTT_IntToCellString(int nCell) +{ + return TTT_CELL_PREFIX + IntToString(nCell); +} + +json TTT_InsertGridLine(json jCol, string sImage, float fWidth, float fHeight) +{ + json jImage = NuiImage(JsonString(sImage), JsonInt(NUI_ASPECT_EXACT), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_MIDDLE)); + jImage = NuiMargin(jImage, 0.0f); + jImage = NuiWidth(jImage, fWidth); + jImage = NuiHeight(jImage, fHeight); + return JsonArrayInsert(jCol, NuiMargin(NuiRow(JsonArrayInsert(JsonArray(), jImage)), 0.0f)); +} + +json TTT_InsertGridCell(json jCol, int nCell) +{ + string sCell = TTT_IntToCellString(nCell); + json jImage = NuiImage(NuiBind(sCell), JsonInt(NUI_ASPECT_EXACT), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_MIDDLE)); + jImage = NuiId(jImage, sCell); + jImage = NuiMargin(jImage, 0.0f); + jImage = NuiWidth(jImage, TTT_LINE_LENGTH); + jImage = NuiHeight(jImage, TTT_LINE_LENGTH); + return JsonArrayInsert(jCol, NuiMargin(NuiRow(JsonArrayInsert(JsonArray(), jImage)), 0.0f)); +} + +json TTT_GetTicTacToeGridJson() +{ + json jCol = JsonArray(), jRow; + jRow = JsonArray(); + { + json jSubCol, jSubRow; + + jSubCol = JsonArray(); + jSubCol = TTT_InsertGridCell(jSubCol, 0); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_LEFT, TTT_LINE_LENGTH, TTT_LINE_THICKNESS); + jSubCol = TTT_InsertGridCell(jSubCol, 3); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_LEFT, TTT_LINE_LENGTH, TTT_LINE_THICKNESS); + jSubCol = TTT_InsertGridCell(jSubCol, 6); + jRow = JsonArrayInsert(jRow, NuiMargin(NuiCol(jSubCol), 0.0f)); + + jSubCol = JsonArray(); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_TOP, TTT_LINE_THICKNESS, TTT_LINE_LENGTH); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_CENTER, TTT_LINE_THICKNESS, TTT_LINE_THICKNESS); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_VERTICAL, TTT_LINE_THICKNESS, TTT_LINE_LENGTH); + jSubCol = TTT_InsertGridLine(jSubCol,TTT_GRID_LINE_CENTER, TTT_LINE_THICKNESS, TTT_LINE_THICKNESS); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_BOTTOM, TTT_LINE_THICKNESS, TTT_LINE_LENGTH); + jRow = JsonArrayInsert(jRow, NuiMargin(NuiCol(jSubCol), 0.0f)); + + jSubCol = JsonArray(); + jSubCol = TTT_InsertGridCell(jSubCol, 1); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_HORIZONTAL, TTT_LINE_LENGTH, TTT_LINE_THICKNESS); + jSubCol = TTT_InsertGridCell(jSubCol, 4); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_HORIZONTAL, TTT_LINE_LENGTH, TTT_LINE_THICKNESS); + jSubCol = TTT_InsertGridCell(jSubCol, 7); + jRow = JsonArrayInsert(jRow, NuiMargin(NuiCol(jSubCol), 0.0f)); + + jSubCol = JsonArray(); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_TOP, TTT_LINE_THICKNESS, TTT_LINE_LENGTH); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_CENTER, TTT_LINE_THICKNESS, TTT_LINE_THICKNESS); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_VERTICAL, TTT_LINE_THICKNESS, TTT_LINE_LENGTH); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_CENTER, TTT_LINE_THICKNESS, TTT_LINE_THICKNESS); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_BOTTOM, TTT_LINE_THICKNESS, TTT_LINE_LENGTH); + jRow = JsonArrayInsert(jRow, NuiMargin(NuiCol(jSubCol), 0.0f)); + + jSubCol = JsonArray(); + jSubCol = TTT_InsertGridCell(jSubCol, 2); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_RIGHT, TTT_LINE_LENGTH, TTT_LINE_THICKNESS); + jSubCol = TTT_InsertGridCell(jSubCol, 5); + jSubCol = TTT_InsertGridLine(jSubCol, TTT_GRID_LINE_RIGHT, TTT_LINE_LENGTH, TTT_LINE_THICKNESS); + jSubCol = TTT_InsertGridCell(jSubCol, 8); + jRow = JsonArrayInsert(jRow, NuiMargin(NuiCol(jSubCol), 0.0f)); + } + jCol = NuiInsertRow(jCol, jRow); + + return NuiCol(jCol); +} + +json TTT_GetWindowJson() +{ + json jWindow = GetLocalJson(GetModule(), TTT_WINDOW_JSON); + if (jWindow == JsonNull()) + { + json jCol; + json jRow; + + jCol = JsonArray(); + + jRow = JsonArray(); + { + json jHeader = NuiHeader(NuiBind(TTT_BIND_HEADER_TEXT)); + jRow = JsonArrayInsert(jRow, jHeader); + } + jCol = NuiInsertRow(jCol, jRow); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jPlayer1 = NuiImage(NuiBind(TTT_BIND_PORTRAIT_ONE), JsonInt(NUI_ASPECT_EXACT), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_TOP)); + jPlayer1 = NuiMargin(jPlayer1, 0.0f); + jPlayer1 = NuiGroup(jPlayer1, TRUE, NUI_SCROLLBARS_NONE); + jPlayer1 = NuiWidth(jPlayer1, 64.0f); + jPlayer1 = NuiHeight(jPlayer1, 100.0f); + jRow = JsonArrayInsert(jRow, jPlayer1); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jTicTacToe = TTT_GetTicTacToeGridJson(); + jTicTacToe = NuiGroup(jTicTacToe, FALSE, NUI_SCROLLBARS_NONE); + jTicTacToe = NuiWidth(jTicTacToe, 182.0f); + jTicTacToe = NuiHeight(jTicTacToe, 182.0f); + jRow = JsonArrayInsert(jRow, jTicTacToe); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jPlayer2 = NuiImage(NuiBind(TTT_BIND_PORTRAIT_TWO), JsonInt(NUI_ASPECT_EXACT), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_TOP)); + jPlayer2 = NuiMargin(jPlayer2, 0.0f); + jPlayer2 = NuiGroup(jPlayer2, TRUE, NUI_SCROLLBARS_NONE); + jPlayer2 = NuiWidth(jPlayer2, 64.0f); + jPlayer2 = NuiHeight(jPlayer2, 100.0f); + jRow = JsonArrayInsert(jRow, jPlayer2); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + } + jCol = NuiInsertRow(jCol, jRow); + + jRow = JsonArray(); + { + json jHeader = NuiHeader(NuiBind(TTT_BIND_INFO_TEXT)); + jRow = JsonArrayInsert(jRow, jHeader); + } + jCol = NuiInsertRow(jCol, jRow); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jButton = NuiButton(JsonString("Restart")); + jButton = NuiId(jButton, TTT_BIND_BUTTON_RESTART); + jButton = NuiEnabled(jButton, NuiBind(TTT_BIND_BUTTON_RESTART)); + jButton = NuiHeight(jButton, 30.0f); + jRow = JsonArrayInsert(jRow, jButton); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + } + jCol = NuiInsertRow(jCol, jRow); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiSpacer()); + } + jCol = NuiInsertRow(jCol, jRow); + + json jRoot = NuiCol(jCol); + jWindow = NuiWindow(jRoot, JsonString("TicTacToe"), NuiBind(NUI_WINDOW_GEOMETRY_BIND), JsonBool(FALSE), JsonNull(), JsonBool(TRUE), JsonBool(FALSE), JsonBool(TRUE)); + SetLocalJson(GetModule(), TTT_WINDOW_JSON, jWindow); + } + + return jWindow; +} + +void TTT_SetRestartButtonEnabled(object oGame, int bEnabled) { TTT_UpdateBindsForPlayers(oGame, TTT_BIND_BUTTON_RESTART, JsonBool(bEnabled)); } +int TTT_GetPlayerWindowToken(object oPlayer) { return NuiFindWindow(oPlayer, TTT_WINDOW_ID); } +void TTT_SetGame(object oPlayer, object oGame) { SetLocalObject(oPlayer, TTT_BOARD, oGame); } +object TTT_GetGame(object oPlayer) { return GetLocalObject(oPlayer, TTT_BOARD); } +void TTT_DeleteGame(object oPlayer) { DeleteLocalObject(oPlayer, TTT_BOARD); } +void TTT_SetPlayerId(object oPlayer, string sPlayerId) { SetLocalString(oPlayer, TTT_PLAYER_ID, sPlayerId); } +string TTT_GetPlayerId(object oPlayer) { return GetLocalString(oPlayer, TTT_PLAYER_ID); } +void TTT_DeletePlayerId(object oPlayer) { DeleteLocalString(oPlayer, TTT_PLAYER_ID); } +void TTT_SetPlayer(object oGame, string sPlayerId, object oPlayer) { SetLocalObject(oGame, sPlayerId, oPlayer); } +object TTT_GetPlayer(object oGame, string sPlayerId) { return GetLocalObject(oGame, sPlayerId); } +void TTT_DeletePlayer(object oGame, string sPlayerId) { DeleteLocalObject(oGame, sPlayerId); } +void TTT_SetCurrentPlayer(object oGame, object oPlayer) { SetLocalObject(oGame, TTT_CURRENT_PLAYER, oPlayer); } +object TTT_GetCurrentPlayer(object oGame) { return GetLocalObject(oGame, TTT_CURRENT_PLAYER); } + +string TTT_GetCurrentPlayerSymbol(object oGame) +{ + return TTT_GetPlayerId(TTT_GetCurrentPlayer(oGame)) == TTT_PLAYER_ONE ? TTT_CELL_VALUE_CROSS : TTT_CELL_VALUE_CIRCLE; +} + +object TTT_GetOpponent(object oGame) +{ + return TTT_GetPlayerId(TTT_GetCurrentPlayer(oGame)) == TTT_PLAYER_ONE ? TTT_GetPlayer(oGame, TTT_PLAYER_TWO) : TTT_GetPlayer(oGame, TTT_PLAYER_ONE); +} + +object TTT_GetValidatedPlayer(object oGame, string sPlayerId) +{ + return TTT_GetIsPlayerValid(oGame, sPlayerId) ? TTT_GetPlayer(oGame, sPlayerId) : OBJECT_INVALID; +} + +int TTT_GetIsPlayerValid(object oGame, string sPlayerId) +{ + object oPlayer = TTT_GetPlayer(oGame, sPlayerId); + return GetIsObjectValid(oPlayer) && TTT_GetPlayerWindowToken(oPlayer); +} + +int TTT_GetNumPlayers(object oGame) +{ + return TTT_GetIsPlayerValid(oGame, TTT_PLAYER_ONE) + TTT_GetIsPlayerValid(oGame, TTT_PLAYER_TWO); +} + +string TTT_GetFreePlayerId(object oGame) +{ + if (!TTT_GetIsPlayerValid(oGame, TTT_PLAYER_ONE)) + return TTT_PLAYER_ONE; + else if (!TTT_GetIsPlayerValid(oGame, TTT_PLAYER_TWO)) + return TTT_PLAYER_TWO; + else + return "IF_THIS_HAPPENS_YOU_DID_SOMETHING_WRONG"; +} + +object TTT_GetSinglePlayer(object oGame) +{ + object oPlayer = TTT_GetValidatedPlayer(oGame, TTT_PLAYER_ONE); + if (oPlayer != OBJECT_INVALID) + return oPlayer; + else + { + oPlayer = TTT_GetValidatedPlayer(oGame, TTT_PLAYER_TWO); + if (oPlayer != OBJECT_INVALID) + return oPlayer; + } + + return OBJECT_INVALID; +} + +void TTT_UpdateBind(object oPlayer, string sBindName, json jValue) +{ + if (GetIsObjectValid(oPlayer)) + { + int nToken = TTT_GetPlayerWindowToken(oPlayer); + if (nToken) + NuiSetBind(oPlayer, nToken, sBindName, jValue); + } +} + +void TTT_UpdateBindsForPlayers(object oGame, string sBindName, json jValue) +{ + TTT_UpdateBind(TTT_GetValidatedPlayer(oGame, TTT_PLAYER_ONE), sBindName, jValue); + TTT_UpdateBind(TTT_GetValidatedPlayer(oGame, TTT_PLAYER_TWO), sBindName, jValue); +} + +int TTT_CreateGameWindow(object oPlayer) +{ + int nToken = NuiCreate(oPlayer, TTT_GetWindowJson(), TTT_WINDOW_ID); + + json jGeometry = GetLocalJson(oPlayer, TTT_WINDOW_GEOMETRY); + if (jGeometry == JsonNull()) + jGeometry = NuiRect(100.0f, 100.0f, TTT_WINDOW_WIDTH, TTT_WINDOW_HEIGHT); + + NuiSetBindWatch(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, TRUE); + NuiSetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, jGeometry); + + return nToken; +} + +void TTT_UpdateStaticBinds(object oGame) +{ + object oPlayerOne = TTT_GetValidatedPlayer(oGame, TTT_PLAYER_ONE); + object oPlayerTwo = TTT_GetValidatedPlayer(oGame, TTT_PLAYER_TWO); + + string sNamePlayerOne = oPlayerOne == OBJECT_INVALID ? "???" : GetName(oPlayerOne); + string sNamePlayerTwo = oPlayerTwo == OBJECT_INVALID ? "???" : GetName(oPlayerTwo); + string sHeader = sNamePlayerOne + " vs. " + sNamePlayerTwo; + TTT_UpdateBindsForPlayers(oGame, TTT_BIND_HEADER_TEXT, JsonString(sHeader)); + + string sPortraitPlayerOne = oPlayerOne == OBJECT_INVALID ? "po_hu_m_99_m" : GetPortraitResRef(oPlayerOne) + "m"; + string sPortraitPlayerTwo = oPlayerTwo == OBJECT_INVALID ? "po_hu_m_99_m" : GetPortraitResRef(oPlayerTwo) + "m"; + TTT_UpdateBindsForPlayers(oGame, TTT_BIND_PORTRAIT_ONE, JsonString(sPortraitPlayerOne)); + TTT_UpdateBindsForPlayers(oGame, TTT_BIND_PORTRAIT_TWO, JsonString(sPortraitPlayerTwo)); +} + +void TTT_UpdateGridCellBind(object oGame, int nCell, json jImage) +{ + TTT_UpdateBindsForPlayers(oGame, TTT_IntToCellString(nCell), jImage); +} + +string TTT_GetImageFromSymbol(string sSymbol) +{ + return sSymbol == TTT_CELL_VALUE_BLANK ? TTT_IMAGE_BLANK : sSymbol == TTT_CELL_VALUE_CIRCLE ? TTT_IMAGE_CIRCLE : TTT_IMAGE_CROSS; +} + +void TTT_UpdateGridBinds(object oGame) +{ + json jGridState = TTT_GetGridState(oGame); + int nCell, nNumCells = JsonGetLength(jGridState); + for (nCell = 0; nCell < nNumCells; nCell++) + { + string sImage = TTT_GetImageFromSymbol(JsonGetString(JsonArrayGet(jGridState, nCell))); + TTT_UpdateGridCellBind(oGame, nCell, JsonString(sImage)); + } +} + +void TTT_UpdateInfoTextBind(object oGame, string sText) +{ + TTT_UpdateBindsForPlayers(oGame, TTT_BIND_INFO_TEXT, JsonString(sText)); +} + +void TTT_AddPlayerToGame(object oPlayer, object oGame = OBJECT_SELF) +{ + if (TTT_GetPlayerWindowToken(oPlayer)) + { + FloatingTextStringOnCreature("TicTacToe: Player Already In Game", oPlayer, FALSE); + return; + } + + int nNumPlayers = TTT_GetNumPlayers(oGame); + if (nNumPlayers == 2) + { + FloatingTextStringOnCreature("TicTacToe: Max Number Of Players Reached", oPlayer, FALSE); + return; + } + + if (!nNumPlayers) + { + TTT_ClearGridState(oGame); + TTT_SetGameState(oGame, TTT_GAME_STATE_NONE, ""); + TTT_DeletePlayer(oGame, TTT_PLAYER_ONE); + TTT_DeletePlayer(oGame, TTT_PLAYER_TWO); + } + + string sPlayerId = TTT_GetFreePlayerId(oGame); + TTT_SetPlayer(oGame, sPlayerId, oPlayer); + TTT_SetPlayerId(oPlayer, sPlayerId); + TTT_SetGame(oPlayer, oGame); + + TTT_CreateGameWindow(oPlayer); + TTT_UpdateStaticBinds(oGame); + TTT_UpdateGridBinds(oGame); + TTT_UpdateGameState(oGame); +} + +void TTT_HandleNUIEvents(object oPlayer, int nToken, string sType, string sElement, int nArrayIndex, json jPayload) +{ + if (sType == NUI_EVENT_MOUSEUP) + { + if (GetStringLeft(sElement, GetStringLength(TTT_CELL_PREFIX)) == TTT_CELL_PREFIX) + { + object oGame = TTT_GetGame(oPlayer); + object oCurrentPlayer = TTT_GetCurrentPlayer(oGame); + int nCell = StringToInt(GetStringRight(sElement, 1)); + int nGameState = TTT_GetGameState(oGame); + + if (nGameState != TTT_GAME_STATE_PLAYING || + oCurrentPlayer != oPlayer || + TTT_GetGridStateCell(oGame, nCell) != TTT_CELL_VALUE_BLANK) + return; + + string sSymbol = TTT_GetCurrentPlayerSymbol(oGame); + + TTT_SetGridStateCell(oGame, nCell, sSymbol); + TTT_UpdateGridCellBind(oGame, nCell, JsonString(TTT_GetImageFromSymbol(sSymbol))); + + if (TTT_GetIsWin(oGame)) + TTT_SetGameState(oGame, TTT_GAME_STATE_GAME_OVER, GetName(oCurrentPlayer) + " won!"); + else if (TTT_GetIsDraw(oGame)) + TTT_SetGameState(oGame, TTT_GAME_STATE_GAME_OVER, "Draw!"); + else + { + object oOpponent = TTT_GetOpponent(oGame); + TTT_SetGameState(oGame, TTT_GAME_STATE_PLAYING, GetName(oOpponent) + "'s turn!"); + TTT_SetCurrentPlayer(oGame, oOpponent); + } + } + } + else if (sType == NUI_EVENT_CLICK) + { + if (sElement == TTT_BIND_BUTTON_RESTART) + { + object oGame = TTT_GetGame(oPlayer); + if (TTT_GetGameState(oGame) == TTT_GAME_STATE_GAME_OVER) + TTT_RestartGame(oGame); + } + } + else if (sType == NUI_EVENT_CLOSE) + { + if (sElement == NUI_WINDOW_ROOT_GROUP) + { + object oGame = TTT_GetGame(oPlayer); + TTT_RemovePlayerFromGame(oGame, oPlayer); + TTT_RestartGame(oGame); + } + } + else if (sType == NUI_EVENT_WATCH) + { + if (sElement == NUI_WINDOW_GEOMETRY_BIND) + { + SetLocalJson(oPlayer, TTT_WINDOW_GEOMETRY, NuiGetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND)); + } + } +} + +json TTT_InsertWinCondition(json jWinConditions, int nValueA, int nValueB, int nValueC) +{ + json jWinCondition = JsonArray(); + jWinCondition = JsonArrayInsert(jWinCondition, JsonInt(nValueA)); + jWinCondition = JsonArrayInsert(jWinCondition, JsonInt(nValueB)); + jWinCondition = JsonArrayInsert(jWinCondition, JsonInt(nValueC)); + return JsonArrayInsert(jWinConditions, jWinCondition); +} + +json TTT_GetWinConditions() +{ + json jWinConditions = GetLocalJson(GetModule(), TTT_WIN_CONDITIONS); + if (jWinConditions == JsonNull()) + { + jWinConditions = JsonArray(); + jWinConditions = TTT_InsertWinCondition(jWinConditions, 0, 1, 2); + jWinConditions = TTT_InsertWinCondition(jWinConditions, 3, 4, 5); + jWinConditions = TTT_InsertWinCondition(jWinConditions, 6, 7, 8); + jWinConditions = TTT_InsertWinCondition(jWinConditions, 0, 3, 6); + jWinConditions = TTT_InsertWinCondition(jWinConditions, 1, 4, 7); + jWinConditions = TTT_InsertWinCondition(jWinConditions, 2, 5, 8); + jWinConditions = TTT_InsertWinCondition(jWinConditions, 0, 4, 8); + jWinConditions = TTT_InsertWinCondition(jWinConditions, 2, 4, 6); + + SetLocalJson(GetModule(), TTT_WIN_CONDITIONS, jWinConditions); + } + + return jWinConditions; +} + +json TTT_GetGridState(object oGame) +{ + return GetLocalJson(oGame, TTT_GRID_STATE); +} + +void TTT_SetGridState(object oGame, json jGridState) +{ + SetLocalJson(oGame, TTT_GRID_STATE, jGridState); +} + +void TTT_ClearGridState(object oGame) +{ + json jGridState = JsonArray(); + int nCell; + for (nCell = 0; nCell < TTT_NUM_CELLS; nCell++) + { + jGridState = JsonArrayInsert(jGridState, JsonString(TTT_CELL_VALUE_BLANK)); + } + + TTT_SetGridState(oGame, jGridState); +} + +string TTT_GetGridStateCell(object oGame, int nCell) +{ + json jGridState = TTT_GetGridState(oGame); + return JsonGetString(JsonArrayGet(jGridState, nCell)); +} + +void TTT_SetGridStateCell(object oGame, int nCell, string sValue) +{ + json jGridState = TTT_GetGridState(oGame); + jGridState = JsonArraySet(jGridState, nCell, JsonString(sValue)); + TTT_SetGridState(oGame, jGridState); +} + +int TTT_GetGameState(object oGame) +{ + return GetLocalInt(oGame, TTT_GAME_STATE); +} + +void TTT_SetGameState(object oGame, int nGameState, string sInfoText) +{ + SetLocalInt(oGame, TTT_GAME_STATE, nGameState); + TTT_UpdateInfoTextBind(oGame, sInfoText); + + if (nGameState == TTT_GAME_STATE_GAME_OVER) + TTT_SetRestartButtonEnabled(oGame, TRUE); + else + TTT_SetRestartButtonEnabled(oGame, FALSE); +} + +void TTT_UpdateGameState(object oGame) +{ + int nNumPlayers = TTT_GetNumPlayers(oGame); + + if (nNumPlayers == 1) + { + TTT_SetGameState(oGame, TTT_GAME_STATE_WAITING, "Waiting for opponent..."); + TTT_SetCurrentPlayer(oGame, TTT_GetSinglePlayer(oGame)); + } + else if (nNumPlayers == 2) + { + TTT_SetGameState(oGame, TTT_GAME_STATE_PLAYING, GetName(TTT_GetCurrentPlayer(oGame)) + "'s turn!"); + } +} + +int TTT_GetIsDraw(object oGame) +{ + json jGridState = TTT_GetGridState(oGame); + int nCell, nNumCells = JsonGetLength(jGridState); + for (nCell = 0; nCell < nNumCells; nCell++) + { + if (JsonGetString(JsonArrayGet(jGridState, nCell)) == TTT_CELL_VALUE_BLANK) + return FALSE; + } + + return TRUE; +} + +int TTT_GetIsWin(object oGame) +{ + json jGridState = TTT_GetGridState(oGame); + json jWinConditions = TTT_GetWinConditions(); + int nWinCondition, nNumWinConditions = JsonGetLength(jWinConditions); + + for(nWinCondition = 0; nWinCondition < nNumWinConditions; nWinCondition++) + { + json jWinCondition = JsonArrayGet(jWinConditions, nWinCondition); + string sValueA = JsonGetString(JsonArrayGet(jGridState, JsonGetInt(JsonArrayGet(jWinCondition, 0)))); + string sValueB = JsonGetString(JsonArrayGet(jGridState, JsonGetInt(JsonArrayGet(jWinCondition, 1)))); + string sValueC = JsonGetString(JsonArrayGet(jGridState, JsonGetInt(JsonArrayGet(jWinCondition, 2)))); + + if (sValueA == TTT_CELL_VALUE_BLANK || sValueB == TTT_CELL_VALUE_BLANK ||sValueC == TTT_CELL_VALUE_BLANK) + continue; + + if (sValueA == sValueB && sValueB == sValueC) + return TRUE; + } + + return FALSE; +} + +void TTT_RestartGame(object oGame) +{ + TTT_SetGameState(oGame, TTT_GAME_STATE_NONE, ""); + TTT_ClearGridState(oGame); + TTT_UpdateStaticBinds(oGame); + TTT_UpdateGridBinds(oGame); + TTT_UpdateGameState(oGame); +} + +void TTT_RemovePlayerFromGame(object oGame, object oPlayer) +{ + NuiDestroy(oPlayer, TTT_GetPlayerWindowToken(oPlayer)); + + TTT_DeletePlayer(oGame, TTT_GetPlayerId(oPlayer)); + TTT_DeleteGame(oPlayer); + TTT_DeletePlayerId(oPlayer); +} + +void TTT_HandlePlayerExit(object oPlayer) +{ + if (TTT_GetPlayerWindowToken(oPlayer)) + { + object oGame = TTT_GetGame(oPlayer); + TTT_RemovePlayerFromGame(oGame, oPlayer); + TTT_RestartGame(oGame); + } +} + diff --git a/_module/nss/inc_transform.nss b/_module/nss/inc_transform.nss new file mode 100644 index 00000000..4f9d578b --- /dev/null +++ b/_module/nss/inc_transform.nss @@ -0,0 +1,305 @@ +/* + Visual Transform NUI Window + Created By: Daz +*/ + +#include "inc_nui" + +const string VT_WINDOW_ID = "VT"; +const string VT_WINDOW_JSON = "VT_WINDOW_JSON"; +const string VT_WINDOW_GEOMETRY = "VT_WINDOW_GEOMETRY"; + +const string VT_VALUE_BIND_PREFIX = "vt_value_"; +const string VT_DISPLAY_BIND_PREFIX = "vt_display_"; +const string VT_CLEAR_BUTTON_ID_PREFIX = "vt_btn_clear_"; + +const string VT_TARGET_BUTTON_ID = "vt_btn_target"; +const string VT_CURRENT_TARGET = "VT_CURRENT_TARGET"; +const string VT_TARGETING_MODE = "VT_TARGETING_MODE"; + +const float VT_SCALE_MIN = 1.0f; +const float VT_SCALE_MAX = 10.0f; +const float VT_SCALE_STEP = 0.1f; +const float VT_SCALE_DEFAULT = 1.0f; + +const float VT_ROTATE_MIN = 0.0f; +const float VT_ROTATE_MAX = 359.0f; +const float VT_ROTATE_STEP = 1.0f; + +const float VT_TRANSLATE_MIN = -10.0f; +const float VT_TRANSLATE_MAX = 10.0f; +const float VT_TRANSLATE_STEP = 0.1f; + +void VT_HandleNUIEvents(object oPlayer, int nToken, string sType, string sElement, int nArrayIndex, json jPayload); +string VT_GetValueBind(int nType); +string VT_GetDisplayBind(int nType); +string VT_GetClearButtonId(int nType); +json VT_CreateVisualTransformRow(string sName, int nType, float fMin, float fMax, float fStep); +void VT_SetValueBindToCurrentValue(object oPlayer, int nToken, int nType); +void VT_ShowWindow(object oPlayer); +void VT_SetCurrentTarget(object oPlayer, object oTarget); +object VT_GetCurrentTarget(object oPlayer); +void VT_DeleteCurrentTarget(object oPlayer); +void VT_EnterTargetMode(object oPlayer); +void VT_HandleTargetEvent(object oPlayer, object oTarget, vector vPosition); + +void VT_HandleNUIEvents(object oPlayer, int nToken, string sType, string sElement, int nArrayIndex, json jPayload) +{ + if (sType == NUI_EVENT_CLICK) + { + if (sElement == VT_TARGET_BUTTON_ID) + { + VT_EnterTargetMode(oPlayer); + } + else if (GetStringLeft(sElement, GetStringLength(VT_CLEAR_BUTTON_ID_PREFIX)) == VT_CLEAR_BUTTON_ID_PREFIX) + { + int nType = StringToInt(GetStringRight(sElement, 2)); + NuiSetBind(oPlayer, nToken, VT_GetValueBind(nType), JsonFloat(nType == OBJECT_VISUAL_TRANSFORM_SCALE ? VT_SCALE_DEFAULT : 0.0f)); + } + } + else if (sType == NUI_EVENT_WATCH) + { + if (GetStringLeft(sElement, GetStringLength(VT_VALUE_BIND_PREFIX)) == VT_VALUE_BIND_PREFIX) + { + int nType = StringToInt(GetStringRight(sElement, 2)); + float fValue = JsonGetFloat(NuiGetBind(oPlayer, nToken, VT_GetValueBind(nType))); + object oTarget = VT_GetCurrentTarget(oPlayer); + + SetObjectVisualTransform(oTarget, nType, fValue); + + NuiSetBind(oPlayer, nToken, VT_GetDisplayBind(nType), JsonString(FloatToString(fValue, 2, 1))); + } + else if (sElement == NUI_WINDOW_GEOMETRY_BIND) + { + SetLocalJson(oPlayer, VT_WINDOW_GEOMETRY, NuiGetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND)); + } + } + else if (sType == NUI_EVENT_MOUSESCROLL) + { + if (GetStringLeft(sElement, GetStringLength(VT_VALUE_BIND_PREFIX)) == VT_VALUE_BIND_PREFIX) + { + int nType = StringToInt(GetStringRight(sElement, 2)); + float fDelta = NuiGetMouseScrollDelta(jPayload); + + float fStep; + switch (nType) + { + case OBJECT_VISUAL_TRANSFORM_SCALE: + fStep = VT_SCALE_STEP; + break; + case OBJECT_VISUAL_TRANSFORM_ROTATE_X: + case OBJECT_VISUAL_TRANSFORM_ROTATE_Y: + case OBJECT_VISUAL_TRANSFORM_ROTATE_Z: + fStep = VT_ROTATE_STEP; + break; + case OBJECT_VISUAL_TRANSFORM_TRANSLATE_X: + case OBJECT_VISUAL_TRANSFORM_TRANSLATE_Y: + case OBJECT_VISUAL_TRANSFORM_TRANSLATE_Z: + fStep = VT_TRANSLATE_STEP; + break; + } + + float fCurrentValue = JsonGetFloat(NuiGetBind(oPlayer, nToken, sElement)); + NuiSetBind(oPlayer, nToken, sElement, JsonFloat(fCurrentValue + (fDelta > 0.0f ? fStep : -fStep))); + } + } + else if (sType == NUI_EVENT_CLOSE) + { + if (sElement == NUI_WINDOW_ROOT_GROUP) + { + VT_DeleteCurrentTarget(oPlayer); + } + } +} + +string VT_GetValueBind(int nType) +{ + return VT_VALUE_BIND_PREFIX + IntToString(nType); +} + +string VT_GetDisplayBind(int nType) +{ + return VT_DISPLAY_BIND_PREFIX + IntToString(nType); +} + +string VT_GetClearButtonId(int nType) +{ + return VT_CLEAR_BUTTON_ID_PREFIX + IntToString(nType); +} + +json VT_CreateVisualTransformRow(string sName, int nType, float fMin, float fMax, float fStep) +{ + json jRow = JsonArray(); + + json jLabel = NuiLabel(JsonString(sName), JsonInt(NUI_HALIGN_LEFT), JsonInt(NUI_VALIGN_MIDDLE)); + jLabel = NuiWidth(jLabel, 100.0f); + jRow = JsonArrayInsert(jRow, jLabel); + + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jSlider = NuiSliderFloat(NuiBind(VT_GetValueBind(nType)), JsonFloat(fMin), JsonFloat(fMax), JsonFloat(fStep)); + jSlider = NuiId(jSlider, VT_GetValueBind(nType)); + jSlider = NuiWidth(jSlider, 175.0f); + jRow = JsonArrayInsert(jRow, jSlider); + + json jText = NuiTextEdit(JsonString(""), NuiBind(VT_GetDisplayBind(nType)), 10, FALSE); + jText = NuiEnabled(jText, JsonBool(FALSE)); + jText = NuiWidth(jText, 75.0f); + jRow = JsonArrayInsert(jRow, jText); + + json jButtonClear = NuiButton(JsonString("X")); + jButtonClear = NuiId(jButtonClear, VT_GetClearButtonId(nType)); + jButtonClear = NuiWidth(jButtonClear, 35.0f); + jButtonClear = NuiHeight(jButtonClear, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonClear); + + return NuiRow(jRow); +} + +void VT_SetValueBindToCurrentValue(object oPlayer, int nToken, int nType) +{ + object oTarget = VT_GetCurrentTarget(oPlayer); + NuiSetBind(oPlayer, nToken, VT_GetValueBind(nType), JsonFloat(GetObjectVisualTransform(oTarget, nType))); +} + +void VT_ShowWindow(object oPlayer) +{ + int nToken = NuiFindWindow(oPlayer, VT_WINDOW_ID); + + if (nToken) + return; + + object oModule = GetModule(); + json jWindow = GetLocalJson(oModule, VT_WINDOW_JSON); + if (!JsonGetType(jWindow)) + { + json jCol; + json jRow; + + jCol = JsonArray(); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiSpacer()); + + json jButtonTarget = NuiButton(JsonString("Target")); + jButtonTarget = NuiId(jButtonTarget, VT_TARGET_BUTTON_ID); + jButtonTarget = NuiWidth(jButtonTarget, 100.0f); + jButtonTarget = NuiHeight(jButtonTarget, 35.0f); + jRow = JsonArrayInsert(jRow, jButtonTarget); + + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + jCol = JsonArrayInsert(jCol, VT_CreateVisualTransformRow("Scale", OBJECT_VISUAL_TRANSFORM_SCALE, VT_SCALE_MIN, VT_SCALE_MAX, VT_SCALE_STEP)); + jCol = JsonArrayInsert(jCol, VT_CreateVisualTransformRow("Rotate X", OBJECT_VISUAL_TRANSFORM_ROTATE_X, VT_ROTATE_MIN, VT_ROTATE_MAX, VT_ROTATE_STEP)); + jCol = JsonArrayInsert(jCol, VT_CreateVisualTransformRow("Rotate Y", OBJECT_VISUAL_TRANSFORM_ROTATE_Y, VT_ROTATE_MIN, VT_ROTATE_MAX, VT_ROTATE_STEP)); + jCol = JsonArrayInsert(jCol, VT_CreateVisualTransformRow("Rotate Z", OBJECT_VISUAL_TRANSFORM_ROTATE_Z, VT_ROTATE_MIN, VT_ROTATE_MAX, VT_ROTATE_STEP)); + jCol = JsonArrayInsert(jCol, VT_CreateVisualTransformRow("Translate X", OBJECT_VISUAL_TRANSFORM_TRANSLATE_X, VT_TRANSLATE_MIN, VT_TRANSLATE_MAX, VT_TRANSLATE_STEP)); + jCol = JsonArrayInsert(jCol, VT_CreateVisualTransformRow("Translate Y", OBJECT_VISUAL_TRANSFORM_TRANSLATE_Y, VT_TRANSLATE_MIN, VT_TRANSLATE_MAX, VT_TRANSLATE_STEP)); + jCol = JsonArrayInsert(jCol, VT_CreateVisualTransformRow("Translate Z", OBJECT_VISUAL_TRANSFORM_TRANSLATE_Z, VT_TRANSLATE_MIN, VT_TRANSLATE_MAX, VT_TRANSLATE_STEP)); + + jRow = JsonArray(); + { + jRow = JsonArrayInsert(jRow, NuiSpacer()); + } + jCol = JsonArrayInsert(jCol, NuiRow(jRow)); + + json jRoot = NuiCol(jCol); + jWindow = NuiWindow(jRoot, NuiBind(NUI_WINDOW_TITLE_BIND), NuiBind(NUI_WINDOW_GEOMETRY_BIND), JsonBool(FALSE), JsonNull(), JsonBool(TRUE), JsonBool(FALSE), JsonBool(TRUE)); + SetLocalJson(oModule, VT_WINDOW_JSON, jWindow); + } + + nToken = NuiCreate(oPlayer, jWindow, VT_WINDOW_ID); + + json jGeometry = GetLocalJson(oPlayer, VT_WINDOW_GEOMETRY); + if (!JsonGetType(jGeometry)) + jGeometry = NuiGetCenteredGeometryRect(oPlayer, 450.0f, 425.0f); + + VT_SetCurrentTarget(oPlayer, oPlayer); + + NuiSetBindWatch(oPlayer, nToken, VT_GetValueBind(OBJECT_VISUAL_TRANSFORM_SCALE), TRUE); + NuiSetBindWatch(oPlayer, nToken, VT_GetValueBind(OBJECT_VISUAL_TRANSFORM_ROTATE_X), TRUE); + NuiSetBindWatch(oPlayer, nToken, VT_GetValueBind(OBJECT_VISUAL_TRANSFORM_ROTATE_Y), TRUE); + NuiSetBindWatch(oPlayer, nToken, VT_GetValueBind(OBJECT_VISUAL_TRANSFORM_ROTATE_Z), TRUE); + NuiSetBindWatch(oPlayer, nToken, VT_GetValueBind(OBJECT_VISUAL_TRANSFORM_TRANSLATE_X), TRUE); + NuiSetBindWatch(oPlayer, nToken, VT_GetValueBind(OBJECT_VISUAL_TRANSFORM_TRANSLATE_Y), TRUE); + NuiSetBindWatch(oPlayer, nToken, VT_GetValueBind(OBJECT_VISUAL_TRANSFORM_TRANSLATE_Z), TRUE); + + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_SCALE); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_ROTATE_X); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_ROTATE_Y); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_ROTATE_Z); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_TRANSLATE_X); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_TRANSLATE_Y); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_TRANSLATE_Z); + + NuiSetBindWatch(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, TRUE); + NuiSetBind(oPlayer, nToken, NUI_WINDOW_GEOMETRY_BIND, jGeometry); + NuiSetBind(oPlayer, nToken, NUI_WINDOW_TITLE_BIND, JsonString("Visually Transforming: " + GetName(oPlayer))); +} + +void VT_SetCurrentTarget(object oPlayer, object oTarget) +{ + SetLocalObject(oPlayer, VT_CURRENT_TARGET, oTarget); +} + +object VT_GetCurrentTarget(object oPlayer) +{ + return GetLocalObject(oPlayer, VT_CURRENT_TARGET); +} + +void VT_DeleteCurrentTarget(object oPlayer) +{ + DeleteLocalObject(oPlayer, VT_CURRENT_TARGET); +} + +void VT_EnterTargetMode(object oPlayer) +{ + SetLocalInt(oPlayer, VT_TARGETING_MODE, TRUE); + EnterTargetingMode(oPlayer, OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR | OBJECT_TYPE_TILE); +} + +void VT_HandleTargetEvent(object oPlayer, object oTarget, vector vPosition) +{ + if (!GetLocalInt(oPlayer, VT_TARGETING_MODE)) + return; + + DeleteLocalInt(oPlayer, VT_TARGETING_MODE); + + if (!GetIsObjectValid(oTarget)) + return; + + if (GetArea(oPlayer) == oTarget) + { + oTarget = GetNearestObjectToLocation(OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR, Location(oTarget, vPosition, 0.0f)); + + if (!GetIsObjectValid(oTarget)) + return; + } + else + { + int nObjectType = GetObjectType(oTarget); + + if (nObjectType != OBJECT_TYPE_CREATURE && + nObjectType != OBJECT_TYPE_PLACEABLE && + nObjectType != OBJECT_TYPE_DOOR) + return; + } + + int nToken = NuiFindWindow(oPlayer, VT_WINDOW_ID); + + if (!nToken) + return; + + VT_SetCurrentTarget(oPlayer, oTarget); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_SCALE); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_ROTATE_X); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_ROTATE_Y); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_ROTATE_Z); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_TRANSLATE_X); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_TRANSLATE_Y); + VT_SetValueBindToCurrentValue(oPlayer, nToken, OBJECT_VISUAL_TRANSFORM_TRANSLATE_Z); + NuiSetBind(oPlayer, nToken, NUI_WINDOW_TITLE_BIND, JsonString("Visually Transforming: " + GetName(oTarget))); +} + diff --git a/_module/nss/inc_util.nss b/_module/nss/inc_util.nss new file mode 100644 index 00000000..3a2aac15 --- /dev/null +++ b/_module/nss/inc_util.nss @@ -0,0 +1,129 @@ +/* + Utility Functions + Created By: Daz +*/ + +#include "nw_inc_gff" +#include "nw_inc_nui" + +string Util_GetIconResref(object oItem, json jItem, int nBaseItem); +string Util_GetIconResref(object oItem, json jItem, int nBaseItem) +{ + if (nBaseItem == BASE_ITEM_CLOAK) // Cloaks use PLTs so their default icon doesn't really work + return "iit_cloak"; + else if (nBaseItem == BASE_ITEM_SPELLSCROLL || nBaseItem == BASE_ITEM_ENCHANTED_SCROLL) + {// Scrolls get their icon from the cast spell property + if (GetItemHasItemProperty(oItem, ITEM_PROPERTY_CAST_SPELL)) + { + itemproperty ip = GetFirstItemProperty(oItem); + while (GetIsItemPropertyValid(ip)) + { + if (GetItemPropertyType(ip) == ITEM_PROPERTY_CAST_SPELL) + return Get2DAString("iprp_spells", "Icon", GetItemPropertySubType(ip)); + + ip = GetNextItemProperty(oItem); + } + } + } + else if (Get2DAString("baseitems", "ModelType", nBaseItem) == "0") + {// Create the icon resref for simple modeltype items + json jSimpleModel = GffGetByte(jItem, "ModelPart1"); + if (JsonGetType(jSimpleModel) == JSON_TYPE_INTEGER) + { + string sSimpleModelId = IntToString(JsonGetInt(jSimpleModel)); + while (GetStringLength(sSimpleModelId) < 3)// Padding... + { + sSimpleModelId = "0" + sSimpleModelId; + } + + string sDefaultIcon = Get2DAString("baseitems", "DefaultIcon", nBaseItem); + switch (nBaseItem) + { + case BASE_ITEM_MISCSMALL: + case BASE_ITEM_CRAFTMATERIALSML: + sDefaultIcon = "iit_smlmisc_" + sSimpleModelId; + break; + case BASE_ITEM_MISCMEDIUM: + case BASE_ITEM_CRAFTMATERIALMED: + case 112:/* Crafting Base Material */ + sDefaultIcon = "iit_midmisc_" + sSimpleModelId; + break; + case BASE_ITEM_MISCLARGE: + sDefaultIcon = "iit_talmisc_" + sSimpleModelId; + break; + case BASE_ITEM_MISCTHIN: + sDefaultIcon = "iit_thnmisc_" + sSimpleModelId; + break; + } + + int nLength = GetStringLength(sDefaultIcon); + if (GetSubString(sDefaultIcon, nLength - 4, 1) == "_")// Some items have a default icon of xx_yyy_001, we strip the last 4 symbols if that is the case + sDefaultIcon = GetStringLeft(sDefaultIcon, nLength - 4); + string sIcon = sDefaultIcon + "_" + sSimpleModelId; + if (ResManGetAliasFor(sIcon, RESTYPE_TGA) != "")// Check if the icon actually exists, if not, we'll fall through and return the default icon + return sIcon; + } + } + + // For everything else use the item's default icon + return Get2DAString("baseitems", "DefaultIcon", nBaseItem); +} + +json Util_GetModelPart(string sDefaultIcon, string sType, json jPart) +{ + if (JsonGetType(jPart) == JSON_TYPE_INTEGER) + { + string sModelPart = IntToString(JsonGetInt(jPart)); + while (GetStringLength(sModelPart) < 3) + { + sModelPart = "0" + sModelPart; + } + + string sIcon = sDefaultIcon + sType + sModelPart; + if (ResManGetAliasFor(sIcon, RESTYPE_TGA) != "") + return JsonString(sIcon); + } + + return JsonString(""); +} + +json Util_GetComplexIconData(json jItem, int nBaseItem); +json Util_GetComplexIconData(json jItem, int nBaseItem) +{ + if (Get2DAString("baseitems", "ModelType", nBaseItem) == "2") + { + string sDefaultIcon = Get2DAString("baseitems", "DefaultIcon", nBaseItem); + json jComplexIcon = JsonObject(); + jComplexIcon = JsonObjectSet(jComplexIcon, "top", Util_GetModelPart(sDefaultIcon, "_t_", GffGetByte(jItem, "ModelPart3"))); + jComplexIcon = JsonObjectSet(jComplexIcon, "middle", Util_GetModelPart(sDefaultIcon, "_m_", GffGetByte(jItem, "ModelPart2"))); + jComplexIcon = JsonObjectSet(jComplexIcon, "bottom", Util_GetModelPart(sDefaultIcon, "_b_", GffGetByte(jItem, "ModelPart1"))); + + return jComplexIcon; + } + + return JsonNull(); +} + +string Util_Get2DAStringByStrRef(string s2DA, string sColumn, int nRow); +string Util_Get2DAStringByStrRef(string s2DA, string sColumn, int nRow) +{ + return GetStringByStrRef(StringToInt(Get2DAString(s2DA, sColumn, nRow))); +} + +string Util_GetItemName(object oItem, int bIdentified); +string Util_GetItemName(object oItem, int bIdentified) +{ + return bIdentified ? GetName(oItem) : Util_Get2DAStringByStrRef("baseitems", "Name", GetBaseItemType(oItem)) + " (Unidentified)"; +} + +void Util_SendDebugMessage(string sMessage); +void Util_SendDebugMessage(string sMessage) +{ + object oPlayer = GetFirstPC(); + while (oPlayer != OBJECT_INVALID) + { + SendMessageToPC(oPlayer, sMessage); + oPlayer = GetNextPC(); + } +} + diff --git a/_module/nss/mod_gui.nss b/_module/nss/mod_gui.nss new file mode 100644 index 00000000..1b1a2300 --- /dev/null +++ b/_module/nss/mod_gui.nss @@ -0,0 +1,19 @@ +#include "inc_examine" + +void main() +{ + object oPlayer = GetLastGuiEventPlayer(); + int nType = GetLastGuiEventType(); + object oTarget = GetLastGuiEventObject(); + int nValue = GetLastGuiEventInteger(); + + if (nType == GUIEVENT_DISABLED_PANEL_ATTEMPT_OPEN) + { + if (nValue == GUI_PANEL_EXAMINE_CREATURE || nValue == GUI_PANEL_EXAMINE_ITEM || + nValue == GUI_PANEL_EXAMINE_PLACEABLE || nValue == GUI_PANEL_EXAMINE_DOOR) + { + Examine_HandleGUIEvents(oPlayer, oTarget, nValue); + } + } +} + diff --git a/_module/nss/mod_nui.nss b/_module/nss/mod_nui.nss new file mode 100644 index 00000000..13fe75e6 --- /dev/null +++ b/_module/nss/mod_nui.nss @@ -0,0 +1,33 @@ +#include "inc_perchest" +#include "inc_gennui" +#include "inc_examine" +#include "inc_tictactoe" +#include "inc_blackjack" +#include "inc_transform" + +void main() +{ + object oPlayer = NuiGetEventPlayer(); + int nToken = NuiGetEventWindow(); + string sWindowId = NuiGetWindowId(oPlayer, nToken); + string sType = NuiGetEventType(); + string sElement = NuiGetEventElement(); + int nArrayIndex = NuiGetEventArrayIndex(); + json jPayload = NuiGetEventPayload(); + + //SendMessageToPC(oPlayer, "(" + IntToString(nToken) + ":" + sWindowId + ") T: " + sType + ", E: " + sElement + ", AI: " + IntToString(nArrayIndex) + ", P: " + JsonDump(jPayload)); + + if (sWindowId == PC_NUI_WINDOW_ID || sWindowId == PC_NUI_GOLD_WINDOW_ID) + PC_HandleNUIEvents(oPlayer, sWindowId, nToken, sType, sElement, nArrayIndex); + else if (sWindowId == EXAMINE_NUI_WINDOW_ID) + Examine_HandleNUIEvents(oPlayer, nToken, sType, sElement, nArrayIndex); + else if (sWindowId == TTT_WINDOW_ID) + TTT_HandleNUIEvents(oPlayer, nToken, sType, sElement, nArrayIndex, jPayload); + else if (sWindowId == BJ_WINDOW_ID) + BJ_HandleNUIEvents(oPlayer, nToken, sType, sElement, nArrayIndex, jPayload); + else if (sWindowId == VT_WINDOW_ID) + VT_HandleNUIEvents(oPlayer, nToken, sType, sElement, nArrayIndex, jPayload); + else + GNW_HandleNUIEvents(); +} + diff --git a/_module/nss/mod_target.nss b/_module/nss/mod_target.nss new file mode 100644 index 00000000..0c6d9705 --- /dev/null +++ b/_module/nss/mod_target.nss @@ -0,0 +1,12 @@ +#include "inc_perchest" +#include "inc_transform" + +void main() +{ + object oPlayer = GetLastPlayerToSelectTarget(); + object oTarget = GetTargetingModeSelectedObject(); + vector vPosition = GetTargetingModeSelectedPosition(); + + PC_HandleDepositEvent(oPlayer, oTarget, vPosition); + VT_HandleTargetEvent(oPlayer, oTarget, vPosition); +} diff --git a/_module/nss/obj_us_chest.nss b/_module/nss/obj_us_chest.nss new file mode 100644 index 00000000..b08502d8 --- /dev/null +++ b/_module/nss/obj_us_chest.nss @@ -0,0 +1,8 @@ +#include "inc_perchest" + +void main() +{ + object oPlayer = GetLastUsedBy(); + + PC_CreateNUIWindow(oPlayer); +} diff --git a/_module/nss/oc_persist.nss b/_module/nss/oc_persist.nss new file mode 100644 index 00000000..39cf83fa --- /dev/null +++ b/_module/nss/oc_persist.nss @@ -0,0 +1,28 @@ +/* +Created by Omnifarious +Basically all of this is reverse engineered for my purposes. +I owe lots of credit to the Item Storage Device by Rusty Dios. +https://neverwintervault.org/project/nwn1/prefab/item/item-storage-device +*/ + +//This works to transfer items between charachters on the same CD key & Login Name. +void main() +{ + object oPC = GetLastClosedBy(); + string sUnique = (GetPCPublicCDKey(oPC) + GetPCPlayerName(oPC)); + + DestroyCampaignDatabase("DATA"+sUnique); + + int i = 0; + object oLoop = GetFirstItemInInventory(); + while(oLoop != OBJECT_INVALID) + { + SetCampaignString("DATA"+sUnique, sUnique+IntToString(i), GetResRef(oLoop), OBJECT_SELF); + SetCampaignInt("DATA"+sUnique, GetResRef(oLoop)+IntToString(i), GetNumStackedItems(oLoop), OBJECT_SELF); + i++; + DestroyObject(oLoop); + SendMessageToPC(oPC, GetName(oLoop) + " has been stored successfully"); + oLoop = GetNextItemInInventory(); + } + SetCampaignInt("DATA"+sUnique, sUnique, i, OBJECT_SELF); +} diff --git a/_module/nss/oo_persist.nss b/_module/nss/oo_persist.nss new file mode 100644 index 00000000..70f28d97 --- /dev/null +++ b/_module/nss/oo_persist.nss @@ -0,0 +1,25 @@ +/* +Created by Omnifarious +Basically all of this is reverse engineered for my purposes. +I owe lots of credit to the Item Storage Device by Rusty Dios. +https://neverwintervault.org/project/nwn1/prefab/item/item-storage-device +*/ + +//This works to transfer items between charachters on the same CD key & Login Name. +void main() +{ + object oPC = GetLastOpenedBy(); + string sUnique = (GetPCPublicCDKey(oPC) + GetPCPlayerName(oPC)); + + int i = 0; + int NumItems = GetCampaignInt("DATA"+sUnique, sUnique, OBJECT_SELF); + if(NumItems > 0) + { + while(i < NumItems) + { + string sResRef = GetCampaignString("DATA"+sUnique, sUnique+IntToString(i), OBJECT_SELF); + CreateItemOnObject(sResRef, OBJECT_SELF, GetCampaignInt("DATA"+sUnique, sResRef+IntToString(i), OBJECT_SELF)); + i++; + } + } +} diff --git a/_module/nss/ra_cocktrc_bite.nss b/_module/nss/ra_cocktrc_bite.nss new file mode 100644 index 00000000..01b7b5c4 --- /dev/null +++ b/_module/nss/ra_cocktrc_bite.nss @@ -0,0 +1,46 @@ +// Cockatrice Bite - Item Unique OnHit Script +// +// CON based petrification attack +// +// + +#include "prc_inc_spells" +//#include "x2_inc_spellhook" +#include "x2_inc_switches" + + +void main() +{ +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oItem = GetSpellCastItem(); + object oTarget = GetSpellTargetObject(); + + int oFort = GetFortitudeSavingThrow(oTarget); + int nDC = 10 + (GetHitDice(oNPC) / 2) + GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int bImmune = GetHasFeat(FEAT_IMMUNE_PETRIFICATION, oTarget); + + effect ePetrify = EffectPetrify(); + effect ePetrifyVis = EffectVisualEffect(VFX_IMP_FORTITUDE_SAVING_THROW_USE); + effect eImmune = EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE); + +//:: Respect Immunity to Petrification + if (bImmune) + { + //SendMessageToPC(OBJECT_SELF, "This creatrure is immune to petrification"); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImmune, oTarget); + return; + } + +//:: Cockatrice's are immune to their own petrification attack. + if (GetName(OBJECT_SELF) == GetName(oTarget)) + return; + +//:: See if the petrification is resisted. + if (!FortitudeSave(oTarget, nDC, SAVING_THROW_TYPE_ALL, oTarget)) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, ePetrifyVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePetrify, oTarget); + } + + } \ No newline at end of file diff --git a/_module/nss/ra_mod_onenter.nss b/_module/nss/ra_mod_onenter.nss index 7c5913ed..5157a756 100644 --- a/_module/nss/ra_mod_onenter.nss +++ b/_module/nss/ra_mod_onenter.nss @@ -1,6 +1,8 @@ #include "prc_inc_racial" //#include "journal_include" #include "pqj_inc" +#include "inc_examine" +#include "inc_gennui" void GivePCWands(object oPC) @@ -130,9 +132,13 @@ void main() { //:: Set Major Variables object oPC = GetEnteringObject(); - + +//:: NUI Magic by Daz + //Examine_DisablePanels(oPC); + PrintString(GetObjectUUID(oPC)); + //:: Restore jounral entries - RebuildJournalQuestEntries(GetEnteringObject()); + RebuildJournalQuestEntries(oPC); // Make sure PC isn't set to Plot, for reasons SetPlotFlag(oPC, FALSE); diff --git a/_module/nss/sob_examine001.nss b/_module/nss/sob_examine001.nss new file mode 100644 index 00000000..d89ce570 --- /dev/null +++ b/_module/nss/sob_examine001.nss @@ -0,0 +1,8 @@ +//Make PC read the description on a placeable when he interacts with it +void main() +{ + object oPC=GetLastUsedBy(); + object oExamine=OBJECT_SELF; + + AssignCommand(oPC,ActionExamine(oExamine)); +} diff --git a/_module/nss/sob_examine002.nss b/_module/nss/sob_examine002.nss new file mode 100644 index 00000000..ecfa59a5 --- /dev/null +++ b/_module/nss/sob_examine002.nss @@ -0,0 +1,7 @@ +//Allow PC to see his description. +void main() +{ + object oPC=GetLastUsedBy(); + + AssignCommand(oPC,ActionExamine(OBJECT_SELF)); +} diff --git a/_module/nss/sob_examine003.nss b/_module/nss/sob_examine003.nss new file mode 100644 index 00000000..b9f8fb8b --- /dev/null +++ b/_module/nss/sob_examine003.nss @@ -0,0 +1,8 @@ +//Make PC read the description on a door when he interacts with it +void main() +{ + object oPC=GetClickingObject(); + object oExamine=OBJECT_SELF; + + AssignCommand(oPC,ActionExamine(oExamine)); +} diff --git a/_module/nss/sob_examine004.nss b/_module/nss/sob_examine004.nss new file mode 100644 index 00000000..aee861d7 --- /dev/null +++ b/_module/nss/sob_examine004.nss @@ -0,0 +1,12 @@ +//Gives placeable description when opened +void main() +{ + object oSelf=OBJECT_SELF; + string sDes=GetDescription(oSelf); + int nDone=GetLocalInt(oSelf,"SPEAKDONE"); + + if (nDone==TRUE) + return; + + SpeakString(sDes); +} diff --git a/_module/nss/x2_def_spawn.nss b/_module/nss/x2_def_spawn.nss index 58b943d0..8edcf4f4 100644 --- a/_module/nss/x2_def_spawn.nss +++ b/_module/nss/x2_def_spawn.nss @@ -154,7 +154,7 @@ void main() { effect eNatInvis = EffectInvisibility(4); eNatInvis = SupernaturalEffect(eNatInvis); - eNatInvis = ExtraordinaryEffect(eNatInvis); + //eNatInvis = ExtraordinaryEffect(eNatInvis); DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNatInvis,OBJECT_SELF)); } diff --git a/_module/nss/x2_mod_def_load.nss b/_module/nss/x2_mod_def_load.nss index 694be466..4d0bca43 100644 --- a/_module/nss/x2_mod_def_load.nss +++ b/_module/nss/x2_mod_def_load.nss @@ -38,6 +38,11 @@ #include "x2_inc_restsys" void main() { + + SetEventScript(GetModule(), EVENT_SCRIPT_MODULE_ON_NUI_EVENT, "mod_nui"); + SetEventScript(GetModule(), EVENT_SCRIPT_MODULE_ON_PLAYER_TARGET, "mod_target"); + SetEventScript(GetModule(), EVENT_SCRIPT_MODULE_ON_PLAYER_GUIEVENT, "mod_gui"); + if (GetGameDifficulty() == GAME_DIFFICULTY_CORE_RULES || GetGameDifficulty() == GAME_DIFFICULTY_DIFFICULT) { // * Setting the switch below will enable a seperate Use Magic Device Skillcheck for diff --git a/_module/ra_tdog.mod b/_module/ra_tdog.mod index 9d4f96d6..4a9d4c9d 100644 Binary files a/_module/ra_tdog.mod and b/_module/ra_tdog.mod differ diff --git a/_module/utc/DIREWEASEL002.utc.json b/_module/utc/DIREWEASEL002.utc.json new file mode 100644 index 00000000..49c4c1d4 --- /dev/null +++ b/_module/utc/DIREWEASEL002.utc.json @@ -0,0 +1,740 @@ +{ + "__data_type": "UTC ", + "Appearance_Type": { + "type": "word", + "value": 840 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 11 + }, + "ChallengeRating": { + "type": "float", + "value": 4.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 12 + }, + "ClassLevel": { + "type": "short", + "value": 6 + } + } + ] + }, + "Comment": { + "type": "cexostring", + "value": "Weasel, Dire: 06 HD\r\n\r\nMonster Manual, pg. 65\r\n\r\n" + }, + "Con": { + "type": "byte", + "value": 10 + }, + "Conversation": { + "type": "resref", + "value": "cv_charmed" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 28 + }, + "DecayTime": { + "type": "dword", + "value": 7000 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "type": "cexolocstring", + "value": { + "0": "This sleek, fur-covered creature has a body longer than a human is tall. It has a wedged-shaped head crowned in short horns, four short legs, and a stumpy tail. Its movements are fluid and very quick." + } + }, + "Dex": { + "type": "byte", + "value": 20 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 65536, + "EquippedRes": { + "type": "resref", + "value": "cr_bite_weasel01" + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3112 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2898 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 5195 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 10 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2468 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2919 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4095 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4092 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2884 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 354 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 1089 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3415 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2285 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4795 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 387 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4235 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 42 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + } + ] + }, + "FirstName": { + "type": "cexolocstring", + "value": { + "0": "Weasel, Dire: 06 HD" + } + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 0 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 28 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 0 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": { + "0": "" + } + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 28 + }, + "NaturalAC": { + "type": "byte", + "value": 2 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PaletteID": { + "type": "byte", + "value": 9 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 578 + }, + "Race": { + "type": "byte", + "value": 8 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "ra_ai_attacked" + }, + "ScriptDamaged": { + "type": "resref", + "value": "ra_ai_ondamaged" + }, + "ScriptDeath": { + "type": "resref", + "value": "ra_ai_ondeath" + }, + "ScriptDialogue": { + "type": "resref", + "value": "ra_ai_onconverse" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "ra_ai_ondisturb" + }, + "ScriptEndRound": { + "type": "resref", + "value": "ra_ai_endcmbtrnd" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "ra_ai_heartbeat" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "ra_ai_onblocked" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "ra_ai_onpercept" + }, + "ScriptRested": { + "type": "resref", + "value": "ra_ai_onrested" + }, + "ScriptSpawn": { + "type": "resref", + "value": "ra_ai_onspawn" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "ra_ai_onspelled" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "ra_ai_userdef" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 3 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 3 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 5 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 5 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 74 + }, + "Str": { + "type": "byte", + "value": 14 + }, + "Subrace": { + "type": "cexostring", + "value": "Animal" + }, + "Tag": { + "type": "cexostring", + "value": "DIREWEASEL002" + }, + "Tail_New": { + "type": "dword", + "value": 10348 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "direweasel002" + }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SET_NAME" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "Dire Weasel" + } + }, + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SPAWN_TYPE" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "no_spn_ftr" + } + } + ] + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 12 + } +} diff --git a/_module/utc/DIREWEASEL003.utc.json b/_module/utc/DIREWEASEL003.utc.json new file mode 100644 index 00000000..4164fe91 --- /dev/null +++ b/_module/utc/DIREWEASEL003.utc.json @@ -0,0 +1,747 @@ +{ + "__data_type": "UTC ", + "Appearance_Type": { + "type": "word", + "value": 5381 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 11 + }, + "ChallengeRating": { + "type": "float", + "value": 8.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 12 + }, + "ClassLevel": { + "type": "short", + "value": 10 + } + } + ] + }, + "Comment": { + "type": "cexostring", + "value": "Weasel, Dire: 10 HD\r\n\r\nMonster Manual, pg. 65\r\n\r\n" + }, + "Con": { + "type": "byte", + "value": 14 + }, + "Conversation": { + "type": "resref", + "value": "cv_charmed" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 44 + }, + "DecayTime": { + "type": "dword", + "value": 7000 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "type": "cexolocstring", + "value": { + "0": "This sleek, fur-covered creature has a body longer than a human is tall. It has a wedged-shaped head crowned in short horns, four short legs, and a stumpy tail. Its movements are fluid and very quick." + } + }, + "Dex": { + "type": "byte", + "value": 18 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 65536, + "EquippedRes": { + "type": "resref", + "value": "cr_bite_weasel01" + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3112 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2898 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 5195 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 10 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2468 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2919 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4095 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4092 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2884 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 354 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 1089 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3415 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2285 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4795 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 387 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4235 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 42 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 291 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + } + ] + }, + "FirstName": { + "type": "cexolocstring", + "value": { + "0": "Weasel, Dire: 10 HD" + } + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 0 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 44 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 0 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": { + "0": "" + } + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 64 + }, + "NaturalAC": { + "type": "byte", + "value": 4 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PaletteID": { + "type": "byte", + "value": 9 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 578 + }, + "Race": { + "type": "byte", + "value": 8 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "ra_ai_attacked" + }, + "ScriptDamaged": { + "type": "resref", + "value": "ra_ai_ondamaged" + }, + "ScriptDeath": { + "type": "resref", + "value": "ra_ai_ondeath" + }, + "ScriptDialogue": { + "type": "resref", + "value": "ra_ai_onconverse" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "ra_ai_ondisturb" + }, + "ScriptEndRound": { + "type": "resref", + "value": "ra_ai_endcmbtrnd" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "ra_ai_heartbeat" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "ra_ai_onblocked" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "ra_ai_onpercept" + }, + "ScriptRested": { + "type": "resref", + "value": "ra_ai_onrested" + }, + "ScriptSpawn": { + "type": "resref", + "value": "ra_ai_onspawn" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "ra_ai_onspelled" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "ra_ai_userdef" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 10 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 5 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 74 + }, + "Str": { + "type": "byte", + "value": 22 + }, + "Subrace": { + "type": "cexostring", + "value": "Animal" + }, + "Tag": { + "type": "cexostring", + "value": "DIREWEASEL003" + }, + "Tail_New": { + "type": "dword", + "value": 10348 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "direweasel003" + }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SET_NAME" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "Dire Weasel" + } + }, + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SPAWN_TYPE" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "no_spn_ftr" + } + } + ] + }, + "WalkRate": { + "type": "int", + "value": 6 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 12 + } +} diff --git a/_module/utc/direweasel001.utc.json b/_module/utc/direweasel001.utc.json new file mode 100644 index 00000000..22295ea9 --- /dev/null +++ b/_module/utc/direweasel001.utc.json @@ -0,0 +1,733 @@ +{ + "__data_type": "UTC ", + "Appearance_Type": { + "type": "word", + "value": 348 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 11 + }, + "ChallengeRating": { + "type": "float", + "value": 3.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 12 + }, + "ClassLevel": { + "type": "short", + "value": 3 + } + } + ] + }, + "Comment": { + "type": "cexostring", + "value": "Weasel, Dire: 03 HD\r\n\r\nMonster Manual, pg. 65\r\n\r\n" + }, + "Con": { + "type": "byte", + "value": 10 + }, + "Conversation": { + "type": "resref", + "value": "cv_charmed" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 16 + }, + "DecayTime": { + "type": "dword", + "value": 7000 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "type": "cexolocstring", + "value": { + "0": "This sleek, fur-covered creature has a body longer than a human is tall. It has a wedged-shaped head crowned in short horns, four short legs, and a stumpy tail. Its movements are fluid and very quick." + } + }, + "Dex": { + "type": "byte", + "value": 19 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 65536, + "EquippedRes": { + "type": "resref", + "value": "cr_bite_weasel01" + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3112 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2898 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 5195 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2468 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2919 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4095 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4092 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2884 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 354 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 1089 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3415 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2285 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4795 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 387 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4235 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 42 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + } + ] + }, + "FirstName": { + "type": "cexolocstring", + "value": { + "0": "Weasel, Dire: 03 HD" + } + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 0 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 16 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 0 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": { + "0": "" + } + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 16 + }, + "NaturalAC": { + "type": "byte", + "value": 2 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PaletteID": { + "type": "byte", + "value": 9 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 578 + }, + "Race": { + "type": "byte", + "value": 8 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "ra_ai_attacked" + }, + "ScriptDamaged": { + "type": "resref", + "value": "ra_ai_ondamaged" + }, + "ScriptDeath": { + "type": "resref", + "value": "ra_ai_ondeath" + }, + "ScriptDialogue": { + "type": "resref", + "value": "ra_ai_onconverse" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "ra_ai_ondisturb" + }, + "ScriptEndRound": { + "type": "resref", + "value": "ra_ai_endcmbtrnd" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "ra_ai_heartbeat" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "ra_ai_onblocked" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "ra_ai_onpercept" + }, + "ScriptRested": { + "type": "resref", + "value": "ra_ai_onrested" + }, + "ScriptSpawn": { + "type": "resref", + "value": "ra_ai_onspawn" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "ra_ai_onspelled" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "ra_ai_userdef" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 3 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 2 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 2 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 5 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 74 + }, + "Str": { + "type": "byte", + "value": 14 + }, + "Subrace": { + "type": "cexostring", + "value": "Animal" + }, + "Tag": { + "type": "cexostring", + "value": "DIREWEASEL001" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "direweasel001" + }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SET_NAME" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "Dire Weasel" + } + }, + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SPAWN_TYPE" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "no_spn_ftr" + } + } + ] + }, + "WalkRate": { + "type": "int", + "value": 5 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 12 + } +} diff --git a/_module/utc/ra_cockatrice001.utc.json b/_module/utc/ra_cockatrice001.utc.json new file mode 100644 index 00000000..9df15fe2 --- /dev/null +++ b/_module/utc/ra_cockatrice001.utc.json @@ -0,0 +1,656 @@ +{ + "__data_type": "UTC ", + "Appearance_Type": { + "type": "word", + "value": 368 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 9 + }, + "ChallengeRating": { + "type": "float", + "value": 4.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 23 + }, + "ClassLevel": { + "type": "short", + "value": 5 + } + } + ] + }, + "Comment": { + "type": "cexostring", + "value": "Cockatrice [RA]: 05 HD\r\n\r\nMonster Manual I, pg. 37" + }, + "Con": { + "type": "byte", + "value": 11 + }, + "Conversation": { + "type": "resref", + "value": "cv_charmed" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 50 + }, + "DecayTime": { + "type": "dword", + "value": 5000 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 40597, + "type": "cexolocstring", + "value": { + "0": "This avian creature is about the size of a large goose or turkey. It has the head and body of a cockerel, bat wings, and the long tail of a lizard. It's eyes glow with a dangerous-looking crimson sheen." + } + }, + "Dex": { + "type": "byte", + "value": 17 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 65536, + "EquippedRes": { + "type": "resref", + "value": "ra_cocktrc_bite" + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 228 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 10 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 354 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 42 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3920 + } + } + ] + }, + "FirstName": { + "id": 40596, + "type": "cexolocstring", + "value": { + "0": "Cockatrice [RA]: 05 HD" + } + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 0 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 50 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 0 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 50 + }, + "NaturalAC": { + "type": "byte", + "value": 0 + }, + "NoPermDeath": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 49 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 624 + }, + "Race": { + "type": "byte", + "value": 19 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "ra_ai_attacked" + }, + "ScriptDamaged": { + "type": "resref", + "value": "ra_ai_ondamaged" + }, + "ScriptDeath": { + "type": "resref", + "value": "ra_ai_ondeath" + }, + "ScriptDialogue": { + "type": "resref", + "value": "ra_ai_onconverse" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "ra_ai_ondisturb" + }, + "ScriptEndRound": { + "type": "resref", + "value": "ra_ai_endcmbtrnd" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "ra_ai_heartbeat" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "ra_ai_onblocked" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "ra_ai_onpercept" + }, + "ScriptRested": { + "type": "resref", + "value": "ra_ai_onrested" + }, + "ScriptSpawn": { + "type": "resref", + "value": "ra_ai_onspawn" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "ra_ai_onspelled" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "ra_ai_userdef" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 5 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 324 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 0 + }, + "Str": { + "type": "byte", + "value": 6 + }, + "Subrace": { + "type": "cexostring", + "value": "Magical Beast" + }, + "Tag": { + "type": "cexostring", + "value": "RA_COCKATRICE001" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "ra_cockatrice001" + }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SET_NAME" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "Cockatrice" + } + }, + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SPAWN_TYPE" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "no_spn_ftr" + } + } + ] + }, + "WalkRate": { + "type": "int", + "value": 4 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 13 + } +} diff --git a/_module/utc/ra_cockatrice002.utc.json b/_module/utc/ra_cockatrice002.utc.json new file mode 100644 index 00000000..144ece97 --- /dev/null +++ b/_module/utc/ra_cockatrice002.utc.json @@ -0,0 +1,670 @@ +{ + "__data_type": "UTC ", + "Appearance_Type": { + "type": "word", + "value": 865 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 9 + }, + "ChallengeRating": { + "type": "float", + "value": 8.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 23 + }, + "ClassLevel": { + "type": "short", + "value": 10 + } + } + ] + }, + "Comment": { + "type": "cexostring", + "value": "Cockatrice [RA]: 10 HD\r\n\r\nMonster Manual I, pg. 37" + }, + "Con": { + "type": "byte", + "value": 14 + }, + "Conversation": { + "type": "resref", + "value": "cv_charmed" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 100 + }, + "DecayTime": { + "type": "dword", + "value": 5000 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 40597, + "type": "cexolocstring", + "value": { + "0": "This avian creature is about the size of a large goose or turkey. It has the head and body of a cockerel, bat wings, and the long tail of a lizard. It's eyes glow with a dangerous-looking crimson sheen." + } + }, + "Dex": { + "type": "byte", + "value": 15 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 65536, + "EquippedRes": { + "type": "resref", + "value": "ra_cocktrc_bite2" + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 228 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 10 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 354 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 26 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 42 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 291 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3920 + } + } + ] + }, + "FirstName": { + "id": 40596, + "type": "cexolocstring", + "value": { + "0": "Cockatrice [RA]: 10 HD" + } + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 0 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 100 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 0 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 120 + }, + "NaturalAC": { + "type": "byte", + "value": 0 + }, + "NoPermDeath": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 49 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 624 + }, + "Race": { + "type": "byte", + "value": 19 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "ra_ai_attacked" + }, + "ScriptDamaged": { + "type": "resref", + "value": "ra_ai_ondamaged" + }, + "ScriptDeath": { + "type": "resref", + "value": "ra_ai_ondeath" + }, + "ScriptDialogue": { + "type": "resref", + "value": "ra_ai_onconverse" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "ra_ai_ondisturb" + }, + "ScriptEndRound": { + "type": "resref", + "value": "ra_ai_endcmbtrnd" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "ra_ai_heartbeat" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "ra_ai_onblocked" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "ra_ai_onpercept" + }, + "ScriptRested": { + "type": "resref", + "value": "ra_ai_onrested" + }, + "ScriptSpawn": { + "type": "resref", + "value": "ra_ai_onspawn" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "ra_ai_onspelled" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "ra_ai_userdef" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 10 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 9 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 8 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 324 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 0 + }, + "Str": { + "type": "byte", + "value": 10 + }, + "Subrace": { + "type": "cexostring", + "value": "Magical Beast" + }, + "Tag": { + "type": "cexostring", + "value": "RA_COCKATRICE002" + }, + "Tail_New": { + "type": "dword", + "value": 416 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "ra_cockatrice002" + }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SET_NAME" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "Cockatrice" + } + }, + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SPAWN_TYPE" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "no_spn_ftr" + } + } + ] + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 13 + } +} diff --git a/_module/utc/ra_cockatrice003.utc.json b/_module/utc/ra_cockatrice003.utc.json new file mode 100644 index 00000000..9dcf985d --- /dev/null +++ b/_module/utc/ra_cockatrice003.utc.json @@ -0,0 +1,684 @@ +{ + "__data_type": "UTC ", + "Appearance_Type": { + "type": "word", + "value": 868 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 9 + }, + "ChallengeRating": { + "type": "float", + "value": 12.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 23 + }, + "ClassLevel": { + "type": "short", + "value": 15 + } + } + ] + }, + "Comment": { + "type": "cexostring", + "value": "Cockatrice [RA]: 15 HD\r\n\r\nMonster Manual I, pg. 37" + }, + "Con": { + "type": "byte", + "value": 14 + }, + "Conversation": { + "type": "resref", + "value": "cv_charmed" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 150 + }, + "DecayTime": { + "type": "dword", + "value": 5000 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 40597, + "type": "cexolocstring", + "value": { + "0": "This avian creature is about the size of a large goose or turkey. It has the head and body of a cockerel, bat wings, and the long tail of a lizard. It's eyes glow with a dangerous-looking crimson sheen." + } + }, + "Dex": { + "type": "byte", + "value": 16 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 65536, + "EquippedRes": { + "type": "resref", + "value": "ra_cocktrc_bite2" + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 408 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 228 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 10 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 22 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 354 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 26 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 42 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 291 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3920 + } + } + ] + }, + "FirstName": { + "id": 40596, + "type": "cexolocstring", + "value": { + "0": "Cockatrice [RA]: 15 HD" + } + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 0 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 150 + }, + "Int": { + "type": "byte", + "value": 3 + }, + "Interruptable": { + "type": "byte", + "value": 0 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 180 + }, + "NaturalAC": { + "type": "byte", + "value": 0 + }, + "NoPermDeath": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 49 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 624 + }, + "Race": { + "type": "byte", + "value": 19 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "ra_ai_attacked" + }, + "ScriptDamaged": { + "type": "resref", + "value": "ra_ai_ondamaged" + }, + "ScriptDeath": { + "type": "resref", + "value": "ra_ai_ondeath" + }, + "ScriptDialogue": { + "type": "resref", + "value": "ra_ai_onconverse" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "ra_ai_ondisturb" + }, + "ScriptEndRound": { + "type": "resref", + "value": "ra_ai_endcmbtrnd" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "ra_ai_heartbeat" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "ra_ai_onblocked" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "ra_ai_onpercept" + }, + "ScriptRested": { + "type": "resref", + "value": "ra_ai_onrested" + }, + "ScriptSpawn": { + "type": "resref", + "value": "ra_ai_onspawn" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "ra_ai_onspelled" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "ra_ai_userdef" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 15 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 12 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 10 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 324 + }, + "SpecAbilityList": { + "type": "list", + "value": [] + }, + "StartingPackage": { + "type": "byte", + "value": 0 + }, + "Str": { + "type": "byte", + "value": 10 + }, + "Subrace": { + "type": "cexostring", + "value": "Magical Beast" + }, + "Tag": { + "type": "cexostring", + "value": "RA_COCKATRICE003" + }, + "Tail_New": { + "type": "dword", + "value": 416 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "ra_cockatrice003" + }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SET_NAME" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "Cockatrice" + } + }, + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SPAWN_TYPE" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "no_spn_ftr" + } + } + ] + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 13 + } +} diff --git a/_module/utc/ra_imp001.utc.json b/_module/utc/ra_imp001.utc.json new file mode 100644 index 00000000..2cb71767 --- /dev/null +++ b/_module/utc/ra_imp001.utc.json @@ -0,0 +1,798 @@ +{ + "__data_type": "UTC ", + "Appearance_Type": { + "type": "word", + "value": 105 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 10 + }, + "ChallengeRating": { + "type": "float", + "value": 5.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 24 + }, + "ClassLevel": { + "type": "short", + "value": 3 + } + } + ] + }, + "Comment": { + "type": "cexostring", + "value": "Imp: 03 HD\r\n\r\nMonster Manual I, pg. 56\r\n\r\nCharm Monster = Suggestion" + }, + "Con": { + "type": "byte", + "value": 10 + }, + "Conversation": { + "type": "resref", + "value": "cv_charmed" + }, + "CRAdjust": { + "type": "int", + "value": 0 + }, + "CurrentHitPoints": { + "type": "short", + "value": 13 + }, + "DecayTime": { + "type": "dword", + "value": 5000 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 12543, + "type": "cexolocstring", + "value": {} + }, + "Dex": { + "type": "byte", + "value": 17 + }, + "Disarmable": { + "type": "byte", + "value": 0 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 16384, + "EquippedRes": { + "type": "resref", + "value": "nw_it_crewpp016" + } + }, + { + "__struct_id": 131072, + "EquippedRes": { + "type": "resref", + "value": "cr_hide_imp01" + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 228 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 10 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 42 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 289 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3920 + } + } + ] + }, + "FirstName": { + "id": 5999, + "type": "cexolocstring", + "value": { + "0": "Imp: 03 HD" + } + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 0 + }, + "GoodEvil": { + "type": "byte", + "value": 0 + }, + "HitPoints": { + "type": "short", + "value": 13 + }, + "Int": { + "type": "byte", + "value": 10 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 100 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 13 + }, + "NaturalAC": { + "type": "byte", + "value": 5 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PaletteID": { + "type": "byte", + "value": 25 + }, + "PerceptionRange": { + "type": "byte", + "value": 11 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 185 + }, + "Race": { + "type": "byte", + "value": 20 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "x2_def_attacked" + }, + "ScriptDamaged": { + "type": "resref", + "value": "x2_def_ondamage" + }, + "ScriptDeath": { + "type": "resref", + "value": "x2_def_ondeath" + }, + "ScriptDialogue": { + "type": "resref", + "value": "x2_def_onconv" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "x2_def_ondisturb" + }, + "ScriptEndRound": { + "type": "resref", + "value": "x2_def_endcombat" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "x2_def_heartbeat" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "x2_def_onblocked" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "x2_def_percept" + }, + "ScriptRested": { + "type": "resref", + "value": "x2_def_rested" + }, + "ScriptSpawn": { + "type": "resref", + "value": "x2_def_spawn" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "x2_def_spellcast" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "x2_def_userdef" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 15 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 5 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 5 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 5 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 5 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 5 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 63 + }, + "SpecAbilityList": { + "type": "list", + "value": [ + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 15 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 11 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + } + ] + }, + "StartingPackage": { + "type": "byte", + "value": 86 + }, + "Str": { + "type": "byte", + "value": 10 + }, + "Subrace": { + "type": "cexostring", + "value": "Outsider (Evil, Extraplanar, Lawful)" + }, + "Tag": { + "type": "cexostring", + "value": "RA_IMP001" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "ra_imp001" + }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SET_NAME" + }, + "Type": { + "type": "dword", + "value": 3 + }, + "Value": { + "type": "cexostring", + "value": "Marty the Imp" + } + }, + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "bFlying" + }, + "Type": { + "type": "dword", + "value": 1 + }, + "Value": { + "type": "int", + "value": 1 + } + } + ] + }, + "WalkRate": { + "type": "int", + "value": 6 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 12 + } +} diff --git a/_module/utc/ra_imp_marty.utc.json b/_module/utc/ra_imp_marty.utc.json index 736613cb..0e91f0f4 100644 --- a/_module/utc/ra_imp_marty.utc.json +++ b/_module/utc/ra_imp_marty.utc.json @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 4.0 + "value": 5.0 }, "ClassList": { "type": "list", @@ -126,6 +126,13 @@ "type": "word", "value": 289 } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3920 + } } ] }, @@ -576,11 +583,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 90 + "value": 799 }, "SpellCasterLevel": { "type": "byte", - "value": 6 + "value": 0 }, "SpellFlags": { "type": "byte", @@ -591,11 +598,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 90 + "value": 799 }, "SpellCasterLevel": { "type": "byte", - "value": 6 + "value": 0 }, "SpellFlags": { "type": "byte", @@ -606,11 +613,101 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 90 + "value": 799 }, "SpellCasterLevel": { "type": "byte", - "value": 6 + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 799 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 }, "SpellFlags": { "type": "byte", @@ -679,21 +776,6 @@ "type": "int", "value": 1 } - }, - { - "__struct_id": 0, - "Name": { - "type": "cexostring", - "value": "NATURAL_INVIS" - }, - "Type": { - "type": "dword", - "value": 1 - }, - "Value": { - "type": "int", - "value": 1 - } } ] }, diff --git a/_module/uti/cr_bite_weasel01.uti.json b/_module/uti/cr_bite_weasel01.uti.json new file mode 100644 index 00000000..ec61c255 --- /dev/null +++ b/_module/uti/cr_bite_weasel01.uti.json @@ -0,0 +1,145 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 69 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "Dire Weasel Bite" + }, + "Cost": { + "type": "dword", + "value": 844 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": { + "0": "Dire Weasel Bite" + } + }, + "Description": { + "type": "cexolocstring", + "value": { + "0": "Dire Weasel Bite" + } + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "id": 13238, + "type": "cexolocstring", + "value": { + "0": "Dire Weasel Bite" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 55 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 8 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 26 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 82 + }, + "Subtype": { + "type": "word", + "value": 125 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "CR_BITE_WEASEL01" + }, + "TemplateResRef": { + "type": "resref", + "value": "cr_bite_weasel01" + } +} diff --git a/_module/uti/ra_cocktrc_bite.uti.json b/_module/uti/ra_cocktrc_bite.uti.json new file mode 100644 index 00000000..c5bf2140 --- /dev/null +++ b/_module/uti/ra_cocktrc_bite.uti.json @@ -0,0 +1,145 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 70 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "Cockatrice Bite" + }, + "Cost": { + "type": "dword", + "value": 604 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": { + "0": "Cockatrice Bite" + } + }, + "Description": { + "type": "cexolocstring", + "value": { + "0": "Cockatrice Bite" + } + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "id": 48250, + "type": "cexolocstring", + "value": { + "0": "Cockatrice Bite" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 55 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 26 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 82 + }, + "Subtype": { + "type": "word", + "value": 125 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "RA_COCKTRC_BITE" + }, + "TemplateResRef": { + "type": "resref", + "value": "ra_cocktrc_bite" + } +} diff --git a/_module/uti/ra_cocktrc_bite2.uti.json b/_module/uti/ra_cocktrc_bite2.uti.json new file mode 100644 index 00000000..3bdcc07a --- /dev/null +++ b/_module/uti/ra_cocktrc_bite2.uti.json @@ -0,0 +1,145 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 70 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "Cockatrice Bite (Medium)" + }, + "Cost": { + "type": "dword", + "value": 844 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": { + "0": "Cockatrice Bite (Medium)" + } + }, + "Description": { + "type": "cexolocstring", + "value": { + "0": "Cockatrice Bite (Medium)" + } + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "id": 48250, + "type": "cexolocstring", + "value": { + "0": "Cockatrice Bite (Medium)" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 55 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 8 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 26 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 82 + }, + "Subtype": { + "type": "word", + "value": 125 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "RA_COCKTRC_BITE" + }, + "TemplateResRef": { + "type": "resref", + "value": "ra_cocktrc_bite2" + } +} diff --git a/_module/utp/persist_chest.utp.json b/_module/utp/persist_chest.utp.json new file mode 100644 index 00000000..f0badd98 --- /dev/null +++ b/_module/utp/persist_chest.utp.json @@ -0,0 +1,219 @@ +{ + "__data_type": "UTP ", + "AnimationState": { + "type": "byte", + "value": 0 + }, + "Appearance": { + "type": "dword", + "value": 10 + }, + "AutoRemoveKey": { + "type": "byte", + "value": 0 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "CloseLockDC": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "Daz's NUI Persistent Chest" + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CurrentHP": { + "type": "short", + "value": 15 + }, + "Description": { + "id": 14597, + "type": "cexolocstring", + "value": { + "0": "This looks like a safe place to store your belongings." + } + }, + "DisarmDC": { + "type": "byte", + "value": 15 + }, + "Faction": { + "type": "dword", + "value": 1 + }, + "Fort": { + "type": "byte", + "value": 16 + }, + "Hardness": { + "type": "byte", + "value": 5 + }, + "HasInventory": { + "type": "byte", + "value": 0 + }, + "HP": { + "type": "short", + "value": 15 + }, + "Interruptable": { + "type": "byte", + "value": 0 + }, + "KeyName": { + "type": "cexostring", + "value": "" + }, + "KeyRequired": { + "type": "byte", + "value": 0 + }, + "Lockable": { + "type": "byte", + "value": 0 + }, + "Locked": { + "type": "byte", + "value": 0 + }, + "LocName": { + "id": 5348, + "type": "cexolocstring", + "value": {} + }, + "OnClick": { + "type": "resref", + "value": "" + }, + "OnClosed": { + "type": "resref", + "value": "" + }, + "OnDamaged": { + "type": "resref", + "value": "" + }, + "OnDeath": { + "type": "resref", + "value": "" + }, + "OnDisarm": { + "type": "resref", + "value": "" + }, + "OnHeartbeat": { + "type": "resref", + "value": "" + }, + "OnInvDisturbed": { + "type": "resref", + "value": "" + }, + "OnLock": { + "type": "resref", + "value": "" + }, + "OnMeleeAttacked": { + "type": "resref", + "value": "" + }, + "OnOpen": { + "type": "resref", + "value": "" + }, + "OnSpellCastAt": { + "type": "resref", + "value": "" + }, + "OnTrapTriggered": { + "type": "resref", + "value": "" + }, + "OnUnlock": { + "type": "resref", + "value": "" + }, + "OnUsed": { + "type": "resref", + "value": "obj_us_chest" + }, + "OnUserDefined": { + "type": "resref", + "value": "" + }, + "OpenLockDC": { + "type": "byte", + "value": 18 + }, + "PaletteID": { + "type": "byte", + "value": 6 + }, + "Plot": { + "type": "byte", + "value": 1 + }, + "PortraitId": { + "type": "word", + "value": 368 + }, + "Ref": { + "type": "byte", + "value": 0 + }, + "Static": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "PERSIST_CHEST" + }, + "TemplateResRef": { + "type": "resref", + "value": "persist_chest" + }, + "TrapDetectable": { + "type": "byte", + "value": 1 + }, + "TrapDetectDC": { + "type": "byte", + "value": 0 + }, + "TrapDisarmable": { + "type": "byte", + "value": 1 + }, + "TrapFlag": { + "type": "byte", + "value": 0 + }, + "TrapOneShot": { + "type": "byte", + "value": 1 + }, + "TrapType": { + "type": "byte", + "value": 0 + }, + "Type": { + "type": "byte", + "value": 0 + }, + "Useable": { + "type": "byte", + "value": 1 + }, + "Will": { + "type": "byte", + "value": 0 + } +}