/* Save the current edits */ public void SaveCommandsPAK() { if (CurrentInstance.commandsPAK == null) { return; } Cursor.Current = Cursors.WaitCursor; try { CurrentInstance.commandsPAK.Save(); } catch (Exception e) { Cursor.Current = Cursors.Default; MessageBox.Show("Failed to save COMMANDS.PAK!\n" + e.Message, "Failed!", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } NodeDBEx.SaveNames(); if (modifyMVR.Checked) { CathodeMovers mvr = new CathodeMovers(CurrentInstance.commandsPAK.Filepath.Replace("COMMANDS.PAK", "MODELS.MVR")); for (int i = 0; i < mvr.Movers.Count; i++) { /* * if (mvr.Movers[i].IsThisTypeID == MoverType.STATIC_MODEL) * { * CathodeFlowgraph flowgraph = GetFlowgraphContainingNode(mvr.Movers[i].NodeID); * if (flowgraph == null) continue; * if (flowgraph.name.Contains("REQUIRED_ASSETS") && flowgraph.name.Contains("VFX")) continue; * MoverEntry mover = mvr.Movers[i]; * mover.IsThisTypeID = MoverType.DYNAMIC_MODEL; * mvr.Movers[i] = mover; * } */ MOVER_DESCRIPTOR mover = mvr.Movers[i]; //This is a **TEMP** hack! mover.Transform = System.Numerics.Matrix4x4.CreateScale(new System.Numerics.Vector3(0, 0, 0)) * System.Numerics.Matrix4x4.CreateFromQuaternion(System.Numerics.Quaternion.Identity) * System.Numerics.Matrix4x4.CreateTranslation(new System.Numerics.Vector3(-9999.0f, -9999.0f, -9999.0f)); mover.IsThisTypeID = MoverType.DYNAMIC_MODEL; mover.NodeID = new cGUID("00-00-00-00"); mvr.Movers[i] = mover; } if (mvr.FilePath != "") { mvr.Save(); } } Cursor.Current = Cursors.Default; }
private void CathodeEditorGUI_Load(object sender, EventArgs e) { return; CathodeMovers mvr = new CathodeMovers(@"G:\SteamLibrary\steamapps\common\Alien Isolation\DATA\ENV\PRODUCTION\BSP_TORRENS\WORLD\MODELS.MVR"); //CathodeMovers.Movers = CathodeMovers.Movers.OrderBy(o => o.IsThisTypeID).ToList<alien_mvr_entry>(); for (int i = 0; i < mvr.Movers.Count; i++) { MOVER_DESCRIPTOR thisMvr = mvr.Movers[i]; //Transform //CollisionMapThingID //REDSIndex //ModelCount //ResourcesBINIndex //EnvironmentMapBINIndex //IsThisTypeID thisMvr.Transform = System.Numerics.Matrix4x4.CreateScale(new System.Numerics.Vector3(0, 0, 0)) * System.Numerics.Matrix4x4.CreateFromQuaternion(System.Numerics.Quaternion.Identity) * System.Numerics.Matrix4x4.CreateTranslation(new System.Numerics.Vector3(-9999.0f, -9999.0f, -9999.0f)); //mvr.IsThisTypeID = MoverType.DYNAMIC_MODEL; thisMvr.IsThisTypeID = MoverType.DYNAMIC_MODEL; thisMvr.NodeID = new cGUID("00-00-00-00"); //mvr.Unknowns5_ = new Vector4(0, 0, 0, 0); //mvr.InstanceState[0].X = 1; //Light R //mvr.InstanceState[0].Y = 1; //Light G //mvr.InstanceState[0].Z = 1; //Light B //mvr.InstanceState[0].W = 0; //Unused? //mvr.InstanceState[1].X = 1; //Material tint R //mvr.InstanceState[1].Y = 1; //Material tint G //mvr.InstanceState[1].Z = 1; //Material tint B //mvr.InstanceState[1].W = 1; //Unused? // mvr.InstanceState[2].X = 10; //Brightness of volumetric light meshes //mvr.InstanceState[2].Y = 0.50f; //setting this to zero makes all particle sprites black, anything higher than one f***s with lighting //mvr.InstanceState[2].Z = 0; //this seems to define some sort of offset for particle systems //mvr.InstanceState[2].W = 10; //unused? // mvr.InstanceState[3].X = 1; //unused? // mvr.InstanceState[3].Y = 100; //Light radius? //mvr.InstanceState[3].Z = 10; //Diffuse texture tile horizontal // mvr.InstanceState[3].W = 1; //Diffuse texture tile vertical //maybe these are normal/specular map scales if the above is diffuse? // mvr.InstanceState[4].X = 10; //unused? //mvr.InstanceState[4].Y = 500; //unsued? //mvr.InstanceState[4].Z = 100; //unused? //mvr.InstanceState[4].W = 50; //unused? //none of these seem to do anything?? //mvr.UnknownID = new cGUID("00-00-00-00"); //mvr.NodeID = new cGUID("00-00-00-00"); //mvr.ResourcesBINID = new cGUID("00-00-00-00"); //mvr.UnknownMinMax_[0] = new Vector3(0, 0, 0); //mvr.UnknownMinMax_[1] = new Vector3(0, 0, 0); //mvr.UnknownValue1 = 0; //mvr.UnknownValue = 0; //mvr.Unknown5_ = 0; //mvr.Unknowns61_ = 0; //mvr.Unknowns60_ = 0; //mvr.Unknown17_ = 0; //mvr.Unknowns70_ = 0; //mvr.Unknowns71_ = 0; //mvr.UnknownMinMax_[0] = new Vector3(0, 0, 0); //mvr.UnknownMinMax_[1] = new Vector3(0, 0, 0); //one of these contains some sort of lighting info //mvr.UnknownValue3_ = 0; //mvr.UnknownValue4_ = 0; //mvr.Unknown2_ = 0; //mvr.Unknowns2_[0] = 0; //mvr.Unknowns2_[1] = 0; //mvr.Unknown3_.X = 0; //mvr.Unknown3_.Y = 0; //mvr.Unknown3_.Z = 0; //mvr.Unknown3_.W = 0; mvr.Movers[i] = thisMvr; } mvr.Save(); mvr = new CathodeMovers(@"G:\SteamLibrary\steamapps\common\Alien Isolation\DATA\ENV\PRODUCTION\TECH_HUB\WORLD\MODELS.MVR"); mvr.Save(); mvr = new CathodeMovers(@"G:\SteamLibrary\steamapps\common\Alien Isolation\DATA\ENV\PRODUCTION\BSP_TORRENS\WORLD\MODELS.MVR"); mvr.Movers.RemoveAll(o => o.NodeID != new cGUID(0)); mvr.Save(); Application.Exit(); }