Improved Modding

General discussion about X³: Farnham's Legacy.

Moderators: Moderators for English X Forum, Moderators for the X3:FL Forums

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

Improved Modding

Post by MegaBurn » Thu, 8. Apr 21, 16:08

Can X3FL please be used as an opportunity to expose more previously hardcoded stuff to modders?

Requests:
Move as many hard coded yet useful values as practical to globals.txt

Implement X3 Customizer "Obj_Code Transforms", these are hex patches on x3story.obj (see list with descriptions in link), I think most should be fairly simple to add settings to globals.txt. The author used a certain Russian tool to map out patch values and locations, my understanding is its a very tedious process which would need to be repeated for FL (or each new x3story build). This should be much much easier to do with the source code and SDK.

Especially Preserve_Captured_Ship_Equipment (on bailed ships) and Max_Marines_Video_Id_Overwrite (repurposes Tships property to be the ship's marine limit, e.g. for M6-TP & TM-TP hybrids, M0 with 60 marines, etc), and Set_Max_Marines (ship class limits). There's a quirk (iirc), class marine limit is the minimum, video ID can raise it higher, so reducing the class values is useful. See comments in the relevant python scripts for discussion on how these were implemented (or ask and I'll put together a report).

The spacefly swarm sanity checking is good too, that feature salvaged some player's saved games, maybe with a purge time value set in globals (e.g. every 10 game hours all space flies die, everywhere).

On special ships packed in ware crates (laser towers, drones, sats), instead of hard coding equipment just install the warelist referenced in Tships.

Increase limit on laser subtypes (aka gun mount types), double would be good (e.g. spare gun 1 through 30). This would reduce need to delimit by ware class. (may need X3 Editor 2 change to see more subtypes??)

Increase limit on missile subtypes, double would be good, can see a case for quadrupling it (racial missiles). (may need X3 Editor 2 change to see more subtypes??)

Laser ammo, add to bullet types a means to define number of rounds per ware unit and rounds used per discharge. E.g. repurpose "video ID" to rounds per unit, and repurpose "skin index" to number of rounds consumed per discharge.

Missile turrets, add a special missile turret cockpit type (e.g. ss_cockpit_missiles), so that ships can use this cockpit in any position to make it a missile turret, having guns in the main cockpit doesn't matter, and maybe allow the main cockpit to be a missile turret (with 6 gun turrets).

Port Bounce from LU (in KC, not SE).

Modders, please post your ideas, but please keep it reasonable, stuff which should be relatively easy to implement with small code tweaks, especially known headaches, feel free to second anything above. If the list gets long enough maybe we can prioritize it. I'm guessing changes to x3story.obj are more likely to be accepted than changes deeper in the game engine. My understanding is no UI changes (especially scaling for high resolution).

Sorry I'm creating more work, hope this isn't too late, I'm happy to help if I can...

Thanks,
-Burn
"Only the dead have seen the end of war." -Plato

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

Re: Improved Modding

Post by CBJ » Thu, 8. Apr 21, 16:22

Posting ideas isn't going to help at this stage, I'm afraid. There are lots of improvements for modders in the game already, but we're in the final stages before release and are not going to be adding more features to either the game or the modding capabilities.

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

Re: Improved Modding

Post by Cycrow » Thu, 8. Apr 21, 16:30

i should point out that at this stage, nothing new will be added into the game. We are already past that point.

But the script engine has been expanded significantly, and has access to many more things that the previous games did not.
Most of the new menus/UI are all done via scripts, so are fully editable as well

The missiles limit already has plenty spare even in AP, as AP currently uses less than half that are available

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

Re: Improved Modding

Post by MegaBurn » Fri, 9. Apr 21, 03:23

Oh, ok... feel kind of stupid for spending hours writing that.

Cycrow,
What kinds of things are accessible?

Are new missile subtypes available in FL? Is there a way to use the unused missile subtypes in AP now? Are they named (sg_missile_xxxx), or can they be named?
"Only the dead have seen the end of war." -Plato

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Re: Improved Modding

Post by SirNukes » Fri, 9. Apr 21, 03:54

MegaBurn wrote:
Thu, 8. Apr 21, 16:08
The author used a certain Russian tool to map out patch values and locations, my understanding is its a very tedious process which would need to be repeated for FL (or each new x3story build).
That tool uses wildcard patterned search/replace, so those edits work on different x3story builds as long as the relevant original source code snippet is unchanged. Hopefully most of those patches will still work on FL.

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

Re: Improved Modding

Post by Cycrow » Fri, 9. Apr 21, 09:22

MegaBurn wrote:
Fri, 9. Apr 21, 03:23
Oh, ok... feel kind of stupid for spending hours writing that.

Cycrow,
What kinds of things are accessible?

Are new missile subtypes available in FL? Is there a way to use the unused missile subtypes in AP now? Are they named (sg_missile_xxxx), or can they be named?
More info about modding will be revealed closer to release

For the missile groups, it's just a bit mask so you can use numbers. You can't assign them actual names though. But you can set the group to a number between 0 and 31 then add that number to the power of 2 in TShips missile entry.
Or the bitwise operation, currentMissiles | 1 << id

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

Re: Improved Modding

Post by MegaBurn » Sat, 10. Apr 21, 00:09

SirNukes,
Hope so. Think you'll come back to mod FL? I've enjoyed using X3C.

Cycrow,
Thanks, that's interesting... Is that documented anywhere? Now I'm wondering what else is possible...
"Only the dead have seen the end of war." -Plato

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Re: Improved Modding

Post by SirNukes » Sat, 10. Apr 21, 09:05

MegaBurn wrote:
Sat, 10. Apr 21, 00:09
SirNukes,
Hope so. Think you'll come back to mod FL? I've enjoyed using X3C.
I will probably do some maintenance to support the FL changes, but probably no new mods.

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

Re: Improved Modding

Post by MegaBurn » Sun, 11. Apr 21, 23:18

Cycrow, Ketraar, X2-Illuminatus,
Looking back to your earlier years of scripting & modding TC & AP, which one feature would each of you be most excited about in FL?
"Only the dead have seen the end of war." -Plato

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

Re: Improved Modding

Post by Cycrow » Mon, 12. Apr 21, 19:52

For modding it'll be the new UI control system

tim-ski
Posts: 8
Joined: Wed, 7. Apr 21, 23:54
x3ap

Re: Improved Modding

Post by tim-ski » Sat, 24. Apr 21, 17:24


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

Re: Improved Modding

Post by Ketraar » Sat, 24. Apr 21, 17:33

You'll find the S&M Forum also has opened.

MFG

Ketraar
Image

Post Reply

Return to “X³: Farnham's Legacy”