Improved Modding
Moderators: Moderators for English X Forum, Moderators for the X3:FL Forums
-
- Posts: 278
- Joined: Mon, 30. Jan 06, 15:52
Improved Modding
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
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
-
- EGOSOFT
- Posts: 52240
- Joined: Tue, 29. Apr 03, 00:56
Re: Improved Modding
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.
-
- Moderator (Script&Mod)
- Posts: 22250
- Joined: Sun, 14. Nov 04, 23:26
Re: Improved Modding
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
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
-
- Posts: 278
- Joined: Mon, 30. Jan 06, 15:52
Re: Improved Modding
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?
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
-
- Posts: 546
- Joined: Sat, 31. Mar 07, 23:44
Re: Improved Modding
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.
-
- Moderator (Script&Mod)
- Posts: 22250
- Joined: Sun, 14. Nov 04, 23:26
Re: Improved Modding
More info about modding will be revealed closer to releaseMegaBurn wrote: ↑Fri, 9. Apr 21, 03:23Oh, 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?
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
-
- Posts: 278
- Joined: Mon, 30. Jan 06, 15:52
Re: Improved Modding
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...
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
-
- Posts: 546
- Joined: Sat, 31. Mar 07, 23:44
-
- Posts: 278
- Joined: Mon, 30. Jan 06, 15:52
Re: Improved Modding
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?
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
-
- Moderator (Script&Mod)
- Posts: 22250
- Joined: Sun, 14. Nov 04, 23:26
Re: Improved Modding
For modding it'll be the new UI control system
-
- Posts: 8
- Joined: Wed, 7. Apr 21, 23:54
Re: Improved Modding
For reference, there is already quite a bit of scripting/modding detail appearing on the wiki.
-
- EGOSOFT
- Posts: 11880
- Joined: Fri, 21. May 04, 17:15