[Discussion] Generic X3FL S&M Questions
Moderators: Moderators for English X Forum, Scripting / Modding Moderators, Moderators for the X3:FL Forums
-
- Posts: 16
- Joined: Wed, 28. Dec 16, 15:47
Re: [Discussion] Generic X3FL S&M Questions
Which commands will allow access to all HSAPs? By default, only a part of the HSAPs are available in the game.
-
- Moderator (Script&Mod)
- Posts: 418
- Joined: Fri, 24. Nov 06, 15:48
Re: [Discussion] Generic X3FL S&M Questions
Curious Max wrote: ↑Sat, 18. Feb 23, 12:16Which commands will allow access to all HSAPs? By default, only a part of the HSAPs are available in the game.
Code: Select all
%0set hsap discoverable: %1
Neue Erweiterung für X3 verfügbar: Farnham's Legacy | +Optional: weitere Verbesserungen im inoffiziellen Patch v1.3.17 *** Modified***
Diese Woche im Angebot: HUD-GUI-Mix (FL) | Text-DB 0001-L049 (FL) | Textkorrekturen & Verbesserungen (FL)
Weitere Veröffentlichungen hier: N8workX
Nützliches Tool für nicht mehr vorhandene Downloads: web.archive.org
Externes Archiv für MOD/SCR Ressourcen: xdownloads.co.uk | code.google.com/archive/p/x3tcscripts/
Diese Woche im Angebot: HUD-GUI-Mix (FL) | Text-DB 0001-L049 (FL) | Textkorrekturen & Verbesserungen (FL)
Weitere Veröffentlichungen hier: N8workX
Nützliches Tool für nicht mehr vorhandene Downloads: web.archive.org
Externes Archiv für MOD/SCR Ressourcen: xdownloads.co.uk | code.google.com/archive/p/x3tcscripts/
-
- Posts: 60
- Joined: Mon, 24. May 21, 19:37
Re: [Discussion] Generic X3FL S&M Questions
Hi,
I'm looking for a command to read the maximum cargo bay size of a ship. The commannd
only returns the current volume and I could not find a way to get the max volume.
Thanks
I'm looking for a command to read the maximum cargo bay size of a ship. The commannd
Code: Select all
get cargo bay size
Thanks
-
- Posts: 60
- Joined: Mon, 24. May 21, 19:37
Re: [Discussion] Generic X3FL S&M Questions
Never mind. I figured it out:
You can get the extra cargo through
and then just add this value to the base cargo size.
You can get the extra cargo through
Code: Select all
get max upgrade for upgrade <cargo bay extension>
and then just add this value to the base cargo size.
-
- Posts: 60
- Joined: Mon, 24. May 21, 19:37
Re: [Discussion] Generic X3FL S&M Questions
Next Question:
How can I read out the price of a ship? I tried different commands, and none yield the correct value.
Example: Standard issue Argon Mercury. baseprice should be 190,501 Cr (Price for "S" version is 201,877 Cr - Trade MK1 - 1Mj shield)
This is consistent with the calculation described here.
So I tried the following script commands:
I also tried some other commands and trying to substitute $shiptype with a created instance of a ship but that usually returned 0
What am I doing wrong?
How can I read out the price of a ship? I tried different commands, and none yield the correct value.
Example: Standard issue Argon Mercury. baseprice should be 190,501 Cr (Price for "S" version is 201,877 Cr - Trade MK1 - 1Mj shield)
This is consistent with the calculation described here.
So I tried the following script commands:
Code: Select all
$price = get average price of ware $shiptype --> returns 153220
$price = get max price of ware $shiptype --> returns 191525 (close, but not correct)
$price = get ship base price: shiptype= $shiptype waresize= null --> returns 164596
What am I doing wrong?
-
- Moderator (Script&Mod)
- Posts: 22254
- Joined: Sun, 14. Nov 04, 23:26
Re: [Discussion] Generic X3FL S&M Questions
you can try the command
this is run on a shipyard. The difference between the base price and the shipyard price is that there is a price variation that adjusts the price (this is usually done based on stock level)
Code: Select all
RetVar= RefObj->get ship price: shiptype=[ShipType] waresize=[WareSizeConstant]
-
- Posts: 60
- Joined: Mon, 24. May 21, 19:37
Re: [Discussion] Generic X3FL S&M Questions
Thanks, this gives the desired result! Do you know why the other commands don't work as expected?Cycrow wrote: ↑Sun, 11. Jun 23, 21:32you can try the commandthis is run on a shipyard. The difference between the base price and the shipyard price is that there is a price variation that adjusts the price (this is usually done based on stock level)Code: Select all
RetVar= RefObj->get ship price: shiptype=[ShipType] waresize=[WareSizeConstant]
-
- Moderator (Script&Mod)
- Posts: 22254
- Joined: Sun, 14. Nov 04, 23:26
Re: [Discussion] Generic X3FL S&M Questions
Its due to how the game calculates the price at stations. It uses a variation modifier based on the storage and stock level. This calculates a percentage to vary the price and applies it to the average price. This also applies to ships as they do have a stock level internally.
i may adjust the base price command to include this variation so it should match (as long as a script doesn't change the stock level at shipyards)
i may adjust the base price command to include this variation so it should match (as long as a script doesn't change the stock level at shipyards)
-
- Posts: 92
- Joined: Tue, 14. Feb 17, 10:06
Re: [Discussion] Generic X3FL S&M Questions
Question - is there a way to accurately compare the efficiency of a script in MSCI? I'm trying to optimise my scripts but it's sometimes hard to tell whether a change helps or hurts.
With other languages I'd simply take a timestamp at the beginning and end and compare execution time but that doesn't seem to work here. Unless I have waits in the script the start and end time comes out the same.
I'm currently trying this with a script that iterates through every ship in the galaxy so there's a fair bit for the CPU to chew on. I tried the following commands:
With other languages I'd simply take a timestamp at the beginning and end and compare execution time but that doesn't seem to work here. Unless I have waits in the script the start and end time comes out the same.
I'm currently trying this with a script that iterates through every ship in the galaxy so there's a fair bit for the CPU to chew on. I tried the following commands:
- playing time
- get game time ms
- get real time
- compare ms timer
I made a couple of X3 mods | Colour By Race | True Relations
-
- Posts: 15
- Joined: Sat, 13. Feb 16, 19:56
Re: [Discussion] Generic X3FL S&M Questions
I’ve been customising gate connections, and I’ve managed to get the new gates working perfectly fine, but I can’t get the map to update with the new layout… I’m using map tool with an updated x3_universe.xml to generate a new 00749 bod file, and I’ve put it in a higher number cat folder inside objects/cut, but it still shows the default FL map… what am I doing wrong?
-
- Posts: 1411
- Joined: Wed, 15. Nov 06, 10:21
Re: [Discussion] Generic X3FL S&M Questions
x3_universe.xml has to be added in /maps folder, not objects/cut (that's for the 749 as you write). Then check than there is no other mod in the hierarchy that takes control. Mods folder is the last one to be read. I go by memory (not having the game installed anymore) but being FL installed in an addons2 you have to add the cat there, not in main directory of the game.Random_Tank wrote: ↑Mon, 13. Nov 23, 19:02I’ve been customising gate connections, and I’ve managed to get the new gates working perfectly fine, but I can’t get the map to update with the new layout… I’m using map tool with an updated x3_universe.xml to generate a new 00749 bod file, and I’ve put it in a higher number cat folder inside objects/cut, but it still shows the default FL map… what am I doing wrong?
-
- Posts: 15
- Joined: Sat, 13. Feb 16, 19:56
Re: [Discussion] Generic X3FL S&M Questions
Apologies, I should've explained that better; I have a x3_universe.pck file inside maps in the highest number cat file (09 for me), and then the 00749.bod file is inside objects/cut in the same cat file. The new connections and sectors I added all work when flying around (added sectors like red light back in, and new connecting gates like between legends home and light of heart), just the issue is that the map won't show the changed layout, it just shows the default one from vanilla X3FL (but it has the sectors added by the TC/AP plots mod displayed correctly).Realspace wrote: ↑Thu, 16. Nov 23, 08:58x3_universe.xml has to be added in /maps folder, not objects/cut (that's for the 749 as you write). Then check than there is no other mod in the hierarchy that takes control. Mods folder is the last one to be read. I go by memory (not having the game installed anymore) but being FL installed in an addons2 you have to add the cat there, not in main directory of the game.
Also, not sure if relevant, but where do I find the list of nameid's for sectors? I ported some sectors back from X3AP, and they work, but X3FL has the nameid's for the sectors in the x3_universe file, and AP obviously didn't do it this way (as those sectors just have the co-ordinates instead of a name) so where could I find the nameid's for the AP sectors? And will adding an existing ID mean the ship computer reads the name out or does that have to be done separately?
-
- EGOSOFT
- Posts: 11880
- Joined: Fri, 21. May 04, 17:15
Re: [Discussion] Generic X3FL S&M Questions
Sounds like you are using a mod as you mention the TC/AP mods, and that seems to add sectors too, so I would guess its that which is causing your issue since mod cat will have priority over others. What you want to do is to add your systems to the TC/AP mod bod file and place that in the mod cat to be the highest priority.
MFG
Ketraar
MFG
Ketraar
-
- Posts: 1411
- Joined: Wed, 15. Nov 06, 10:21
Re: [Discussion] Generic X3FL S&M Questions
Then the issue is the 749.bod file, it is the only one making the layout, so maybe some other mod takes control. I repeat, did you put it in the addon2 folder, inside your cat, or plain? Bc if your mod is put in the /mods folder, then the structure has to contain the addon2 otherwise, as false patch in the main root, I suppose not, but check that part.
Names are to be found inside the T folder, the various 001-044 etc. Matching the code (page/line) with what is inside universe.xml at the start of each sector. So you need another editor, not the in-game galaxy editor. Or can open the xml directly, starting of each sector is easy to see.
Names are to be found inside the T folder, the various 001-044 etc. Matching the code (page/line) with what is inside universe.xml at the start of each sector. So you need another editor, not the in-game galaxy editor. Or can open the xml directly, starting of each sector is easy to see.
-
- EGOSOFT
- Posts: 11880
- Joined: Fri, 21. May 04, 17:15
Re: [Discussion] Generic X3FL S&M Questions
You can edit sector name ID in the ingame editor in X3FL.
MFG
Ketraar
You do not have the required permissions to view the files attached to this post.
-
- Posts: 15
- Joined: Sat, 13. Feb 16, 19:56
Re: [Discussion] Generic X3FL S&M Questions
I have it in the addon2 inside the cat; the mod is installed as an archive via plugin manager, so it ends up being 09 cat (the highest number), and there is nothing in the mods folder, so nothing should've been overriding it (AFAIK).Realspace wrote: ↑Fri, 17. Nov 23, 09:28Then the issue is the 749.bod file, it is the only one making the layout, so maybe some other mod takes control. I repeat, did you put it in the addon2 folder, inside your cat, or plain? Bc if your mod is put in the /mods folder, then the structure has to contain the addon2 otherwise, as false patch in the main root, I suppose not, but check that part.
Names are to be found inside the T folder, the various 001-044 etc. Matching the code (page/line) with what is inside universe.xml at the start of each sector. So you need another editor, not the in-game galaxy editor. Or can open the xml directly, starting of each sector is easy to see.
Though one thing I realised from what you said is that the objects folder should not inside addon2, as with other mods I've made/are using it isn't (and these work!). So I moved it outside, the game no longer uses the vanilla FL map.... but instead I get no map at all (though I can stil navigate with the arrow keys, it's using my edited layout, just doesn't display it). This means it wasn't loading in the first place, but now it is, and makes me think there is an issue with the actual bod file and it's failing to load properly, but no idea what as it was generated by the maptools program.
I wonder if it's that I'm not using maptools correctly; I'm extracting all the pck files from maps, converting them to xml so maptools can read them (as it won't read pck), adding x3_universe first, then adding the all the other maps on top, so it's every sector in the game in one bod file, even including ones that are added later via the plots (like Aldrin 2 and Albion)... is this correct? And would some sectors not currently having names be an issue?
-
- Posts: 17
- Joined: Fri, 8. Dec 23, 23:04
Re: [Discussion] Generic X3FL S&M Questions
Hello, I am new here and new to x3 modding, but really hope someone can help me
I made a script for taxation of player owned stations, but only within sectors owned by races with which player's rep is not good enough... All is good and working, but I want to know, is it possible to trace the amount of credits player transferring between his account and stations? How can i do it and reffer to this value within my own script?
I made a script for taxation of player owned stations, but only within sectors owned by races with which player's rep is not good enough... All is good and working, but I want to know, is it possible to trace the amount of credits player transferring between his account and stations? How can i do it and reffer to this value within my own script?
-
- Posts: 17
- Joined: Fri, 8. Dec 23, 23:04
Re: [Discussion] Generic X3FL S&M Questions
No one answered, but I found a workaround without targeting money transference at all, so the question is obsolete.