Need command ID's 1 to 19 (pg 2003), if possible group names, if possible parameter text or ID's for each command (maybe parse something out of KC source?). In the readme and comments I forgot to mention this should run on Python 3.6 or later (maybe earlier, I have 3.8).
Overall, not a bad exercise, my Python skills are rustier than I care to admit, been looking at X3 Customizer and assuming I can do more than I'm probably able at the moment, so maybe some more of this before I do some of that...
Edit 1: --------------------------------------------------
Analysis of X-Studio 1.08 Source for X3FL Update
Source X-Studio 1 master on Mr Bear's Github repo. Point of these notes is to give a rough idea of what might be involved in updating XS1 for FL. It's not exhaustive, but searching for "X3AP" does seem to give a good overview.
Hope this helps, this isn't something I can do right now, but I'll try to help anyone who can.
Files containing "X3AP"
Code: Select all
~\BearScriptLib\Command Syntax.cpp (3 hits)
Line 502: /// [ALBION PRELUDE] Search for X3AP
Line 503: else if (utilCompareString(szGameVersion, "X3AP"))
Line 1174: /// [ALBION PRELUDE] Check for X3AP command version flag
~\BearScriptLib\Game Data.cpp (5 hits)
Line 59: TEXT("X3AP.exe"), NULL, MT_NONE, DT_NULL
Line 556: /// [X3TC+X3AP EXECUTABLES] Return INCOMPLETE + X3:AP
Line 586: // GMC_EXECUTABLE : An executable is present (eVersion : Indicates the game version. GV_UNKNOWN indicates X3TC+X3AP)
Line 610: // [CHECK] Did we just detect X3TC and X3AP?
Line 612: // [X3TC + X3AP] Add 'executable' flag but return UNKNOWN game version
~\BearScriptLib\Game String Trees.cpp (1 hit)
Line 450: // [X3TC/X3AP] Generate the 'L0nn' language file identifier (format as '-L0nn.')
~\BearScriptLib\Script Objects.cpp (1 hit)
Line 14: CONST TCHAR* szVersionInitials[4] = { TEXT("X2"), TEXT("X3R"), TEXT("X3TC"), TEXT("X3AP") };
~\BearScriptRes\Data\Command Syntax.txt (853 hits)
*** SNIP ***
~\BearScriptRes\Data\Description Variables.xml (1 hit)
Line 183: <t id="X3AP">{TERMINOLOGY:X³ - Albion Prelude}</t>
~\BearScriptRes\Data\Object Descriptions.xml (19 hits)
Lines 3997, 4186, 4206, 4227, 4248, 4269, 4289, 4309, 4329, 4349, 4369, 4389, 4409, 4429, 4449, 4469, 4491, 4513, 4535: {COMPATIBILITY_2:X3TC,X3AP}
~\BearScriptRes\Working\Splash\X-Studio Logo.psd (1 hit)
Line 1668:
~\BearScriptUI\Main Window (Testing).cpp (2 hits)
Line 71: /// [XRM] Skip X3TC scripts that contain X3AP constants
Line 76: /// [XRM] Skip X3TC scripts that intentionally contain X3AP sectors to test for presence of X3:TC
~\BearScriptUI\Preferences Dialog (Base).cpp (1 hit)
Line 323: pNewPreferences->eGameVersion = displayGameVersionDialog(hParentWnd, pNewPreferences->eGameVersion == GV_ALBION_PRELUDE); // If X3TC and X3AP executables are present, 'eGameVersion' == GV_ALBION_PRELUDE, otherwise GV_UNKNOWN
~\BearScriptUI\Preferences Dialog (UI).cpp (1 hit)
Line 286: CONST TCHAR *szRegistryFolders[4] = { TEXT("Software\\Egosoft\\X2"), TEXT("Software\\Egosoft\\X3R"), TEXT("Software\\Egosoft\\X3TC"), TEXT("Software\\Egosoft\\X3AP") };
~\Change Log.txt (1 hit)
Line 59: • Changed compatibility of 'format seconds to Zura time string' to incompatible with X3AP
~\Data\Relevant Files\*.*
*** SNIP *** These are game data files
~\Help\X-Studio.chm (4 hits)
*** SNIP *** (compiled HTML)
~\Help\X-Studio.hnd (2 hits)
*** SNIP *** (SQLite format 3)
~\Update.xml (1 hit)
Line 87: • Changed compatibility of 'format seconds to Zura time string' to incompatible with X3AP
Line 502-503: Add "else if" lines for FL, define "CV_FARNHAMS_LEGACY" (somewhere)
Line 1174: Add case lines for FL
~\BearScriptLib\Game Data.cpp
Lines 22-53: This specifies the addon folder, not X3TC root, not sure why.
Line 59: Add line for executable, X3FL.exe?
Line 556: Add new game version/file check case for FL
Line 586, 610, 612: Add checks for new game folder contents
~\BearScriptLib\Game String Trees.cpp
Line 450: No change?
~\BearScriptLib\Script Objects.cpp
Line 14: Add FL to list.
~\BearScriptRes\Data\Command Syntax.txt
Add missing AP commands
Add new FL commands
Figure out how to reconcile AP-FL conflicts (23?)
~\BearScriptRes\Data\Description Variables.xml
Line 183: Add entry for FL
~\BearScriptRes\Data\Object Descriptions.xml
This provides reference information to users, the more data the better, but there has got to be a better way to update it (and maybe add missing AP details too). Recommend loading this from external file for easier updates.
~\BearScriptRes\Working\Splash\X-Studio Logo.psd
Not needed, but a new splash screen would be nice if easily created.
~\BearScriptUI\Main Window (Testing).cpp
Special cases for XRM, to handle TC scripts with AP constants. Maybe a lead on how to deal with any AP vs FL compatibility issues.
~\BearScriptUI\Preferences Dialog (Base).cpp
Add case for game is FL.
~\BearScriptUI\Preferences Dialog (UI).cpp
Add FL folder.
~\Change Log.txt
Note changes.
~\Data\Relevant Files\
Copies of AP and some TC game data files, maybe change to load from game folder instead, or add sub-folders for each game.
~\Help\X-Studio.*
Any help updates needed?
The .hnd file is SQLite format 3 and 4.67MB, maybe internal help content.
~\Update.xml
There is a check for updates mechanism, points to a dead website, could point elsewhere...
Edit 2: --------------------------------------------------
Datatype Bug
Searched the source for several data types and all came back to ~\Data\Relevant Files\AP.0001-L044.xml, so reading this in from game data or copying over the new file should solve this problem, for both FL and AP.
Syntax File Generator v0.3
Looked at SirNuke's datatype correction script and some Python docs, I think I can write a new syntax generator which will read XML files (e.g. 0001), and accept command ID ranges for input (e.g. all, list, 1623 to end). But I'm not aware of a reference for command parameters by command ID or text.