From 1491f346866104ba86e2d5bca7073d47db8d4d63 Mon Sep 17 00:00:00 2001 From: Georgeto Date: Thu, 5 Dec 2024 21:13:10 +0100 Subject: [PATCH] Script_ModMe: Warn about write restrictions with Program Files --- source/Scripts/Script_ModMe/docs/docs/other.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/Scripts/Script_ModMe/docs/docs/other.md b/source/Scripts/Script_ModMe/docs/docs/other.md index 79025eb..a29cf98 100644 --- a/source/Scripts/Script_ModMe/docs/docs/other.md +++ b/source/Scripts/Script_ModMe/docs/docs/other.md @@ -10,6 +10,10 @@ Fortunately Gothic 3 contains code to recalculate these properties, which can be First you have to create the directory `_compiledMesh` in the Gothic 3 data directory, and within `_compiledMesh` another directory named `FixMe`. Now Gothic 3 recalculates the above mentioned properties for all `.xcmsh`s in the `FixMe` directory on startup, when reaching the main menu. For each of the meshes, a version repaired in this way is stored in the 'FixMe' directory. +!!! caution "Attention" + To write the fixed `.xcmhsh`s, Gothic 3 needs write access to its installation directory. + Therefore, move Gothic 3 to a folder without write restrictions, i.e. outside of `Program Files`, or run the game as administrator. + # Repair animated meshes Animated meshes (.xact), called eCResourceAnimationActor_PS within the engine, are structured as follows: ```cpp @@ -64,11 +68,19 @@ Fortunately, Gothic 3 contains code to recalculate the AmbientOcclusion of an ac First you have to create the directory `_compiledAnimation` in the Gothic 3 data directory, and within `_compiledAnimation` another directory named `FixMe`. Now Gothic 3 recalculates the AmbientOcclusion for all `.xact`s in the `FixMe` directory on startup, more precisely when reaching the main menu. For each of the meshes, a version repaired in this way is stored in the `FixMe` directory. +!!! caution "Attention" + To write the fixed `.xact`s, Gothic 3 needs write access to its installation directory. + Therefore, move Gothic 3 to a folder without write restrictions, i.e. outside of `Program Files`, or run the game as administrator. + # Automatic scaling of Convex-CollisionMeshes When converting a CollisionShape to the physics engine PhsyX used by Gothic 3, it is scaled with the scaling factors of its entity. Strangely though, the code responsible for this is duplicated. Even worse, the two versions subtly differ from each other - details will follow. For Triangle-/Convex-CollisionShapes, if required, i.e. if no correspondingly scaled version exists yet, one will be created and stored in `_compiledPhysic`. So much for the theory, but if you look closely you can see that in one of the two versions there is no automatic scaling for Convex-CollisionShapes. Even the log messages are the same. But instead of checking if an unscaled CollisionShape exists in the absence of a scaled version, it simply directly assumes that it does not and issues an error message. This inconsistency has been removed; now scaled versions are created for Convex-CollisionShape if required. +!!! caution "Attention" + To write the scaled collision mmeshes, Gothic 3 needs write access to its installation directory. + Therefore, move Gothic 3 to a folder without write restrictions, i.e. outside of `Program Files`, or run the game as administrator. + # Box-CollisionShapes and unevenly scaled entities The PhsyX conversion function was not able to convert Box-CollisionShapes correctly if the corresponding entity was not scaled uniformly, i.e. had different scales on X-axis, Y-axis and Z-axis. This limitation has been fixed. \ No newline at end of file