[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
BrigandPhantos77
Posts: 517
Joined: Wed, 27. Dec 17, 05:47
x4

Re: [Discussion] Generic X3FL S&M Questions

Post by BrigandPhantos77 » Tue, 7. Sep 21, 01:34

I have 3 questions that I am hoping could be added to a future update.

1. I will understand if no is the answer, but I am hoping at some point in the future the developers could add a toggle to this feature to make it optional. I was thinking under options when you first run the startup before you click start. And turning it off would obviously disable to achievements connected to it. And this could be an option that applies solely to the start of a new game. This might make a lot of people happy, and still allow those that want the challenge to use it.

2. I was also hoping a tag could be added to indicate you have a blueprint already for a ship you are about to purchase. Or maybe add an entry/section in the encyclopedia for owned blueprints. I know we can just check the phq, but sometimes if you close the interaction the ship your looking to purchase, it may not be available once you finish checking your phq to see if you have it already.

3. Some of the random sellable ships/blueprints when you enter a system, still appear if you don't have sufficient notoriety. Can we get these hidden if your not allowed to complete the transaction?

One final question I was curious about.
Spoiler
Show
I know that you can get a Gamma Kyon blueprint from one of the unexplored sectors. I have not seen any Khaak ships beyond the fighter show up. Is there a way to obtain the Destroyer or Carrier? Or a plan to add them back in?
If I put these in the wrong thread I apologize.
Peace is a state of mind!
War is absolute!
~ Phantos ~

dirkf
Posts: 30
Joined: Wed, 7. Jan 04, 00:34
x3tc

Re: [Discussion] Generic X3FL S&M Questions

Post by dirkf » Tue, 19. Oct 21, 11:00

Is there a way to have a custom script autorun in a custom galaxy only?

Basically if I start a new game in a custom galaxy it runs, but when I start a different game it is ignored by the engine?

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, 02:49

What I hope is a quick question, Is it possible for modders to play around with the dummied out factions in FL? I refer to Darkspace,Industitech, Beryll and the Corps 1 and 2.
Found them using the cheat package, and would like to get Darkspace up and running just so there is a Terran corp.
So far I see issues with missions spawning (Seems simple, just add them to the MD cues) but "unlocking" the faction in the faction screen I haven't figured out.

So would this be possible, or is it hardcoded?

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, 10:33

yes you can use those races. The named ones are actually fully implemented, Darkspace is a corporation for Terrans.

To enable it, you need to remove the disabled flag.

Code: Select all

remove race flags: race=Darkspace, flags=2097152
to make it show up on the player status, the race just needs to be known.
this can be done via the set known command

Code: Select all

$race = Darkspace
$race -> set known: true
This will happen automatically if they own sectors, and would get unlocked once the player visits

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, 15:50

Ok, took some troubleshooting but Darkspace is still having problems.

They have sectors, stations and jobs.
The number didn't seem to work as a flag. I instead used the constant [RaceFlg.Known]. That got them on the pilot sheet.
However they aren't showing in Diplomacy, thus no influence.

And am correct that I have update the mission director files for each mission? I see there is a "terrangroup" mentioned, are they already defined in there? if not, is there a way to update "terrangroup"?
And a concern I thought of, Terran jobs all have the ".raceonly" trade script, which will stop them form trading with Darkspace.
Starting to think I can see why they got cut.

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

Post Reply

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