[Discussion] Generic X3TC S&M questions III

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
User avatar
Aldebaran_Prime
Posts: 1128
Joined: Sat, 20. Feb 10, 18:47
x4

Post by Aldebaran_Prime » Mon, 10. Jul 17, 07:51

Reaper507 wrote:Hello guys,

changing jobs.txt requires start a new game? What means field "Is Owner Sector"?
I just tested a changing of jobs.txt - no it doesn't. But it need several hours (>4) until it worked in my case.

"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...
Image

Xe-131
Posts: 25
Joined: Mon, 1. Jun 15, 15:23
x4

Post by Xe-131 » Thu, 24. Aug 17, 21:34

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!

Darth_Wayner
Posts: 32
Joined: Sun, 20. Jan 13, 02:01

Post by Darth_Wayner » Sun, 28. Jan 18, 16:18

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!

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 21120
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Sun, 28. Jan 18, 17:57

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.
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton

Darth_Wayner
Posts: 32
Joined: Sun, 20. Jan 13, 02:01

Post by Darth_Wayner » Mon, 29. Jan 18, 04:25

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)?

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 21120
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Mon, 29. Jan 18, 11:34

Try "<RetVar> = <RefObj> get pilot name" from General Object Commands -> Pilots.
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton

Darth_Wayner
Posts: 32
Joined: Sun, 20. Jan 13, 02:01

Post by Darth_Wayner » Mon, 19. Mar 18, 14:02

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?

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 21120
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Mon, 19. Mar 18, 14:29

Yes, you have to turn on the factory production task.
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton

sajjukar
Posts: 12
Joined: Sun, 10. Feb 08, 11:56

Post by sajjukar » Mon, 19. Mar 18, 23:10

Has any one you tried :

AP + XTC + Caudiu's Xtra (XTC compatibility versions ) ?
yvy

sajjukar
Posts: 12
Joined: Sun, 10. Feb 08, 11:56

Post by sajjukar » Wed, 21. Mar 18, 19: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 ?
yvy

UnknownObject
Posts: 126
Joined: Fri, 15. Jan 10, 13:05
x3ap

Re: [Discussion] Generic X3TC S&M questions III

Post by UnknownObject » Mon, 19. Nov 18, 14:30

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?

SirNukes
Posts: 311
Joined: Sat, 31. Mar 07, 23:44
x4

Re: [Discussion] Generic X3TC S&M questions III

Post by SirNukes » Mon, 19. Nov 18, 21:07

UnknownObject wrote:
Mon, 19. Nov 18, 14:30
2) a small group of fighters guarding an OWP.
That is found in the x3_universe map file.

UnknownObject
Posts: 126
Joined: Fri, 15. Jan 10, 13:05
x3ap

Re: [Discussion] Generic X3TC S&M questions III

Post by UnknownObject » Tue, 20. Nov 18, 08:53

SirNukes wrote:
Mon, 19. Nov 18, 21:07

That is found in the x3_universe map file.
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>
But I don't understand, how this code can create a Notus Hauler in Legend's Home?

SirNukes
Posts: 311
Joined: Sat, 31. Mar 07, 23:44
x4

Re: [Discussion] Generic X3TC S&M questions III

Post by SirNukes » Tue, 20. Nov 18, 09:18

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.:

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>

User avatar
creatoxx
Posts: 32
Joined: Wed, 17. Oct 18, 14:01
x3tc

Re: [Discussion] Generic X3TC S&M questions III

Post by creatoxx » Thu, 22. Nov 18, 14:50

Hey there,

in desperate need of help for Mission Director. I have this MD-code...
please click to openShow

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>
...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... :gruebel:

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”