Re: How to change Stepmania's arrow speed mods
Well the problem with that is different themes and modded themes. It would horribly screw things up, because peoples metrics really are different. Between stepmania 4.0 and 3.9 and 3.95 and all the themes from those.
Heres my code. If anyone can guide me in the right direction of added the mods automatically that would be great.
Well the problem with that is different themes and modded themes. It would horribly screw things up, because peoples metrics really are different. Between stepmania 4.0 and 3.9 and 3.95 and all the themes from those.
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public int xcount = 1;
public int xxcount = 1;
public int ccount = 1;
public int cccount = 1;
public double xstart = 0;
public double xend = 0;
public double xinc = 0;
public int cstart = 0;
public int cend = 0;
public int cinc = 0;
public Form1()
{
InitializeComponent();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void Go_Click(object sender, EventArgs e)
{
if (rad1.Checked == true)
{
if (Xstart.Text == "" || Xend.Text == "" || Xinc.Text == "" || Cstart.Text == "" || Cend.Text == "" || Cinc.Text == "")
{
metrics.Text = "A field is empty";
Language.Text = "A field is empty";
}
else
{
xstart = Convert.ToDouble(Xstart.Text);
xend = Convert.ToDouble(Xend.Text);
xinc = Convert.ToDouble(Xinc.Text);
cstart = Convert.ToInt32(Cstart.Text);
cend = Convert.ToInt32(Cend.Text);
cinc = Convert.ToInt32(Cinc.Text);
metrics.Text = "";
Language.Text = "";
for (double i = xstart; i <= xend; i = i + xinc)
{
xxcount += 1;
}
int cccount = xxcount;
for (int i = cstart; i < cend; i = i + cinc)
{
cccount += 1;
}
metrics.Text = ("# Player options\r\n");
metrics.Text = metrics.Text + ("Speed=" + cccount + "\r\n");
metrics.Text = metrics.Text + ("SpeedDefault=mod, 1x\r\n");
for (double i = xstart; i <= xend; i = i + xinc)
{
metrics.Text = metrics.Text + ("Speed," + xcount + "=mod," + System.Math.Round(i, 3) + "x;name,x" + System.Math.Round(i, 3) + "\r\n");
xcount += 1;
}
int ccount = xcount;
for (int i = cstart; i <= cend; i = i + cinc)
{
metrics.Text = metrics.Text + ("Speed," + ccount + "=mod," + "C" + i + ";name,C" + i + "\r\n");
ccount += 1;
}
Language.Text = "";
for (double i = xstart; i <= xend; i = i + xinc)
{
Language.Text = Language.Text + ("x" + System.Math.Round(i, 3) + "=x" + System.Math.Round(i, 3) + "\r\n");
}
for (int i = cstart; i <= cend; i = i + cinc)
{
Language.Text = Language.Text + ("C" + i + "=C" + i + "\r\n");
}
xcount = 1;
xxcount = 1;
ccount = 1;
cccount = 1;
xstart = 0;
xend = 0;
xinc = 0;
cstart = 0;
cend = 0;
cinc = 0;
}
}
if (rad2.Checked == true)
{
if (Xstart.Text == "" || Xend.Text == "" || Xinc.Text == "" || Cstart.Text == "" || Cend.Text == "" || Cinc.Text == "")
{
metrics.Text = "A field is empty";
Language.Text = "A field is empty";
}
else
{
xstart = Convert.ToDouble(Xstart.Text);
xend = Convert.ToDouble(Xend.Text);
xinc = Convert.ToDouble(Xinc.Text);
cstart = Convert.ToInt32(Cstart.Text);
cend = Convert.ToInt32(Cend.Text);
cinc = Convert.ToInt32(Cinc.Text);
metrics.Text = "";
Language.Text = "";
for (double i = xstart; i <= xend; i = i + xinc)
{
xxcount += 1;
}
int cccount = xxcount;
for (int i = cstart; i < cend; i = i + cinc)
{
cccount += 1;
}
metrics.Text = metrics.Text + ("# Player options\r\n");
metrics.Text = metrics.Text + ("Speed=\"" + (cccount +1) + "\"\r\n");
metrics.Text = metrics.Text + ("SpeedDefault=\"mod, 1x,no randomspeed\"\r\n");
for (double i = xstart; i <= xend; i = i + xinc)
{
metrics.Text = metrics.Text + ("Speed," + xcount + "=\"mod," + System.Math.Round(i, 3) + "x;name,x" + System.Math.Round(i, 3) + "\"\r\n");
xcount += 1;
}
int ccount = xcount;
for (int i = cstart; i <= cend; i = i + cinc)
{
metrics.Text = metrics.Text + ("Speed," + ccount + "=\"mod," + "C" + i + ";name,C" + i + "\"\r\n");
ccount += 1;
if (i == cend)
{
metrics.Text = metrics.Text + ("Speed," + (ccount) + "=\"mod,1x,200% randomspeed;name,Random\"");
}
}
Language.Text = "";
for (double i = xstart; i <= xend; i = i + xinc)
{
Language.Text = Language.Text + ("x" + System.Math.Round(i, 3) + "=x" + System.Math.Round(i, 3) + "\r\n");
}
for (int i = cstart; i <= cend; i = i + cinc)
{
Language.Text = Language.Text + ("C" + i + "=C" + i + "\r\n");
}
xcount = 1;
xxcount = 1;
ccount = 1;
cccount = 1;
xstart = 0;
xend = 0;
xinc = 0;
cstart = 0;
cend = 0;
cinc = 0;
}
}
}
private void metrics_TextChanged(object sender, EventArgs e)
{
}
private void Clear_Click(object sender, EventArgs e)
{
Xstart.Text = "";
Xend.Text = "";
Xinc.Text = "";
Cstart.Text = "";
Cend.Text = "";
Cinc.Text = "";
metrics.Text = "";
Language.Text = "";
}
private void Form1_Load(object sender, EventArgs e)
{
rad1.Checked = true;
}
private void rad1_Click(object sender, EventArgs e)
{
rad2.Checked = false;
rad1.Checked = true;
}
private void rad2_Click(object sender, EventArgs e)
{
rad1.Checked = false;
rad2.Checked = true;
}
private void Help_Click(object sender, EventArgs e)
{
metrics.Text = "";
Language.Text = "";
metrics.Text = "Created by: Izzy\r\n";
metrics.Text = metrics.Text + "www.BlueXoon.com\r\n";
Language.Text = "1) Don't leave any fields blank \r\n";
Language.Text = Language.Text + ("2) Don't use any letters \r\n");
Language.Text = Language.Text + ("3) Don't make the incriments bigger then the end value \r\n");
Language.Text = Language.Text + ("4) It's a good idea to make your values pass through 1x \r\n");
}
}
}


Comment