[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
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

[Discussion] Generic X3FL S&M Questions

Post by Cycrow » Sat, 10. Apr 21, 15:11

Post all the short and simple questions (not covered by existing threads) about scripting, modding, and MD in X3 Farnham's Legacy here.

User avatar
XenonArchitect7
Posts: 110
Joined: Fri, 5. Jul 19, 07:19

Re: [Discussion] Generic X3FL S&M Questions

Post by XenonArchitect7 » Wed, 28. Apr 21, 05:59

Hello X3FL developers, will modders be allowed to backport any X3FL features into X3AP or X3TC? For example, the new dock prop used on the Terran station at the beginning of the X3FL trailer is something I would like to potentially use on X3AP modded ships. I would assume that this would be allowed, based on the precedent set by modders putting X3TC's plots into X3AP and X3 ships into X4, but I would like to know if there is an official rule against this.

CBJ
EGOSOFT
EGOSOFT
Posts: 51740
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by CBJ » Wed, 28. Apr 21, 08:23

The general rule is that you can port things forwards to a newer game, but not backwards to and older one. In the case of X3FL that would mean that you can port X3TC and X3AP elements forwards to X3FL, but not the other way around. Note that since X3FL is somewhat "out of sequence", you can't backport XR or X4 elements to X3FL (not that this would be likely to be possible anyway).

User avatar
XenonArchitect7
Posts: 110
Joined: Fri, 5. Jul 19, 07:19

Re: [Discussion] Generic X3FL S&M Questions

Post by XenonArchitect7 » Wed, 28. Apr 21, 09:37

Thanks for clarifying!

MegaBurn
Posts: 278
Joined: Mon, 30. Jan 06, 15:52
xr

Re: [Discussion] Generic X3FL S&M Questions

Post by MegaBurn » Wed, 28. Apr 21, 22:45

Makes sense as FL is an add-on, but can we port from X-btf, X2, X3-R to FL? (considering those are independent titles still for sale on GOG)
"Only the dead have seen the end of war." -Plato

CBJ
EGOSOFT
EGOSOFT
Posts: 51740
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by CBJ » Wed, 28. Apr 21, 22:59

Again, forwards is fine, so yes. Porting from those games will be harder, though, as there are more differences.

User avatar
Herman2000
Posts: 42
Joined: Sat, 24. Aug 13, 22:20
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by Herman2000 » Thu, 29. Apr 21, 19:11

Of note, I have successfully ported models from BtF/X-T to X³ AP before - the format is _basically_ the same. The biggest difference is in scaling methods of individual objects, and texture availability.

User avatar
TVCD
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 7016
Joined: Sat, 18. Dec 04, 18:43
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by TVCD » Thu, 29. Apr 21, 22:58

XenonArchitect7 wrote:
Wed, 28. Apr 21, 05:59
the new dock prop used on the Terran station at the beginning of the X3FL trailer is something I would like to potentially use on X3AP modded ships.

The dock in the trailer is not a new dock. It was made specifically for the trailer, specifically for the Winterblossom. So it will not be present in the game. The same goes for the ship. :wink:
"Manche Menschen können den Regen spüren, andere werden nur nass"

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, 29. Apr 21, 23:35

@TVCD you could always include it in your UFO base mod. :P

MFG

Ketraar
Image

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, 29. Apr 21, 23:38

Mod? What mod, isn't it in the base game ? ;)

User avatar
TVCD
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 7016
Joined: Sat, 18. Dec 04, 18:43
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by TVCD » Fri, 30. Apr 21, 00:00

No unfortunately not included. But it will come in the next addon. :roll:
"Manche Menschen können den Regen spüren, andere werden nur nass"

MegaBurn
Posts: 278
Joined: Mon, 30. Jan 06, 15:52
xr

Re: [Discussion] Generic X3FL S&M Questions

Post by MegaBurn » Fri, 30. Apr 21, 07:29

TVCD wrote:
Fri, 30. Apr 21, 00:00
No unfortunately not included. But it will come in the next addon. :roll:
Next addon? Yeah! What will it be? Older titles "remastered" on X3? Earlier Terraformer Wars? Later AGI hunting? Something new? :D

On updating X Studio (also see later AP custom syntax): Bad news, I dug into the source code, the executable and game data locations are hard coded in multiple places (e.g. search source files for "x3ap"), it needs to be updated, I'm not setup to do this (no Visual Studio). Mr Bear was last active in March 2016, I sent him a PM asking if he'll return, and offering to help. If someone else spearheads this, I'm willing to help. The source file "Command Syntax.txt" uses the same format as "custom.syntax.txt", so the AP updated commands can be copied & pasted, field 2 compatibility may need updated for FL in source too. I was thinking of writing a python script to generate an updated custom syntax, but need command ID's, can also help with adding/formating command descriptions if text is available, maybe AP descriptions too. Also, new data types seem to be a problem, SirNukes created a patch script but maybe the underlying problem can be fixed, along with support for new data types in FL.

Edit: Sorry, just noticed that source code is v1.01, latest is 1.08, and a lot changed. Really need Mr Bear to return...
"Only the dead have seen the end of war." -Plato

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 » Fri, 30. Apr 21, 08:33

for the Command ids, the id for

Code: Select all

set agent command: command=%0, script=%1, tasks=%2
is 1623
after that, they are in id order.

the ones before that replacing existing commands

MegaBurn
Posts: 278
Joined: Mon, 30. Jan 06, 15:52
xr

Re: [Discussion] Generic X3FL S&M Questions

Post by MegaBurn » Sat, 1. May 21, 00:14

Found Mr Bear on Github, XS1 v1.08 source: https://github.com/nick-crowley/X-Studio
Also see XS2 source but there are a few serious bugs.

Started on syntax converter script.
"Only the dead have seen the end of war." -Plato

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 » Sat, 1. May 21, 09:26

Great, keep us posted how you get along, please. :)
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!

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

Post Reply

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