From 8836e3783e5f74044452c1f250651976d161580e Mon Sep 17 00:00:00 2001 From: Danny Bierek Date: Thu, 20 Jun 2024 00:11:06 -0700 Subject: [PATCH] Move functionality to modules and add prim read and extract examples --- .gitignore | 3 +- .vscode/launch.json | 101 -- Cargo.toml | 1 + examples/connect_to_game.rs | 62 +- examples/extract_prims.rs | 22 + examples/read_prims.rs | 13 + examples/scan_scenario.rs | 9 +- glacier2obj.py | 4 +- package-lock.json | 6 + prims.json | 2630 ------------------------------ src/connect/game_connection.rs | 87 + src/connect/mod.rs | 1 + src/extract/mod.rs | 1 + src/extract/prim_extraction.rs | 57 + src/json_serde/mod.rs | 1 + src/json_serde/prims_json.rs | 74 + src/lib.rs | 6 +- src/package/mod.rs | 1 + src/package/package_scan.rs | 152 ++ src/scanner/scenario_scan.rs | 272 --- src/{scanner => scenario}/mod.rs | 0 src/scenario/scenario_scan.rs | 150 ++ toFind.json | 1 - 23 files changed, 586 insertions(+), 3068 deletions(-) delete mode 100644 .vscode/launch.json create mode 100644 examples/extract_prims.rs create mode 100644 examples/read_prims.rs create mode 100644 package-lock.json delete mode 100644 prims.json create mode 100644 src/connect/game_connection.rs create mode 100644 src/connect/mod.rs create mode 100644 src/extract/mod.rs create mode 100644 src/extract/prim_extraction.rs create mode 100644 src/json_serde/mod.rs create mode 100644 src/json_serde/prims_json.rs create mode 100644 src/package/mod.rs create mode 100644 src/package/package_scan.rs delete mode 100644 src/scanner/scenario_scan.rs rename src/{scanner => scenario}/mod.rs (100%) create mode 100644 src/scenario/scenario_scan.rs delete mode 100644 toFind.json diff --git a/.gitignore b/.gitignore index 62f5b29..2e13d53 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target -/objects \ No newline at end of file +/objects +/output \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 54eba85..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'glacier2obj'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=glacier2obj" - ], - "filter": { - "name": "glacier2obj", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug example 'connect_to_game'", - "cargo": { - "args": [ - "build", - "--example=connect_to_game", - "--package=glacier2obj" - ], - "filter": { - "name": "connect_to_game", - "kind": "example" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in example 'connect_to_game'", - "cargo": { - "args": [ - "test", - "--no-run", - "--example=connect_to_game", - "--package=glacier2obj" - ], - "filter": { - "name": "connect_to_game", - "kind": "example" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug example 'scan_scenario'", - "cargo": { - "args": [ - "build", - "--example=scan_scenario", - "--package=glacier2obj" - ], - "filter": { - "name": "scan_scenario", - "kind": "example" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in example 'scan_scenario'", - "cargo": { - "args": [ - "test", - "--no-run", - "--example=scan_scenario", - "--package=glacier2obj" - ], - "filter": { - "name": "scan_scenario", - "kind": "example" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - } - ] -} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index fff9f70..ef5a709 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,6 +26,7 @@ extended-tea = "0.1.1" byteorder = "1.5.0" rayon = { version = "1.10.0", optional = true} serde = { version = "1.0.199", optional = true, features = ["derive"] } +serde_json = { version = "1.0.117"} serde-hex = { version = "0.1.0", optional = true } tungstenite = { version = "0.16.0", features = ["native-tls"]} url = "2.2.2" diff --git a/examples/connect_to_game.rs b/examples/connect_to_game.rs index e465477..d0f0d12 100644 --- a/examples/connect_to_game.rs +++ b/examples/connect_to_game.rs @@ -1,63 +1,13 @@ -use std::{env, fs}; -use std::fs::OpenOptions; -use std::io::prelude::*; +use std::env; + +use glacier2obj::connect::game_connection::GameConnection; -use tungstenite::{connect, Message}; -use url::Url; pub fn main() { let args: Vec = env::args().collect(); if args.len() < 2 { - eprintln!("Usage: cargo run -- example connect_to_game "); + eprintln!("Usage: cargo run -- example connect_to_game "); return; } - println!("Connecting to game on port 46735"); - - let (mut socket, _response) = connect( - Url::parse("ws://localhost:46735/socket").unwrap() - ).expect("Can't connect"); - - let _ = socket.write_message(Message::Text(r#"{"type":"hello","identifier":"glacier2obj"}"#.into())); - let message = fs::read_to_string(args[1].as_str()).expect(format!("Error opening {}. Run a scan to generate this file", args[1].as_str()).as_str()); - - let _ = socket.write_message(Message::Text(message.into())); - - fs::write(args[2].as_str(), "").expect(format!("Error writing to {}", args[2].as_str()).as_str()); - - let mut out_file = OpenOptions::new() - .write(true) - .append(true) - .open(args[2].as_str()) - .unwrap(); - - let mut welcome_received: bool = false; - let mut is_first: bool = true; - - loop { - let msg = socket.read_message().expect("Error reading message"); - if msg.to_string().as_str() == "Done sending entities." { - println!("Received Done message. Finalizing json output and exiting."); - if let Err(e) = writeln!(out_file, "]}}") { - eprintln!("Couldn't write to file: {}", e); - } - break - } - if welcome_received { - if !is_first { - if let Err(e) = writeln!(out_file, ",") { - eprintln!("Couldn't write to file: {}", e); - } - } else { - is_first = false; - } - if let Err(e) = write!(out_file, "{}", msg) { - eprintln!("Couldn't write to file: {}", e); - } - } else { - if let Err(e) = write!(out_file, r#"{{"entities":["#) { - eprintln!("Couldn't write to file: {}", e); - } - welcome_received = true; - } - } -} + GameConnection::get_prim_list_from_game(args[1].as_str(), args[2].as_str()); +} \ No newline at end of file diff --git a/examples/extract_prims.rs b/examples/extract_prims.rs new file mode 100644 index 0000000..b07ad40 --- /dev/null +++ b/examples/extract_prims.rs @@ -0,0 +1,22 @@ +use glacier2obj::extract::prim_extraction::PrimExtraction; +use glacier2obj::json_serde::prims_json::PrimsJson; +use glacier2obj::package::package_scan::PackageScan; +use std::env; + +fn main() { + let args: Vec = env::args().collect(); + + if args.len() < 6 { + eprintln!("Usage: cargo run --example extract_prims -- "); + return; + } + let prims_json = PrimsJson::build_from_prims_file(args[4].clone()); + let needed_prim_hashes = PrimExtraction::get_needed_prim_hashes(&prims_json, args[5].clone()); + if needed_prim_hashes.is_empty() { + println!("All prim files already exist. Skipping extraction."); + return; + } + println!("Extracting {} prims.", needed_prim_hashes.len()); + let partition_manager = PackageScan::scan_packages(args[1].clone(), args[3].clone()).unwrap(); + PrimExtraction::extract_prims(args[2].clone(), needed_prim_hashes, &partition_manager, args[5].clone()); +} \ No newline at end of file diff --git a/examples/read_prims.rs b/examples/read_prims.rs new file mode 100644 index 0000000..b09b343 --- /dev/null +++ b/examples/read_prims.rs @@ -0,0 +1,13 @@ +use glacier2obj::json_serde::prims_json::PrimsJson; +use std::env; + +fn main() { + let args: Vec = env::args().collect(); + + if args.len() < 2 { + eprintln!("Usage: cargo run --example read_prims -- "); + return; + } + let mut prims_json: PrimsJson = PrimsJson::build_from_prims_file(args[1].clone()); + prims_json.output_prims(); +} \ No newline at end of file diff --git a/examples/scan_scenario.rs b/examples/scan_scenario.rs index bc45c14..a6a34a1 100644 --- a/examples/scan_scenario.rs +++ b/examples/scan_scenario.rs @@ -1,6 +1,6 @@ use std::env; -use glacier2obj::scanner::scenario_scan::ScenarioScan; +use glacier2obj::{package::package_scan::PackageScan, scenario::scenario_scan::ScenarioScan}; // Based on mount_game_files example from rpkg-rs pub fn main() { @@ -9,8 +9,9 @@ pub fn main() { eprintln!("Usage: cargo run -- example scan_scenario "); return; } - let mut scan: ScenarioScan = ScenarioScan::new(args[1].clone(), args[2].clone(), args[3].clone(), args[4].clone()); - scan.scan_scenario(); + let mut scan: ScenarioScan = ScenarioScan::new(args[3].clone(), args[4].clone()); + let partition_manager = PackageScan::scan_packages(args[1].clone(), args[2].clone()).unwrap(); + + scan.scan_scenario(&partition_manager); scan.output_to_file(args[5].clone()); - return; } diff --git a/glacier2obj.py b/glacier2obj.py index 8436915..7c33d23 100644 --- a/glacier2obj.py +++ b/glacier2obj.py @@ -5,10 +5,10 @@ from mathutils import Euler import math -path_to_obj_dir = os.path.join('D:\\workspace\\glacier2obj\\objects\\OBJ\\') +path_to_obj_dir = os.path.join('D:\\workspace\\glacier2obj\\output\\obj\\') file_list = sorted(os.listdir(path_to_obj_dir)) obj_list = [item for item in file_list if item.endswith('.obj')] -path_to_prims_json = os.path.join('D:\\workspace\\glacier2obj\\prims.json'); +path_to_prims_json = os.path.join('D:\\workspace\\glacier2obj\\output\\prims.json'); f = open (path_to_prims_json, "r") data = json.loads(f.read()) print("Printing hashes and transforms") diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..009e2b2 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "glacier2obj", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/prims.json b/prims.json deleted file mode 100644 index 4cfdf84..0000000 --- a/prims.json +++ /dev/null @@ -1,2630 +0,0 @@ -{ - "entities": [ - { - "primHash": "00B7E15F8E939D1F", - "entity": { - "id": "feedf9bad6815e0f", - "name": "skyscraper_staff_ceiling_floor_zmapped_a ceiling", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -8.0, "y": -6.0, "z": 6.0 }, - "rotation": { - "yaw": -0.0, - "pitch": 3.1415927410125732, - "roll": 3.1415927410125732 - }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": -8.0, "y": -6.0, "z": 6.0 }, - "rotation": { - "yaw": -0.0, - "pitch": 3.1415927410125732, - "roll": 3.1415927410125732 - }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": 0.0, "y": -1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": 0.0, "z": -1.0 }, - "Trans": { "x": -8.0, "y": -6.0, "z": 6.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feedb2923f5fa7af", - "name": "Ceilings", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 8.0, "y": 6.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~0da90f87": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "00B7E15F8E939D1F", - "entity": { - "id": "feed8b3fea8ad339", - "name": "skyscraper_staff_ceiling_floor_zmapped_a floor", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -8.0, "y": 6.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": -8.0, "y": 6.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": -8.0, "y": 6.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed3c572ef05679", - "name": "Floors", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 8.0, "y": 6.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~0da90f87": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "001B79632475D36C", - "entity": { - "id": "feede50ae0479660", - "name": "Leather_Chair_Italian_A_02", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": 0.0, "y": -3.799999952316284, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 2.3148183822631836 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": -3.799999952316284, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 2.3148183822631836 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_STATIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { - "x": -0.6772525310516357, - "y": 0.7357505559921265, - "z": 0.0 - }, - "YAxis": { - "x": -0.7357505559921265, - "y": -0.6772525310516357, - "z": 0.0 - }, - "ZAxis": { "x": 0.0, "y": 0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": -3.799999952316284, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feedee0e055b426f", - "name": "Props", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "00E2675C5B50DA0E", - "entity": { - "id": "feeda4e80bc4b859", - "name": "medieval_oak_desk_a", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZExplosionBlockerAspect", - "void", - "IEntity" - ], - "transform": { - "position": { "x": 0.0, "y": -2.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -2.549461603164673 }, - "scale": { - "x": 1.0000001192092896, - "y": 1.0000001192092896, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": -2.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -2.549461603164673 }, - "scale": { - "x": 1.0000001192092896, - "y": 1.0000001192092896, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_STATIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { - "x": -0.8297532796859741, - "y": -0.5581306219100952, - "z": 0.0 - }, - "YAxis": { - "x": 0.5581306219100952, - "y": -0.8297532796859741, - "z": 0.0 - }, - "ZAxis": { "x": 0.0, "y": 0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": -2.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feedee0e055b426f", - "name": "Props", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 1.0, "z": 0.7875049710273743 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "00B7E15F8E939D1F", - "entity": { - "id": "feed72869cedfb34", - "name": "skyscraper_staff_ceiling_floor_zmapped_a ceiling", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -4.0, "y": -22.0, "z": 6.0 }, - "rotation": { - "yaw": -0.0, - "pitch": 3.1415927410125732, - "roll": 3.1415927410125732 - }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": -4.0, "y": -8.0, "z": 6.0 }, - "rotation": { - "yaw": -0.0, - "pitch": 3.1415927410125732, - "roll": 3.1415927410125732 - }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": 0.0, "y": -1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": 0.0, "z": -1.0 }, - "Trans": { "x": -4.0, "y": -8.0, "z": 6.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed78e0167ff76d", - "name": "Ceilings", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 4.0, "y": 8.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~0da90f87": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "00B7E15F8E939D1F", - "entity": { - "id": "feed898521607581", - "name": "skyscraper_staff_ceiling_floor_zmapped_a floor", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -4.0, "y": -6.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": -4.0, "y": 8.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": -4.0, "y": 8.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feedc74da26ae631", - "name": "Floors", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 4.0, "y": 8.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~0da90f87": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "001B79632475D36C", - "entity": { - "id": "feedaaec19107fb6", - "name": "Leather_Chair_Italian_A_02", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { - "x": 1.4520654678344727, - "y": -5.101253509521484, - "z": 0.5178936123847961 - }, - "rotation": { - "yaw": -0.6990736126899719, - "pitch": 1.4794272184371948, - "roll": -3.083954095840454 - }, - "scale": { - "x": 0.9999998807907104, - "y": 0.9999998807907104, - "z": 0.9999999403953552 - } - }, - "relativeTransform": { - "position": { - "x": 1.4520654678344727, - "y": 8.898746490478516, - "z": 0.5178936123847961 - }, - "rotation": { - "yaw": -0.6990736126899719, - "pitch": 1.4794272184371948, - "roll": -3.083954095840454 - }, - "scale": { - "x": 0.9999998807907104, - "y": 0.9999998807907104, - "z": 0.9999999403953552 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_STATIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { - "x": -0.054174721240997314, - "y": -0.04409438371658325, - "z": 0.9975573420524597 - }, - "YAxis": { - "x": 0.6450164914131165, - "y": -0.7641674876213074, - "z": 0.0012511909008026123 - }, - "ZAxis": { - "x": 0.7622458338737488, - "y": 0.643508791923523, - "z": 0.06984028965234756 - }, - "Trans": { - "x": 1.4520654678344727, - "y": 8.898746490478516, - "z": 0.5178936123847961 - } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed3a2397b6cc55", - "name": "Props", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "00558A7805FEE9AE", - "entity": { - "id": "feed6571e4cce08a", - "name": "Skyscraper_Window_6x4_Glass", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -8.0, "y": 0.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 3.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feedb163f86d3429", - "name": "East Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": false }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 3.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~9981df89": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "003FC9BC70A3C146", - "entity": { - "id": "feed603e13ae22bd", - "name": "skyscraper_window_6x4_c_inside", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -8.0, "y": 0.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feedb163f86d3429", - "name": "East Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 3.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null } - } - } - }, - { - "primHash": "00558A7805FEE9AE", - "entity": { - "id": "feed3ae0ae629753", - "name": "Skyscraper_Window_6x4_Glass", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -6.0, "y": -6.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 1.570796251296997 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 3.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed224cff428df0", - "name": "North East Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": false }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~9981df89": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "003FC9BC70A3C146", - "entity": { - "id": "feed79ebf8e98099", - "name": "skyscraper_window_6x4_c_inside", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -6.0, "y": -6.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 1.570796251296997 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed224cff428df0", - "name": "North East Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null } - } - } - }, - { - "primHash": "00558A7805FEE9AE", - "entity": { - "id": "feed9e8c538d2466", - "name": "Skyscraper_Window_6x4_Glass", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": 6.0, "y": -6.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 1.570796251296997 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 3.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed9f8831386662", - "name": "North West Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": false }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~9981df89": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "003FC9BC70A3C146", - "entity": { - "id": "feed77abb57551b2", - "name": "skyscraper_window_6x4_c_inside", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "IEntity", - "void" - ], - "transform": { - "position": { "x": 6.0, "y": -6.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 1.570796251296997 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed9f8831386662", - "name": "North West Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null } - } - } - }, - { - "primHash": "00558A7805FEE9AE", - "entity": { - "id": "feedade230a884ca", - "name": "Skyscraper_Window_6x4_Glass", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": 0.0, "y": 6.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -1.570796251296997 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 3.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed44e983148608", - "name": "South Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": false }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 4.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~9981df89": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "003FC9BC70A3C146", - "entity": { - "id": "feed42168b9b3a6e", - "name": "skyscraper_window_6x4_c_inside", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "IEntity", - "void" - ], - "transform": { - "position": { "x": 0.0, "y": 6.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -1.570796251296997 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed44e983148608", - "name": "South Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 4.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null } - } - } - }, - { - "primHash": "00558A7805FEE9AE", - "entity": { - "id": "feedcc1bbb417e21", - "name": "Skyscraper_Window_6x4_Glass", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": 8.0, "y": 0.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 3.1415927410125732 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 3.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed65cb5d0b7d3e", - "name": "West Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": false }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 3.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~9981df89": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "003FC9BC70A3C146", - "entity": { - "id": "feed0b728c0df2d5", - "name": "skyscraper_window_6x4_c_inside", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "IEntity", - "void" - ], - "transform": { - "position": { "x": 8.0, "y": 0.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 3.1415927410125732 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed65cb5d0b7d3e", - "name": "West Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 3.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null } - } - } - }, - { - "primHash": "00558A7805FEE9AE", - "entity": { - "id": "feeda9e487f1e4e2", - "name": "Skyscraper_Window_6x4_Glass", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -4.0, "y": -14.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 3.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed0a4123266d1c", - "name": "East Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": false }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 4.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~9981df89": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "003FC9BC70A3C146", - "entity": { - "id": "feed698b3d3fa91e", - "name": "skyscraper_window_6x4_c_inside", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -4.0, "y": -14.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed0a4123266d1c", - "name": "East Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 4.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null } - } - } - }, - { - "primHash": "00558A7805FEE9AE", - "entity": { - "id": "feed9a077d2fee67", - "name": "Skyscraper_Window_6x4_Glass", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -2.0, "y": -22.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 1.570796251296997 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 3.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feedc52c77239cdc", - "name": "North East Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": false }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~9981df89": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "003FC9BC70A3C146", - "entity": { - "id": "feed94dc8629a8e5", - "name": "skyscraper_window_6x4_c_inside", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "IEntity", - "void" - ], - "transform": { - "position": { "x": -2.0, "y": -22.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 1.570796251296997 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feedc52c77239cdc", - "name": "North East Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null } - } - } - }, - { - "primHash": "00558A7805FEE9AE", - "entity": { - "id": "feede2459fd23527", - "name": "Skyscraper_Window_6x4_Glass", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": 2.0, "y": -22.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 1.570796251296997 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 3.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed503a2de9e50b", - "name": "North West Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": false }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~9981df89": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "003FC9BC70A3C146", - "entity": { - "id": "feedda9177a2ae5e", - "name": "skyscraper_window_6x4_c_inside", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "IEntity", - "void" - ], - "transform": { - "position": { "x": 2.0, "y": -22.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 1.570796251296997 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { - "x": 0.9999999403953552, - "y": 0.9999999403953552, - "z": 1.0 - } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feed503a2de9e50b", - "name": "North West Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null } - } - } - }, - { - "primHash": "00558A7805FEE9AE", - "entity": { - "id": "feedbdc6670fd7b2", - "name": "Skyscraper_Window_6x4_Glass", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "ZMaterialOverwriteAspect", - "ZExplosionBlockerAspect", - "IEntity", - "void" - ], - "transform": { - "position": { "x": 4.0, "y": -14.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 3.1415927410125732 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 3.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 3.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feedda16cbee2cdc", - "name": "West Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": false }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 4.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null }, - "~9981df89": { "type": "ZResourcePtr", "data": {} }, - "m_bEnableExplosionBlocker": { "type": "bool", "data": true } - } - } - }, - { - "primHash": "003FC9BC70A3C146", - "entity": { - "id": "feedd257d92e914a", - "name": "skyscraper_window_6x4_c_inside", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZGeomEntity", - "interfaces": [ - "ZGeomEntity", - "ZPrimitiveContainerEntity", - "ZRenderableEntity", - "ZBoundedEntity", - "ZSpatialEntity", - "ZStaticPhysicsAspect", - "ZPhysicsBaseEntity", - "ICollisionShapeListener", - "IStaticPhysics", - "IPhysicsAccessor", - "ZCollisionResourceShapeAspect", - "ICollisionShapeProvider", - "IEntity", - "void" - ], - "transform": { - "position": { "x": 4.0, "y": -14.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": 3.1415927410125732 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "relativeTransform": { - "position": { "x": 0.0, "y": 0.0, "z": 0.0 }, - "rotation": { "yaw": -0.0, "pitch": 0.0, "roll": -0.0 }, - "scale": { "x": 1.0, "y": 1.0, "z": 1.0 } - }, - "properties": { - "m_eRoomBehaviour": { - "type": "ZSpatialEntity.ERoomBehaviour", - "data": "ROOM_DYNAMIC" - }, - "m_bForceVisible": { "type": "bool", "data": false }, - "m_mTransform": { - "type": "SMatrix43", - "data": { - "XAxis": { "x": 1.0, "y": 0.0, "z": 0.0 }, - "YAxis": { "x": -0.0, "y": 1.0, "z": 0.0 }, - "ZAxis": { "x": 0.0, "y": -0.0, "z": 1.0 }, - "Trans": { "x": 0.0, "y": 0.0, "z": 0.0 } - } - }, - "m_bVisible": { "type": "bool", "data": true }, - "m_bIsPrivate": { "type": "bool", "data": false }, - "m_bVisibleInBoxReflection": { "type": "bool", "data": true }, - "m_nViewportVisibility": { "type": "uint8", "data": 255 }, - "m_eidParent": { - "type": "TEntityRef", - "data": { - "id": "feedda16cbee2cdc", - "name": "West Window with Frame", - "source": "game", - "tblu": "003FC5B5BE3EA0CE", - "type": "ZCompositeEntity" - } - }, - "m_fLODScale": { "type": "float32", "data": 1.0 }, - "m_fLODOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationOffset": { "type": "float32", "data": 0.0 }, - "m_fTessellationMaxDist": { "type": "float32", "data": 5.0 }, - "m_eGlowType": { "type": "ERenderGlowTypes", "data": null }, - "m_eTessellationMode": { "type": "ETessellationMode", "data": null }, - "m_eTessellationFactorMode": { - "type": "ETessellationFactorMode", - "data": null - }, - "m_nTessellationMaxTessellation": { "type": "uint8", "data": 8 }, - "m_bCastShadows": { "type": "bool", "data": true }, - "m_bDisableStaticShadows": { "type": "bool", "data": false }, - "m_bPCCastShadows": { "type": "bool", "data": false }, - "m_nEmissiveHdrScale": { "type": "uint8", "data": 0 }, - "m_bRaytracingVisible": { "type": "bool", "data": true }, - "m_bRaytracingVisibleShadows": { "type": "bool", "data": true }, - "m_bRaytracingVisibleReflections": { "type": "bool", "data": true }, - "m_VertexPaintData": { "type": "TResourcePtr", "data": null }, - "m_sVertexPaintSourceResourceId": { "type": "ZString", "data": "" }, - "m_ResourceID": { "type": "ZResourcePtr", "data": {} }, - "m_PrimitiveScale": { - "type": "SVector3", - "data": { "x": 1.0, "y": 4.0, "z": 1.0 } - }, - "m_eSeamFix": { "type": "ESeamFixMode", "data": null }, - "m_bRemovePhysics": { "type": "bool", "data": false }, - "m_bDisableNavmeshExport": { "type": "bool", "data": false }, - "m_bSmartStairSurface": { "type": "bool", "data": false }, - "m_CollisionResourceID": { "type": "TResourcePtr", "data": null } - } - } - } - ] -} diff --git a/src/connect/game_connection.rs b/src/connect/game_connection.rs new file mode 100644 index 0000000..be0500c --- /dev/null +++ b/src/connect/game_connection.rs @@ -0,0 +1,87 @@ +use std::fs; +use std::fs::OpenOptions; +use std::io::prelude::*; + +use tungstenite::{connect, Message}; +use url::Url; + +pub struct GameConnection; +impl GameConnection { + pub fn get_prim_list_from_game(in_file_path: &str, out_file_path: &str) { + println!("Connecting to game on port 46735"); + + let mut socket = GameConnection::connect_to_game(); + + GameConnection::send_hello_message(&mut socket); + let in_file_contents = GameConnection::get_input_file_contents(in_file_path); + + GameConnection::send_message(&mut socket, in_file_contents); + + GameConnection::clear_file(out_file_path); + + let out_file = OpenOptions::new() + .write(true) + .append(true) + .open(out_file_path) + .unwrap(); + + GameConnection::build_prims_list(socket, out_file); + } + + fn connect_to_game() -> tungstenite::WebSocket> { + let (socket, _response) = connect( + Url::parse("ws://localhost:46735/socket").unwrap() + ).expect("Can't connect"); + socket + } + + fn clear_file(out_file_path: &str) { + fs::write(out_file_path, "").expect(format!("Error writing to {}", out_file_path).as_str()); + } + + fn send_message(socket: &mut tungstenite::WebSocket>, in_file_contents: String) { + let _ = socket.write_message(Message::Text(in_file_contents.into())); + } + + fn get_input_file_contents(in_file_path: &str) -> String { + let in_file_contents = fs::read_to_string(in_file_path).expect(format!("Error opening {}. Run a scan to generate this file", in_file_path).as_str()); + in_file_contents + } + + fn send_hello_message(socket: &mut tungstenite::WebSocket>) { + let _ = socket.write_message(Message::Text(r#"{"type":"hello","identifier":"glacier2obj"}"#.into())); + } + + fn build_prims_list(mut socket: tungstenite::WebSocket>, mut out_file: fs::File) { + let mut welcome_received: bool = false; + let mut is_first: bool = true; + + loop { + let msg = socket.read_message().expect("Error reading message"); + if msg.to_string().as_str() == "Done sending entities." { + println!("Received Done message. Finalizing json output and exiting."); + if let Err(e) = writeln!(out_file, "]}}") { + eprintln!("Couldn't write to file: {}", e); + } + break + } + if welcome_received { + if !is_first { + if let Err(e) = writeln!(out_file, ",") { + eprintln!("Couldn't write to file: {}", e); + } + } else { + is_first = false; + } + if let Err(e) = write!(out_file, "{}", msg) { + eprintln!("Couldn't write to file: {}", e); + } + } else { + if let Err(e) = write!(out_file, r#"{{"entities":["#) { + eprintln!("Couldn't write to file: {}", e); + } + welcome_received = true; + } + } + } +} \ No newline at end of file diff --git a/src/connect/mod.rs b/src/connect/mod.rs new file mode 100644 index 0000000..9e9093b --- /dev/null +++ b/src/connect/mod.rs @@ -0,0 +1 @@ +pub mod game_connection; \ No newline at end of file diff --git a/src/extract/mod.rs b/src/extract/mod.rs new file mode 100644 index 0000000..d88dad8 --- /dev/null +++ b/src/extract/mod.rs @@ -0,0 +1 @@ +pub mod prim_extraction; \ No newline at end of file diff --git a/src/extract/prim_extraction.rs b/src/extract/prim_extraction.rs new file mode 100644 index 0000000..19c8623 --- /dev/null +++ b/src/extract/prim_extraction.rs @@ -0,0 +1,57 @@ +use std::{collections::{HashMap, HashSet}, fs, path::{Path, PathBuf}}; + +use rpkg_rs::resource::{partition_manager::PartitionManager, resource_package::ResourcePackage, runtime_resource_id::RuntimeResourceID}; + +use crate::{json_serde::prims_json::PrimsJson, package::package_scan::PackageScan}; + +pub struct PrimExtraction; + +impl PrimExtraction { + pub fn extract_prims(runtime_folder: String, needed_prim_hashes: HashSet, partition_manager: &PartitionManager, prims_output_folder: String) { + let runtime_folder_path = PathBuf::from(&runtime_folder); + let prims_output_folder_path = PathBuf::from(&prims_output_folder); + let mut resource_packages: HashMap = HashMap::new(); + for hash in needed_prim_hashes { + let rrid: RuntimeResourceID = RuntimeResourceID::from_hex_string(hash.as_str()).unwrap(); + let resource_info = PackageScan::get_resource_info(partition_manager, &rrid).unwrap(); + let last_partition = resource_info.last_partition; + let package_path = runtime_folder_path.join(last_partition.clone()); + let rpkg = resource_packages.entry(last_partition.clone()).or_insert(ResourcePackage::from_file(&package_path).unwrap_or_else(|e| { + println!("Failed parse resource package: {}", e); + std::process::exit(0) + })); + println!("Extracting {} from {}", hash, last_partition); + let prim_contents = rpkg + .read_resource(&package_path, &rrid) + .unwrap_or_else(|e| { + println!("Failed extract resource: {}", e); + std::process::exit(0) + }); + + let prim_file_path_buf = prims_output_folder_path.join(hash.clone() + ".PRIM"); + let prim_file_path = prim_file_path_buf.as_os_str().to_str().unwrap(); + println!("Saving the prim to '{}'", prim_file_path); + fs::write(prim_file_path, prim_contents).expect("File failed to be written"); + } + + } + + pub fn get_needed_prim_hashes(prims_json: &PrimsJson, prims_output_folder: String) -> HashSet { + let mut hashes: HashSet = HashSet::new(); + let mut needed_hashes: HashSet = HashSet::new(); + for entity in &prims_json.entities { + hashes.insert(entity.prim_hash.clone()); + } + let prims_output_folder_path = PathBuf::from(&prims_output_folder); + for hash in hashes { + let prim_file_path_buf = prims_output_folder_path.join(hash.clone() + ".PRIM"); + let prim_file_path = prim_file_path_buf.as_os_str().to_str().unwrap(); + if Path::new(prim_file_path).exists() { + println!("{} already exists, skipping extraction.", prim_file_path); + continue; + } + needed_hashes.insert(hash); + } + return needed_hashes; + } +} diff --git a/src/json_serde/mod.rs b/src/json_serde/mod.rs new file mode 100644 index 0000000..426f94b --- /dev/null +++ b/src/json_serde/mod.rs @@ -0,0 +1 @@ +pub mod prims_json; \ No newline at end of file diff --git a/src/json_serde/prims_json.rs b/src/json_serde/prims_json.rs new file mode 100644 index 0000000..69b100f --- /dev/null +++ b/src/json_serde/prims_json.rs @@ -0,0 +1,74 @@ +use serde::Deserialize; +use std::fs; + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PrimsJson { + pub entities: Vec, +} + +impl PrimsJson { + pub fn build_from_prims_file(prims_json_file: String) -> PrimsJson { + println!("Building PrimsJson from prims file: {}", prims_json_file); + let prims_json_string = fs::read_to_string(prims_json_file.as_str()) + .expect("Should have been able to read the file"); + return PrimsJson::build_from_prims_json_string(prims_json_string) + } + + pub fn build_from_prims_json_string(prims_json_string: String) -> PrimsJson { + return serde_json::from_str(&prims_json_string).expect("JSON was not well-formatted"); + } + + pub fn output_prims(&mut self) { + for entity in &self.entities { + println!("Entity Instance:"); + println!(" Hash: {}", entity.prim_hash); + println!(" ID: {}", entity.entity.id); + println!(" Name: {}", entity.entity.name); + println!(" Position: {:?}", entity.entity.position); + println!(" Rotation: {:?}", entity.entity.rotation); + println!(" Scale: {:?}", entity.entity.scale); + } + } +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct EntityHashPair { + pub prim_hash: String, + pub entity: Entity, +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Entity { + pub id: String, + pub name: String, + pub position: Vec3, + pub rotation: Rotation, + pub scale: Scale, +} + +#[derive(Debug, Deserialize)] +#[serde()] +pub struct Vec3 { + pub x: f64, + pub y: f64, + pub z: f64, +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Rotation { + pub yaw: f64, + pub pitch: f64, + pub roll: f64, +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Scale { + #[serde(rename = "type")] + pub r#type: String, + pub data: Vec3, +} diff --git a/src/lib.rs b/src/lib.rs index 1c967b5..2da0742 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1 +1,5 @@ -pub mod scanner; \ No newline at end of file +pub mod package; +pub mod scenario; +pub mod extract; +pub mod connect; +pub mod json_serde; \ No newline at end of file diff --git a/src/package/mod.rs b/src/package/mod.rs new file mode 100644 index 0000000..635627a --- /dev/null +++ b/src/package/mod.rs @@ -0,0 +1 @@ +pub mod package_scan; \ No newline at end of file diff --git a/src/package/package_scan.rs b/src/package/package_scan.rs new file mode 100644 index 0000000..59c00ae --- /dev/null +++ b/src/package/package_scan.rs @@ -0,0 +1,152 @@ +use itertools::Itertools; +use rpkg_rs::misc::ini_file_system::IniFileSystem; +use rpkg_rs::resource::partition_manager::{PartitionManager, PartitionState}; +use rpkg_rs::resource::pdefs::PackageDefinitionSource; +use rpkg_rs::resource::resource_info::ResourceInfo; +use rpkg_rs::resource::resource_partition::PatchId; +use rpkg_rs::resource::runtime_resource_id::RuntimeResourceID; +use std::io::Write; +use std::path::PathBuf; +use std::io; + +pub struct ResourceInfoAndPartition { + pub last_occurrence: ResourceInfo, + pub last_partition: String, +} + +impl ResourceInfoAndPartition { + pub fn new(last_occurrence: ResourceInfo, last_partition: String) -> Self { + Self { + last_occurrence, + last_partition + } + } +} + +#[derive(Clone)] +pub struct PackageScan; + +impl PackageScan { + + pub fn scan_packages(retail_folder: String, game_version: String) -> Option { + let mut package_manager: PartitionManager; + let retail_path = PathBuf::from(&retail_folder); + let thumbs_path = retail_path.join("thumbs.dat"); + + let thumbs = IniFileSystem::from(&thumbs_path.as_path()).unwrap_or_else(|err| { + eprintln!("Error reading thumbs file: {:?}", err); + std::process::exit(1); + }); + + let app_options = &thumbs.root()["application"]; + let runtime_path: PathBuf; + if let (Some(proj_path), Some(relative_runtime_path)) = ( + app_options.options().get("PROJECT_PATH"), + app_options.options().get("RUNTIME_PATH"), + ) { + runtime_path = PathBuf::from(format!( + "{}\\{proj_path}\\{relative_runtime_path}", + retail_path.display() + )); + } else { + eprintln!( + "Missing required properties inside thumbs.dat:\n\ + PROJECT_PATH: {}\n\ + RUNTIME_PATH: {}", + app_options.has_option("PROJECT_PATH"), + app_options.has_option("RUNTIME_PATH") + ); + return None; + } + std::println!("start reading package definitions {:?}", runtime_path); + + package_manager = PartitionManager::new(runtime_path.clone()); + + //read the packagedefs here + let mut last_index = 0; + let mut progress = 0.0; + let progress_callback = |current, state: &PartitionState| { + if current != last_index { + last_index = current; + print!("Mounting partition {} ", current); + } + let install_progress = (state.install_progress * 10.0).ceil() / 10.0; + + let chars_to_add = (install_progress * 10.0 - progress * 10.0) as usize * 2; + let chars_to_add = std::cmp::min(chars_to_add, 20); + print!("{}", "█".repeat(chars_to_add)); + io::stdout().flush().unwrap(); + + progress = install_progress; + + if progress == 1.0 { + progress = 0.0; + println!(" done :)"); + } + }; + + let package_defs_bytes = + std::fs::read(runtime_path.join("packagedefinition.txt").as_path()).unwrap(); + + let mut package_defs = match game_version.as_str() { + "HM2016" => PackageDefinitionSource::HM2016(package_defs_bytes).read(), + "HM2" => PackageDefinitionSource::HM2(package_defs_bytes).read(), + "HM3" => PackageDefinitionSource::HM3(package_defs_bytes).read(), + e => { + eprintln!("invalid game version: {}", e); + std::process::exit(0); + } + } + .unwrap_or_else(|e| { + println!("Failed to parse package definitions {}", e); + std::process::exit(0); + }); + + for partition in package_defs.iter_mut() { + partition.set_max_patch_level(301); + } + + package_manager + .mount_partitions( + PackageDefinitionSource::Custom(package_defs), + progress_callback, + ) + .unwrap_or_else(|e| { + eprintln!("failed to init package manager: {}", e); + std::process::exit(0); + }); + return Some(package_manager); + } + + pub fn get_resource_info(package_manager: &PartitionManager, rrid: &RuntimeResourceID) -> Option { + let mut last_occurrence: Option<&ResourceInfo> = None; + let mut last_partition: Option = None; + for partition in package_manager.partitions() { + let changes = partition.resource_patch_indices(rrid); + let deletions = partition.resource_removal_indices(rrid); + let occurrences = changes + .clone() + .into_iter() + .chain(deletions.clone().into_iter()) + .collect::>(); + for occurrence in occurrences.iter().sorted() { + if deletions.contains(occurrence) { + last_occurrence = None; + } + if changes.contains(occurrence) { + if let Ok(info) = partition.resource_info_from(rrid, *occurrence) { + last_occurrence = Some(info); + last_partition = Some(partition.partition_info().filename(*occurrence)); + } + } + } + if !last_occurrence.is_none(){ + break; + } + } + if last_occurrence.is_none() || last_partition.is_none() { + return None + } + return Some(ResourceInfoAndPartition::new(last_occurrence.unwrap().clone(), last_partition.unwrap())); + } +} \ No newline at end of file diff --git a/src/scanner/scenario_scan.rs b/src/scanner/scenario_scan.rs deleted file mode 100644 index 25406e1..0000000 --- a/src/scanner/scenario_scan.rs +++ /dev/null @@ -1,272 +0,0 @@ -use itertools::Itertools; -use rpkg_rs::misc::hash_path_list::PathList; -use rpkg_rs::misc::ini_file_system::IniFileSystem; -use rpkg_rs::misc::resource_id::ResourceID; -use rpkg_rs::resource::partition_manager::{PartitionManager, PartitionState}; -use rpkg_rs::resource::pdefs::PackageDefinitionSource; -use rpkg_rs::resource::resource_info::ResourceInfo; -use rpkg_rs::resource::resource_partition::PatchId; -use rpkg_rs::resource::runtime_resource_id::RuntimeResourceID; -use std::collections::{HashSet, VecDeque}; -use std::io::Write; -use std::path::{Path, PathBuf}; -use std::str::FromStr; -use std::{fs, io}; - -pub struct ScenarioScan { - retail_folder: String, - game_version: String, - scenario: String, - hash_list_file: String, - hashes_for_output: HashSet, - alocs_for_output: HashSet, - prims_for_output: HashSet, - -} - -impl ScenarioScan { - pub fn new(retail_folder: String, game_version: String, scenario: String, hash_list_file: String) -> Self { - Self { - retail_folder, - game_version, - scenario, - hash_list_file, - hashes_for_output: HashSet::new(), - alocs_for_output: HashSet::new(), - prims_for_output: HashSet::new(), - } - } - - pub fn scan_scenario(&mut self) { - let retail_path = PathBuf::from(&self.retail_folder); - let thumbs_path = retail_path.join("thumbs.dat"); - - let thumbs = IniFileSystem::from(&thumbs_path.as_path()).unwrap_or_else(|err| { - eprintln!("Error reading thumbs file: {:?}", err); - std::process::exit(1); - }); - - let app_options = &thumbs.root()["application"]; - - let hash_list_path = Path::new(&self.hash_list_file); - - let mut path_list = PathList::new(); - path_list.parse_into(hash_list_path).unwrap(); - - - if let (Some(proj_path), Some(relative_runtime_path)) = ( - app_options.options().get("PROJECT_PATH"), - app_options.options().get("RUNTIME_PATH"), - ) { - let runtime_path = PathBuf::from(format!( - "{}\\{proj_path}\\{relative_runtime_path}", - retail_path.display() - )); - std::println!("start reading package definitions {:?}", runtime_path); - - let mut package_manager = PartitionManager::new(runtime_path.clone()); - - //read the packagedefs here - let mut last_index = 0; - let mut progress = 0.0; - let progress_callback = |current, state: &PartitionState| { - if current != last_index { - last_index = current; - print!("Mounting partition {} ", current); - } - let install_progress = (state.install_progress * 10.0).ceil() / 10.0; - - let chars_to_add = (install_progress * 10.0 - progress * 10.0) as usize * 2; - let chars_to_add = std::cmp::min(chars_to_add, 20); - print!("{}", "█".repeat(chars_to_add)); - io::stdout().flush().unwrap(); - - progress = install_progress; - - if progress == 1.0 { - progress = 0.0; - println!(" done :)"); - } - }; - - let package_defs_bytes = - std::fs::read(runtime_path.join("packagedefinition.txt").as_path()).unwrap(); - - let mut package_defs = match self.game_version.as_str() { - "HM2016" => PackageDefinitionSource::HM2016(package_defs_bytes).read(), - "HM2" => PackageDefinitionSource::HM2(package_defs_bytes).read(), - "HM3" => PackageDefinitionSource::HM3(package_defs_bytes).read(), - e => { - eprintln!("invalid game version: {}", e); - std::process::exit(0); - } - } - .unwrap_or_else(|e| { - println!("Failed to parse package definitions {}", e); - std::process::exit(0); - }); - - for partition in package_defs.iter_mut() { - partition.set_max_patch_level(301); - } - - package_manager - .mount_partitions( - PackageDefinitionSource::Custom(package_defs), - progress_callback, - ) - .unwrap_or_else(|e| { - eprintln!("failed to init package manager: {}", e); - std::process::exit(0); - }); - - let ioi_string_or_hash = self.scenario.as_str(); - let mut hash; - let hash_resource_id = RuntimeResourceID::from_hex_string(ioi_string_or_hash); - if hash_resource_id.is_err() { - let ioi_string_resource_id = ResourceID::from_str(ioi_string_or_hash); - if !ioi_string_resource_id.is_err() { - hash = RuntimeResourceID::from_resource_id(&ioi_string_resource_id.unwrap()).to_hex_string(); - } else { - println!("Invalid RuntimeResourceId"); - std::process::exit(0); - } - } else { - hash = ioi_string_or_hash.to_string(); - } - let mut hashes: VecDeque = VecDeque::from([String::from_str(&hash).unwrap()]); - let mut found_hashes = HashSet::new(); - println!("Getting ALOCs for: {}", hash); - - let excluded_hashes: Vec<&str> = Vec::from(["00BDA629523CE8B2", "00ACD408BE462DD3","00355E794876922A"]); - loop { - if hashes.len() == 0 { - break; - } - hash = hashes.pop_front().unwrap(); - if excluded_hashes.contains(&hash.as_str()) { - continue - } - let rrid = RuntimeResourceID::from_hex_string(&hash).unwrap_or_else(|_| { - println!("Invalid RuntimeResourceId"); - std::process::exit(0); - }); - if found_hashes.contains(&rrid) { - continue; - } - found_hashes.insert(rrid); - let resource_package_opt = ScenarioScan::get_resource_info(&package_manager, &rrid); - if resource_package_opt.is_none() { - continue; - } - let ioi_string = if path_list.get(&rrid).is_some() { - path_list.get(&rrid).unwrap().resource_path() - } else { - "".to_string() - }; - - let resource_package = resource_package_opt.unwrap(); - let references = resource_package.0.references(); - let mut prim_rrid: Option = None; - let mut prim_ioi_string: Option = None; - let mut prim_partition: Option = None; - let mut has_aloc = false; - for reference in references.iter() { - let dep_rrid = reference.0; - - if found_hashes.contains(&dep_rrid) { - continue; - } - let depend_resource_opt = ScenarioScan::get_resource_info(&package_manager, &dep_rrid); - if depend_resource_opt.is_none() { - continue; - } - let dep_ioi_string = if path_list.get(&dep_rrid).is_some() { - path_list.get(&dep_rrid).unwrap().resource_path() - } else { - "".to_string() - }; - - let depend_resource = depend_resource_opt.unwrap(); - - if depend_resource.0.data_type().as_str() == "PRIM" { - prim_rrid = Some(dep_rrid); - prim_ioi_string = Some(dep_ioi_string.clone()); - prim_partition = Some(depend_resource.1.clone()); - } - if Vec::from(["TEMP", "ALOC", "PRIM", "ASET"]).contains(&depend_resource.0.data_type().as_str()) { - let is_aloc = depend_resource.0.data_type().as_str() == "ALOC"; - if is_aloc { - println!("{} {} Type: {} Partition: {}", rrid, ioi_string, resource_package.0.data_type(), resource_package.1); - println!("|-> {} {} Type: {} Partition: {}", dep_rrid, dep_ioi_string, depend_resource.0.data_type(), depend_resource.1); - self.hashes_for_output.insert(rrid); - self.alocs_for_output.insert(dep_rrid); - has_aloc = true; - } - hashes.push_back(dep_rrid.to_hex_string()); - } - } - if has_aloc && prim_rrid.is_some() { - self.prims_for_output.insert(prim_rrid.unwrap()); - println!("|-> {} {} Type: prim Partition: {}", prim_rrid.unwrap(), prim_ioi_string.unwrap(), prim_partition.unwrap()); - - } - } - } else { - eprintln!( - "Missing required properties inside thumbs.dat:\n\ - PROJECT_PATH: {}\n\ - RUNTIME_PATH: {}", - app_options.has_option("PROJECT_PATH"), - app_options.has_option("RUNTIME_PATH") - ); - return; - } - } - - pub fn output_to_file(&self, output_file: String) { - let output_path = Path::new(&output_file); - let mut data = String::from(r#"{"type":"listPrimEntities", "prims":["#); - let mut it = self.prims_for_output.iter().peekable(); - while let Some(rrid) = it.next() { - data += (String::from("\"") + rrid.to_hex_string().as_str() + "\"").as_str(); - if it.peek().is_some() { - data += String::from(",").as_str(); - } - } - data += String::from("]}").as_str(); - fs::write(output_path, data).expect("Unable to write file"); - } - - fn get_resource_info(package_manager: &PartitionManager, rrid: &RuntimeResourceID) -> Option<(ResourceInfo, String)> { - let mut last_occurrence: Option<&ResourceInfo> = None; - let mut last_partition: Option = None; - for partition in package_manager.partitions() { - let changes = partition.resource_patch_indices(rrid); - let deletions = partition.resource_removal_indices(rrid); - let occurrences = changes - .clone() - .into_iter() - .chain(deletions.clone().into_iter()) - .collect::>(); - for occurrence in occurrences.iter().sorted() { - if deletions.contains(occurrence) { - last_occurrence = None; - } - if changes.contains(occurrence) { - if let Ok(info) = partition.resource_info_from(rrid, *occurrence) { - last_occurrence = Some(info); - last_partition = Some(partition.partition_info().filename(*occurrence)); - } - } - } - if !last_occurrence.is_none(){ - break; - } - } - if last_occurrence.is_none() || last_partition.is_none() { - return None - } - return Some((last_occurrence.unwrap().clone(), last_partition.unwrap())); - } -} \ No newline at end of file diff --git a/src/scanner/mod.rs b/src/scenario/mod.rs similarity index 100% rename from src/scanner/mod.rs rename to src/scenario/mod.rs diff --git a/src/scenario/scenario_scan.rs b/src/scenario/scenario_scan.rs new file mode 100644 index 0000000..8726efb --- /dev/null +++ b/src/scenario/scenario_scan.rs @@ -0,0 +1,150 @@ +use rpkg_rs::misc::hash_path_list::PathList; +use rpkg_rs::misc::resource_id::ResourceID; +use rpkg_rs::resource::partition_manager::PartitionManager; +use rpkg_rs::resource::runtime_resource_id::RuntimeResourceID; +use std::collections::{HashSet, VecDeque}; +use std::path::Path; +use std::str::FromStr; +use std::fs; + +use crate::package::package_scan::PackageScan; + +pub struct ScenarioScan { + scenario: String, + hash_list_file: String, + hashes_for_output: HashSet, + alocs_for_output: HashSet, + prims_for_output: HashSet, + +} + +impl ScenarioScan { + pub fn new(scenario: String, hash_list_file: String) -> Self { + Self { + scenario, + hash_list_file, + hashes_for_output: HashSet::new(), + alocs_for_output: HashSet::new(), + prims_for_output: HashSet::new(), + } + } + + pub fn scan_scenario(&mut self, partition_manager: &PartitionManager) { + let hash_list_path = Path::new(&self.hash_list_file); + + let mut path_list = PathList::new(); + path_list.parse_into(hash_list_path).unwrap(); + + + let ioi_string_or_hash = self.scenario.as_str(); + let mut hash; + let hash_resource_id = RuntimeResourceID::from_hex_string(ioi_string_or_hash); + if hash_resource_id.is_err() { + let ioi_string_resource_id = ResourceID::from_str(ioi_string_or_hash); + if !ioi_string_resource_id.is_err() { + hash = RuntimeResourceID::from_resource_id(&ioi_string_resource_id.unwrap()).to_hex_string(); + } else { + println!("Invalid RuntimeResourceId"); + std::process::exit(0); + } + } else { + hash = ioi_string_or_hash.to_string(); + } + let mut hashes: VecDeque = VecDeque::from([String::from_str(&hash).unwrap()]); + let mut found_hashes = HashSet::new(); + println!("Getting ALOCs for: {}", hash); + + // These hashes are for things that aren't needed for navmeshes like fx ghost mode, fx torus, and shockwave sphere + // 00BDA629523CE8B2 [assembly:/_pro/effects/templates/misc/fx_ghostmode.template?/fx_e_ghostmode_outfit_manipulator.entitytemplate].pc_entitytype + // 00ACD408BE462DD3 fx_shockwave_sphere_1m (template) + // 00355E794876922A [assembly:/_pro/effects/geometry/misc/fx_basic_shapes.wl2?/fx_torus_1m.prim].pc_entitytype + let excluded_hashes: Vec<&str> = Vec::from(["00BDA629523CE8B2", "00ACD408BE462DD3","00355E794876922A"]); + loop { + if hashes.len() == 0 { + break; + } + hash = hashes.pop_front().unwrap(); + if excluded_hashes.contains(&hash.as_str()) { + continue + } + let rrid = RuntimeResourceID::from_hex_string(&hash).unwrap_or_else(|_| { + println!("Invalid RuntimeResourceId"); + std::process::exit(0); + }); + if found_hashes.contains(&rrid) { + continue; + } + found_hashes.insert(rrid); + let resource_package_opt = PackageScan::get_resource_info(partition_manager, &rrid); + if resource_package_opt.is_none() { + continue; + } + let ioi_string = if path_list.get(&rrid).is_some() { + path_list.get(&rrid).unwrap().resource_path() + } else { + "".to_string() + }; + + let resource_package = resource_package_opt.unwrap(); + let references = resource_package.last_occurrence.references(); + let mut prim_rrid: Option = None; + let mut prim_ioi_string: Option = None; + let mut prim_partition: Option = None; + let mut has_aloc = false; + for reference in references.iter() { + let dep_rrid = reference.0; + + if found_hashes.contains(&dep_rrid) { + continue; + } + let depend_resource_opt = PackageScan::get_resource_info(partition_manager, &dep_rrid); + if depend_resource_opt.is_none() { + continue; + } + let dep_ioi_string = if path_list.get(&dep_rrid).is_some() { + path_list.get(&dep_rrid).unwrap().resource_path() + } else { + "".to_string() + }; + + let depend_resource = depend_resource_opt.unwrap(); + + if depend_resource.last_occurrence.data_type().as_str() == "PRIM" { + prim_rrid = Some(dep_rrid); + prim_ioi_string = Some(dep_ioi_string.clone()); + prim_partition = Some(depend_resource.last_partition.clone()); + } + if Vec::from(["TEMP", "ALOC", "PRIM", "ASET"]).contains(&depend_resource.last_occurrence.data_type().as_str()) { + let is_aloc = depend_resource.last_occurrence.data_type().as_str() == "ALOC"; + if is_aloc { + println!("{} {} Type: {} Partition: {}", rrid, ioi_string, resource_package.last_occurrence.data_type(), resource_package.last_partition); + println!("|-> {} {} Type: {} Partition: {}", dep_rrid, dep_ioi_string, depend_resource.last_occurrence.data_type(), depend_resource.last_partition); + self.hashes_for_output.insert(rrid); + self.alocs_for_output.insert(dep_rrid); + has_aloc = true; + } + hashes.push_back(dep_rrid.to_hex_string()); + } + } + if has_aloc && prim_rrid.is_some() { + self.prims_for_output.insert(prim_rrid.unwrap()); + println!("|-> {} {} Type: prim Partition: {}", prim_rrid.unwrap(), prim_ioi_string.unwrap(), prim_partition.unwrap()); + + } + } + } + + pub fn output_to_file(&self, output_file: String) { + let output_path = Path::new(&output_file); + let mut data = String::from(r#"{"type":"listPrimEntities", "prims":["#); + let mut it = self.prims_for_output.iter().peekable(); + while let Some(rrid) = it.next() { + data += (String::from("\"") + rrid.to_hex_string().as_str() + "\"").as_str(); + if it.peek().is_some() { + data += String::from(",").as_str(); + } + } + data += String::from("]}").as_str(); + fs::write(output_path, data).expect("Unable to write file"); + } +} \ No newline at end of file diff --git a/toFind.json b/toFind.json deleted file mode 100644 index d2eeb98..0000000 --- a/toFind.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"listPrimEntities", "prims":["00B7E15F8E939D1F","00558A7805FEE9AE","001B79632475D36C","00E2675C5B50DA0E","003FC9BC70A3C146"]} \ No newline at end of file