mirror of
https://github.com/skogaby/butterfly.git
synced 2026-04-25 16:06:52 -05:00
Readme update, and include the diff to the Xom version included
This commit is contained in:
parent
5aa0af170d
commit
c839c77314
104
README.md
104
README.md
|
|
@ -1,2 +1,104 @@
|
|||
# butterfly
|
||||
An e-amusement server emulator, targeting Dance Dance Revolution A.
|
||||
An e-AMUSEMENT server emulator, targeting Dance Dance Revolution A.
|
||||
|
||||
## What is this?
|
||||
|
||||
This is **butterfly**, an e-AMUSEMENT server targeting Dance Dance Revolution A. This is a mostly-fully-featured server, intended for local usage.
|
||||
|
||||
### Features:
|
||||
* Full support for profile creation, score saving, options saving. etc.
|
||||
* Carding in works as expected, and any number of profiles is supported
|
||||
* Forced full unlock (currently event progress is not tracked / everything is fully unlocked already)
|
||||
* Can run on Windows/Mac/Linux
|
||||
|
||||
### How do I use it?
|
||||
|
||||
Requirements:
|
||||
* Java 8 or above needs to be installed. Most users should already have this, but if not, download the latest JRE for your platform
|
||||
|
||||
#### Usage:
|
||||
|
||||
Put the following in a file called "run_server.bat" if on Windows, or "run_server.sh" if on Linux/Mac. The path including YOUR_USERNAME can be anything, this is where the database file will be saved. Save and run the file:
|
||||
|
||||
`java -Ddb_path="C:\Users\YOUR_USERNAME\Desktop\db.sqlite" -jar butterfly-1.0.0.jar`
|
||||
|
||||
At this point, the server should be running. Connect your game and play!
|
||||
|
||||
### How do I change webUI-only options (dancer, fast/slow judgement, etc.)?
|
||||
|
||||
Unfortunately, I did not get around to making a web UI for this server. I might in the future. In the meantime, you'll need to manually edit the database to change these options... any SQLite database browser will work.
|
||||
|
||||
To change your options, find your user under the "ddr_16_profiles" table and edit whichever columns you'd like. Below are the valid options for each column you probably care about:
|
||||
|
||||
**dancer_character**:
|
||||
```
|
||||
RANDOM,
|
||||
RANDOM_MALE,
|
||||
RANDOM_FEMALE,
|
||||
YUNI,
|
||||
RAGE,
|
||||
AFRO,
|
||||
JENNY,
|
||||
EMI,
|
||||
BABYLON,
|
||||
GUS,
|
||||
RUBY,
|
||||
ALICE,
|
||||
JULIO,
|
||||
BONNIE,
|
||||
ZERO,
|
||||
RINON,
|
||||
RYUSEI_EMI,
|
||||
RYUSEI_ALICE,
|
||||
RYUSEI_RINON
|
||||
```
|
||||
|
||||
**option_arrow_skin**:
|
||||
```
|
||||
NORMAL,
|
||||
X,
|
||||
CLASSIC,
|
||||
CYBER,
|
||||
MEDIUM,
|
||||
SMALL,
|
||||
DOT,
|
||||
BUTTERFLY
|
||||
```
|
||||
|
||||
**option_screen_filter**:
|
||||
```
|
||||
OFF,
|
||||
LIGHT,
|
||||
MEDIUM,
|
||||
DARK
|
||||
```
|
||||
|
||||
**option_guidelines**:
|
||||
``` OFF,
|
||||
ARROW_TOP,
|
||||
ARROW_CENTER
|
||||
```
|
||||
|
||||
**option_judgement_layer**:
|
||||
```
|
||||
FOREGROUND,
|
||||
BACKGROUND
|
||||
```
|
||||
|
||||
**show_fast_slow_results**:
|
||||
```
|
||||
0,
|
||||
1
|
||||
```
|
||||
|
||||
If you'd like to set your weight, enter your weight in **kilograms** in the weight column.
|
||||
|
||||
### What's next?
|
||||
|
||||
Probably nothing. I'm mainly releasing this because I don't see myself working more on it in the future, but I thought it'd be helpful for others. I mainly coded it as a learning exercise, and I suspect that the "juicy" bits of this code won't be relevant for much longer anyway. Maybe I'll make a web UI in the future but don't hold me to that.
|
||||
|
||||
### Credits
|
||||
* **skogaby**: main author
|
||||
* **dogelition_man** (https://github.com/ledoge): author of Kotlin kbinxml and card number conversion code
|
||||
* Various other devs for tips/pointers
|
||||
* Various other projects that I reversed for figuring out packet encryption/compression
|
||||
198
lib/xom-1.3.0-diff.txt
Normal file
198
lib/xom-1.3.0-diff.txt
Normal file
|
|
@ -0,0 +1,198 @@
|
|||
diff --git a/src/nu/xom/Element.java b/src/nu/xom/Element.java
|
||||
index a810cbc..50cee6a 100644
|
||||
--- a/src/nu/xom/Element.java
|
||||
+++ b/src/nu/xom/Element.java
|
||||
@@ -21,13 +21,7 @@
|
||||
|
||||
package nu.xom;
|
||||
|
||||
-import java.util.HashMap;
|
||||
-import java.util.HashSet;
|
||||
-import java.util.Iterator;
|
||||
-import java.util.Map;
|
||||
-import java.util.NoSuchElementException;
|
||||
-import java.util.Set;
|
||||
-import java.util.LinkedHashSet;
|
||||
+import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -49,7 +43,7 @@ import java.util.LinkedHashSet;
|
||||
* @version 1.3.0
|
||||
*
|
||||
*/
|
||||
-public class Element extends ParentNode {
|
||||
+public class Element extends ParentNode implements Iterable<Attribute> {
|
||||
|
||||
private String localName;
|
||||
private String prefix;
|
||||
@@ -1839,6 +1833,23 @@ public class Element extends ParentNode {
|
||||
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public Iterator<Attribute> iterator() {
|
||||
+ return new Iterator<Attribute>() {
|
||||
+ int i = 0;
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean hasNext() {
|
||||
+ return (i < numAttributes && attributes[i] != null);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Attribute next() {
|
||||
+ return attributes[i++];
|
||||
+ }
|
||||
+ };
|
||||
+ }
|
||||
+
|
||||
|
||||
private class AttributeIterator implements Iterator {
|
||||
|
||||
@@ -1863,6 +1874,25 @@ public class Element extends ParentNode {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public void sortAttributes() {
|
||||
+ if (attributes == null) return;
|
||||
+ Arrays.sort(attributes, new Comparator<Attribute>(){
|
||||
+ @Override
|
||||
+ public int compare(Attribute t1, Attribute t2) {
|
||||
+ if (t1 == null && t2 == null) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ if (t1 == null) {
|
||||
+ return 1;
|
||||
+ }
|
||||
+ if (t2 == null) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return t1.getLocalName().compareTo(t2.getLocalName());
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
|
||||
Iterator attributeIterator() {
|
||||
|
||||
diff --git a/src/nu/xom/Elements.java b/src/nu/xom/Elements.java
|
||||
index 1fd26ea..524cbb0 100644
|
||||
--- a/src/nu/xom/Elements.java
|
||||
+++ b/src/nu/xom/Elements.java
|
||||
@@ -22,6 +22,7 @@
|
||||
package nu.xom;
|
||||
|
||||
import java.util.ArrayList;
|
||||
+import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -38,7 +39,7 @@ import java.util.List;
|
||||
*
|
||||
*
|
||||
*/
|
||||
-public final class Elements {
|
||||
+public final class Elements implements Iterable<Element> {
|
||||
|
||||
|
||||
private List elements = new ArrayList(1);
|
||||
@@ -82,4 +83,25 @@ public final class Elements {
|
||||
elements.add(element);
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public Iterator<Element> iterator() {
|
||||
+ return new Iterator<Element>(){
|
||||
+
|
||||
+ int i = 0;
|
||||
+ @Override
|
||||
+ public boolean hasNext() {
|
||||
+ return i < elements.size();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Element next() {
|
||||
+ return (Element)elements.get(i++);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void remove() {
|
||||
+
|
||||
+ }
|
||||
+ };
|
||||
+ }
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/nu/xom/Nodes.java b/src/nu/xom/Nodes.java
|
||||
index a987783..9ca938f 100644
|
||||
--- a/src/nu/xom/Nodes.java
|
||||
+++ b/src/nu/xom/Nodes.java
|
||||
@@ -22,6 +22,7 @@
|
||||
package nu.xom;
|
||||
|
||||
import java.util.ArrayList;
|
||||
+import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -45,9 +46,9 @@ import java.util.List;
|
||||
* @version 1.1b4
|
||||
*
|
||||
*/
|
||||
-public final class Nodes {
|
||||
+public final class Nodes implements Iterable<Node> {
|
||||
|
||||
- private final List nodes;
|
||||
+ private final List<Node> nodes;
|
||||
|
||||
|
||||
/**
|
||||
@@ -56,7 +57,7 @@ public final class Nodes {
|
||||
* </p>
|
||||
*/
|
||||
public Nodes() {
|
||||
- nodes = new ArrayList();
|
||||
+ nodes = new ArrayList<Node>();
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +75,7 @@ public final class Nodes {
|
||||
if (node == null) {
|
||||
throw new NullPointerException("Nodes content must be non-null");
|
||||
}
|
||||
- nodes = new ArrayList(1);
|
||||
+ nodes = new ArrayList<Node>(1);
|
||||
nodes.add(node);
|
||||
|
||||
}
|
||||
@@ -113,7 +114,7 @@ public final class Nodes {
|
||||
* negative or greater than or equal to the size of the list
|
||||
*/
|
||||
public Node get(int index) {
|
||||
- return (Node) nodes.get(index);
|
||||
+ return nodes.get(index);
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +132,7 @@ public final class Nodes {
|
||||
* negative or greater than or equal to the size of the list
|
||||
*/
|
||||
public Node remove(int index) {
|
||||
- return (Node) nodes.remove(index);
|
||||
+ return nodes.remove(index);
|
||||
}
|
||||
|
||||
|
||||
@@ -187,5 +188,9 @@ public final class Nodes {
|
||||
return nodes.contains(node);
|
||||
}
|
||||
|
||||
-
|
||||
+
|
||||
+ @Override
|
||||
+ public Iterator<Node> iterator() {
|
||||
+ return nodes.iterator();
|
||||
+ }
|
||||
}
|
||||
\ No newline at end of file
|
||||
Loading…
Reference in New Issue
Block a user