From 71671940ebbd69a1dea2d78666848f0d7b76c036 Mon Sep 17 00:00:00 2001 From: ook3d <47336113+ook3D@users.noreply.github.com> Date: Tue, 2 Jul 2024 21:18:10 -0400 Subject: [PATCH] Update Scenario Point Cluster Unknowns --- .../GameFiles/MetaTypes/MetaTypes.cs | 8 ++++---- .../Panels/EditScenarioNodePanel.Designer.cs | 20 +++++++++---------- .../Project/Panels/EditScenarioNodePanel.cs | 12 +++++------ 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs index a264533..1961f6e 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs @@ -5581,8 +5581,8 @@ namespace CodeWalker.GameFiles { public CScenarioPointContainer Points { get; set; } //0 0: Structure: CScenarioPointContainer//2380938603: Points//702683191 public rage__spdSphere ClusterSphere { get; set; } //48 48: Structure: 1062159465: ClusterSphere//352461053 - public float Unk_1095875445 { get; set; } //64 64: Float: 0: 1095875445 //spawn chance? eg 5, 30 - public byte Unk_3129415068 { get; set; } //68 68: Boolean: 0: 3129415068 + public float NextSpawnAttemptDelay { get; set; } //64 64: Float: 0: 1095875445 //spawn chance? eg 5, 30 + public byte AllPointsRequiredForSpawn { get; set; } //68 68: Boolean: 0: 3129415068 public uint Unused0 { get; set; }//72 public uint Unused1 { get; set; }//76 @@ -5618,8 +5618,8 @@ namespace CodeWalker.GameFiles _Data.ClusterSphere = new rage__spdSphere() { centerAndRadius = v4 }; } } - public float Unk1 { get { return _Data.Unk_1095875445; } set { _Data.Unk_1095875445 = value; } } - public bool Unk2 { get { return _Data.Unk_3129415068==1; } set { _Data.Unk_3129415068 = (byte)(value?1:0); } } + public float NextSpawnAttemptDelay { get { return _Data.NextSpawnAttemptDelay; } set { _Data.NextSpawnAttemptDelay = value; } } + public bool AllPointsRequiredForSpawn { get { return _Data.AllPointsRequiredForSpawn==1; } set { _Data.AllPointsRequiredForSpawn = (byte)(value?1:0); } } public MCScenarioPointCluster() { } public MCScenarioPointCluster(MCScenarioPointRegion region) { Region = region; } diff --git a/CodeWalker/Project/Panels/EditScenarioNodePanel.Designer.cs b/CodeWalker/Project/Panels/EditScenarioNodePanel.Designer.cs index f653caa..6e59363 100644 --- a/CodeWalker/Project/Panels/EditScenarioNodePanel.Designer.cs +++ b/CodeWalker/Project/Panels/EditScenarioNodePanel.Designer.cs @@ -2024,7 +2024,7 @@ // this.ScenarioClusterRadiusTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterRadiusTextBox.Location = new System.Drawing.Point(100, 29); + this.ScenarioClusterRadiusTextBox.Location = new System.Drawing.Point(146, 29); this.ScenarioClusterRadiusTextBox.Name = "ScenarioClusterRadiusTextBox"; this.ScenarioClusterRadiusTextBox.Size = new System.Drawing.Size(204, 20); this.ScenarioClusterRadiusTextBox.TabIndex = 9; @@ -2033,7 +2033,7 @@ // label157 // this.label157.AutoSize = true; - this.label157.Location = new System.Drawing.Point(51, 32); + this.label157.Location = new System.Drawing.Point(97, 32); this.label157.Name = "label157"; this.label157.Size = new System.Drawing.Size(43, 13); this.label157.TabIndex = 8; @@ -2044,9 +2044,9 @@ this.ScenarioClusterUnk2CheckBox.AutoSize = true; this.ScenarioClusterUnk2CheckBox.Location = new System.Drawing.Point(100, 81); this.ScenarioClusterUnk2CheckBox.Name = "ScenarioClusterUnk2CheckBox"; - this.ScenarioClusterUnk2CheckBox.Size = new System.Drawing.Size(55, 17); + this.ScenarioClusterUnk2CheckBox.Size = new System.Drawing.Size(169, 17); this.ScenarioClusterUnk2CheckBox.TabIndex = 12; - this.ScenarioClusterUnk2CheckBox.Text = "Unk 2"; + this.ScenarioClusterUnk2CheckBox.Text = "All Points Required For Spawn"; this.ScenarioClusterUnk2CheckBox.UseVisualStyleBackColor = true; this.ScenarioClusterUnk2CheckBox.CheckedChanged += new System.EventHandler(this.ScenarioClusterUnk2CheckBox_CheckedChanged); // @@ -2054,7 +2054,7 @@ // this.ScenarioClusterUnk1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterUnk1TextBox.Location = new System.Drawing.Point(100, 55); + this.ScenarioClusterUnk1TextBox.Location = new System.Drawing.Point(146, 55); this.ScenarioClusterUnk1TextBox.Name = "ScenarioClusterUnk1TextBox"; this.ScenarioClusterUnk1TextBox.Size = new System.Drawing.Size(204, 20); this.ScenarioClusterUnk1TextBox.TabIndex = 11; @@ -2065,14 +2065,14 @@ this.label140.AutoSize = true; this.label140.Location = new System.Drawing.Point(4, 58); this.label140.Name = "label140"; - this.label140.Size = new System.Drawing.Size(90, 13); + this.label140.Size = new System.Drawing.Size(137, 13); this.label140.TabIndex = 10; - this.label140.Text = "Probability Unk 1:"; + this.label140.Text = "Next Spawn Attempt Delay:"; // // ScenarioClusterGoToButton // this.ScenarioClusterGoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterGoToButton.Location = new System.Drawing.Point(382, 1); + this.ScenarioClusterGoToButton.Location = new System.Drawing.Point(428, 1); this.ScenarioClusterGoToButton.Name = "ScenarioClusterGoToButton"; this.ScenarioClusterGoToButton.Size = new System.Drawing.Size(68, 23); this.ScenarioClusterGoToButton.TabIndex = 7; @@ -2084,7 +2084,7 @@ // this.ScenarioClusterCenterTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterCenterTextBox.Location = new System.Drawing.Point(100, 3); + this.ScenarioClusterCenterTextBox.Location = new System.Drawing.Point(146, 3); this.ScenarioClusterCenterTextBox.Name = "ScenarioClusterCenterTextBox"; this.ScenarioClusterCenterTextBox.Size = new System.Drawing.Size(276, 20); this.ScenarioClusterCenterTextBox.TabIndex = 6; @@ -2093,7 +2093,7 @@ // label139 // this.label139.AutoSize = true; - this.label139.Location = new System.Drawing.Point(53, 6); + this.label139.Location = new System.Drawing.Point(99, 6); this.label139.Name = "label139"; this.label139.Size = new System.Drawing.Size(41, 13); this.label139.TabIndex = 5; diff --git a/CodeWalker/Project/Panels/EditScenarioNodePanel.cs b/CodeWalker/Project/Panels/EditScenarioNodePanel.cs index 323153d..abea33b 100644 --- a/CodeWalker/Project/Panels/EditScenarioNodePanel.cs +++ b/CodeWalker/Project/Panels/EditScenarioNodePanel.cs @@ -516,8 +516,8 @@ namespace CodeWalker.Project.Panels ScenarioClusterAddToProjectButton.Enabled = !ScenarioClusterDeleteButton.Enabled; ScenarioClusterCenterTextBox.Text = FloatUtil.GetVector3String(c.Position); ScenarioClusterRadiusTextBox.Text = FloatUtil.ToString(c.Radius); - ScenarioClusterUnk1TextBox.Text = FloatUtil.ToString(c.Unk1); - ScenarioClusterUnk2CheckBox.Checked = c.Unk2; + ScenarioClusterUnk1TextBox.Text = FloatUtil.ToString(c.NextSpawnAttemptDelay); + ScenarioClusterUnk2CheckBox.Checked = c.AllPointsRequiredForSpawn; ScenarioClusterPointsListBox.Items.Clear(); ScenarioClusterAddPointButton.Enabled = true; @@ -2009,9 +2009,9 @@ namespace CodeWalker.Project.Panels float v = FloatUtil.Parse(ScenarioClusterUnk1TextBox.Text); lock (ProjectForm.ProjectSyncRoot) { - if (CurrentScenarioNode.Cluster.Unk1 != v) + if (CurrentScenarioNode.Cluster.NextSpawnAttemptDelay != v) { - CurrentScenarioNode.Cluster.Unk1 = v; + CurrentScenarioNode.Cluster.NextSpawnAttemptDelay = v; ProjectForm.SetScenarioHasChanged(true); } } @@ -2025,9 +2025,9 @@ namespace CodeWalker.Project.Panels bool v = ScenarioClusterUnk2CheckBox.Checked; lock (ProjectForm.ProjectSyncRoot) { - if (CurrentScenarioNode.Cluster.Unk2 != v) + if (CurrentScenarioNode.Cluster.AllPointsRequiredForSpawn != v) { - CurrentScenarioNode.Cluster.Unk2 = v; + CurrentScenarioNode.Cluster.AllPointsRequiredForSpawn = v; ProjectForm.SetScenarioHasChanged(true); } }