Author Topic: Editing .BCS files to add subtitles (Torment)  (Read 6049 times)

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Editing .BCS files to add subtitles (Torment)
« on: September 09, 2005, 10:34:34 AM »
Hi guys,

I'm about to start a project to translate Torment into Portuguese. I have just finished the translation of BG2, so I pretty much know how to do it, and I'm fairly knowledgeable about IE file types (I use NearInfinity to translate the .tlk file).

But Torment has some additional difficulties. Specifically, some very important cutscenes (I'm thinking about the ones with The Transcendent One, when he kills Ravel, the party members, etc.) have no subtitles at all. I'd like to add subtitles to those. Now I know BG2 had a "DisplayStringHead" or somesuch command in BCSs to do that - Torment is apparently different, the command seems to be "FloatMessage". So, I think all I need to do is to add some entries to dialog.tlk with the spoken text and edit the appropriate BCSs with the FloatMessage command referring to the new entries. But since I have never edited BCSs before, I'd appreciate some tips and/or hints about how to do it properly.

Another secondary thing, there are some comments NPCs make which have no subtitles as well. I can recall Grace and Annah's comments when they first enter Fell's Parlor, for instance. Maybe there are more. I've done a bit of research on that, and in this case, the BCS file (0404Fell.bcs) has a weird line, VerbalConstant("Grace"SCRIPT_COMMENT2), which seems to link to Grace's .CRE file. I wonder if the FloatMessage command would work here as well. But this is not as important as the first problem.

If anyone can help me, I'd be most grateful. I've posted in the Vengeance forum, but it seems pretty dead.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Editing .BCS files to add subtitles (Torment)
« Reply #1 on: September 09, 2005, 11:19:32 AM »
First, I'm wondering what the Spanish translators did about this, since you might be able to just build off of their efforts...

VerbalConstant is basically a way for the engine to play a sound that belongs to a game object (CRE file, essentially) rather than using a strref. So if you look in Grace's CRE file you'll see the SCRIPT_COMMENT2 line.

It's hard to say what the most efficient way to do this is. I'm generally opposed to hard-coded, .tlk/file overwriting mods, but presumably any translation must always be installed first... I'd probably load up NI, open the .tlk editor and the BCS editor, and simply add the entries and recompile/save scripts as I went. But you might first see what the Spanish team did about this subtitle issue so that you don't have to reinvent that particular wheel.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #2 on: September 09, 2005, 11:43:13 AM »
Thanks for the quick reply :)

I've already asked the Spanish team. They didn't subtitle the cutscenes, but they thought it was a good idea when I mentioned it ;) So I guess I'll share whatever I end up doing with them.

So, what you suggest would be something like this, if I'm not mistaken:

Quote
IF
   True()
THEN
   RESPONSE #100
      CutSceneId("Trans")
      SetGlobal("Trans_Vanish","GLOBAL",1)
      PlaySoundNotRanged("Tra060")
      PlaySequence(ANIM_SPELL1)
      Wait(3)
      PlaySequence(ANIM_SPELL3)
      StickySinisterPoof("EF02TPR2","Trans",-1)
      Wait(1)
      StartCutScene("1204tm1")
END

This is 1204TM0.BCS. Sound "Tra060" says "I will take your measure shortly." So all I'd need to do, I guess, would be to add

FloatMessage(Myself65656) // I will take your measure shortly.

below the "PlaySound..." line, right? (the string number is fictional)

As I said, I've never edited BCSs before. Please tell me if I'm forgetting anything, or making anything wrong. And would this work with the "VerbalConstant" command as well? Thank you very much! :)

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Editing .BCS files to add subtitles (Torment)
« Reply #3 on: September 09, 2005, 12:38:46 PM »
You'd want a comma between Myself and the strref, but basically, yes.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #4 on: September 10, 2005, 12:04:19 AM »
Oh yeah, forgot the comma. Thanks again. And I'll probably add another small wait after the text.

Just one more question. I'll try to add the subtitles to those VerbalConstants and see if it works, but trying to add subtitles to normal character sounds would be pushing it, right? I mean the insults, the little lines they say at specific locations (for instance, Nordom: "Plane: Baator. Location: Avernus"), etc. BG2 had this covered under "subtitles", but I don't see how this could be done in PST...

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #5 on: September 10, 2005, 09:05:24 AM »
Oh, and another little doubt: how does the game know which color to use for item descriptions? Bandages, for instance, have the standard yellow description but also white notes (about their usage). I cannot find anything in the .itm file nor in the string ref to set the colors. Or is the word "NOTE" hardcoded? Or is it something else?

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Editing .BCS files to add subtitles (Torment)
« Reply #6 on: September 10, 2005, 10:47:10 AM »
Somebody with more PST modding experience (and there aren't many who have done anything at all) will have to address that, I have no idea.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: Editing .BCS files to add subtitles (Torment)
« Reply #7 on: September 10, 2005, 01:53:39 PM »
I forget what the format for an item desription is.  Something like:

"Bandages

These bandages can bandage you up!


Note: Bandages will heal 3 hit points when used.
"

Something like that, right?

PST automatically adds the white text (possibly even the 'Note:' bit) to text after the first or second line break.
Earn Money Sleeping.

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #8 on: September 11, 2005, 12:31:59 PM »
Actually, I've tested it and it seems to be related to the word "NOTE" itself. I translated exactly the bandages to see how it worked, and if I used the Portuguese word "NOTA", the text would be yellow. But when I changed it back to "NOTE", it turned white again.

I wonder how they did that...

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #9 on: September 13, 2005, 08:27:25 AM »
Everything is going well. Cutscenes work fine, as far as I have tested, the NOTE word is really hardcoded... the only thing I haven't figured out yet is subtitles for party banter. I don't know if it's possible...

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Editing .BCS files to add subtitles (Torment)
« Reply #10 on: September 13, 2005, 09:08:57 AM »
Heh. Just one more mystery of the bizarro bastard PST variant of the Infinity Engine.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #11 on: September 13, 2005, 09:48:01 AM »
The sounds in the .CRE files have strings in dialog.tlk. For instance, Grace's "May my faith lend me strength" spell-casting sound has a string which contains simply "Fall-from-Grace Spellcasting Sound 2", or something. All sounds have those strings. These could easily be edited to have the real sentences. The trick is to make them appear in the game...

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #12 on: September 14, 2005, 08:30:50 AM »
The only thing that I'm able to think about would be altering the NPC .bcs files with something like

IF
PlaySound(x)

THEN
FloatMessage(Myself,y)

Do you think this could work at all?

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Editing .BCS files to add subtitles (Torment)
« Reply #13 on: September 14, 2005, 09:25:12 AM »
I don't believe you can use PlaySound as a trigger (part of the IF statement.)

If you're trying to caption random comments made at a deeper level of the engine than the NPC's own scripting, I'm not sure there's really a way to do it.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #14 on: September 14, 2005, 10:16:06 AM »
Yeah, BG2 has an option to turn subtitles on, which makes those lines appear in the dialogue window. But that seems to be handled by the engine, not by editable files. And since Torment has no such option (even though there *is* a "Subtitle" line in torment.ini. I've changed it to 1 but it doesn't seem to do anything)...

I'll try to script those sounds anyway. If it doesn't work, well, it doesn't.

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #15 on: September 14, 2005, 10:28:39 AM »
NI says that "PlaySound" is not in trigger.ids, as you said. I wonder if that could be edited  ;D I have never messed with .ids files before...

Offline Avenger_teambg

  • Planewalker
  • *****
  • Posts: 399
Re: Editing .BCS files to add subtitles (Torment)
« Reply #16 on: September 14, 2005, 10:50:13 AM »
You can't exchange triggers with actions.
You might be able to trick weidu, and you might think that you were clever, but in the end you will realize :)

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #17 on: September 14, 2005, 08:48:42 PM »
Ok, this is my last try, I promise...

What if I created a bcs that looked like this:

IF
InParty("Morte")
Global("MorteTauntsAnnah")=0

THEN
PlaySoundNotRanged("Mor123")
FloatMessage(Myself,23234)
SetGlobal("MorteTauntsAnnah")=1

I know the syntax may be wrong, but that's the general idea. I could create a global variable for each taunt (MorteTauntsAnnah, in this case), and they would play the sound with a text subtitle at least once. The sound would still play randomly according to the game engine, without subtitles. Of course, this would be a lot of tedious work, but it could be worth it to display those funny lines at least once...

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Editing .BCS files to add subtitles (Torment)
« Reply #18 on: September 14, 2005, 09:21:15 PM »
Yeah, I had considered suggesting something like that, but didn't want to wish all that busy work on anybody. :)

You could get more sophisticated and rotate through those types of lines on a set, repeating timer, basically replicating the game's efforts, just with your own subtitles, if you want to get fancy.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #19 on: September 15, 2005, 05:57:11 AM »
I don't mind getting fancy, I just wouldn't know how to do it ;)

If you could explain me the basics of doing that, or at least point me to some site where I could get that info, I'd be most grateful.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Editing .BCS files to add subtitles (Torment)
« Reply #20 on: September 15, 2005, 08:56:13 AM »
Well, you'd want to use some sort of recurring talk timer. The "bantergoose" script found in Kelsey and the Banter Pack (and a few other places) would be a decent enough base to build on: it says, "okay, every X seconds, we'll make somebody talk."

It has additional code for "if we have X people in the party, we'll have an equal chance of 1 through X being the one to talk here" which could be useful, although you'd more likely have different conditions based on the actual individuals since you would be assigning them the lines to say.

Go have a look at that code first and see if you have any specific questions about it.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Faldrath

  • Planewalker
  • *****
  • Posts: 18
Re: Editing .BCS files to add subtitles (Torment)
« Reply #21 on: September 16, 2005, 11:42:58 PM »
Let me see if I understood it (I downloaded the Banter Pack):

It sets a variable, runs down a timer, triggers a dialogue, runs down another timer, then resets the variable so that it can run again, essentially?

I've been surveying the lines I'd like to subtitle in Torment, and it turns out that there are actually very few taunts (Morte and Annah are the taunters, basically). There are many more location-specific lines. I'll have to think about it some more... how do I create a variable, by the way? Torment has that var.var file that no other IE game has...

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Editing .BCS files to add subtitles (Torment)
« Reply #22 on: September 17, 2005, 12:28:05 AM »
Ah, right, the dreaded VAR.VAR. I actually have forgotten the very limited universe of utilities that can do anything with it--and I recall WeiDU isn't one of them because believe it or not, but nobody's really formally asked for better PST support in the past 4 years.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: Editing .BCS files to add subtitles (Torment)
« Reply #23 on: September 17, 2005, 04:28:28 AM »
Actually if you understand var.var it can be added to with WeiDU but its byte adding at patching.

Quote
Okay a variable for Var.var consists of:

8 characters for the scope of the variable
32 characters for the variable name then the rest filled with '20' characters (spaces).  The variable name shouldn't have spaces.  Use underscores.
1 character as a number, from 0 to 9, as the starting value of the variable e.g. 00 for 0, 01 for 1 etc.  Note, japh thinks this does nothing in game but the PST Var editor claims it does.
3 '00' characters.

Notes:

1) The scope is either a local for an area represented ARXXXX, global represented by GLOBAL or a death variable represented by KAPUTZ (the rest if any of the starting 8 are just spaces ('20').

2) Its entirely possible the entire of the last 4 can be used for a large number starting value but I don't know.

The IESDP will also tell you about it: http://iesdp.gibberlings3.net/ieformats/var.htm.
"You alone can make my song take flight..."

Offline Idobek

  • Dust Bunny
  • Planewalker
  • *****
  • Posts: 431
  • Gender: Male
Re: Editing .BCS files to add subtitles (Torment)
« Reply #24 on: September 18, 2005, 06:19:43 AM »
Actually, I've tested it and it seems to be related to the word "NOTE" itself. I translated exactly the bandages to see how it worked, and if I used the Portuguese word "NOTA", the text would be yellow. But when I changed it back to "NOTE", it turned white again.

I wonder how they did that...
I loaded torment.exe in a hex editor and ran a search for "note". It turned up 3 or 4 times but only one looked as though it might be the key to this. The full entry was "NOTE:" you could try changing that to "NOTA:" and see what happens. (Backup torment.exe first, please.)
The Gibberlings Three Forums

<SimDing0> Did you know G3 has secret forum rules?
<CamDawg> Yep. They're generally of the nature 'don't annoy Idobek.'

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: