[Discussion] Generic X3TC S&M questions III
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 105
- Joined: Wed, 15. Apr 20, 17:35
Re: [Discussion] Generic X3TC S&M questions III
Woops, doublepost
-
- EGOSOFT
- Posts: 11869
- Joined: Fri, 21. May 04, 17:15
Re: [Discussion] Generic X3TC S&M questions III
Its seconds, so 3600 is one ingame hour.
no coordinates makes it random based on the sector flag(s) that are defined above, so owner's sector will spread the jobs only to sectors of that defined race, you can tick any flag to add more or less filters to that randomness. If you want them to spawn in a specific sector just replace it with coordinates.
MFG
Ketraar
-
- Posts: 105
- Joined: Wed, 15. Apr 20, 17:35
Re: [Discussion] Generic X3TC S&M questions III
Awesome, thank you! That is a very user friendly way to control spawn coordinates.Ketraar wrote: ↑Thu, 15. Apr 21, 12:42Its seconds, so 3600 is one ingame hour.
no coordinates makes it random based on the sector flag(s) that are defined above, so owner's sector will spread the jobs only to sectors of that defined race, you can tick any flag to add more or less filters to that randomness. If you want them to spawn in a specific sector just replace it with coordinates.
MFG
Ketraar
-
- Posts: 474
- Joined: Thu, 6. Mar 08, 19:55
Re: [Discussion] Generic X3TC S&M questions III
Hi. This question is regarding X3: Terran conflict.
Is it possible for a script to obtain information on which plots are already completed or progress on the ones that are not yet completed? I assume mission director can do that but I would like for a script to also write plot progress to a file using "write to log file" command. Any ideas on how that can be done?
Is it possible for a script to obtain information on which plots are already completed or progress on the ones that are not yet completed? I assume mission director can do that but I would like for a script to also write plot progress to a file using "write to log file" command. Any ideas on how that can be done?
Fast sector selection on the Universe Map | Rock locations for Mobile/OOS mining | Botting for max speed Hyperion | Complete list of ship sources | Capturing smaller ships
My current ship collection:
11 out of 11 *retired* ships found
17 out of 17 *unique* ships found
9 out of 9 *limited* ships found
16 out of 16 *rare* ships found
My current ship collection:
11 out of 11 *retired* ships found
17 out of 17 *unique* ships found
9 out of 9 *limited* ships found
16 out of 16 *rare* ships found
-
- EGOSOFT
- Posts: 11869
- Joined: Fri, 21. May 04, 17:15
Re: [Discussion] Generic X3TC S&M questions III
Dont think its possible as its set up now. Even the MD passes on info between files to know which plots are done, I'm not aware of a way to have the SE read that without adjusting the Plot files. Adding something to the Plot files (especially the one that handles them) should be possible though.
An alternative way to do it would be to find something unique that ties in to the plots, so say at the end of a plot you are given a unique ship, that would be easy enough to track, the issue here would be to find something that is reliably unique for each.
MFG
Ketraar
An alternative way to do it would be to find something unique that ties in to the plots, so say at the end of a plot you are given a unique ship, that would be easy enough to track, the issue here would be to find something that is reliably unique for each.
MFG
Ketraar
-
- Posts: 31
- Joined: Fri, 24. May 13, 01:42
Re: [Discussion] Generic X3TC S&M questions III
I have a question regarding modding ettiquette:
I'm reworking (well, nearly a complete rewrite by now) "Capture Stations" by Nividium, originally just for personal use but it's come to the point where I feel it's actually polished enough that I could eventually publish it for the community to use. However, Nividium didn't specify any permissions in their mod's thread, and they also don't seem to be in the permission index thread. I don't think I can ask them directly either, as the date of their last login was nine years ago.
Should I assume that this means I should not publish anything that is derivative of Nividium's works?
I'm reworking (well, nearly a complete rewrite by now) "Capture Stations" by Nividium, originally just for personal use but it's come to the point where I feel it's actually polished enough that I could eventually publish it for the community to use. However, Nividium didn't specify any permissions in their mod's thread, and they also don't seem to be in the permission index thread. I don't think I can ask them directly either, as the date of their last login was nine years ago.
Should I assume that this means I should not publish anything that is derivative of Nividium's works?
-
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
Re: [Discussion] Generic X3TC S&M questions III
I suggest you release your reworked / updated script, mention Nividium as the creator of the original script and link back to the original script topic.
Even if he hasn't been online in a while, best to also write him a PM about your updated version.
Even if he hasn't been online in a while, best to also write him a PM about your updated version.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
-
- Posts: 31
- Joined: Fri, 24. May 13, 01:42
Re: [Discussion] Generic X3TC S&M questions III
Thank you, I will do that!X2-Illuminatus wrote: ↑Mon, 31. May 21, 22:07I suggest you release your reworked / updated script, mention Nividium as the creator of the original script and link back to the original script topic.
Even if he hasn't been online in a while, best to also write him a PM about your updated version.
Meanwhile I ran into some confusing behaviour while trying to make my main script be able to run both from a hotkey and an autopilot command. As a command, the script lets you choose (via sector map interface) the target station which is then passed as the single argument to the script, "target.station". I imagined that when running from a hotkey instead of a command, this argument would be null, and so I could catch that and make the script use the player's aim/target. Instead, it's getting a very specific value (1732) that doesn't seem to change regardless of what ship or sector I'm in, or what I'm targeting, or what is in my cargohold... where is this ghost argument value coming from?
-
- Posts: 2
- Joined: Sat, 13. Oct 18, 11:54
Re: [Discussion] Generic X3TC S&M questions III
Hello, recently I have been messing around with changing wares and equipment sold in docks.
However, I've ran into a problem. I wanted to increase the capacity of Nividium in the NMMC HQ but I can't find where that information would be stored.
So, just to reiterate, I am asking how to change the capacity of NPC docks, not player owned stations.
Thanks in advance!
However, I've ran into a problem. I wanted to increase the capacity of Nividium in the NMMC HQ but I can't find where that information would be stored.
So, just to reiterate, I am asking how to change the capacity of NPC docks, not player owned stations.
Thanks in advance!
-
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
Re: [Discussion] Generic X3TC S&M questions III
There's no way to increase that size if you're playing X3TC afaik. In X3AP the addon\types\globals file should have a storage modifier for NPC docks. Use VFS of the X3 Editor 2 to get the latest version of that file.
If I had to guess, I would say it's an internal number representing the position of the hotkey in the control profiles file.Mokunen wrote: ↑Thu, 3. Jun 21, 03:29Meanwhile I ran into some confusing behaviour while trying to make my main script be able to run both from a hotkey and an autopilot command. As a command, the script lets you choose (via sector map interface) the target station which is then passed as the single argument to the script, "target.station". I imagined that when running from a hotkey instead of a command, this argument would be null, and so I could catch that and make the script use the player's aim/target. Instead, it's getting a very specific value (1732) that doesn't seem to change regardless of what ship or sector I'm in, or what I'm targeting, or what is in my cargohold... where is this ghost argument value coming from?
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
-
- Moderator (Script&Mod)
- Posts: 22239
- Joined: Sun, 14. Nov 04, 23:26
Re: [Discussion] Generic X3TC S&M questions III
The value is the ID of the Hotkey being calledMokunen wrote: ↑Thu, 3. Jun 21, 03:29Thank you, I will do that!X2-Illuminatus wrote: ↑Mon, 31. May 21, 22:07I suggest you release your reworked / updated script, mention Nividium as the creator of the original script and link back to the original script topic.
Even if he hasn't been online in a while, best to also write him a PM about your updated version.
Meanwhile I ran into some confusing behaviour while trying to make my main script be able to run both from a hotkey and an autopilot command. As a command, the script lets you choose (via sector map interface) the target station which is then passed as the single argument to the script, "target.station". I imagined that when running from a hotkey instead of a command, this argument would be null, and so I could catch that and make the script use the player's aim/target. Instead, it's getting a very specific value (1732) that doesn't seem to change regardless of what ship or sector I'm in, or what I'm targeting, or what is in my cargohold... where is this ghost argument value coming from?
you could either have a separate hotkey script that then calls your command script with either null, or the tracking aim.
or you could simply check the datatype of the value.
either
Code: Select all
if is datatype [ $target.station ] == DATATYPE_INT
$target.station = get player tracking aim
end
Code: Select all
if not $target.station -> exists
$target.station = get player tracking aim
end
-
- Posts: 31
- Joined: Fri, 24. May 13, 01:42
Re: [Discussion] Generic X3TC S&M questions III
X2-Illuminatus wrote: ↑Sat, 5. Jun 21, 15:34If I had to guess, I would say it's an internal number representing the position of the hotkey in the control profiles file.
Ah, so it's the hotkey that makes sense, thanks to you both! And yes, in the meanwhile I was checking the datatype (but as != DATATYPE_STATION) while I worked on the rest of the script, but I was worried it might be a flimsy correction. Good too know it will be safe.
I actually ran into that later when I introduced a menu to let the player choose the target station if their tracking aim was invalid when called as a hotkey: the player escaping out of the menu also returns null, so I had to check datatype a second time and assume the script should be terminated there if it was still not a station datatype.
-
- Moderator (Script&Mod)
- Posts: 22239
- Joined: Sun, 14. Nov 04, 23:26
Re: [Discussion] Generic X3TC S&M questions III
if you are expecting an object, then using the $obj -> is exists, command will generally be better than checking datatypes
if the object needs to be a certain class, like a station, then using $obj -> is of class [STATION]
this is because if the object is destroyed, the datatype will still be the same, but the object no longer exists
checking the datatype is better for when you looking for INT's or STRING's, or if the variable could be of different types, that you will need to handle separately
if the object needs to be a certain class, like a station, then using $obj -> is of class [STATION]
this is because if the object is destroyed, the datatype will still be the same, but the object no longer exists
checking the datatype is better for when you looking for INT's or STRING's, or if the variable could be of different types, that you will need to handle separately
-
- Posts: 6
- Joined: Wed, 6. Nov 02, 20:31
Re: [Discussion] Generic X3TC S&M questions III
Is there any way to sell damaged (or any) ships to shipyards programmatically?
I could not find any existing mod or script or example of how to actually sell ships within a script.
I figured that since the player can pick and sell ships, there has to be a way to do that with a script as well.
I'm hesitant to reverse engineer the price of the ship myself based on it's components and reputation and whatnot and then just destroy the ship and hand me the money because that feels just wrong.
I could not find any existing mod or script or example of how to actually sell ships within a script.
I figured that since the player can pick and sell ships, there has to be a way to do that with a script as well.
I'm hesitant to reverse engineer the price of the ship myself based on it's components and reputation and whatnot and then just destroy the ship and hand me the money because that feels just wrong.
-
- Moderator (Script&Mod)
- Posts: 22239
- Joined: Sun, 14. Nov 04, 23:26
Re: [Discussion] Generic X3TC S&M questions III
in TC/AP the only way is to compute the price yourself.
script commands for those only exist in FL
script commands for those only exist in FL
-
- Posts: 6
- Joined: Wed, 6. Nov 02, 20:31
-
- Posts: 29
- Joined: Tue, 8. Jun 21, 17:52
Re: [Discussion] Generic X3TC S&M questions III
In MD files, can I combine <check_any> and <check_all>?
for example a <check_any> inside a <check_all> node or two <check_all> within a <check_any> node?
for example a <check_any> inside a <check_all> node or two <check_all> within a <check_any> node?
-
- EGOSOFT
- Posts: 11869
- Joined: Fri, 21. May 04, 17:15
Re: [Discussion] Generic X3TC S&M questions III
In general yes, but will depend greatly what is being checked
So either of value1 or value2 being 1 needs to be true AND value 3 always has to be true.
Here either value1 AND value2 are 1 OR value3 is 1 to trigger conditions.
While possible, this needs to be thought out carefully, more so if events are used in combination. Hope this made sense.
MFG
Ketraar
Code: Select all
<check_all>
<check_any>
<check_value value="this.value1" exact="1"/>
<check_value value="this.value2" exact="1"/>
</check_any>
<check_value value="this.value3" exact="1"/>
</check_all>
Code: Select all
<check_any>
<check_all>
<check_value value="this.value1" exact="1"/>
<check_value value="this.value2" exact="1"/>
</check_all>
<check_value value="this.value3" exact="1"/>
</check_any>
While possible, this needs to be thought out carefully, more so if events are used in combination. Hope this made sense.
MFG
Ketraar
-
- Posts: 29
- Joined: Tue, 8. Jun 21, 17:52
Re: [Discussion] Generic X3TC S&M questions III
Thank you.
Your first example would be equal to if ((a || b) && (c)) and the second to if ((a && b) || (c)), correct?
Then I assume, that here will work too.
Your first example would be equal to if ((a || b) && (c)) and the second to if ((a && b) || (c)), correct?
Then I assume, that here will work too.
Code: Select all
<check_all>
<check_all>
<check_value value="this.value1" exact="1"/>
<check_value value="this.value2" exact="1"/>
</check_all>
<check_any>
<check_all>
<check_value value="this.value3" exact="1"/>
<check_value value="this.value4" exact="1"/>
</check_all>
<check_all>
<check_value value="this.value5" exact="1"/>
<check_value value="this.value6" exact="1"/>
</check_all>
</check_any>
</check_all>
-
- EGOSOFT
- Posts: 11869
- Joined: Fri, 21. May 04, 17:15
Re: [Discussion] Generic X3TC S&M questions III
Sure but you would not need to add an additional chack_all within the check_all, its already given.
It would then look like this without the redundant check_all.
MFG
Ketraar
Code: Select all
<check_all>
<check_value value="this.value1" exact="1"/>
<check_value value="this.value2" exact="1"/>
<check_any>
<check_all>
<check_value value="this.value3" exact="1"/>
<check_value value="this.value4" exact="1"/>
</check_all>
<check_all>
<check_value value="this.value5" exact="1"/>
<check_value value="this.value6" exact="1"/>
</check_all>
</check_any>
</check_all>
MFG
Ketraar