[Discussion] Generic X3TC S&M questions III

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

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

Redrazors
Posts: 12
Joined: Fri, 5. Sep 14, 16:49
x3ap

Post by Redrazors »

I'm still at it....

I can't seem to get the "find XXXX in scanner range:" commands working properly, keeps on coming up null, so I assume I'm not using it correctly.

If I wanted to find pirate ships in scanner range of a specificed ship called $scout, would the syntax be:

$foundShips = $scout-> find ships in scanner range: of race pirate nearest to $scout

Thanks.
KillerSteel
Posts: 30
Joined: Tue, 16. Feb 10, 01:24
x3tc

Post by KillerSteel »

Good to see this thread is getting moderate attention... alright, how about this?

I was looking at Cycrow's Cheat Package, and I remembered that it could spawn any ship with any loadout. Something came to mind when I was talking with a friend and getting him X3: Albion Prelude, and he was the one who suggested it.

Factory ships. But of course, there's a key question in this.

Is it at all possible to spawn a ship inside the ship bay of another ship? A script that can, say, drop three fighters into your carrier? If it is, is it possible to create a 'resource for ship' system that subtracts resources from the ship's hangar, and spawns ships after a time delay inside it? Like the Headquarters?

Seriously, if this is possible, nomadic fleets that develop their own ships and weapons using internalized development factories and hangars would be unbelievably awesome.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Something like this?
Drone Carrier Software 2 (DCS2)
KillerSteel
Posts: 30
Joined: Tue, 16. Feb 10, 01:24
x3tc

Post by KillerSteel »

DrBullwinkle wrote:Something like this?
Drone Carrier Software 2 (DCS2)
That's perfect, actually! Factory ships can really be done then, huh? Cooool. Gotta dig into some of these scripts, learn how they do things... the logic shouldn't be too hard, but the scripting might be.
User avatar
Aldebaran_Prime
Posts: 1387
Joined: Sat, 20. Feb 10, 17:47
x4

Post by Aldebaran_Prime »

Hi together. I Like to play some own movies during a MD script in my mod.
Therefore the command play_movie should work like this:

Code: Select all

 <play_movie movieid="8120"/> 
The number 8120 references the file 00812.dat in the mov directory.

This works good, as long the xxxxx.dat file is one of the orginal files of EGOSOFT.

But this works not, when I create a own 00850.dat and try this:

Code: Select all

 <play_movie movieid="8500"/> 
has somebody an idea, where I need to register my addtional .dat file, so that ist works?

I found this example in an other script:

Code: Select all

 <set_value name="L2M025.MovieTime" exact="{player.age}+5"/>
  <set_value name="L2M025.TimingsSet" exact="2"/>
 <play_movie movieid="8100"/>
for what are this 2 addtional values/properties?
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25130
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus »

It's an awful long time since I had a look at that, but back then (X3TC times), you weren't able to add own video files. Only replacing existing ones worked. I doubt that this was changed with X3AP. Since, there are several videos just showing the congratulations screen, you have at least some "spare" (file) numbers you can use.
Aldebaran_Prime wrote:for what are this 2 addtional values/properties?
Hard to tell without further context. If I had to guess, I would say they are merely used to determine, when the video should be played.
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!
User avatar
Aldebaran_Prime
Posts: 1387
Joined: Sat, 20. Feb 10, 17:47
x4

Post by Aldebaran_Prime »

X2-Illuminatus wrote:It's an awful long time since I had a look at that, but back then (X3TC times), you weren't able to add own video files. Only replacing existing ones worked. I doubt that this was changed with X3AP. Since, there are several videos just showing the congratulations screen, you have at least some "spare" (file) numbers you can use.
Aldebaran_Prime wrote:for what are this 2 addtional values/properties?
Hard to tell without further context. If I had to guess, I would say they are merely used to determine, when the video should be played.
I tested a bit more - and found unfortunately no way to get the video in 00850.dat to be shown. In the orginal TOTT mod they were able to play some addtional files, but this team also decompiled and modified some .obj files - but this knowledege is lost because the team had broken apart.

So I had a look at the several number of congratulation videos. In the TC Folder structure under mov (also for an AP installation) the files 00812.dat til 00822.dat contains all different versions of congratulation videos. The videos in 00816.dat til 00822.dat contains all the same video - so they are ideal to be replaced with own videos.

I renamed my video as 00819.dat and placed in in the add/mov folder ( in the hope, that the Mission director engine of AP will look first in the AP/mov folder to play a video. But this didn' work either - it still plays the congrat video of the TC/mov folder. The next try was to delete the 00819.dat in the TC/mov (in the hope, that MD searches somehow all mov folders in a order) - no sucess again.
Only the replacement of the 00819.dat in the TC/mov folder with my own version of 00819.dat brought my AP MD script to play my custom video.
:D


I didn' checked yet all original MD scripts of TC and AP from ES which of them may use the "standard congrat videos" - but a first check shows, that at least the AP MD scripts does not use the videos 819 to 822 - which will be a good base for my further work.
User avatar
JSDD
Posts: 1379
Joined: Fri, 21. Mar 14, 20:51
x3tc

Post by JSDD »

... i have a little question regarding the mission director:

does the event <object_claimed/> trigger when the player has boarded a ship ??
if not, which event is suitable to check if any object (bigship) in a group has been boarded ??
To err is human. To really foul things up you need a computer.
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.


Mission Director Beispiele
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12156
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

Its been too long, but I think it does trigger, should be easy to do a test though.

If it doesent checking value {object.boarding@object} for boarding progress and afterwards owner is a good alternative. But it may depend on what you want specifically.

MFG

Ketraar
User avatar
JSDD
Posts: 1379
Joined: Fri, 21. Mar 14, 20:51
x3tc

Post by JSDD »

... thanks 4 your answer ;)

i'm trying to make a little plot which allows the payer to get access to 4 unknown sektors (therefore i will load a separate map)
part of this plot is to escort a paranid ship from sacred relic to harmony of perpetuity
every few minutes the OBS (opponent balancing system, a vanilla library) spawns enemies (xenon)
to remove captured ships (class fighter) from the group i use this piece of code:

Code: Select all

<cue name="PLCL_step9_enemy_captured" version="1">

  <condition>
	<check_any>
	  <any_object_captured group="PLCL.enemies"/>
	  <any_object_claimed group="PLCL.enemies"/>
	</check_any>
  </condition>

  <action>
	<do_all>
	  <remove_object_from_group object="{event.object}" group="PLCL.enemies"/>
	  <reset_cue cue="this"/>
	</do_all>
  </action>
  
</cue>
... but i'm not sure if boarded ships (bigships) will also be removed by this code :? :|

another point i figured out:
the description of the MD instruction <set_sector_owner/> says that its "not recommended" to reward the player with ownership of sectors :?
why ?? is it specific to albion prelude ??
(the ownership of these unknown sectors i've set explicitly in the map file, using r="10")
To err is human. To really foul things up you need a computer.
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.


Mission Director Beispiele
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12156
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

Your code should work for boarded ships (the _captured bit does it).

Player owned sectors have some issues, some debug spam possibly related to jobs and such, hence why in the vanilla versions its faked. basically its a Unknown sector labelled as player owned.

For a modded game its not a too big of a deal though, technically there wont be much difference. In any case unless some script or code depends on it you can use the fake owner overlay type command and it will look the same for anyone not looking into your code.

MFG

Ketraar

PS.: quick reminder that all my info has gathered some dust, so take that into account.
c2colton
Posts: 3
Joined: Mon, 19. May 14, 03:28

Post by c2colton »

Is it possible to have 2 (or more) variants of a custom ship in-game?

I am looking at editing the Reliant from Star Trek to be used as a cargo variant as well as it's current fighter class.

I used the "edit ship" option from the plugin manager, but when I install the new file (renamed and all) it just replaces the already installed one. I did not check the "replace ship" option, and was just curious if there is a quick fix that someone can point me towards.

Thanks in advance!
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12156
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

You can change ships name when spawning (via script) or you can just go and make 2 entries using same model.

MFG

Ketraar
User avatar
JSDD
Posts: 1379
Joined: Fri, 21. Mar 14, 20:51
x3tc

Post by JSDD »

1. remove the plugin manager, install x3editor2
2. open your TShips with the x3editor2, find your custom ship in there
3. copy & paste TO END (!!!) the entry of the custom ship (now you have a clone of it)
4. give the new entry (ID = PASTED_OBJECT or something like that) a new, more "meaningful" ID, e.g. SS_SH_A_M1_STARTREK_VAR1 (not necessary, but recommended)
5. go to "variation index" of the new entry and change it to ...

1 for "vanguard"
2 for "sentinel"
3 for "raider"
4 for "hauler"
...
To err is human. To really foul things up you need a computer.
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.


Mission Director Beispiele
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22434
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

c2colton wrote:Is it possible to have 2 (or more) variants of a custom ship in-game?

I am looking at editing the Reliant from Star Trek to be used as a cargo variant as well as it's current fighter class.

I used the "edit ship" option from the plugin manager, but when I install the new file (renamed and all) it just replaces the already installed one. I did not check the "replace ship" option, and was just curious if there is a quick fix that someone can point me towards.

Thanks in advance!
If you edit the ship, you need to make sure you change the ID of the ship, you cant install 2 ships with the same.
ascendence
Posts: 3
Joined: Thu, 18. Jun 15, 22:51
x3ap

Post by ascendence »

hey guys,
I'm completely new to the game and forums,
and i would like to ask you guys what are must-have mods to start the game out with?

any total conversion / re-balancing mods?
also any graphics mod are appreciated.

hope you guys can help me out!
Idleking
Posts: 425
Joined: Tue, 15. Aug 06, 15:47
x3ap

Post by Idleking »

Litcube's.

Nuff said ;)
As the size of an explosion increases, the number of social situations it is incapable of solving approaches zero.

[ external image ]
Litcube wrote:Don't succumb to the "I figured it'd be ok".
Xe-131
Posts: 64
Joined: Mon, 1. Jun 15, 15:23
x4

Post by Xe-131 »

Idleking wrote:Litcube's.

Nuff said ;)
+1, awesome mod, saved my interest in the game series.

My own question: how can I change the music for one particular sector? I'm aware of the method of changing the name of a particular soundtrack, but there's a sector in particular that I'd like to change the music for without changing the music for the other sectors that share the same soundtrack. I had a quick look in the script editor, but I couldn't find anything to help me.

Any ideas? Thanks
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 12156
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar »

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
    <cues>
    <cue name="alter_sector">
      <condition>
        <check_all>
          <check_value value="{player.age}" exact="10s"/>
        </check_all>
      </condition>
      <action>
        <do_all>
          <alter_sector x="1" y="3" music="8104"/>
        </do_all>
       </action>
      </cue>
     </cues>
</director> 
The x/y coordinates represent the sector coord within x3_universe.xml, whereas the number after music is the sound file.
C&P into xml file with unique name and put in /director folder.

MFG

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

Post by Xe-131 »

Okay, I tried pasting the code into notepad, changed the coords to (1,1) as a test (pretty sure that's Power Circle or Kingdom End), and put "83000" as the music code (83000 is a .mp3 file in the soundtrack folder that I put in), however it didn't work.

I called the file "musicchange.xml", as it was a unique name and then I could see what it did.

I put the .xml file into the /addon/director folder.

What could have gone wrong?

Thanks :)

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