Creating New Dialogs (and also BAMs and projectiles)
semiticgoddess
Member Posts: 14,903
I've finally figured out how to use WeiDu to set up proper strings for spells, items, and critters, and also copy over files to the override folder. And I know how to use Near Infinity to create spells, items, critters, .2da files, and stores. But there are some things I don't get.
For one, I don't know how to create a completely new dialog from scratch and give it new strings. I've found tutorials for editing existing dialogs, and I can create custom dialogs with pre-existing strings, but I can't create a simple dialog to open a new store.
Less importantly, I'd like to learn how to create custom BAMs. I can copy BAMs from IWD2, and I can create my own image files, but I don't know how to get from BMP to BAM.
Finally, I have no idea how to create new projectiles. All I know is that getting them to work requires adding an IDS entry, which I don't know how to do. And I've no idea how to edit them.
Can anyone tell me how to do any of these things?
For one, I don't know how to create a completely new dialog from scratch and give it new strings. I've found tutorials for editing existing dialogs, and I can create custom dialogs with pre-existing strings, but I can't create a simple dialog to open a new store.
Less importantly, I'd like to learn how to create custom BAMs. I can copy BAMs from IWD2, and I can create my own image files, but I don't know how to get from BMP to BAM.
Finally, I have no idea how to create new projectiles. All I know is that getting them to work requires adding an IDS entry, which I don't know how to do. And I've no idea how to edit them.
Can anyone tell me how to do any of these things?
1
Comments
To add new dialog to the game you need to write a .d file and compile it to the game using WeiDU with your .tp2 file. If you wanted to create a storekeeper dialog for instance, it'd look something like this, using xxSTORE as an example name for the dialog file.
BEGIN xxSTORE IF ~~ THEN BEGIN xxSTORE1 SAY ~Hello! Would you like to take a look at my stock?~ ++ ~Yes, let's see what you have.~ DO ~StartStore("xxSTORE",LastTalkedToBy())~ EXIT ++ ~Not right now.~ EXIT END
This only works if the only people talking are the PC and the storekeeper. If you wanted a party member to interject, you'd have to use CHAIN instead:
BEGIN xxSTORE CHAIN IF ~True()~ THEN xxSTORE xxSTORE1 ~Hello! Would you like to take a look at my stock?~ == IMOEN2 IF ~InParty("IMOEN")~ THEN ~Wow! Look at all the things they have, <CHARNAME>!~ END ++ ~Yes, let's see what you have.~ DO ~StartStore("xxSTORE",LastTalkedToBy())~ EXIT ++ ~Not right now.~ EXIT
Don't forget to connect the dialog to the character you want to say the above.
Now, if you want to ADD to an existing character's dialogue, DO NOT use BEGIN at the start of the file, or else you'll override any dialog they already had. Instead, you want to use EXTEND_TOP or EXTEND_BOTTOM, which adds to their existing dialogue. Let's say you want to add an extra line of dialogue to Ribald to access your custom store:
EXTEND_BOTTOM RIBALD 0 ++ ~I'm looking for something special. Got anything else for sale?~ EXTERN RIBALD xxRibald1 END CHAIN RIBALD xxRibald1 ~I may have some unusual items in the back. Would you like to have a look?~ END ++ ~Sure.~ EXTERN RIBALD xxRibald2 ++ ~Nah.~ EXTERN RIBALD xxRibald3 CHAIN RIBALD xxRibald2 ~Come with me then.~ DO ~StartStore("xxSTORE",LastTalkedToBy())~ EXIT CHAIN RIBALD xxRibald3 ~Alright.~ EXIT
This would add an extra dialogue option to the bottom of Ribald's dialogue without overriding anything.
Regardless of how you write the dialogue, you need to compile it to the game via your .tp2 file. The command looks like this:
COMPILE ~xxMOD/dialogue/xxSTORE.d~
My advice for further details - look at Kulyok's Branwen mod at Pocket Plane Group. Almost everything is fully annotated and explains how to deal with different ways of adding new dialogue.
BAMS and projectiles aren't really my field of expertise. My attempts at successfully creating original BAMs are often hit or miss.
WeiDu refused to read the file until I renamed the would-be dialog from (AL)003 to DIAL003, because the parentheses caused a problem. That never happened to any of my other files before, with or without WeiDu, but it seems .d files can't handle extra parentheses.
Anyway, the dialog I want to create looks like this, the one I created before this thread:
but with different strings. The one above is fully functional.
I managed to create a new dialog with new strings, but the tree doesn't show up properly, which I think is the problem here.
What I don't know is how to fix that problem.
This is what I added to the TP2 file:
COMPILE ~AlchemistKit/dlg/DIAL003.d~
This is what I added to the dlg folder mentioned above:
DIAL003 (the .d file)
This is what I added to the .d file mentioned above:
BEGIN DIAL003
IF ~~ THEN BEGIN DIAL003
SAY ~Begin Alchemist Workshop?~
++ ~Begin.~ DO ~StartStore("(AL)003",LastTalkedToBy())~ EXIT
++ ~Exit.~ EXIT
END
All of that went through WeiDu just fine; it didn't get stuck anywhere along the way.
Replace: "IF ~~ THEN BEGIN DIAL003"
With: "IF ~~ THEN BEGIN 0"
Replace: IF ~~ THEN BEGIN DIAL003
With: IF ~True()~ THEN BEGIN DIAL003
As for adding projectiles and using them in spells, it's actually really easy.
I agree with @Grammarsalad that projectiles are difficult to create. There are many fields to set which are badly documented (if at all). Your best bet is probably to use an existing projectile and modify it bit by bit until it fits your need.
For example, I created a spell called "storm wall" that was basically a wall of electricity. When a creature passes through it, they take electricity damage. First, I started with the wall of moonlight spell. Then i changed the bam used by the projectile to the one used by the lightning bolt spell, but with the bam rotated 90 degrees. Then i made relevant changes to the spell ( e.g. electricity damage and protection from the spell for one round as otherwise the spell deals an insane amount of damage per second(?))
Anyway, the thing looks awesome, like a wall crackling with electrical energy, though I made very few changes to the projectile itself.
My primary suggestion is to experiment, experiment, experiment
I already know how to add one to an item. This is how my TP2 added a custom projectile to a custom item:
ADD_PROJECTILE ~AlchemistKitBG2EE/pro/USALG06.PRO~
COPY ~AlchemistKitBG2EE/itm/(AL)057.ITM~ ~override/(AL)057.ITM~
WRITE_SHORT 0x09c ~%USALG06%~
SAY NAME1 @36g
SAY NAME2 @36g
SAY DESC @36g
This is what I tried to do to add a different custom projectile to a custom spell:
ADD_PROJECTILE ~AlchemistKitBG2EE/pro/USALPG1.PRO~
COPY ~AlchemistKitBG2EE/spl/(AL)064B.SPL~ ~override/(AL)064B.SPL~
WRITE_SHORT 0x09c ~%USALPG1%~
I also tried:
ADD_PROJECTILE ~AlchemistKitBGEE/pro/USALPG1.PRO~
COPY ~AlchemistKitBGEE/spl/(AL)064B.SPL~ ~override/(AL)064B.SPL~
LPF SPELL_ALTER_HEADER INT_VAR projectile = USALPG1 END
I keep getting the same error message from WeiDu, saying the projectile STAT value of 20 was a problem (it's the standard message when I've failed to copy projectiles properly).
The projectile in question is just a clone of Cloudkill, with the number of hits reduced from 10 to 4 to reduce the duration.
This method works for me:
This should work. You were just missing "quotes"
Edit: I'm a bit concerned about those parentheses in "(AL)064B.SPL".
Does that normally work?
In any case, ALTER_SPELL_HEADER should work now
@Grammarsalad: Parentheses will break WeiDu if you use them in dialogs and projectiles and probably some other places, but they'll be fine if you're simply copying over item and spell files.
Btw, if you want to see other spell related tricks, look here.
Might be useful