[Discussion] Generic X3FL S&M Questions

The place to discuss scripting and game modifications for X³: Farnham's Legacy

Moderators: Scripting / Modding Moderators, Moderators for English X Forum, Moderators for the X3:FL Forums

MegaBurn
Posts: 268
Joined: Mon, 30. Jan 06, 16:52
xr

Re: [Discussion] Generic X3FL S&M Questions

Post by MegaBurn » Sun, 2. May 21, 10:21

Here's a proof of concept syntax file generator: FL-XS-Syntax-v02.zip
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
~\BearScriptLib\Command Syntax.cpp
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.
"Only the dead have seen the end of war." -Plato

NEMESIS165
Posts: 75
Joined: Mon, 13. Aug 07, 09:16
x3tc

Re: [Discussion] Generic X3FL S&M Questions

Post by NEMESIS165 » Thu, 6. May 21, 08:47

Hi . Is there a way to unlock new gamestarts with regedit? I tryed 3fff,ffff but they seem not working

User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 9440
Joined: Fri, 21. May 04, 17:15
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Ketraar » Thu, 6. May 21, 10:39

Assuming you did it in the right place

Code: Select all

HKEY_CURRENT_USER\SOFTWARE\EGOSOFT\X3FL\GameStarts
Try setting it decimal to 65536

MFG

Ketraar
Image

NEMESIS165
Posts: 75
Joined: Mon, 13. Aug 07, 09:16
x3tc

Re: [Discussion] Generic X3FL S&M Questions

Post by NEMESIS165 » Thu, 6. May 21, 12:47

Ketraar wrote:
Thu, 6. May 21, 10:39
Assuming you did it in the right place

Code: Select all

HKEY_CURRENT_USER\SOFTWARE\EGOSOFT\X3FL\GameStarts
Try setting it decimal to 65536

MFG

Ketraar
Mine was set to 69000 something so yeah i unlocked them all before . Hoping to get more game starts from you guys in the future like Anonymous Argon / Khaak ))
Last edited by NEMESIS165 on Thu, 6. May 21, 16:12, edited 1 time in total.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20725
Joined: Mon, 15. Nov 04, 00:26
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Cycrow » Thu, 6. May 21, 12:55

The game starts from the old games are not available.

Its only the Expanded and Challenging Sandbox starts that get unlocked

Deniskos
Posts: 38
Joined: Wed, 11. Jun 08, 21:40
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Deniskos » Thu, 6. May 21, 19:27

X2-Illuminatus wrote:
Sat, 1. May 21, 09:26
Great, keep us posted how you get along, please. :)
This addon is perhaps the richest in terms of innovations in game mechanics and improvement of the game engine. There are only about one and a half thousand new script commands here. Thank you so much for a good job.
I've been fooling around with python a little and parsed the whole thing.
List of all new script commands of X3 Farnham's Legacy.
This list is for X-Studio, since all new parameters of the type: Var/Agent Command, Var/Agent, Var/Table, Var/Array/Table have been replaced with Value.
Otherwise, X-Studio refused to work with them.
I have verified that all new scripts created in X-Studio work correctly in the game. Although this requires additional tests.

I also offer an external editor X-Studio with command syntax from X3 Farnham's Legacy .
After starting, if necessary, point to the folder X3 Farnham's Legacy which is located inside the directory X-Studio for FL .
X-Studio for FL

Nauoa
Posts: 7
Joined: Tue, 4. May 21, 13:41

Re: [Discussion] Generic X3FL S&M Questions

Post by Nauoa » Thu, 6. May 21, 21:08

Hello,

is it possible to add additional diplomatic/spy missions such as reducing the relation between to races/factions?
It would be awesome to sent out spies that slowly initiate a war between two races.
This would make the game a lot more interesting in the late game when i can have a real war between Argons+Borons against Split+Paranid for example.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20725
Joined: Mon, 15. Nov 04, 00:26
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Cycrow » Thu, 6. May 21, 21:14

yes the diplomacy system is fully scriptable.
Infact all the existing commands are all just scripts.

You can add new tasks in the same way you add new ship/station commands.

however, just reducing relation between say Argon and Paranid wont do much on its own, as its already very low where they will shoot each other on site

Wrath8180
Posts: 2
Joined: Wed, 20. Oct 10, 07:21

Re: [Discussion] Generic X3FL S&M Questions

Post by Wrath8180 » Fri, 7. May 21, 17:16

For a start, I would like to thank you very much, because this game connected me again with my son, who already has his life, his problems, but as soon as he learned that the sequel for X3 came out, he sat down next to me on a chair like when he was 10 years old and now he's watching me play (he is 21 years old). This game brought us closer again, for which I am grateful.
I have one question and at the same time a request that would definitely help many players.
I play in 1920x1080 resolution but the letters are so small on the monitor that they are hard to read. I need weak glasses to read, my son has good eyes, but his eyes and head still hurt from reading. Couldn't the font size be somehow adjusted in the game? This is our only problem with the game. Even now, we had to take a break because of that.
I have a feeling that this game will have further extensions and modifications, it would be good if someone also considered the possibility of creating a font size setting in the game.
Thank you and I wish you much success in the future, not only in creating such games.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 22385
Joined: Sun, 2. Apr 06, 16:38
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by X2-Illuminatus » Fri, 7. May 21, 18:57

Wrath8180 wrote:
Fri, 7. May 21, 17:16
For a start, I would like to thank you very much, because this game connected me again with my son, who already has his life, his problems, but as soon as he learned that the sequel for X3 came out, he sat down next to me on a chair like when he was 10 years old and now he's watching me play (he is 21 years old). This game brought us closer again, for which I am grateful.
Thank you for sharing this. Much appreciated. :)
Wrath8180 wrote:
Fri, 7. May 21, 17:16
I have a feeling that this game will have further extensions and modifications, it would be good if someone also considered the possibility of creating a font size setting in the game.
I'm afraid but a font size setting or an UI scaling feature is nothing we can provide or that can be achieved by modding.

What you can try is changing the underlying font file X3FL uses. The user BlackArchon provides here (under UI) a so-called "Ubuntu font for X3". Simply extract the .zip archive to your X3 Terran Conflict game folder.

Not a super big improvement, but hopefully brings at least a little relief. Comparison screenshots (click to enlarge) below.

Normal font:
X3FL_normal_font.jpg
Ubuntu font:
X3FL_Ubuntu font.jpg
You do not have the required permissions to view the files attached to this post.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Wrath8180
Posts: 2
Joined: Wed, 20. Oct 10, 07:21

Re: [Discussion] Generic X3FL S&M Questions

Post by Wrath8180 » Fri, 7. May 21, 20:03

X2-Illuminatus wrote:
Fri, 7. May 21, 18:57
Wrath8180 wrote:
Fri, 7. May 21, 17:16
For a start, I would like to thank you very much, because this game connected me again with my son, who already has his life, his problems, but as soon as he learned that the sequel for X3 came out, he sat down next to me on a chair like when he was 10 years old and now he's watching me play (he is 21 years old). This game brought us closer again, for which I am grateful.
Thank you for sharing this. Much appreciated. :)
Wrath8180 wrote:
Fri, 7. May 21, 17:16
I have a feeling that this game will have further extensions and modifications, it would be good if someone also considered the possibility of creating a font size setting in the game.
I'm afraid but a font size setting or an UI scaling feature is nothing we can provide or that can be achieved by modding.

What you can try is changing the underlying font file X3FL uses. The user BlackArchon provides here (under UI) a so-called "Ubuntu font for X3". Simply extract the .zip archive to your X3 Terran Conflict game folder.

Not a super big improvement, but hopefully brings at least a little relief. Comparison screenshots (click to enlarge) below.

Normal font:
X3FL_normal_font.jpg

Ubuntu font:
X3FL_Ubuntu font.jpg
Well, re-establishing a relationship with my son is a very big deal for me, so maybe you can imagine how I feel.
Fonts - I tried "Ubuntu font for X3", I changed the setting to 1600x900 and it's a big difference, thank you.

Post Reply

Return to “X³: Farnham's Legacy - Scripts and Modding”