-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes, work from a folder, new README #3
Open
Davidixx
wants to merge
1
commit into
dev-osrose:master
Choose a base branch
from
Davidixx:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# convert_tool | ||
This is a ROSE client data convertion tool that will take a extracted IROSE client (112_112na) and convert the data into sql and lua files to support the osirose-new server project | ||
|
||
# before building - DO NOT FORGET! | ||
CMD> git submodule update --init --recursive | ||
|
||
The rest is just convert_tools.sln -> build | ||
|
||
# How to use | ||
1. Create folder inside client named convert_tool | ||
2. Copy build files under src/bin/debug into the folder above | ||
3. Run convert_tool.exe | ||
4. Copy srv_data/scripts into server files | ||
5. Load item_db.sql + skill_db.sql into your database | ||
|
||
You're good to go! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
#endregion | ||
|
||
using System; | ||
using System.Globalization; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Text.RegularExpressions; | ||
|
@@ -103,18 +104,18 @@ public void Load(string filePath = null, int mapId = 0) | |
|
||
private static void ExtractSpawnPoints(int mapId, ZoneFile zoneFile, List<string> spawnList) | ||
{ | ||
const string zoneStb = "./3DDATA/stb/list_zone.stb"; | ||
const string zoneStb = Globals.stbroot + "list_zone.stb"; | ||
|
||
var zoneDataFile = new DataFile(); | ||
zoneDataFile.Load(zoneStb); | ||
|
||
var curMapRow = zoneDataFile[mapId]; | ||
|
||
var reviveMap = curMapRow[32]; | ||
bool isParsable = int.TryParse(curMapRow[32], out var reviveMap); | ||
double.TryParse(curMapRow[33], out var reviveX); | ||
double.TryParse(curMapRow[34], out var reviveY); | ||
|
||
if (reviveMap.Length > 0) | ||
if (isParsable) | ||
{ | ||
spawnList.Add("revive_point(" + reviveMap.ToString("G", CultureInfo.InvariantCulture) + ", " + (reviveX * 1000.0f).ToString("G", CultureInfo.InvariantCulture) + ", " + (reviveY * 10000.0f).ToString("G", CultureInfo.InvariantCulture) + ");\n"); | ||
} | ||
|
@@ -177,7 +178,7 @@ private static void ExtractNpcs(List<string> npcList, int mapId, MapDataFile ifo | |
foreach (var npc in ifo.NPCs) | ||
{ | ||
var eventDataFile = new DataFile(); | ||
eventDataFile.Load("./3DDATA/stb/list_event.stb"); | ||
eventDataFile.Load(Globals.stbroot + "list_event.stb"); | ||
int dialogId = 0; | ||
for (int i = 0; i < eventDataFile.RowCount; i++) | ||
{ | ||
|
@@ -201,10 +202,10 @@ private static void ExtractNpcs(List<string> npcList, int mapId, MapDataFile ifo | |
|
||
private static void ExtractWarpGates(List<string> warpList, int mapId, MapDataFile ifo) | ||
{ | ||
const string warpStb = "./3DDATA/stb/warp.stb"; | ||
const string zoneStb = "./3DDATA/stb/list_zone.stb"; | ||
const string warpGateModel = "./3DDATA/special/warp_gate01/warp.zms"; | ||
const string decoSpecialList = "./3DDATA/special/list_deco_special.zsc"; | ||
const string warpStb = Globals.stbroot + "warp.stb"; | ||
const string zoneStb = Globals.stbroot + "list_zone.stb"; | ||
const string warpGateModel = Globals.stbroot + "../special/warp_gate01/warp.zms"; | ||
const string decoSpecialList = Globals.stbroot +"../special/list_deco_special.zsc"; | ||
Comment on lines
+207
to
+208
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally I don't like this as this would resolve to "../3DDATA/stb/../special/warp_gate01/warp.zms" and "../3DDATA/stb/../special/list_deco_special.zsc". Also this tool is being deprecated in favor for https://github.com/dev-osrose/rose_data_converter |
||
|
||
var zoneDataFile = new DataFile(); | ||
zoneDataFile.Load(zoneStb); | ||
|
@@ -223,10 +224,10 @@ private static void ExtractWarpGates(List<string> warpList, int mapId, MapDataFi | |
foreach (var warpGate in ifo.WarpPoints) | ||
{ | ||
var destMapId = int.Parse(warpDataFile[warpGate.WarpID][2]); | ||
if (zoneDataFile[destMapId][2].ToString().Contains(".zon")) | ||
if (("../" + zoneDataFile[destMapId][2].ToString()).Contains(".zon")) | ||
{ | ||
ZoneFile zoneFile = new ZoneFile(); | ||
zoneFile.Load(zoneDataFile[destMapId][2].ToString()); // Load the zon file | ||
zoneFile.Load("../" + zoneDataFile[destMapId][2].ToString()); // Load the zon file | ||
|
||
foreach (var spawnPoint in zoneFile.SpawnPoints) | ||
{ | ||
|
@@ -258,7 +259,7 @@ private static void ExtractWarpGates(List<string> warpList, int mapId, MapDataFi | |
var boundingBox = BoundingBox.FromPoints(vectorPositions); | ||
|
||
warpList.Add("warp_gate(\"\", " | ||
+ warpDataFile[warpGate.WarpID][2].ToString("G", CultureInfo.InvariantCulture) + ", " | ||
+ warpDataFile[warpGate.WarpID][2] + ", " | ||
+ (destCoords.X).ToString("G", CultureInfo.InvariantCulture) + ", " | ||
+ (destCoords.Y).ToString("G", CultureInfo.InvariantCulture) + ", " | ||
+ (destCoords.Z).ToString("G", CultureInfo.InvariantCulture) + ", " | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this a command line parameter? And default it to "./". This way, people can run it from anywhere and we have some sound default.