Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Brief and Proximity files to JSON #4068

Open
wants to merge 86 commits into
base: master
Choose a base branch
from

Conversation

KJeff01
Copy link
Member

@KJeff01 KJeff01 commented Sep 12, 2024

Giga PR to mass convert each campaign Brief and Proximity file to something a lot more readable and mod friendly.

First phase was to convert each Brief/Prox file 1:1 (aside from 1 exception where beta 1 had a disabled video which I ignored), and to introduce a document on the new format. The last of my commits deal with cleaning up unnecessary briefing files that mostly were related to having the END (mission failed) video present. Here, I just put END/WIN in genmessages and included that file into the appropriate WRF files. Finally, upon converting the Prox files I noticed several issues with incorrect/missing sound files when clicking on a proximity blip among other things which I fixed.

The C++ functions may need some additional error checking or cleanup, and maybe some fixes to the document as well. Otherwise it all appears to be working just fine bar any errors in the conversions. Presumably we could rip out SMSG entirely in the not too distant future.


Reviewing this PR will take a bit of extra effort since you'll need to understand the CSV format. I have a guide below:

PROXIMITY

C1A_BASE0,1,BARBASE_MSG,2,3904,4672,0,pcv390.ogg,0

C1A_BASE0  - View data name ID
1          - Amount of translated message strings
BARBASE_MSG - Translated message string
2           - view data type (2 = proximity)
3904        - x
4672        - y
0           - z
pcv390.ogg  - audioID
0           - proximity type (color or denotion of use)

BRIEF

MB1A_MSG,0,3,2,brfcom.ogg,1,1,TRANS_MSG1,0,0000,

MB1A_MSG,           - ID
0,                  - Number of translated message strings (always 0 for flics)
3,                  - type (1 - flic, 3 - "extended" flic requires the sequence loop flag to be set)
                    - If 1, the sequence flag is defaulted to 0 (not looped) and not included (aka 1 less data point to read later)
2,                  - Number of videos to play (total .ogg files referenced)
brfcom.ogg,         - video sequence
1,                  - sequence loop video flag (1 = loop until audio is finished)
1,                  - Number of video sequence subtitle strings
TRANS_MSG1,         - subtitle string reference
0,                  - audioID string name - An assert claims this is "deprecated", so, this should always be 0.
0000,               - dummy value seperator (the data means nothing)

Not used (this one is inside brief2-dii).
Just turns it into a placeholder for the WIN and END messages.
Not used, just removing any remnants of SMSG.
Moved a message in cam1messages to brief1a. The other files had unused IDs or repeated inclusions for END.

camX.wrf files now point to the previously unused genmessages file which will hold WIN/END to reduce duplication.
Add genmessages to the fastplay WRF file.
Weird situation where 1 video in both brief3intro and brief3-a got used. We can use 1 file instead.
Original game wrong messages, wrong sound file, missing sound file, and bad locations.
@past-due past-due added this to the 4.6.0 milestone Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants