Jump to content

Looking for help importing Jester's Bracers into BG2EE


Recommended Posts

Greetings all.  In my SoD2BG2EE item upgrade mod, I have included the jester's bracers, and I am having alot of trouble with importing it's effect of "telling corny jokes".  The actual effect file is: BDBRAC02.EFF.  It's a "Float Text" effect, and it also plays sound files.  It has a display type of "Cynicism"

 

Despite all my efforts, I am running into an absolute brick wall trying to bring this over to BG2EE.  I would really appreciate any help with this.

 

Link to comment

For reference, this is opcode 330.

I don't understand how the effect works, but it references strref 45232 in parameter 3.  Strings 45232–45239 all appear to be lines that it should display.  I don't know if it's hardcoded to use the 7 sequential strrefs starting at the one listed in parameter 3, but that's where I'd start experimenting.

If that is how it works, then you'll have to figure out how to insert 7 strrefs sequentially, with sounds, which sounds like a fun challenge.

Link to comment

Thank you for the response Mike.  I attempted copying over the sound files the effect uses to see if it would even reference those and play them, but it doesn't.  Based on your feedback, it looks like making this work is going to be a hell of a challenge.   I hope I am able to get it working, as it is one of the more unique and fun things that SoD added.

 

For what its worth, the effect *does* reference those same strings in BG2EE and plays them as floating text, but as you can imagine it is totally wrong.  Out of all the custom effects I have created for the items in my mod, this is proving to the the most difficult, and its just for flavor more than anything else.

Edited by Daeros_Trollkiller
Link to comment

This should be quite easy... but we need both string content... and the sound file names, to start.

45232 = ~Why does the honeybee hum? He knows not the words! Waka waka!~ [bd45232]

33 = ~How do ettins leave messages for one another? On a bull-ettin board!~ [bd45233]

34 = ~Where is the safest place in all the land for diving? Waterdeep!~ [bd45234]

35 = ~Never listen to a tale from a wyrm—they tend to drag on!~ [bd45235]

36 = ~Why do skeletons never battle with one another? They lack guts.~ [bd45236]

37 = ~Two orcs walk into a bar. Ouch!~ [bd45237]

38 = ~Last time I told a joke to a ghoul, he laughed his head off!~ [bd45238]

39 = ~What has the body of a lion, the wings of a dragon, and tastes great covered in butter? A manti-corn!~ [bd45239]

 

//Now we bring the item in:

COPY ~modfolder/component/bdbrac02.itm~ ~override~

LPF ~DELETE_EFFECT~ INT_VAR opcode=177 END 

LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=177 target=1 timing=2 duration=0 parameter1 = 0 parameter2 = 2 STR_VAR resource = EVAL "%bdbrac02.eff%" END

LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=177 target=1 timing=2 duration=0 parameter1 = 16398 parameter2 = 9 STR_VAR resource = EVAL "%bdbrac2a.eff%" END

//Then we compile a .dlg file ... later.

//And then we edit the .eff ... later.

Edited by Jarno Mikkola
Link to comment

Hehe, I'm happy to hear that someone thinks it's easy, but I'm still scratching my head on this one.  I've located and copied over the sound files, along with the effect just to see if they would play (even if the strings were wrong), but they do not.

I haven't done anything with Opcode 330 in WeiDu yet, so any examples of it's use would be helpful.  for what it's worth, I cant even see how the effect references the sound files to play them.

Link to comment
On 11/17/2019 at 6:54 PM, Jarno Mikkola said:

This should be quite easy... but we need both string content... and the sound file names, to start.

45232 = ~Why does the honeybee hum? He knows not the words! Waka waka!~ [bd45232]

33 = ~How do ettins leave messages for one another? On a bull-ettin board!~ [bd45233]

34 = ~Where is the safest place in all the land for diving? Waterdeep!~ [bd45234]

35 = ~Never listen to a tale from a wyrm—they tend to drag on!~ [bd45235]

36 = ~Why do skeletons never battle with one another? They lack guts.~ [bd45236]

37 = ~Two orcs walk into a bar. Ouch!~ [bd45237]

38 = ~Last time I told a joke to a ghoul, he laughed his head off!~ [bd45238]

39 = ~What has the body of a lion, the wings of a dragon, and tastes great covered in butter? A manti-corn!~ [bd45239]

 

//Now we bring the item in:

COPY ~modfolder/component/bdbrac02.itm~ ~override~

LPF ~DELETE_EFFECT~ INT_VAR opcode=177 END 

LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=177 target=1 timing=2 duration=0 parameter1 = 0 parameter2 = 2 STR_VAR resource = EVAL "%bdbrac02.eff%" END

LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=177 target=1 timing=2 duration=0 parameter1 = 16398 parameter2 = 9 STR_VAR resource = EVAL "%bdbrac2a.eff%" END

//Then we compile a .dlg file ... later.

//And then we edit the .eff ... later.

Jarno, thank you very, very much for your help on this, I am going to work with this and see what I am able to do.

Link to comment

Sorry, this took a while and I might need to edit it later... it might not work as intended, haven't got the test setup, just a text editor. Soo, with that said:

Well, now we do the similated "dialog" that will never actually happen in the game, but as that provides us the dialog.tlk's insertion point, we need to keep in mind the above, and that there can be no oddities in between them. Or actually that it's easy to code... 😛

We make a .d file into the mod folder, it's literally just a .txt text renamed as a .d file, we name it, and it can only contain upto 8 characters in it's name(+2 as the ".d" extension)... for example "IJ#datro.d" will do for us for now. So after we create that in the modfolder, we insert the actual dialog code into it, which will be this:

BEGIN IJ#datro

CHAIN
IF ~Global("IJ#datr","GLOBAL",1)~ THEN BEGIN Talk1
~Why does the honeybee hum? He knows not the words! Waka waka!~ [bd45232]
== ~How do ettins leave messages for one another? On a bull-ettin board!~ [bd45233]
== ~Where is the safest place in all the land for diving? Waterdeep!~ [bd45234]
== ~Never listen to a tale from a wyrm—they tend to drag on!~ [bd45235]
== ~Why do skeletons never battle with one another? They lack guts.~ [bd45236]
== ~Two orcs walk into a bar. Ouch!~ [bd45237]
== ~Last time I told a joke to a ghoul, he laughed his head off!~ [bd45238]
== ~What has the body of a lion, the wings of a dragon, and tastes great covered in butter? A manti-corn!~ [bd45239]
EXIT
END

.. and nothing else, and WE HAVE TO REMEMBER TO NEVER set the GLOBAL to 1, or bad things might happen.

After that, we compile the file:

COMPILE ~modfolder/IJ#datro.d~

And so now we should have the associate string references in the dialog.tlk ... and then we just need to utilize them... well, the first one as the rest will be associated from the first one, in the .eff ... the next process is easier... but I did this just off the bat, so I probably should test it first.

Link to comment

Thank you very much for your continued help on this Jarno!  with your help and my own delving into .d files for my mod, I am starting to get a better grasp of how they work.  I am using a .TRA file for my strings for other .d files I have in my mod, referencing them with @12345 (for example)

Would it be better for this particular .d file to be done as you have it above?  or something like I have below for consistency:

 

Quote

BEGIN IJ#datro

CHAIN
IF ~Global("IJ#datr","GLOBAL",1)~ THEN BEGIN Talk1
~@10000~ [bd45232]
== ~@10001~ [bd45233]
== ~@10002~ [bd45234]
== ~@10003~ [bd45235]
== ~@10004~ [bd45236]
== ~@10005~ [bd45237]
== ~@10006~ [bd45238]
== ~@10007~ [bd45239]
EXIT
END

 

 

 

Link to comment
On 11/15/2019 at 12:31 PM, Mike1072 said:

For reference, this is opcode 330.

I don't understand how the effect works, but it references strref 45232 in parameter 3.  Strings 45232–45239 all appear to be lines that it should display.  I don't know if it's hardcoded to use the 7 sequential strrefs starting at the one listed in parameter 3, but that's where I'd start experimenting.

If that is how it works, then you'll have to figure out how to insert 7 strrefs sequentially, with sounds, which sounds like a fun challenge.

It doesn't seem to be hardcoded.  Instead it uses 8 sequential strings starting with the strref specified in parameter 3.

I've submitted a pull request that adds the strings with sound effects to dialog.tlk using RESOLVE_STR_REF and assigns the first strref to parameter 3 of the .eff file.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...