mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-06-08 23:19:14 +08:00
Add Weights chart
This commit is contained in:
parent
6575931ab2
commit
013b3c76b4
@ -30,6 +30,10 @@ namespace GrasscutterTools.Forms
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormGachaBannerEditor2));
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
this.GrpBannerValues = new System.Windows.Forms.GroupBox();
|
||||
this.ChkAutoStripRateUpFromFallback = new System.Windows.Forms.CheckBox();
|
||||
this.LblOptions = new System.Windows.Forms.Label();
|
||||
@ -84,6 +88,8 @@ namespace GrasscutterTools.Forms
|
||||
this.TxtPoolWeight5 = new System.Windows.Forms.TextBox();
|
||||
this.LblPoolWeight4 = new System.Windows.Forms.Label();
|
||||
this.LblPoolWeight5 = new System.Windows.Forms.Label();
|
||||
this.GrpWeightChart = new System.Windows.Forms.GroupBox();
|
||||
this.ChartWeights = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||
this.GrpBannerValues.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUDEventChance4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUDEventChance5)).BeginInit();
|
||||
@ -95,11 +101,12 @@ namespace GrasscutterTools.Forms
|
||||
this.GrpJson.SuspendLayout();
|
||||
this.GrpWeights.SuspendLayout();
|
||||
this.GrpBalance.SuspendLayout();
|
||||
this.GrpWeightChart.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.ChartWeights)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// GrpBannerValues
|
||||
//
|
||||
resources.ApplyResources(this.GrpBannerValues, "GrpBannerValues");
|
||||
this.GrpBannerValues.Controls.Add(this.ChkAutoStripRateUpFromFallback);
|
||||
this.GrpBannerValues.Controls.Add(this.LblOptions);
|
||||
this.GrpBannerValues.Controls.Add(this.ChkRemoveC6FormPool);
|
||||
@ -130,6 +137,7 @@ namespace GrasscutterTools.Forms
|
||||
this.GrpBannerValues.Controls.Add(this.LblCostItem);
|
||||
this.GrpBannerValues.Controls.Add(this.LblPrefabPath);
|
||||
this.GrpBannerValues.Controls.Add(this.RbCostItem223);
|
||||
resources.ApplyResources(this.GrpBannerValues, "GrpBannerValues");
|
||||
this.GrpBannerValues.Name = "GrpBannerValues";
|
||||
this.GrpBannerValues.TabStop = false;
|
||||
//
|
||||
@ -173,9 +181,9 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// CmbPrefab
|
||||
//
|
||||
resources.ApplyResources(this.CmbPrefab, "CmbPrefab");
|
||||
this.CmbPrefab.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CmbPrefab.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.CmbPrefab, "CmbPrefab");
|
||||
this.CmbPrefab.Name = "CmbPrefab";
|
||||
//
|
||||
// LblEventChance4Tip
|
||||
@ -305,13 +313,13 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// CmbBannerType
|
||||
//
|
||||
resources.ApplyResources(this.CmbBannerType, "CmbBannerType");
|
||||
this.CmbBannerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CmbBannerType.FormattingEnabled = true;
|
||||
this.CmbBannerType.Items.AddRange(new object[] {
|
||||
resources.GetString("CmbBannerType.Items"),
|
||||
resources.GetString("CmbBannerType.Items1"),
|
||||
resources.GetString("CmbBannerType.Items2")});
|
||||
resources.ApplyResources(this.CmbBannerType, "CmbBannerType");
|
||||
this.CmbBannerType.Name = "CmbBannerType";
|
||||
//
|
||||
// LblSortIdTip
|
||||
@ -358,11 +366,11 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// ListFallbackItems
|
||||
//
|
||||
resources.ApplyResources(this.ListFallbackItems, "ListFallbackItems");
|
||||
this.ListFallbackItems.CheckBoxes = true;
|
||||
this.ListFallbackItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.ColFallbackId,
|
||||
this.ColFallbackName});
|
||||
resources.ApplyResources(this.ListFallbackItems, "ListFallbackItems");
|
||||
this.ListFallbackItems.FullRowSelect = true;
|
||||
this.ListFallbackItems.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] {
|
||||
((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListFallbackItems.Groups"))),
|
||||
@ -386,18 +394,18 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// GrpUpPool
|
||||
//
|
||||
resources.ApplyResources(this.GrpUpPool, "GrpUpPool");
|
||||
this.GrpUpPool.Controls.Add(this.ListUpItems);
|
||||
resources.ApplyResources(this.GrpUpPool, "GrpUpPool");
|
||||
this.GrpUpPool.Name = "GrpUpPool";
|
||||
this.GrpUpPool.TabStop = false;
|
||||
//
|
||||
// ListUpItems
|
||||
//
|
||||
resources.ApplyResources(this.ListUpItems, "ListUpItems");
|
||||
this.ListUpItems.CheckBoxes = true;
|
||||
this.ListUpItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.ColUpId,
|
||||
this.ColUpName});
|
||||
resources.ApplyResources(this.ListUpItems, "ListUpItems");
|
||||
this.ListUpItems.FullRowSelect = true;
|
||||
this.ListUpItems.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] {
|
||||
((System.Windows.Forms.ListViewGroup)(resources.GetObject("ListUpItems.Groups"))),
|
||||
@ -447,12 +455,12 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// GrpWeights
|
||||
//
|
||||
resources.ApplyResources(this.GrpWeights, "GrpWeights");
|
||||
this.GrpWeights.Controls.Add(this.LnkWeightHelp);
|
||||
this.GrpWeights.Controls.Add(this.TxtWeight4);
|
||||
this.GrpWeights.Controls.Add(this.TxtWeight5);
|
||||
this.GrpWeights.Controls.Add(this.LblWeight4);
|
||||
this.GrpWeights.Controls.Add(this.LblWeight5);
|
||||
resources.ApplyResources(this.GrpWeights, "GrpWeights");
|
||||
this.GrpWeights.Name = "GrpWeights";
|
||||
this.GrpWeights.TabStop = false;
|
||||
//
|
||||
@ -485,11 +493,11 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// GrpBalance
|
||||
//
|
||||
resources.ApplyResources(this.GrpBalance, "GrpBalance");
|
||||
this.GrpBalance.Controls.Add(this.TxtPoolWeight4);
|
||||
this.GrpBalance.Controls.Add(this.TxtPoolWeight5);
|
||||
this.GrpBalance.Controls.Add(this.LblPoolWeight4);
|
||||
this.GrpBalance.Controls.Add(this.LblPoolWeight5);
|
||||
resources.ApplyResources(this.GrpBalance, "GrpBalance");
|
||||
this.GrpBalance.Name = "GrpBalance";
|
||||
this.GrpBalance.TabStop = false;
|
||||
//
|
||||
@ -513,10 +521,51 @@ namespace GrasscutterTools.Forms
|
||||
resources.ApplyResources(this.LblPoolWeight5, "LblPoolWeight5");
|
||||
this.LblPoolWeight5.Name = "LblPoolWeight5";
|
||||
//
|
||||
// GrpWeightChart
|
||||
//
|
||||
resources.ApplyResources(this.GrpWeightChart, "GrpWeightChart");
|
||||
this.GrpWeightChart.Controls.Add(this.ChartWeights);
|
||||
this.GrpWeightChart.Name = "GrpWeightChart";
|
||||
this.GrpWeightChart.TabStop = false;
|
||||
//
|
||||
// ChartWeights
|
||||
//
|
||||
chartArea2.AxisX.Minimum = 0D;
|
||||
chartArea2.AxisY.Maximum = 100D;
|
||||
chartArea2.AxisY.Minimum = 0D;
|
||||
chartArea2.AxisY.Title = "%";
|
||||
chartArea2.Name = "ChartArea1";
|
||||
this.ChartWeights.ChartAreas.Add(chartArea2);
|
||||
resources.ApplyResources(this.ChartWeights, "ChartWeights");
|
||||
legend2.Name = "Legend1";
|
||||
this.ChartWeights.Legends.Add(legend2);
|
||||
this.ChartWeights.Name = "ChartWeights";
|
||||
series3.ChartArea = "ChartArea1";
|
||||
series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
|
||||
series3.Color = System.Drawing.Color.OrangeRed;
|
||||
series3.Label = "(#VALX, #VAL)";
|
||||
series3.Legend = "Legend1";
|
||||
series3.LegendText = "5*";
|
||||
series3.Name = "SeriesWeight5";
|
||||
series3.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int32;
|
||||
series3.YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Double;
|
||||
series4.ChartArea = "ChartArea1";
|
||||
series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
|
||||
series4.Color = System.Drawing.Color.Purple;
|
||||
series4.Label = "(#VALX, #VAL)";
|
||||
series4.Legend = "Legend1";
|
||||
series4.LegendText = "4*";
|
||||
series4.Name = "SeriesWeight4";
|
||||
series4.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int32;
|
||||
series4.YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Double;
|
||||
this.ChartWeights.Series.Add(series3);
|
||||
this.ChartWeights.Series.Add(series4);
|
||||
//
|
||||
// FormGachaBannerEditor2
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.GrpWeightChart);
|
||||
this.Controls.Add(this.GrpBalance);
|
||||
this.Controls.Add(this.GrpWeights);
|
||||
this.Controls.Add(this.GrpJson);
|
||||
@ -540,6 +589,8 @@ namespace GrasscutterTools.Forms
|
||||
this.GrpWeights.PerformLayout();
|
||||
this.GrpBalance.ResumeLayout(false);
|
||||
this.GrpBalance.PerformLayout();
|
||||
this.GrpWeightChart.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.ChartWeights)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@ -599,5 +650,7 @@ namespace GrasscutterTools.Forms
|
||||
private System.Windows.Forms.CheckBox ChkRemoveC6FormPool;
|
||||
private System.Windows.Forms.CheckBox ChkAutoStripRateUpFromFallback;
|
||||
private System.Windows.Forms.Label LblOptions;
|
||||
private System.Windows.Forms.GroupBox GrpWeightChart;
|
||||
private System.Windows.Forms.DataVisualization.Charting.Chart ChartWeights;
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
|
||||
using GrasscutterTools.Game;
|
||||
using GrasscutterTools.Game.Gacha;
|
||||
@ -183,6 +184,15 @@ namespace GrasscutterTools.Forms
|
||||
TxtWeight4.Text = '[' + string.Join(", ", SelectWeights(banner.Weights4).Select(w => $"[{w.Count}, {w.Weight}]")) + ']';
|
||||
TxtPoolWeight5.Text = '[' + string.Join(", ", SelectWeights(banner.PoolBalanceWeights5).Select(w => $"[{w.Count}, {w.Weight}]")) + ']';
|
||||
TxtPoolWeight4.Text = '[' + string.Join(", ", SelectWeights(banner.PoolBalanceWeights4).Select(w => $"[{w.Count}, {w.Weight}]")) + ']';
|
||||
|
||||
ChartWeights.SuspendLayout();
|
||||
ChartWeights.Series[0].Points.Clear();
|
||||
foreach (var w in SelectWeights(banner.Weights5))
|
||||
ChartWeights.Series[0].Points.AddXY(w.Count, w.Weight / 100.0);
|
||||
ChartWeights.Series[1].Points.Clear();
|
||||
foreach (var w in SelectWeights(banner.Weights4))
|
||||
ChartWeights.Series[1].Points.AddXY(w.Count, w.Weight / 100.0);
|
||||
ChartWeights.ResumeLayout();
|
||||
}
|
||||
|
||||
private IEnumerable<GachaWeight> SelectWeights(int[,] weights)
|
||||
@ -295,6 +305,7 @@ namespace GrasscutterTools.Forms
|
||||
var json = JsonConvert.SerializeObject(banner);
|
||||
json = json.Replace(",\"", ",\r\n \"").Insert(1, "\r\n ");
|
||||
TxtJson.Text = json.Insert(json.Length-1, "\r\n");
|
||||
ShowBanner(banner);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -431,6 +431,9 @@
|
||||
<data name="LblPoolWeight5.Text" xml:space="preserve">
|
||||
<value>Pool Weight 5</value>
|
||||
</data>
|
||||
<data name="GrpWeightChart.Text" xml:space="preserve">
|
||||
<value>Weight Chart</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Gacha Banner Editor</value>
|
||||
</data>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -233,7 +233,7 @@
|
||||
<value>Молитва события с оружием</value>
|
||||
</data>
|
||||
<data name="LblSortIdTip.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>101, 17</value>
|
||||
<value>121, 17</value>
|
||||
</data>
|
||||
<data name="LblSortIdTip.Text" xml:space="preserve">
|
||||
<value>Показать порядок</value>
|
||||
@ -283,6 +283,9 @@
|
||||
<data name="GrpBannerValues.Text" xml:space="preserve">
|
||||
<value>Баннер</value>
|
||||
</data>
|
||||
<data name="GrpFallbackPool.Text" xml:space="preserve">
|
||||
<value>Запасной Пул</value>
|
||||
</data>
|
||||
<data name="ListFallbackItems.Groups" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
@ -343,8 +346,8 @@
|
||||
bWVudAEAAAAHdmFsdWVfXwAIAgAAAAAAAAAKBgUAAAAHR3JvdXBXMws=
|
||||
</value>
|
||||
</data>
|
||||
<data name="GrpFallbackPool.Text" xml:space="preserve">
|
||||
<value>Запасной Пул</value>
|
||||
<data name="GrpUpPool.Text" xml:space="preserve">
|
||||
<value>Верхний Пул</value>
|
||||
</data>
|
||||
<data name="ListUpItems.Groups" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
@ -386,9 +389,6 @@
|
||||
bWVudAEAAAAHdmFsdWVfXwAIAgAAAAAAAAAKBgUAAAAJR3JvdXBVcFc0Cw==
|
||||
</value>
|
||||
</data>
|
||||
<data name="GrpUpPool.Text" xml:space="preserve">
|
||||
<value>Верхний Пул</value>
|
||||
</data>
|
||||
<data name="BtnGen.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>85, 23</value>
|
||||
</data>
|
||||
@ -404,6 +404,9 @@
|
||||
<data name="BtnParse.Text" xml:space="preserve">
|
||||
<value>Загр. Json</value>
|
||||
</data>
|
||||
<data name="GrpWeights.Text" xml:space="preserve">
|
||||
<value>Gacha Веса</value>
|
||||
</data>
|
||||
<data name="LnkWeightHelp.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>375, 0</value>
|
||||
</data>
|
||||
@ -431,8 +434,8 @@
|
||||
<data name="LblWeight5.Text" xml:space="preserve">
|
||||
<value>Веса 5*</value>
|
||||
</data>
|
||||
<data name="GrpWeights.Text" xml:space="preserve">
|
||||
<value>Gacha Веса</value>
|
||||
<data name="GrpBalance.Text" xml:space="preserve">
|
||||
<value>Баланс персонажа и оружия (работают только смешанные пулы)</value>
|
||||
</data>
|
||||
<data name="LblPoolWeight4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>28, 61</value>
|
||||
@ -452,8 +455,8 @@
|
||||
<data name="LblPoolWeight5.Text" xml:space="preserve">
|
||||
<value>Пул Веса 5*</value>
|
||||
</data>
|
||||
<data name="GrpBalance.Text" xml:space="preserve">
|
||||
<value>Баланс персонажа и оружия (работают только смешанные пулы)</value>
|
||||
<data name="GrpWeightChart.Text" xml:space="preserve">
|
||||
<value>Таблица веса</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Редактор баннеров Gacha</value>
|
||||
|
@ -165,6 +165,9 @@
|
||||
<data name="GrpBannerValues.Text" xml:space="preserve">
|
||||
<value>卡池參數</value>
|
||||
</data>
|
||||
<data name="GrpFallbackPool.Text" xml:space="preserve">
|
||||
<value>基礎池</value>
|
||||
</data>
|
||||
<data name="ListFallbackItems.Groups" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
@ -225,9 +228,6 @@
|
||||
dAEAAAAHdmFsdWVfXwAIAgAAAAAAAAAKBgUAAAAHR3JvdXBXMws=
|
||||
</value>
|
||||
</data>
|
||||
<data name="GrpFallbackPool.Text" xml:space="preserve">
|
||||
<value>基礎池</value>
|
||||
</data>
|
||||
<data name="ListUpItems.Groups" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
@ -268,6 +268,9 @@
|
||||
dAEAAAAHdmFsdWVfXwAIAgAAAAAAAAAKBgUAAAAJR3JvdXBVcFc0Cw==
|
||||
</value>
|
||||
</data>
|
||||
<data name="GrpWeights.Text" xml:space="preserve">
|
||||
<value>卡池權重與保底機制</value>
|
||||
</data>
|
||||
<data name="LnkWeightHelp.Text" xml:space="preserve">
|
||||
<value>幫助</value>
|
||||
</data>
|
||||
@ -277,8 +280,8 @@
|
||||
<data name="LblWeight5.Text" xml:space="preserve">
|
||||
<value>5星權重</value>
|
||||
</data>
|
||||
<data name="GrpWeights.Text" xml:space="preserve">
|
||||
<value>卡池權重與保底機制</value>
|
||||
<data name="GrpBalance.Text" xml:space="preserve">
|
||||
<value>角色和武器平衡機制(僅混合池有效)</value>
|
||||
</data>
|
||||
<data name="LblPoolWeight4.Text" xml:space="preserve">
|
||||
<value>4星池權重</value>
|
||||
@ -286,8 +289,8 @@
|
||||
<data name="LblPoolWeight5.Text" xml:space="preserve">
|
||||
<value>5星池權重</value>
|
||||
</data>
|
||||
<data name="GrpBalance.Text" xml:space="preserve">
|
||||
<value>角色和武器平衡機制(僅混合池有效)</value>
|
||||
<data name="GrpWeightChart.Text" xml:space="preserve">
|
||||
<value>權重圖表</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>卡池編輯器</value>
|
||||
|
@ -47,9 +47,12 @@
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Windows.Forms.DataVisualization" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controls\TextBoxXP.cs">
|
||||
|
Loading…
Reference in New Issue
Block a user