Add Your Own Movies Part 2
This section of the tutorial will guide you through the edits required to add a video. The process to replace is simpler and essentially the same. There are dozens of different ways of doing this but this one is proven. You can experiment yourself once you're more comfortable with the process.
Remember in Part 1 of this tutorial we learned the xml has 3 sections. We will edit each one to complete our movie additions.
Step 1 - Playlist Section
Remember in Part 1 of this tutorial we learned the xml has 3 sections. We will edit each one to complete our movie additions.
Step 1 - Playlist Section
Open tvplaylists_x64.xml with any text editor and find this line and section:
<Name>PL_STD_WZL</Name>
Add a new line that is unique, you don't want duplicates. Repeat for each video you want to add but remember that too many videos, or too large, could crash your game. For example if you have 13 and want to add 2 new videos, you would have 14 and 15:
<Item>WZL14</Item>
<Item>WZL15</Item>
<Name>PL_STD_WZL</Name>
Add a new line that is unique, you don't want duplicates. Repeat for each video you want to add but remember that too many videos, or too large, could crash your game. For example if you have 13 and want to add 2 new videos, you would have 14 and 15:
<Item>WZL14</Item>
<Item>WZL15</Item>
Step 2 - PlayList Section
Repeat the process for this section
<Name>PL_STD_WZL_FOS_EP2</Name>
Once more, add a new line for each new video<Item>WZL14</Item>
<Item>WZL15</Item>
Step 3 - PlayListSlots Section
Now we will look for the last WZL_Show to find the next item to create. Using search we found the last one being WZL_Show5, so we will create a new item and name it WZL_Show6. We assign it to the item we created in Step 2 which was WZL14
<Item>
<Name>WZL14</Name>
<TVVideoInfoNames>
<Item>WZL_SHOW6</Item>
</TVVideoInfoNames>
</Item>
<Name>WZL14</Name>
<TVVideoInfoNames>
<Item>WZL_SHOW6</Item>
</TVVideoInfoNames>
</Item>
Step 4 - Video Section
Finally we add our movie name, without any file extension. We need to add the proper duration, the calculation is shown below.
<Item>
<Name>WZL_SHOW6</Name>
<VideoFileName>TEST_1</VideoFileName>
<fDuration value="8121.870000" />
<bNotOnDisk value="false" />
</Item>
<Name>WZL_SHOW6</Name>
<VideoFileName>TEST_1</VideoFileName>
<fDuration value="8121.870000" />
<bNotOnDisk value="false" />
</Item>
Step 5 - Duration Calculation
In our example for this tutorial our video was 4 minutes and 31 seconds.
1. We convert the video length above to seconds: 4 x 60 + 31 = 271 seconds
2. We then multiply 271 by 29.97 to get 8121.87
Note: the frame rate of our movie is 30 FPS but this is rounded up from 29.97
Note: Rockstar uses 6 decimals places so add the extra ones. My own tests, with 2 decimal places only also worked fine, but to be safe use 6.
1. We convert the video length above to seconds: 4 x 60 + 31 = 271 seconds
2. We then multiply 271 by 29.97 to get 8121.87
Note: the frame rate of our movie is 30 FPS but this is rounded up from 29.97
Note: Rockstar uses 6 decimals places so add the extra ones. My own tests, with 2 decimal places only also worked fine, but to be safe use 6.
<fDuration value="8121.870000" />
Step 6 - Duplicate file and rename
Given the xml playlist files are identical and given we started with tvplaylists_x64.xml, simply copy this file and rename it tvplaylists.xml.
Now replace the vanilla files, which you backed up, in OpenIV or CodeWalker with your edited xml files.
Don't panic if you didn't backup and need to revert because these files exist in the vanilla section. If you really screwed up and didn't use a mods folder, do a verify integrity to restore your game.
Comments
Post a Comment