-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugin - show classification and surface enums for JWE2 and PZ
- Loading branch information
1 parent
e5cbba3
commit b752162
Showing
5 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
from generated.formats.ovl_base import OvlContext | ||
from generated.formats.physmat.compounds.PhysmatRoot import PhysmatRoot | ||
|
||
files = ("C:/Users/arnfi/Desktop/pz.physmat", "C:/Users/arnfi/Desktop/jwe2.physmat") | ||
for fp in files: | ||
# PZ ms2 | ||
pz_classification_name = ['Animal', 'Animal_Bone', 'Animal_Box', 'Bedding', 'Building', 'Climbable', 'Coaster_Car', 'Enrichment_Object', 'Facility', 'Kinetic_Object', 'NoCollision', 'Prop', 'Scenery', 'Scenery_NoNavSource', 'Structure', 'Track', 'TreeBase', 'TreeBranch', 'TreeFoliage', 'TreeTrunk', 'UIElement'] | ||
pz_surface_name = ['Animal', 'Brick', 'Cloth', 'Concrete', 'Default', 'Default_Legacy_DO_NOT_USE', 'Dirt', 'Foliage', 'Glass', 'Grass', 'Ice', 'Leaves', 'Litter', 'Metal', 'Mud', 'Plastic', 'Poo', 'Rubber', 'Snow', 'Stone', 'Tree', 'Wood'] | ||
|
||
# JWE2 ms2 | ||
jwe2_classification_name = ['AIVehicle', 'AIVehicleObstacle', 'AviaryTourGate', 'Building', 'BuildingNoCameraObstacle', 'CameraObstacle', 'CarBody', 'CarObstacle', 'Debris', 'Default', 'Dinosaur', 'DinosaurNoFence', 'DinosaurNoVehicle', 'Drone', 'Foliage', 'Gate', 'GuestRagdoll', 'HatcheryGate', 'LagoonFloor', 'PaleoFoodPoint', 'Perch', 'PerchQuetz', 'Prop', 'PropNoCameraObstacle', 'TourGate', 'Vehicle'] | ||
jwe2_surface_name = ['BuildingBrick', 'BuildingConcrete', 'BuildingMetal', 'BuildingWood', 'CarBody', 'Debris', 'Default', 'DinosaurLimb', 'Drone', 'Gyrosphere', 'LagoonFloor', 'PaleoFoodPoint', 'PropMetal', 'PropPlastic', 'PropWooden', 'SceneryTree'] | ||
|
||
files = ( | ||
("C:/Users/arnfi/Desktop/pz.physmat", pz_classification_name, pz_surface_name), | ||
("C:/Users/arnfi/Desktop/jwe2.physmat", jwe2_classification_name, jwe2_surface_name)) | ||
for fp, classification, surface in files: | ||
with open(fp, "rb") as f: | ||
mat = PhysmatRoot.from_stream(f, OvlContext()) | ||
print(mat) | ||
for s in ("all_surfaces", "surface_res", "classnames"): | ||
print("\n\n") | ||
print(s) | ||
names = [] | ||
for ind, offset in enumerate(getattr(mat, f"{s}_names")): | ||
lut = None | ||
if s in ("surface_res", "classnames"): | ||
lut = getattr(mat, f"{s}_indices")[ind] | ||
print(ind, mat.names.get_str_at(offset), lut) | ||
else: | ||
lut = f'{bin(getattr(mat, f"all_surfaces_flags")[ind])[2:]:>64s}' | ||
name = mat.names.get_str_at(offset) | ||
print(f'{ind:>3d}', lut, name) | ||
names.append(name) | ||
print(sorted(names)) | ||
print() | ||
print(classification) | ||
print(surface) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
cc80d1b3e - Sun Nov 12 23:20:30 2023 +0100 | ||
e5cbba344 - Mon Nov 13 16:54:31 2023 +0100 |