Videos.txt, VideoLists.txt and Billboards explained

The place to discuss scripting and game modifications for X³: Reunion.

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

User avatar
Observe
Posts: 5323
Joined: Fri, 30. Dec 05, 17:47
xr

Videos.txt, VideoLists.txt and Billboards explained

Post by Observe »

Creating custom billboards has forced me to unravel the mysteries of two video related files found in the /types folder, and understand how the new Bali Gi Billboards use those files.

Videos.txt:

This file contains a list of video clips which can be specified for playback with the new Bali Gi Billboards (SS_SPECIAL_SIGN1 - 4) defined in TSpecial.txt. For Billboards, this file (Videos.txt) works in conjunction with VideoLists.txt.

Perhaps the first thing to note is that Videos.txt is somewhat "broken". This is because the header count is wrong. I discovered this when I tried to add a new video clip. Whereas the header count = 244, it should equal count = 265. Once this is corrected, new clips can be added to the file.

Here the last video clip entry in the file followed by one I've added:

Code: Select all

2306;0;0;0;2;31;27;80;32;19;480;//Newsclip6
2307;0;0;0;7;0;0;0;18;00;000;//Newsclip OSR
Fields:
2307 = Probably could be any unused number. I used the next available at the end of the list.
0,0,0 = No need to change these.
7 = References my custom video clip 00007.dat in the X3 mov directory.
0,0,0 = Start time (min, sec, milli).
18,0,0 = End time (min, sec, milli).

VideoLists.txt:

This file consists of a list of video clips contained in Videos.txt. It is used by the Billboards for determining which advertisements will be displayed.

Here is a snippet from VideoLists.txt:

Code: Select all

//video lists
//number of video lists;
//number of videos;[video id]
7;
7;2101;2102;2103;2104;2105;2106;2107;// Only traditional adverts randomly
........
........
.......
.......
.......
2;109;2307; // Saya+OSR
You see the header count = 7 lines. The first line has 7 entries (2101;......2107;) These numbers represent video clips defined in Video.txt.

Notice the last line is one I added. It references a video clip of Saya (109), plus my custom video clip (2307) added to Videos.txt.

-------------------------------------------------------------------------------------------------

Billboards:

Now, with that out of the way, let's see how we can specify which clips a billboard will display.

First, we must realize that we cannot correctly add a billboard using the Galaxy Editor. This is because one key attribute is not included. Here is the XML code from adding a billboard via the Galaxy Editor:

Code: Select all

<o t="20" s="SS_SPECIAL_SIGNOSR1" x="424411" y="0" z="177979" a="0" b="0" g="0"/>
Here is the code necessary for a functional billboard:

Code: Select all

<o f="1" t="20" s="SS_SPECIAL_SIGNOSR1" x="0" y="0" z="113582" a="-1024" b="1024" g="0" v="-1"/>
The major missing attribute is v="-1". This value specifies which line in VideoLists.txt will play on the board. In the case of existing Bali Gi boards, the value for v = "-1". Minus 1 references the first line in VideoLists. That means all seven video clips in line one will play in an endless loop (2101;2102;2103;2104;2105;2106;2107).

In order to make my custom clip play on the board, I simply change v="-1" in the galaxy map entry for the billboard to v="-7". This will cause the two clips on line 7 to play in an endless loop.

Now along with my explanations on making custom billboards (XFP forum), you too can make your own billboards, and or make existing billboards display whatever you want. :)

[ external image ]
Last edited by Observe on Fri, 9. Feb 07, 08:34, edited 3 times in total.
Kortako
Posts: 230
Joined: Sat, 22. Jul 06, 05:10
x4

Post by Kortako »

Wow, that's awesome Observe! Now, is there any way to make the video playback start on a scripted in Billboard with the "create special" command? I don't want to have to use the Galaxy Editor, as that would require a restart.
User avatar
Observe
Posts: 5323
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Kortako wrote:Wow, that's awesome Observe! Now, is there any way to make the video playback start on a scripted in Billboard with the "create special" command? I don't want to have to use the Galaxy Editor, as that would require a restart.
I seem to remember something about someone having created a billboard scripting mod, but as I recall, they had problems getting the video feed to loop. I don't know who it was that created the mod, but perhaps they can get their mod billboards looping if they refer to my above explanation.
User avatar
Klyith
Posts: 594
Joined: Fri, 6. Jan 06, 01:38
x3

Post by Klyith »

Observe wrote:I seem to remember something about someone having created a billboard scripting mod, but as I recall, they had problems getting the video feed to loop. I don't know who it was that created the mod, but perhaps they can get their mod billboards looping if they refer to my above explanation.
Ugh, I don't know... That "v=" seems to only be used in relation to special objects. Who knows what that that is translated into script editor terms, or if it's even accessible via the script editor. Billboards may forever be out of scripting usability.
User avatar
Observe
Posts: 5323
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Klyith wrote:... That "v=" seems to only be used in relation to special objects. Who knows what that that is translated into script editor terms, or if it's even accessible via the script editor. Billboards may forever be out of scripting usability.
Well, hopefully Cycrow or on of the other master scripters may shed some light on this matter, because there are some VERY interesting possbilities if the "v=" flag can be specified when scripting special objects.
User avatar
Klyith
Posts: 594
Joined: Fri, 6. Jan 06, 01:38
x3

Post by Klyith »

Further observations:
You can only have one billboard in a sector. If you have more than one they will lock to the "test pattern" most of the time. Oddly they will play videos when the camera position is a certain distance. (At about 10km my 4 billboard megascreen was working. The irony of having to use zoom to see the biggest drive in movie theater in the universe is not lost on me.)

The videos.txt header count should be 278 I think. At least, that's the number of lines in the file, excluding comments of course.
User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53
x4

Post by defiant1 »

lol...i fooled a bit with it and got a "mega plex" (figured what the hell try 8 to 10 of them [8 worked best for me])...of course im just tinkering with it since i dont wanna do any thing to distroy my other save since ive got HQ on that...hehe :)
Teladi Next Minute Shipping®
User avatar
laux
Posts: 2609
Joined: Sun, 7. Mar 04, 11:39
x3tc

Post by laux »

Hi, this are the entries for animations.txt i figured out for the Mod we realeased in 06-Nov. in german forum.

Code: Select all

TAT_MOVIE; NULL; 90; 90; 2; 0; 50; 0; 0; 1500; 2400;// 86 video texure

Code: Select all

TAT_MOVIE; TADF_COORDS; 90; 90; 0.25; 0.25; 0.00; 0.00; 2; 0; 0; 0; 0; 50; 640;// 86 video texure
But all this versions are playing the movie only for one time. (no loop)

I know, its not so comfortable like Observe´s version, but you will be able to load more than only one billboard per sector.

http://robo.mentalbox.com/layouts/robo/ ... n00344.jpg

http://robo.mentalbox.com/layouts/robo/ ... n00345.jpg
User avatar
Observe
Posts: 5323
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

laux wrote:But all this versions are playing the movie only for one time. (no loop)
@laux: If you are simply replacing 00002.dat with your own video you should be able to achieve looping. I'm wondering why your video doesn't loop? Have you made entries in Videos and VideoList? What video encoder are you using for your custom videos? I initially had trouble with looping, but managed to overcome the problem.

Return to “X³: Reunion - Scripts and Modding”