[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

Re: [Discussion] Generic X3FL S&M Questions

Post by Cycrow » Sat, 20. Nov 21, 16:06

The number in the previous command is for the inactive flag rather than the known flag. That's the one you need to remove to enable them in missions.

Some missions may pick specific races or may filter out some races so you may need to edit them.

Of they just use one of the flags like enemy race then they will be included as long as you have removed the inactive flag

For diplomacy, they won't show up until they have thier influence value set.
So set thier include to 0 and they should appear.
!lib.agent.races

If you give them a unique station/hq then you need to add that to !lib.diplomacy.gettradedock


You will also have to edit the diplomacy script to include them for selection

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

Re: [Discussion] Generic X3FL S&M Questions

Post by Aranov » Sat, 20. Nov 21, 22:07

So I don't what went wrong the first try, but everything is working now!
Full rep and Diplomacy for them is online, only three issues and only one needs an actual fix.

First, they aren't "Terran" so Commonwealth NPCs are spawning on stations sometimes giving missions. This kinda makes since with my understanding of the story.
Second, Their rep (and the Yaki) is still using the dynamic system, even tho I thought I disabled it. But again, This kinda makes since and having only some factions being dynamic seems less punishing.
Third, Build station missions are picking Commonwealth stations. This I'm positive I can fix.

Thank you!

ITFUncleDave
Posts: 163
Joined: Fri, 27. Jun 08, 18:47
x3fl

Re: [Discussion] Generic X3FL S&M Questions

Post by ITFUncleDave » Thu, 6. Jan 22, 21:45

I've been out of the X3 scripting game for a long time and it seems like I've forgotten everything. I'm writing a super simple command that simply calls another command with set arguments. Two (hopefully simple) questions:
  1. My command doesn't make the computer say "Command Accepted", do I have to do anything in particular for this to happen?
  2. I've added a text value to the command info page for my command, but pressing "i" while hovering the command does nothing instead of bringing up the info window.
I'm probably missing something simple, any thoughts?

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. Jan 22, 23:25

When you create the command script, make sure you select the command at the top of the script (just below the version/description)

and also use the script command, set command: [MY_COMMAND]

you need to set both for it to work correctly

for the info page, you can check if its working by going into encyclopaedia and viewing your command from there, if it shows the info, then its working correctly. There currently an issue with custom command info not working from the hotkey

ITFUncleDave
Posts: 163
Joined: Fri, 27. Jun 08, 18:47
x3fl

Re: [Discussion] Generic X3FL S&M Questions

Post by ITFUncleDave » Fri, 7. Jan 22, 02:00

Thanks, that cleared it up for me.
There currently an issue with custom command info not working from the hotkey
It is a custom command so I guess that's the issue, as you say it does show up correctly in the encyclopaedia.

ITFUncleDave
Posts: 163
Joined: Fri, 27. Jun 08, 18:47
x3fl

Re: [Discussion] Generic X3FL S&M Questions

Post by ITFUncleDave » Wed, 19. Jan 22, 22:46

I'm looking into the
FL HSAP spoiler
Show
constant xenon / kha'ak spawning in the double sectors behind the HSAPs
and it seems to me like it's triggered by

Code: Select all

<enable_plotflag plotflag="512"/>
and similar, in the 3.10 RSM mission, but I can't find these plotflags referenced anywhere else, where might I find them?

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, 20. Jan 22, 01:00

The plot flags are a set of flags that represent different game states.

These are used in the Jobs file to enable/disable jobs dynamically depending on the state

ITFUncleDave
Posts: 163
Joined: Fri, 27. Jun 08, 18:47
x3fl

Re: [Discussion] Generic X3FL S&M Questions

Post by ITFUncleDave » Sat, 22. Jan 22, 20:44

Me again. Any particular reason this command wouldn't show up in the Trade menu?

setup.plugin.dti.sn

Code: Select all

$page.id = 8248
set global variable: name='dti.sn.page.id' value=$page.id
load text: id=$page.id

set script command upgrade: command=COMMAND_DTI_SUPPLY_NETWORK  upgrade=[TRUE]  script=plugin.dti.sn.cmd
global script map: set: key=COMMAND_DTI_SUPPLY_NETWORK, class=Moveable Ship, race=Player, script=plugin.dti.sn.cmd, prio=50
set command menu script: command=COMMAND_DTI_SUPPLY_NETWORK, script=plugin.dti.sn.menu, cmdcheck=[FALSE]
  
add ship custom command: id=10010 menu=Trade
return null
8248-L044

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<language id="44">

<page id="2008">
 <t id="10010">COMMAND_DTI_SUPPLY_NETWORK</t>
</page>
<page id="2010">
 <t id="10010">Supply Network</t>
</page>
<page id="2011">
 <t id="10010">Supply.Net</t>
</page>
<page id="2022">
 <t id="10010">Supply Network</t>
</page>

<page id="8248">
 <t id="10">Wares</t>
</page>

</language>

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 » Sat, 22. Jan 22, 21:32

You are using the wrong command upgrade. you want to use the one without the script. As that script is a cmdcheck script, which is run to check if the command should display. If it doesn't return the correct flags, then it wont appear. You also shouldn't use that when using a menu script, as if you need a cmdcheck, then you set it to true in the menu script allocation, and return the correct flags from the cmdcheck event.

so it should just be

Code: Select all

set script command upgrade: command=COMMAND_DTI_SUPPLY_NETWORK  upgrade=[TRUE] 

User avatar
radon
Posts: 9
Joined: Tue, 1. Feb 22, 17:42

Re: [Discussion] Generic X3FL S&M Questions

Post by radon » Tue, 1. Feb 22, 17:58

Hi, hope this is the right place to ask, I have a couple of questions about a bit of station modding, is there any documentation anywhere on TFactories and TFacSizes? Some cursory searches hasn't yielded much but dead links. Basically I'm playing around trying to add a custom station, I've added an entry in TFactories (basically only copied an existing entry and made the number at the top one bigger) and added a sister entry in WareTemplate.xml, and that works (I differentiated the station by changing its volume) but I'm not sure which values to change that would affect the cycle time or the name of the station, anybody know how to do that? I was looking at TFacSizes too to try and add a new XXXL size for this new station but I'm not sure if that's even the place to do it, you can have more sizes of each station than there are entries so I'm guessing sizes (M, L, XL, XXL) and the corresponding upgrade levels (up to 20 I think?) are global things? is there a way to raise the limit on that?

entries in TFacSizes look like this
SS_FAC_TR_POWER_PL_1;7525;7535;2175;4525;7530;7525;7499;
SS_FAC_TR_POWER_PL_2;11865;11875;2175;4525;11875;11870;11840;
I'm guessing bigger number has something to do with that station being bigger?

and there are from TFactories
1;0;0;0;0;SG_FAC_POWER;2011;116;-1.2;-3.0;200;stations\x3tc\terran_spp_L_scene;29;18;37;38;2000;5;ICON_TRG_ST_SPP;17500;152550;25;20;5;5000;1000;0;0;SS_FAC_TR_POWER_PL_1;
1;0;0;0;0;SG_FAC_POWER;2011;116;-1.2;-3.0;200;stations\x3tc\terran_spp_L_scene;29;18;37;38;2000;10;ICON_TRG_ST_SPP;24000;271200;25;20;5;5000;1000;0;0;SS_FAC_TR_POWER_PL_2;
I found info on what the numbers mean in TSuns but I can't find anything on what these ones in TFacSizes and TFactories mean, anybody know where to point me?

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 » Tue, 1. Feb 22, 18:15

The TFacSizes file are the dimensions of the factory model. This is used by the station construction server so it knows how close it can place the factories. If you are using an existing model, just copy the entry from one that uses the same model. Without this added, it will used a generated size instead, but it wont be able to fit in as tightly as the others.

The upgrade levels are fixed, and you set the starting level of the factory in TFactories. So an XXL factory wont have any upgrade levels, as its already the max.
These upgrade levels cant be changed

The name of the station is read from the standard text file, TFactories contains the entry for that, and its on page 17 (same for all objects). The 2011 is the text file. The station size is appended to the existing name. So if you are just added a different size, then you dont need to change the name.
If you need a different name, you need to add a new entry in a text file, and set its id to the new entry

The value for size is simply the production multiplier. So XXL is 20, as its production is 20x that of S.
The cycle time, production count, resource count, etc are calculated from the relval of the Product and resource wares by finding the lowest common divisor. The production multiplier is then applied to that for each different factory size. The cycle time actually remains the same for all different sizes, and its production count and resource counts are increase instead

User avatar
radon
Posts: 9
Joined: Tue, 1. Feb 22, 17:42

Re: [Discussion] Generic X3FL S&M Questions

Post by radon » Tue, 1. Feb 22, 18:50

Oh that was a quick reply, thank you! I've got the new name set. Is there a way to change the relval then to make a station produce more or less (and use more or less) each cycle?

Seranach
Posts: 2
Joined: Tue, 1. Feb 22, 18:52

Re: [Discussion] Generic X3FL S&M Questions

Post by Seranach » Tue, 1. Feb 22, 19:00

hope im asking in the right thread ...

So Im looking for a mod that will help me with my fleet woes.
I would like to be able to have a fleet be resupplied by a complex automatically - I dont mean with munitions, but with ships. If i should lose an M3 or what have you, I would like a station to put together a new M3 and send it on its way to join the fleet - constructing it and/or its loadout if need be.
I primarily want to have my patrol/protection/etc fleets/wings not degrade over time.
Ive combed the forums but i cant seem find a mod like that .... maybe im blind, i dunno - any help would be appreciated!

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 » Tue, 1. Feb 22, 19:05

the relval is set in the ware files.

this controls both the price of the ware, and the production. Changing it will effect all factories that that use that ware.
you cant change it for individual factories, as the values are computed, not stored anywhere.

the production count is simply the lowest value that can divided into the product and resource ware relval.
The only other way to increase it is to increase the factories production (which is set in TFactories) This simply defines the multiple of products that are produced per cycle. This production value can be set to anything you wanted. But if it doesn't use the defined sizes, then the upgrade stages wont work (but if its higher than 20 you wont get any additional upgrade levels anyways)

setting it to 100 for example would mean you product 100x the products per cycle.

messing with the relvals is generally not a good idea if you dont know what your doing, and are not going to do it for all wares, as it can mess up the economy if its not balanced very well. This can result in the resources not dividing well into the product and increases the production count. If this gets to more than 50% of the total capacity it means the factories need to be full to start production. And as most of the free traders will not sell wares if they are above 50% capacity this results in the factories from never really producing. (this was an issue with numerous factories in TC/AP which got fixed in FL)

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 » Tue, 1. Feb 22, 19:08

Seranach wrote:
Tue, 1. Feb 22, 19:00
hope im asking in the right thread ...

So Im looking for a mod that will help me with my fleet woes.
I would like to be able to have a fleet be resupplied by a complex automatically - I dont mean with munitions, but with ships. If i should lose an M3 or what have you, I would like a station to put together a new M3 and send it on its way to join the fleet - constructing it and/or its loadout if need be.
I primarily want to have my patrol/protection/etc fleets/wings not degrade over time.
Ive combed the forums but i cant seem find a mod like that .... maybe im blind, i dunno - any help would be appreciated!
while there are numerous fleet mod that might do the trick. There is functionality in the base game that could also work.
IF you have fighters assigned to carriers, you can install the carrier command software, which allows the carrier to repair and replace its managed ships. It can use both your HQ and race shipyards to do this. You just need to add the fighters as managed ships to the carrier

Seranach
Posts: 2
Joined: Tue, 1. Feb 22, 18:52

Re: [Discussion] Generic X3FL S&M Questions

Post by Seranach » Tue, 1. Feb 22, 19:36

Cycrow wrote:
Tue, 1. Feb 22, 19:08
while there are numerous fleet mod that might do the trick. There is functionality in the base game that could also work.
IF you have fighters assigned to carriers, you can install the carrier command software, which allows the carrier to repair and replace its managed ships. It can use both your HQ and race shipyards to do this. You just need to add the fighters as managed ships to the carrier
Oh wow, didnt know it went so deep with the carrier software - neat!
I assume this extends to ADS (Anarkis Defence System)? Then my problems are over - thank you kind sir!

Also - please allow me to squeak and get my panties up in a bunch like a giddy school girl - back in the day when I had nary but a hair on my chin did I play X3 with your (and Lucikes) mods from dawn to dusk and to dawn again. Back then, of course, I didnt understand the depth of these games and I was simply there for the pewpew - now, with FL and nostalgia, Im seeing the depth exploding in my face and Im buckling down for another X3 epoch.
So let me take this time to thank you (and Lucike, if hes still around), for an amazing time back then - and probably also now ahead of me.
Viva la Imperium! o7

User avatar
radon
Posts: 9
Joined: Tue, 1. Feb 22, 17:42

Re: [Discussion] Generic X3FL S&M Questions

Post by radon » Tue, 1. Feb 22, 19:40

I think I'll keep away from the revals and stick to changing the factories production number then, thanks again Cycrow that's a huge help :)

User avatar
radon
Posts: 9
Joined: Tue, 1. Feb 22, 17:42

Re: [Discussion] Generic X3FL S&M Questions

Post by radon » Fri, 4. Feb 22, 09:08

Ok so I've worked out some of the columns in tfactories, probably the only ones I really need, but I was wondering if anybody knew what the rest do?

Column 6 - Changes station hull strength (must do other stuff too)
Column 7 - Station name on page 17 of the xxxx-L0xx file
Column 12 - Station model used
Column 14 - Station race (1 Argon 2 Boron etc.)
Column 19 - Icon on the map
Column 20 - Station volume (in TLs for instance)
Column 29 - Station name/code in WareTemplate

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, 4. Feb 22, 11:28

It'll be easier to just download the x3 editor 2 from doubleshadow.

You can use it to edit the files pr if you prefer to as a reference as it'll label all the columns

There's also an FL update available for it

User avatar
radon
Posts: 9
Joined: Tue, 1. Feb 22, 17:42

Re: [Discussion] Generic X3FL S&M Questions

Post by radon » Fri, 4. Feb 22, 11:51

ah silly me I've been using the editor but I was opening files with the text editor rather than tdebugger, I did find another post alluding to this but I couldn't work out what they meant, I get it now, thanks again :mrgreen:

Post Reply

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