[Discussion] Generic X3TC S&M questions III
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
You need to start turret scripts on either of the tasks from 1 to 6, which are reserved for these specific commands and which represent the turrets 1 to 6.
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: 37
- Joined: Sun, 10. Jul 16, 11:28
Thanks for the quick reply.X2-Illuminatus wrote:You need to start turret scripts on either of the tasks from 1 to 6, which are reserved for these specific commands and which represent the turrets 1 to 6.
Sorry for being such a noob but I'm not sure I understand the answer. Do you mean that I am not using the right ID or is the target of the script the wrong entity?
-
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
If you have a look at the code of the script you are calling, you will see that the turret id argument is not passed on to the then following called script !plugin.gz.missile.def.mk3. (Which actually makes the argument quite useless. Not sure what the idea behind that was. I guess it's either a remnant from an old script or a planned feature of some sort, which was not implemented.) The script !plugin.gz.missile.def.mk3 gets the turret id by checking which task it is running on. So in order to run it on turret 2, you have to start it directly on task 2, which isn't possible with the command you are using. There are two "start script on task" commands in the General Commands -> Script Calls section for this.
To learn more about tasks and script calls I suggest having a look at the MSCI Handbook, which, while originally written for X2, is still relevant to the latest X3 games.
To learn more about tasks and script calls I suggest having a look at the MSCI Handbook, which, while originally written for X2, is still relevant to the latest X3 games.
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: 37
- Joined: Sun, 10. Jul 16, 11:28
This is perfect. I just managed to make it work with this info.X2-Illuminatus wrote:If you have a look at the code of the script you are calling, you will see that the turret id argument is not passed on to the then following called script !plugin.gz.missile.def.mk3. (Which actually makes the argument quite useless. Not sure what the idea behind that was. I guess it's either a remnant from an old script or a planned feature of some sort, which was not implemented.) The script !plugin.gz.missile.def.mk3 gets the turret id by checking which task it is running on. So in order to run it on turret 2, you have to start it directly on task 2, which isn't possible with the command you are using. There are two "start script on task" commands in the General Commands -> Script Calls section for this.
To learn more about tasks and script calls I suggest having a look at the MSCI Handbook, which, while originally written for X2, is still relevant to the latest X3 games.
Thanks a lot for your help. This community is pretty cool.
-
- Posts: 62
- Joined: Tue, 5. Aug 14, 00:34
-
- Posts: 1386
- Joined: Sat, 20. Feb 10, 17:47
I just tested a changing of jobs.txt - no it doesn't. But it need several hours (>4) until it worked in my case.Reaper507 wrote:Hello guys,
changing jobs.txt requires start a new game? What means field "Is Owner Sector"?
"Is Owner Sector" means, that ships only appear in sectors which have the same race as the job-entry race. Sure - after spawning, they may move into other sectors...
-
- Posts: 64
- Joined: Mon, 1. Jun 15, 15:23
Hi,
I decided against creating a thread as I'm sure this question or similar has been asked a thousand times, but I've started playing around with the galaxy editor and when I try to add sectors that weren't already in the loaded x3_universe (from import patch data, I'm on Litcube's Universe and haven't tried vanilla yet but I have to download it first) I can't see them on the universe map afterwards, nor can I connect gates to them or access them in any way. I can't even change sector names or descriptions.
Is what I'm trying to do beyond the editor's capabilities? If so, could anyone point me in the right direction?
Cheers!
I decided against creating a thread as I'm sure this question or similar has been asked a thousand times, but I've started playing around with the galaxy editor and when I try to add sectors that weren't already in the loaded x3_universe (from import patch data, I'm on Litcube's Universe and haven't tried vanilla yet but I have to download it first) I can't see them on the universe map afterwards, nor can I connect gates to them or access them in any way. I can't even change sector names or descriptions.
Is what I'm trying to do beyond the editor's capabilities? If so, could anyone point me in the right direction?
Cheers!
-
- Posts: 33
- Joined: Sun, 20. Jan 13, 01:01
I'm trying to write a script similar to "Space Loot Transpoter" that works on Marines. I'm tired of flying around trying to scoop up marines after a failed boarding attempt so I want to put them back into my cargo hold via transporter device.
SLT uses <var> get object class
I can find "Astronaut" under get object class and "space suit" under a <var> get ship class but niether of these seem to work for marines, which show on the sector map as "Astronaut (Marine)". I can't seem to find this object anywhere in the scripting menus.
As a follow-on, I tried alternatively to have the script read the Marine information with "<Var> get marine fighting skill" etc then destroy the flying marine and create a duplicate in my cargo hold. This isn't favorable because I'd lose the marine historical stats such as number of boarding etc, but better than nothing. I can't get this to work either because the scripts doesn't seem to recognize a flying marine the same way it does a Marine in you cargo hold.
Based on oth of these attempts, I can only surmise that a flying marine is a special type of object that I just haven't been able to find in the scripting menus?
Any help would be appreciated!
SLT uses <var> get object class
I can find "Astronaut" under get object class and "space suit" under a <var> get ship class but niether of these seem to work for marines, which show on the sector map as "Astronaut (Marine)". I can't seem to find this object anywhere in the scripting menus.
As a follow-on, I tried alternatively to have the script read the Marine information with "<Var> get marine fighting skill" etc then destroy the flying marine and create a duplicate in my cargo hold. This isn't favorable because I'd lose the marine historical stats such as number of boarding etc, but better than nothing. I can't get this to work either because the scripts doesn't seem to recognize a flying marine the same way it does a Marine in you cargo hold.
Based on oth of these attempts, I can only surmise that a flying marine is a special type of object that I just haven't been able to find in the scripting menus?
Any help would be appreciated!
-
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
Are you sure that your code finds the correct astronaut in space, before you perform the class check? Best you post your script code here, so that we can have a look. (Double click on the script file in your "scripts" folder, then post the browser view of your script in code-tags here.)
An object class check for Astronaut should work on any astronaut in space, whether it's a passenger or a marine. To determine whether it really is a marine then, there's the <RetVar/IF> is marine: passenger/astronaut=<Var/Passenger> command. The commands to retrieve the marine skills should work on a marine in a space suit, too.
An object class check for Astronaut should work on any astronaut in space, whether it's a passenger or a marine. To determine whether it really is a marine then, there's the <RetVar/IF> is marine: passenger/astronaut=<Var/Passenger> command. The commands to retrieve the marine skills should work on a marine in a space suit, too.
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: 33
- Joined: Sun, 20. Jan 13, 01:01
thanks for your help illuminatus, not sure what i was foing wrong, but i got it working now. my last minor hiccup is that i'm trying to get the marine's name. everytime i beam a marine aboard, its name is "Astronaut ( Marine)". im using "<ret/var> get object name" or something similar under general object commands. Is there a command where i can get the marine's actual name name (Leonar Jovi, for example)?
-
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
Try "<RetVar> = <RefObj> get pilot name" from General Object Commands -> Pilots.
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: 33
- Joined: Sun, 20. Jan 13, 01:01
so i've been a scripting maniac lately, really enjoying it. Anyway, i wrote a script to sprinkle some PALC, IBL, and PSG forges randomly around the universe. i put the PALC forges in split sectors and set owner to split, and same setup for PSG and IBL forges but Paranid. It looked like it was going to work fine...NPC traders and my UTs promptly answered the call for resources but the factories are not producing. is there a script that needs to be called for each station to start them producing?
-
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
Yes, you have to turn on the factory production task.
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: 15
- Joined: Sun, 10. Feb 08, 10:56
-
- Posts: 15
- Joined: Sun, 10. Feb 08, 10:56
On XTC AP + Cadius/Xtra pack (XTC compatible version)
I am not able to dock a TP/TS/M6 to the Tapukei Spport Frigate.
It does say that it has 10 Fighter bays and 6 External Ports.
Checked the model and it does actually have the Ext. Docking ports.
But when I order a dock to, the Tapukei cannot be selected....
Anyone knows how to fix this?
Is it an issue with the script and not the Tships/Model ?
I am not able to dock a TP/TS/M6 to the Tapukei Spport Frigate.
It does say that it has 10 Fighter bays and 6 External Ports.
Checked the model and it does actually have the Ext. Docking ports.
But when I order a dock to, the Tapukei cannot be selected....
Anyone knows how to fix this?
Is it an issue with the script and not the Tships/Model ?
yvy
-
- Posts: 402
- Joined: Fri, 15. Jan 10, 12:05
Re: [Discussion] Generic X3TC S&M questions III
In 2 cases game creates ships that aren't in the Jobs file: 1) M6 + a large group of fighters intruding to the space of an unfriendly race (for example, Argon Heavy Centaur and a swarm of Novas, Busters and Discoverers invade a Paranid sector and start fighting; 2) a small group of fighters guarding an OWP.
There can be some rare ships among them: Argon Notus Hauler, Teladi Kite Vanguard, Teladi Kestrel (I know it's buyable, but NPCs use it rarely), Drones Haulers (in AP).
I'm curious, where is the code for these events?
There can be some rare ships among them: Argon Notus Hauler, Teladi Kite Vanguard, Teladi Kestrel (I know it's buyable, but NPCs use it rarely), Drones Haulers (in AP).
I'm curious, where is the code for these events?
Мир всем народам на свете.
Нам не нужна
Война!
Нам не нужна
Война!
-
- Posts: 546
- Joined: Sat, 31. Mar 07, 23:44
Re: [Discussion] Generic X3TC S&M questions III
That is found in the x3_universe map file.
-
- Posts: 402
- Joined: Fri, 15. Jan 10, 12:05
Re: [Discussion] Generic X3TC S&M questions III
Thanks!
Code: Select all
<o id="3996" t="7" s="SS_SH_A_OWP_1" x="3034120" y="298855" z="6798024" r="1">
<o t="23" s="10">
<o t="24" s="15"/>
<o t="26" s="0" v="0"/>
<o t="26" s="0" v="0"/>
<o t="26" s="0" v="0"/>
<o t="26" s="0" v="0"/>
</o>
Мир всем народам на свете.
Нам не нужна
Война!
Нам не нужна
Война!
-
- Posts: 546
- Joined: Sat, 31. Mar 07, 23:44
Re: [Discussion] Generic X3TC S&M questions III
That quoted part is apparently a script command. You can use Chealec's writeup to look up the node types: http://www.xenotaph.net/lib_pdf/galaxy_hacking_x3tc.pdf. Though I don't know what script subtype 15 would be; I also don't see those nodes in the x3_universe file in AP 02.cat.
Anyway, I only see ships for large platforms, and only basic ship types, eg.:
Anyway, I only see ships for large platforms, and only basic ship types, eg.:
Code: Select all
<o t="7" s="SS_SH_A_OWP_3" x="2588413" y="1691026" z="3330708" r="1">
<o t="23" s="5">
<o t="7" s="SS_SH_A_M5" r="1">
</o>
<o t="7" s="SS_SH_A_M4" r="1">
</o>
<o t="7" s="SS_SH_A_M3" r="1">
</o>
</o>
</o>
-
- Posts: 32
- Joined: Wed, 17. Oct 18, 14:01
Re: [Discussion] Generic X3TC S&M questions III
Hey there,
in desperate need of help for Mission Director. I have this MD-code...
...what I am trying to achieve is using a object dummy, to evaluate if I visited a sector before(aka "known"), since I can't use sector_is_known when arriving in a sector. The problem is my <do_if negate="1" value="{object.sector@TX_MD02_sector_dummy}" exact="{player.sector}">-check, will always return true, because if the dummy can't be found inside the player.sector, it can be found in any other sector I visited before. So what I need is an exclusive check for the sector im dwelling, without the engine checking any other sector. Is this possible?
Please, if anyone has some code snippets, I'd be grateful for lifetime. I'm tearing my hair out trying to get this working since over a week...
in desperate need of help for Mission Director. I have this MD-code...
please click to open
Show
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="TX_MD02_name" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
<documentation>
<author name="CrEaToXx" alias="M.Adam" contact="creatorx42@gmail.com"/>
<content name="Exploring Auto Credits" description="Terran Explorer Service"/>
<version number="0.0.1" date="15.11.2018" status="development"/>
</documentation>
<cues>
<cue name="TX_MD02_cue01">
<condition>
<check_all>
<check_age value="{player.age}" min="3s"/>
</check_all>
</condition>
<timing>
<time min="1s"/>
</timing>
<action>
<do_all>
<find_debris findobject="{player.ship}" name="TX_MD02_sector_dummy" typename="SS_DEBRIS_FGH" silent="1">
<sector sector="{player.sector}"/>
</find_debris>
<do_if negate="1" value="{object.sector@TX_MD02_sector_dummy}" exact="{player.sector}">
<show_help force="1" text="{TX_MD02_sector_dummy} is not in {player.sector}, creating!"/>
<create_debris name="TX_MD02_sector_dummy" typename="SS_DEBRIS_FGH" invincible="1" hidden="1" scanned="0">
<position object="{player.ship}" min="1000km"/>
</create_debris>
</do_if>
<do_if value="{object.sector@TX_MD02_sector_dummy}" exact="{player.sector}">
<show_help force="1" text="{TX_MD02_sector_dummy} is in {player.sector}!"/>
</do_if>
</do_all>
</action>
<cues>
<cue name="TX_MD02_cue02">
<condition>
<check_all>
<cue_is_complete cue="TX_MD02_cue02"/>
<object_changed_sector/>
</check_all>
</condition>
<timing>
<time min="1s"/>
</timing>
<action>
<do_all>
<find_debris findobject="{player.ship}" name="TX_MD02_sector_dummy" typename="SS_DEBRIS_FGH" silent="1">
<sector sector="{player.sector}"/>
</find_debris>
<do_if negate="1" value="{object.sector@TX_MD02_sector_dummy}" exact="{player.sector}">
<show_help force="1" text="{TX_MD02_sector_dummy} is not in {player.sector}, but in{object.sector@TX_MD02_sector_dummy}, creating!"/>
<create_debris name="TX_MD02_sector_dummy" typename="SS_DEBRIS_FGH" invincible="1" hidden="1" scanned="0">
<position object="{player.ship}" min="1000km"/>
</create_debris>
<reward_player>
<money exact="1000"/>
</reward_player>
<reset_cue cue="TX_MD02_cue02"/>
</do_if>
<do_if value="{object.sector@TX_MD02_sector_dummy}" exact="{player.sector}">
<show_help force="1" text="{TX_MD02_sector_dummy} is in {player.sector}, resetting!"/>
<reset_cue cue="TX_MD02_cue02"/>
</do_if>
</do_all>
</action>
</cue>
</cues>
</cue>
</cues>
</director>
Please, if anyone has some code snippets, I'd be grateful for lifetime. I'm tearing my hair out trying to get this working since over a week...