Merge remote-tracking branch 'remotes/origin/docgen_fix'

This commit is contained in:
Jaysyn904
2024-06-21 22:40:56 -04:00
87 changed files with 282 additions and 78 deletions
+124 -1
View File
@@ -27,5 +27,128 @@ nwn/nwnprc/trunk/makefile.temp
*.temp *.temp
*.temp *.temp
nwn/nwnprc/trunk/makefile.temp nwn/nwnprc/trunk/makefile.temp
nwn/nwnprc/DocGen/trunk/2da/*.2da
nwn/nwnprc/DocGen/trunk/tlk/*.tlk
nwn/nwnprc/trunk/makefile.temp nwn/nwnprc/trunk/makefile.temp
nwn/nwnprc/trunk/makefile.temp nwn/nwnprc/DocGen/trunk/manual/
nwn/nwnprc/DocGen/trunk/errorlog
# Created by https://www.toptal.com/developers/gitignore/api/intellij+all,java
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij+all,java
### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Intellij+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.
.idea/*
!.idea/codeStyles
!.idea/runConfigurations
### Java ###
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
# End of https://www.toptal.com/developers/gitignore/api/intellij+all,java
*.orig
@@ -16,6 +16,7 @@ From NWN base:
racialtypes.2da racialtypes.2da
all race_feat_*.2da all race_feat_*.2da
all cls_*.2da all cls_*.2da
all *.tlk
From the PRC: From the PRC:
@@ -72,4 +73,25 @@ above.
See codegen_example -directory for example template and 2das. To see the See codegen_example -directory for example template and 2das. To see the
results from it, run (replace \ with / if not running on windoze) results from it, run (replace \ with / if not running on windoze)
java CodeGen exa_ codegen_example\example.nss codegen_example\Foo.2da codegen_example\Bar.2da java CodeGen exa_ codegen_example\example.nss codegen_example\Foo.2da codegen_example\Bar.2da
## Build Docs
As it currently goes, this seems to run best on windows (`xcopy` is required). There is a makefile, but xcopy + make
are not cooperating with each other, so here are the commands to build the docs.
```commandline
make
xcopy "Main Manual Files" manual /iey
java -Xmx1024m -Xms300m -cp "imageio_tga_1.1.0.jar;." prc/autodoc/Main
```
This has been conveniently placed in a batch file called `autodoc.bat` for Windows users.
## Testing the Site
You'll want to use a server to host the docs so you can load them correctly. I like python for this
```commandline
python -m http.server
```
+3 -2
View File
@@ -1,2 +1,3 @@
xcopy /iey "Main Manual Files" manual make
java -jar DocGen.jar manual xcopy "Main Manual Files" manual /iey
java -Xmx1024m -Xms300m -cp "imageio_tga_1.1.0.jar;." prc/autodoc/Main
+1 -1
View File
@@ -1,6 +1,6 @@
COMPILER = javac COMPILER = javac
FLAGS = -Xlint:all -g -source 11 -target 11 FLAGS = -Xlint:all -g -source 11 -target 11
RUNPARAMS = -Xmx300m -Xms300m -cp imageio_tga_1.1.0.jar\; RUNPARAMS = -Xmx300m -Xms300m -cp "imageio_tga_1.1.0.jar\;."
TARGET = prc/*.java \ TARGET = prc/*.java \
prc/autodoc/*.java \ prc/autodoc/*.java \
prc/utils/*.java \ prc/utils/*.java \
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -381,7 +381,8 @@ public class Data_2da implements Cloneable {
} else } else
line = Integer.parseInt(matcher.group()); line = Integer.parseInt(matcher.group());
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
throw new TwoDAReadException("Numberless 2da line: " + (line + 1)); return;
// throw new TwoDAReadException("Numberless 2da line: " + (line + 1));
} }
// Start parsing the row // Start parsing the row
@@ -399,7 +400,8 @@ public class Data_2da implements Cloneable {
// Check for too long rows // Check for too long rows
if (matcher.find()) if (matcher.find())
throw new TwoDAReadException("Too long 2da line: " + line); return;
// throw new TwoDAReadException("Too long 2da line: " + line);
// Increment the entry counter // Increment the entry counter
//entries++; //entries++;
Binary file not shown.
@@ -1,9 +1,6 @@
package prc.autodoc; package prc.autodoc;
import java.io.File; import java.io.*;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.RandomAccessFile;
import java.nio.MappedByteBuffer; import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel; import java.nio.channels.FileChannel;
import java.util.stream.IntStream; import java.util.stream.IntStream;
@@ -32,7 +29,6 @@ public class Data_TLK {
// Some paranoia checking for bad parameters // Some paranoia checking for bad parameters
if (!filePath.toLowerCase().endsWith("tlk")) if (!filePath.toLowerCase().endsWith("tlk"))
throw new IllegalArgumentException("Non-tlk filename passed to Data_TLK: " + filePath); throw new IllegalArgumentException("Non-tlk filename passed to Data_TLK: " + filePath);
File baseFile = new File(filePath); File baseFile = new File(filePath);
if (!baseFile.exists()) if (!baseFile.exists())
throw new IllegalArgumentException("Nonexistent file passed to Data_TLK: " + filePath); throw new IllegalArgumentException("Nonexistent file passed to Data_TLK: " + filePath);
@@ -366,7 +366,7 @@ public class EntryGeneration {
psiPowMap = new HashMap<String, Integer>(); psiPowMap = new HashMap<String, Integer>();
// Load cls_psipw_*.2da // Load cls_psipw_*.2da
String[] fileNames = new File("2da").list(new FilenameFilter() { String[] fileNames = new File("../../trunk/2das").list(new FilenameFilter() {
public boolean accept(File dir, String name) { public boolean accept(File dir, String name) {
return name.toLowerCase().startsWith("cls_psipw_") && return name.toLowerCase().startsWith("cls_psipw_") &&
name.toLowerCase().endsWith(".2da"); name.toLowerCase().endsWith(".2da");
@@ -384,7 +384,7 @@ public class EntryGeneration {
utterMap = new HashMap<String, Integer>(); utterMap = new HashMap<String, Integer>();
// Load cls_*_utter.2da // Load cls_*_utter.2da
String[] fileNames = new File("2da").list(new FilenameFilter() { String[] fileNames = new File("../../trunk/2das").list(new FilenameFilter() {
public boolean accept(File dir, String name) { public boolean accept(File dir, String name) {
return name.toLowerCase().startsWith("cls_") && return name.toLowerCase().startsWith("cls_") &&
name.toLowerCase().endsWith("_utter.2da"); name.toLowerCase().endsWith("_utter.2da");
@@ -402,7 +402,7 @@ public class EntryGeneration {
invMap = new HashMap<String, Integer>(); invMap = new HashMap<String, Integer>();
// Load cls_*_utter.2da // Load cls_*_utter.2da
String[] fileNames = new File("2da").list(new FilenameFilter() { String[] fileNames = new File("../../trunk/2das").list(new FilenameFilter() {
public boolean accept(File dir, String name) { public boolean accept(File dir, String name) {
return name.toLowerCase().startsWith("cls_inv_") && return name.toLowerCase().startsWith("cls_inv_") &&
name.toLowerCase().endsWith(".2da"); name.toLowerCase().endsWith(".2da");
@@ -420,7 +420,7 @@ public class EntryGeneration {
maneuverMap = new HashMap<String, Integer>(); maneuverMap = new HashMap<String, Integer>();
// Load cls_*_utter.2da // Load cls_*_utter.2da
String[] fileNames = new File("2da").list(new FilenameFilter() { String[] fileNames = new File("../../trunk/2das").list(new FilenameFilter() {
public boolean accept(File dir, String name) { public boolean accept(File dir, String name) {
return name.toLowerCase().startsWith("cls_move_") && return name.toLowerCase().startsWith("cls_move_") &&
name.toLowerCase().endsWith(".2da"); name.toLowerCase().endsWith(".2da");
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+110 -50
View File
@@ -3,6 +3,7 @@ package prc.autodoc;
import java.io.File; import java.io.File;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Paths;
import java.util.*; import java.util.*;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@@ -20,6 +21,33 @@ import static prc.autodoc.PageGeneration.*;
* many errors present in the 2das. * many errors present in the 2das.
*/ */
public class Main { public class Main {
public static ArrayList<String> getFoldersInFolder(String path) {
var result = new ArrayList<String>();
var folder = new File(path);
for (var fileEntry : folder.listFiles()) {
if (fileEntry.isDirectory()) {
result.add(fileEntry.getAbsolutePath().toString());
}
}
return result;
}
public static ArrayList<String> getFilesInFolder(String path) {
var result = new ArrayList<String>();
var folder = new File(path);
for (var fileEntry : folder.listFiles()) {
if (!fileEntry.isDirectory()) {
result.add(fileEntry.getAbsolutePath().toString());
}
}
return result;
}
/** /**
* A small data structure class that gives access to both normal and custom * A small data structure class that gives access to both normal and custom
* TLK with the same method * TLK with the same method
@@ -33,25 +61,27 @@ public class Main {
* TLKStore(normalName, customName, "tlk"). * TLKStore(normalName, customName, "tlk").
* *
* @param normalName dialog.tlk or equivalent for the given language * @param normalName dialog.tlk or equivalent for the given language
* @param customName prc_consortium.tlk or equivalent for the given languag * @param customName prc8_consortium.tlk or equivalent for the given languag
* @throws TLKReadException if there are any problems reading either TLK * @throws TLKReadException if there are any problems reading either TLK
*/ */
public TLKStore(String normalName, String customName) { public TLKStore(String normalName, String customName) {
this.normal = new Data_TLK("tlk" + fileSeparator + normalName); var baseDirectory = "../../trunk"; // @TODO: Move to a Configuration File
this.custom = new Data_TLK("tlk" + fileSeparator + customName); this.normal = new Data_TLK(Paths.get(baseDirectory, "tlk", normalName).toAbsolutePath().toString());
this.custom = new Data_TLK(Paths.get(baseDirectory, "tlk", customName).toAbsolutePath().toString());
} }
/** /**
* Creates a new TLKStore around the given two filenames. * Creates a new TLKStore around the given two filenames.
* *
* @param normalName dialog.tlk or equivalent for the given language * @param normalName dialog.tlk or equivalent for the given language
* @param customName prc_consortium.tlk or equivalent for the given languag * @param customName prc8_consortium.tlk or equivalent for the given languag
* @param tlkDir Directory containing the two .tlk files * @param tlkDir Directory containing the two .tlk files
* @throws TLKReadException if there are any problems reading either TLK * @throws TLKReadException if there are any problems reading either TLK
*/ */
public TLKStore(String normalName, String customName, String tlkDir) { public TLKStore(String normalName, String customName, String tlkDir) {
this.normal = new Data_TLK(tlkDir + fileSeparator + normalName); var baseDirectory = "../../trunk"; // @TODO: Move to a Configuration File
this.custom = new Data_TLK(tlkDir + fileSeparator + customName); this.normal = new Data_TLK(Paths.get(baseDirectory, tlkDir, normalName).toAbsolutePath().toString());
this.custom = new Data_TLK(Paths.get(baseDirectory, tlkDir, customName).toAbsolutePath().toString());
} }
/** /**
@@ -138,25 +168,43 @@ public class Main {
* that could be done anyway. * that could be done anyway.
*/ */
public TwoDAStore() { public TwoDAStore() {
this("2da"); this("../../trunk/2das");
//long start = System.currentTimeMillis(); //long start = System.currentTimeMillis();
if (verbose) System.out.print("Loading main 2da files "); if (verbose) System.out.print("Loading main 2da files ");
CountDownLatch latch = new CountDownLatch(7);
List<Data_2da> list = Collections.synchronizedList(new ArrayList<Data_2da>());
ArrayList<Thread> threads = new ArrayList<>();
var baseDirectory = "../../trunk"; // @TODO: Move to a Configuration File
var folders = getFoldersInFolder(baseDirectory);
for (var folder : folders) {
if (folder.endsWith("2das")) {
var files = getFilesInFolder(folder);
for (var file : files) {
var thread = new Thread(new Loader(file, list, latch));
threads.add(thread);
thread.start();
}
}
}
boolean oldVerbose = verbose; boolean oldVerbose = verbose;
verbose = false; verbose = false;
CountDownLatch latch = new CountDownLatch(7);
List<Data_2da> list = Collections.synchronizedList(new ArrayList<Data_2da>()); // // Read the main 2das
// Read the main 2das // new Thread(new Loader("2da" + fileSeparator + "classes.2da", list, latch)).start();
new Thread(new Loader("2da" + fileSeparator + "classes.2da", list, latch)).start(); // new Thread(new Loader("2da" + fileSeparator + "domains.2da", list, latch)).start();
new Thread(new Loader("2da" + fileSeparator + "domains.2da", list, latch)).start(); // new Thread(new Loader("2da" + fileSeparator + "feat.2da", list, latch)).start();
new Thread(new Loader("2da" + fileSeparator + "feat.2da", list, latch)).start(); // new Thread(new Loader("2da" + fileSeparator + "masterfeats.2da", list, latch)).start();
new Thread(new Loader("2da" + fileSeparator + "masterfeats.2da", list, latch)).start(); // new Thread(new Loader("2da" + fileSeparator + "racialtypes.2da", list, latch)).start();
new Thread(new Loader("2da" + fileSeparator + "racialtypes.2da", list, latch)).start(); // new Thread(new Loader("2da" + fileSeparator + "skills.2da", list, latch)).start();
new Thread(new Loader("2da" + fileSeparator + "skills.2da", list, latch)).start(); // new Thread(new Loader("2da" + fileSeparator + "spells.2da", list, latch)).start();
new Thread(new Loader("2da" + fileSeparator + "spells.2da", list, latch)).start();
try { try {
latch.await(); for (Thread thread : threads) {
thread.join();
}
} catch (InterruptedException e) { } catch (InterruptedException e) {
err_pr.println("Error: Interrupted while reading main 2das. Exception data:\n"); err_pr.println("Error: Interrupted while reading main 2das. Exception data:\n");
err_pr.printException(e); err_pr.printException(e);
@@ -199,7 +247,19 @@ public class Main {
else { else {
Data_2da temp = null; Data_2da temp = null;
try { try {
temp = Data_2da.load2da(twoDAPath + fileSeparator + name + ".2da", true); var basePath = "../../trunk";
var potentialPaths = getFoldersInFolder(basePath);
for (var folder : potentialPaths) {
var file = new File(Paths.get(folder, name + ".2da").toAbsolutePath().toString());
if (file.exists()) {
temp = Data_2da.load2da(file.getAbsolutePath().toString(), true);
break;
}
}
if (temp == null) {
throw new TwoDAReadException("File not found\n" + name);
}
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
throw new TwoDAReadException("Problem with filename when trying to read from 2da:\n" + e); throw new TwoDAReadException("Problem with filename when trying to read from 2da:\n" + e);
} }
@@ -485,7 +545,7 @@ public class Main {
*/ */
public static final int LANGDATA_BASETLK = 1; public static final int LANGDATA_BASETLK = 1;
/** /**
* curLanguageData index of the name of the prc_consortium.tlk equivalent for this language * curLanguageData index of the name of the prc8_consortium.tlk equivalent for this language
*/ */
public static final int LANGDATA_PRCTLK = 2; public static final int LANGDATA_PRCTLK = 2;
/** /**
@@ -763,38 +823,38 @@ public class Main {
* @return <code>true</code> if all the reads succeeded, <code>false</code> otherwise * @return <code>true</code> if all the reads succeeded, <code>false</code> otherwise
*/ */
private static boolean readTemplates() { private static boolean readTemplates() {
String templatePath = "templates" + fileSeparator + curLanguage + fileSeparator; String templatePath = Paths.get("templates", curLanguage).toAbsolutePath().toString();
try { try {
babAndSavthrTableHeaderTemplate = readTemplate(templatePath + "babNsavthrtableheader.html"); babAndSavthrTableHeaderTemplate = readTemplate(Paths.get(templatePath, "babNsavthrtableheader.html").toAbsolutePath().toString());
classTablesEntryTemplate = readTemplate(templatePath + "classtablesentry.html"); classTablesEntryTemplate = readTemplate(Paths.get(templatePath, "classtablesentry.html").toAbsolutePath().toString());
classTemplate = readTemplate(templatePath + "class.html"); classTemplate = readTemplate(Paths.get(templatePath, "class.html").toAbsolutePath().toString());
domainTemplate = readTemplate(templatePath + "domain.html"); domainTemplate = readTemplate(Paths.get(templatePath, "domain.html").toAbsolutePath().toString());
featTemplate = readTemplate(templatePath + "feat.html"); featTemplate = readTemplate(Paths.get(templatePath, "feat.html").toAbsolutePath().toString());
mFeatTemplate = readTemplate(templatePath + "masterfeat.html"); mFeatTemplate = readTemplate(Paths.get(templatePath, "masterfeat.html").toAbsolutePath().toString());
menuTemplate = readTemplate(templatePath + "menu.html"); menuTemplate = readTemplate(Paths.get(templatePath, "menu.html").toAbsolutePath().toString());
menuItemTemplate = readTemplate(templatePath + "menuitem.html"); menuItemTemplate = readTemplate(Paths.get(templatePath, "menuitem.html").toAbsolutePath().toString());
prereqANDFeatHeaderTemplate = readTemplate(templatePath + "prerequisiteandfeatheader.html"); prereqANDFeatHeaderTemplate = readTemplate(Paths.get(templatePath, "prerequisiteandfeatheader.html").toAbsolutePath().toString());
prereqORFeatHeaderTemplate = readTemplate(templatePath + "prerequisiteorfeatheader.html"); prereqORFeatHeaderTemplate = readTemplate(Paths.get(templatePath, "prerequisiteorfeatheader.html").toAbsolutePath().toString());
raceTemplate = readTemplate(templatePath + "race.html"); raceTemplate = readTemplate(Paths.get(templatePath, "race.html").toAbsolutePath().toString());
spellTemplate = readTemplate(templatePath + "spell.html"); spellTemplate = readTemplate(Paths.get(templatePath, "spell.html").toAbsolutePath().toString());
skillTableHeaderTemplate = readTemplate(templatePath + "skilltableheader.html"); skillTableHeaderTemplate = readTemplate(Paths.get(templatePath, "skilltableheader.html").toAbsolutePath().toString());
skillTemplate = readTemplate(templatePath + "skill.html"); skillTemplate = readTemplate(Paths.get(templatePath, "skill.html").toAbsolutePath().toString());
successorFeatHeaderTemplate = readTemplate(templatePath + "successorfeatheader.html"); successorFeatHeaderTemplate = readTemplate(Paths.get(templatePath, "successorfeatheader.html").toAbsolutePath().toString());
iconTemplate = readTemplate(templatePath + "icon.html"); iconTemplate = readTemplate(Paths.get(templatePath, "icon.html").toAbsolutePath().toString());
listEntrySetTemplate = readTemplate(templatePath + "listpageentryset.html"); listEntrySetTemplate = readTemplate(Paths.get(templatePath, "listpageentryset.html").toAbsolutePath().toString());
listEntryTemplate = readTemplate(templatePath + "listpageentry.html"); listEntryTemplate = readTemplate(Paths.get(templatePath, "listpageentry.html").toAbsolutePath().toString());
alphaSortedListTemplate = readTemplate(templatePath + "alphasorted_listpage.html"); alphaSortedListTemplate = readTemplate(Paths.get(templatePath, "alphasorted_listpage.html").toAbsolutePath().toString());
requiredForFeatHeaderTemplate = readTemplate(templatePath + "reqforfeatheader.html"); requiredForFeatHeaderTemplate = readTemplate(Paths.get(templatePath, "reqforfeatheader.html").toAbsolutePath().toString());
pageLinkTemplate = readTemplate(templatePath + "pagelink.html"); pageLinkTemplate = readTemplate(Paths.get(templatePath, "pagelink.html").toAbsolutePath().toString());
featMenuTemplate = readTemplate(templatePath + "featmenu.html"); featMenuTemplate = readTemplate(Paths.get(templatePath, "featmenu.html").toAbsolutePath().toString());
spellSubradialListTemplate = readTemplate(templatePath + "spellsubradials.html"); spellSubradialListTemplate = readTemplate(Paths.get(templatePath, "spellsubradials.html").toAbsolutePath().toString());
spellSubradialListEntryTemplate = readTemplate(templatePath + "spellsubradialsentry.html"); spellSubradialListEntryTemplate = readTemplate(Paths.get(templatePath, "spellsubradialsentry.html").toAbsolutePath().toString());
classFeatTableTemplate = readTemplate(templatePath + "classfeattable.html"); classFeatTableTemplate = readTemplate(Paths.get(templatePath, "classfeattable.html").toAbsolutePath().toString());
classFeatTableEntryTemplate = readTemplate(templatePath + "classfeattableentry.html"); classFeatTableEntryTemplate = readTemplate(Paths.get(templatePath, "classfeattableentry.html").toAbsolutePath().toString());
classMagicTableTemplate = readTemplate(templatePath + "classmagictable.html"); classMagicTableTemplate = readTemplate(Paths.get(templatePath, "classmagictable.html").toAbsolutePath().toString());
classMagicTableEntryTemplate = readTemplate(templatePath + "classmagictableentry.html"); classMagicTableEntryTemplate = readTemplate(Paths.get(templatePath, "classmagictableentry.html").toAbsolutePath().toString());
craftTemplate = readTemplate(templatePath + "craftprop.html"); craftTemplate = readTemplate(Paths.get(templatePath, "craftprop.html").toAbsolutePath().toString());
} catch (IOException e) { } catch (IOException e) {
return false; return false;
} }
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -94,7 +94,7 @@ public final class AMSSpellbookMaker {
spells2da = Data_2da.load2da("2das" + File.separator + "spells.2da", true); spells2da = Data_2da.load2da("2das" + File.separator + "spells.2da", true);
feat2da = Data_2da.load2da("2das" + File.separator + "feat.2da", true); feat2da = Data_2da.load2da("2das" + File.separator + "feat.2da", true);
iprp_feats2da = Data_2da.load2da("2das" + File.separator + "iprp_feats.2da", true); iprp_feats2da = Data_2da.load2da("2das" + File.separator + "iprp_feats.2da", true);
customtlk = new Data_TLK("tlk" + File.separator + "prc_consortium.tlk"); customtlk = new Data_TLK("tlk" + File.separator + "prc8_consortium.tlk");
dialogtlk = new Data_TLK("tlk" + File.separator + "dialog.tlk"); dialogtlk = new Data_TLK("tlk" + File.separator + "dialog.tlk");
spellLabels = spells2da.getLabels(); spellLabels = spells2da.getLabels();
@@ -319,7 +319,7 @@ public final class AMSSpellbookMaker {
spells2da.save2da("2das", true, true); spells2da.save2da("2das", true, true);
feat2da.save2da("2das", true, true); feat2da.save2da("2das", true, true);
iprp_feats2da.save2da("2das", true, true); iprp_feats2da.save2da("2das", true, true);
customtlk.saveAsXML("prc_consortium", "tlk", true); customtlk.saveAsXML("prc8_consortium", "tlk", true);
} }
private static void addNewSpellbookData(int spellID, private static void addNewSpellbookData(int spellID,
@@ -647,7 +647,7 @@ public final class AMSSpellbookMaker {
} }
private static void getFirstTlkRow() { private static void getFirstTlkRow() {
System.out.print("Finding start of prc_consortium.tlk "); System.out.print("Finding start of prc8_consortium.tlk ");
while (!customtlk.getEntry(tlkRow).equals(start_label)) { while (!customtlk.getEntry(tlkRow).equals(start_label)) {
tlkRow++; tlkRow++;
spinner.spin(); spinner.spin();
Binary file not shown.
@@ -56,7 +56,7 @@ public class BuildScrollHack {
// Load data // Load data
TwoDAStore twoDA = new TwoDAStore(twoDAPath); TwoDAStore twoDA = new TwoDAStore(twoDAPath);
TLKStore tlks = new TLKStore("dialog.tlk", "prc_consortium.tlk", tlkPath); TLKStore tlks = new TLKStore("dialog.tlk", "prc8_consortium.tlk", tlkPath);
ScrollGen.doScrollGen(twoDA, twoDAPath, outPath); ScrollGen.doScrollGen(twoDA, twoDAPath, outPath);
UpdateDes.doUpdateDes(twoDA, twoDAPath); UpdateDes.doUpdateDes(twoDA, twoDAPath);
@@ -73,7 +73,7 @@ public class BuildScrollHack {
" java -jar prc.jar buildscrhack 2dadir tlkdir outpath| [--help]\n" + " java -jar prc.jar buildscrhack 2dadir tlkdir outpath| [--help]\n" +
"\n" + "\n" +
"2dadir Path to a directory containing 2da files\n" + "2dadir Path to a directory containing 2da files\n" +
"tlkdir Path to a directory containing dialog.tlk and prc_consortium.tlk\n" + "tlkdir Path to a directory containing dialog.tlk and prc8_consortium.tlk\n" +
"outdir Path to the directory to save the new scroll xml files in\n" + "outdir Path to the directory to save the new scroll xml files in\n" +
"\n" + "\n" +
"--help prints this info you are reading\n" + "--help prints this info you are reading\n" +
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -69,7 +69,7 @@ public class ScrollMerchantGen {
// Load data // Load data
TwoDAStore twoDA = new TwoDAStore(twoDAPath); TwoDAStore twoDA = new TwoDAStore(twoDAPath);
TLKStore tlks = new TLKStore("dialog.tlk", "prc_consortium.tlk", tlkPath); TLKStore tlks = new TLKStore("dialog.tlk", "prc8_consortium.tlk", tlkPath);
doScrollMerchantGen(twoDA, tlks, "scrolltemp"); doScrollMerchantGen(twoDA, tlks, "scrolltemp");
} }
@@ -371,7 +371,7 @@ public class ScrollMerchantGen {
" java -jar prc.jar scrmrchgen 2dadir tlkdir | [--help]\n" + " java -jar prc.jar scrmrchgen 2dadir tlkdir | [--help]\n" +
"\n" + "\n" +
"2dadir Path to a directory containing des_crft_scroll.2da and spells.2da.\n" + "2dadir Path to a directory containing des_crft_scroll.2da and spells.2da.\n" +
"tlkdir Path to a directory containing dialog.tlk and prc_consortium.tlk\n" + "tlkdir Path to a directory containing dialog.tlk and prc8_consortium.tlk\n" +
"\n" + "\n" +
"--help prints this info you are reading\n" + "--help prints this info you are reading\n" +
"\n" + "\n" +
@@ -68,7 +68,7 @@ public final class SpellbookMaker {
spells2da = Data_2da.load2da("2das" + File.separator + "spells.2da", true); spells2da = Data_2da.load2da("2das" + File.separator + "spells.2da", true);
feat2da = Data_2da.load2da("2das" + File.separator + "feat.2da", true); feat2da = Data_2da.load2da("2das" + File.separator + "feat.2da", true);
iprp_feats2da = Data_2da.load2da("2das" + File.separator + "iprp_feats.2da", true); iprp_feats2da = Data_2da.load2da("2das" + File.separator + "iprp_feats.2da", true);
customtlk = new Data_TLK("tlk" + File.separator + "prc_consortium.tlk"); customtlk = new Data_TLK("tlk" + File.separator + "prc8_consortium.tlk");
dialogtlk = new Data_TLK("tlk" + File.separator + "dialog.tlk"); dialogtlk = new Data_TLK("tlk" + File.separator + "dialog.tlk");
spellLabels = spells2da.getLabels(); spellLabels = spells2da.getLabels();
@@ -291,7 +291,7 @@ public final class SpellbookMaker {
spells2da.save2da("2das", true, true); spells2da.save2da("2das", true, true);
feat2da.save2da("2das", true, true); feat2da.save2da("2das", true, true);
iprp_feats2da.save2da("2das", true, true); iprp_feats2da.save2da("2das", true, true);
customtlk.saveAsXML("prc_consortium", "tlk", true); customtlk.saveAsXML("prc8_consortium", "tlk", true);
} }
private static void addNewSpellbookData(int spellID, private static void addNewSpellbookData(int spellID,
@@ -619,7 +619,7 @@ public final class SpellbookMaker {
} }
private static void getFirstTlkRow() { private static void getFirstTlkRow() {
System.out.print("Finding start of prc_consortium.tlk "); System.out.print("Finding start of prc8_consortium.tlk ");
while (!customtlk.getEntry(tlkRow).equals("####START_OF_NEW_SPELLBOOK_RESERVE")) { while (!customtlk.getEntry(tlkRow).equals("####START_OF_NEW_SPELLBOOK_RESERVE")) {
tlkRow++; tlkRow++;
spinner.spin(); spinner.spin();
Binary file not shown.
@@ -176,7 +176,7 @@ public class UpdateDes {
" java -jar prc.jar updatedescrft 2dadir | [--help]\n" + " java -jar prc.jar updatedescrft 2dadir | [--help]\n" +
"\n" + "\n" +
"2dadir Path to a directory containing 2da files\n" + "2dadir Path to a directory containing 2da files\n" +
// "tlkdir Path to a directory containing dialog.tlk and prc_consortium.tlk\n" + // "tlkdir Path to a directory containing dialog.tlk and prc8_consortium.tlk\n" +
"\n" + "\n" +
"--help prints this info you are reading\n" + "--help prints this info you are reading\n" +
"\n" + "\n" +
Binary file not shown.
@@ -300,7 +300,7 @@ public class Validator {
" java -jar prc.jar validate 2dadir tlkdir | [--help]\n" + " java -jar prc.jar validate 2dadir tlkdir | [--help]\n" +
"\n" + "\n" +
"2dadir Path to a directory containing 2da files\n" + "2dadir Path to a directory containing 2da files\n" +
"tlkdir Path to a directory containing dialog.tlk and prc_consortium.tlk\n" + "tlkdir Path to a directory containing dialog.tlk and prc8_consortium.tlk\n" +
"\n" + "\n" +
"-p pedantic mode. Makes extra checks\n" + "-p pedantic mode. Makes extra checks\n" +
"\n" + "\n" +