[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
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Fri, 13. Mar 15, 09:19

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: 1386
Joined: Sat, 20. Feb 10, 17:47
x4

Post by Aldebaran_Prime » Fri, 13. Mar 15, 22:20

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: 1378
Joined: Fri, 21. Mar 14, 20:51
x3tc

Post by JSDD » Wed, 6. May 15, 18:07

... 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: 11835
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar » Wed, 6. May 15, 19:49

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: 1378
Joined: Fri, 21. Mar 14, 20:51
x3tc

Post by JSDD » Wed, 6. May 15, 20:15

... 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: 11835
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar » Wed, 6. May 15, 20:59

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 » Wed, 27. May 15, 07:51

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: 11835
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar » Wed, 27. May 15, 10:15

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: 1378
Joined: Fri, 21. Mar 14, 20:51
x3tc

Post by JSDD » Wed, 27. May 15, 11:09

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: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Thu, 28. May 15, 10:35

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 » Thu, 18. Jun 15, 22:55

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 » Thu, 18. Jun 15, 23:49

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 » Tue, 30. Jun 15, 00:44

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: 11835
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar » Tue, 30. Jun 15, 02:46

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 » Tue, 30. Jun 15, 03:29

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

User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 11835
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar » Tue, 30. Jun 15, 10:09

0,0 is Kingdom End. the Coordinates in the map file start there, not at 1,1.

MFG

Ketraar

User avatar
Milite Ignoto
Posts: 536
Joined: Tue, 7. Oct 08, 20:55
x3tc

Post by Milite Ignoto » Mon, 6. Jul 15, 09:51

Probably this had been already answered, but i searched it and didn't find so... what I have to do to open (or extract) .dat files? I have no problem with using X3 editor for .cat, but I really don't understand how to open the .dat.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Mon, 6. Jul 15, 10:27

The cat and dat files are pairs.

when you open the cat file, it also opens the dat files.

essentially the cat file just lists the contents and the dat files contain the actual data

User avatar
Milite Ignoto
Posts: 536
Joined: Tue, 7. Oct 08, 20:55
x3tc

Post by Milite Ignoto » Mon, 6. Jul 15, 12:27

Thanks for the reply!So, editing the .cat also change the corresponding .dat?

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

Post by X2-Illuminatus » Mon, 6. Jul 15, 17:47

Correct. Whereby you shouldn't change files within existing cat/dat pairs, but rather create an own cat/dat pair where you put your changed files. (The number of that cat/dat pair should be one greater than that of the highest cat/dat pair.) That way you can easily roll back changes you made without having to reinstall the game and you have all your modified files in one place.
Alternatively you can put the modified files within their folder structures into the game folder directly. For example a modified "Tships.txt" can be put into a folder called "types" within the X3TC gamefolder, so that Tships file would overwrite all other Tships files.

To save the hassle of finding the newest files, i.e. the ones you want to modify, you should use the virtual file system (VFS) option of the X3 Editor 2.
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!

Post Reply

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