[Discussion] Generic X3FL S&M Questions

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

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

Post Reply
MegaBurn
Posts: 278
Joined: Mon, 30. Jan 06, 15: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: 76
Joined: Mon, 13. Aug 07, 09:16
x4

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: 11741
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: 76
Joined: Mon, 13. Aug 07, 09:16
x4

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: 22201
Joined: Sun, 14. Nov 04, 23: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

Nauoa
Posts: 19
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: 22201
Joined: Sun, 14. Nov 04, 23: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: 24950
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.

Aranov
Posts: 134
Joined: Mon, 3. Jun 13, 23:08
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Aranov » Sun, 9. May 21, 17:16

Have there been any changes to hard-coded HQ mechanics?
Namely can we have more then one now (If modded in) with blueprints sharing and working correctly?

My quick testing with the cheat script and a Terran HQ says no, but I wanted to be sure.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Cycrow » Sun, 9. May 21, 17:25

HQ's have separate blueprints list

but if you wanted to have them share the same list, then you will need to create a script to do it.
there are some new Signals for the HQ production, and you have full control over the blueprints lists

Aranov
Posts: 134
Joined: Mon, 3. Jun 13, 23:08
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Aranov » Mon, 10. May 21, 02:15

Alright, I decided to take a crack at the HQs, but I've no idea what I'm doing. spent most of my day on it, and I'm stuck.

Right now I'm starting on a simple script the finds all player HQs in the universe, and then spits out a list of blueprints to my log, so I know they where found.
First issue I'm stuck on, building a list of stations. "Find Station" will only find one station, while with "Get station array of race" I've yet to find anything. Even my factories.

Feels like there's something simple that I don't know.

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

Re: [Discussion] Generic X3FL S&M Questions

Post by X2-Illuminatus » Mon, 10. May 21, 20:17

<RetVar> = get station array: of race <Var/Race> class/type=<Value> in Universe and Sector commands is what you're looking for.
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!

Realspace
Posts: 1342
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Realspace » Tue, 11. May 21, 10:48

First of all thank you thank you thank you :D
I love I can go back into X3's dark space with a new story and new mechanics.

Maybe I missed it but is there a list of features that were previously covered only by scripts/mods in AP and are already integrated in vanilla FL?

There are many little ones I used in tc/ap that I would like to add at the start of the game but don't want them to conflict with the game's scripts.
:)

Keridos
Posts: 50
Joined: Sat, 21. Sep 13, 23:17
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Keridos » Tue, 11. May 21, 18:18

It seems some people, including me, have an issue with Mouse flight being broken. It was hinted by someone that the issue might be that the Autopilot was in an erronous state due to some Mod/Plugin.
If it really is an issue with the autopilot, it might be fixable with a small script snippet. Is that possible and if it is, where could I find information about the API/script calls used for that?

Here is a link to my issue
viewtopic.php?f=199&t=438478

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

Re: [Discussion] Generic X3FL S&M Questions

Post by X2-Illuminatus » Tue, 11. May 21, 19:10

Scripts don't have control over the input API, besides adding or removing hotkeys. If you can provide more information, steps to reproduce are most handy, that would certainly help identify and hopefully fix the bug.
Realspace wrote:
Tue, 11. May 21, 10:48
Maybe I missed it but is there a list of features that were previously covered only by scripts/mods in AP and are already integrated in vanilla FL?
I'm afraid we don't have a full feature list. You could have a look at the main feature list on Steam / GOG and at the Survival Guide to get an idea of the new features.
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!

Aranov
Posts: 134
Joined: Mon, 3. Jun 13, 23:08
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Aranov » Wed, 12. May 21, 02:41

Two more questions:

On remote system locations, If I understand not all of them spawn in every game? I don't like that, wondering how to change it so they all spawn.
Related, I've have discovered both Unclaimed Sector points but can't buy the TOA for them from the guild. How's this supposed to work?
I ask here as the only reason I can think these sectors aren't working is I've added new sectors that connect to them, or I'm misunderstanding the mechanics.

EDIT:Nevermind on the second question, I looked at the guild script, I think I kind of understand what happened, and why it's my fault.

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

Re: [Discussion] Generic X3FL S&M Questions

Post by X2-Illuminatus » Thu, 13. May 21, 22:06

Aranov wrote:
Wed, 12. May 21, 02:41
On remote system locations, If I understand not all of them spawn in every game? I don't like that, wondering how to change it so they all spawn.
Not my area of expertise, but it should be handled in addon2\director\3.10 RSM HSAP Management.xml
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!

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Cycrow » Thu, 13. May 21, 23:59

to enable the HSAP, you just have to set its status to discoverable. This can be done either by a script command, or via the MD

Post Reply

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