Jump to content

Newbie Modding Questions


Twani

Recommended Posts

If in the process of item creation im just throwing the item into the game with out installing it with WeiDu, would that have a negating effect on some of the equipped abilities such as opcode protection?

 

Also, im getting a error code from the item checker:

"Tootip.2da is inconsistent with extended header counter, more tooltips than expected" If its refering to the extended header 1/x counter and to the tooltip under each header I don't know what its gripping about. there can't be more tooltips than headers, the program doesn't allow it.

Link to comment

Okay, I think this is a case of APPEND or EXTERN's or something that I don't quite get. Basically, I want to add a new state/link/piece/part/something or other to a dialog that already exists in the game.

 

I'm looking at BGEE, DornJ phase 178 'Since you ask...'. He's being his usual charming self, and will go through every party member in your party, accusing them of treachery (he does the same thing later, where you can direct him to try and kill any of your companions you have hanging around). I'd like to add my NPC in both of these instances, because it really stands out as obvious 'this is a mod' if he isn't there.

 

The problem is, I have no idea how to do this. I know how to create a completely new dialog on an existing NPC from staring at Kelsey's code (I, er, think anyway), and I know how to make I_C_T interactions, but this I don't know (although I assume it's the same as Tree of Life interjections, right?). Could someone give me an example of code, if you have the time?

 

(A better example of this is actually DORJ 229, the accusation part. Looking closely, phase 178 can actually be solved with an I_C_T, now that I stopped being a bloody moron and stared at it a bit more. DornJ 229, however, clearly needs a player reply 'It was Alton.' added to it, and that I don't know how to do.)

Link to comment

Wait, wait, I may have actually figured out how to do this myself. Maybe. When do I use EXTEND_TOP and when do I use EXTEND_BOTTOM again?

 

Anyway, does this code look around right?

 

EXTEND_TOP DORJ 229 #3
+ ~InParty("M3Alt") InMyArea("M3Alt") !StateCheck("M3Alt",CD_STATE_NOTVALID)~ + ~It was Altan.~ + m3dornaltfite
END

CHAIN M3AltJ m3dornaltfite
~(Generic WTF didn't do it reaction)~
== DORNJ ~Generic DIE!~
DO ~SetGlobal("M3AltDornRomanceFight","GLOBAL",1)~
EXIT

 

Then I set up the standard DornRomanceFight actions in the BGEE script file, setting it to go to DornJ 260 if Dorn wins, or a custom 'wtf CHARNAME seriously' line in Altan's BGEE file if Altan somehow wins (extremely unlikely, unless Altan can get off a Hold). Is that... around right?

 

(Does anyone seriously actually direct Dorn to try and kill one of their other companions? This strikes me as the kind of thing no one in the world would actually use, but I figure I should do it anyway because everyone else in game has it.)

Link to comment

You need to EXTERN to Altan to get to his reaction. Best practice seems to be using EXTEND_BOTTOM unless there's a really good reason for EXTEND_TOP. So:

 

EXTEND_BOTTOM DORJ 229 #3

+ ~InParty("M3Alt") InMyArea("M3Alt") !StateCheck("M3Alt",CD_STATE_NOTVALID)~ + ~It was Altan.~ EXTERN M3AltJ m3dornaltfite

END

 

CHAIN M3AltJ m3dornaltfite

~(Generic WTF didn't do it reaction)~

== DORNJ ~Generic DIE!~

DO ~SetGlobal("M3AltDornRomanceFight","GLOBAL",1)~

EXIT

Link to comment

Aha, okay. Got it. :)

 

I noticed that in the Branwen mod, she uses Extend Top for the Solar summoning and the Volo interjection. Any reason for that over EXTEND_BOTTOM? I had thought that I read that EXTEND_BOTTOM was almost always the way to go, but I've read so many things that I don't know what I'm doing half the time.

Link to comment

First of all, when you add a new reply to the existing dialogue, and that reply doesn't COPY_TRANS back to the exact same place, it is VERY BAD for compatibility(unless the dialogue can be run again and again, like companion summoning via Fate Spirit or Volo's biography dialogue option - then it's more or less fine). Another player might want an interjection there, or a quest, or a Dorn expansion dialogue, and you're screwed.

 

That said, if you're going to use a reply in the place where all modders are doing it(like NPC summoning at the Throne of Bhaal), you're going to be fine. EXTEND_BOTTOM and EXTEND_TOP are just a user's choice - they determine a place where that reply would appear(EXTEND_BOTTOM means last, EXTEND_TOP means first, EXTEND_TOP #3 might mean third, but not if other mods add other replies before or after your mod).

Link to comment

EXTEND_TOP to a dialogue state is dangerous, because if another mod changes the transactions of a specific reply option but gets installed after your mod, your mod would have pushed the reply option in question one place down and the wrong reply option would be altered. So, EXTEND_TOP to a dialogue is a great no-go, in general.

Link to comment

I don't suppose there are any 'how to do a cutscene' tutorials out there? Or easy cutscene code I could look at? Would looking at Bodhi's abduction sequences help me, perhaps?

There are a few tutorials out there. Try here or there. BG2 has a lot of cutscenes you can browse through. They are conveniently named cut01.bcs, cut02a.bcs, and so on. Or try newgame.bcs, which is the opening cutscene in Irenicus' dungeon.

Link to comment

If you need examples, I think Sellswords cutscenes should be easy enough to read.

 

One thing to remember, though: all actions in the cutscene happen one after another. It means that usually the engine does not see the next action until it stops performing the previous one(your Wait(1) command will not kick in until the hero will have stopped walking). I had to deal with lots of headache until I finally understood that. However, the animations(teleporting spells, pretty effects) WILL be broken by the next action, which is why you may want to put a Wait(5) after teleporting(so the Dimension Door animation plays fully), and Wait(1) between various pretty effects like Flame Column(otherwise they will blend into one).

Link to comment
One thing to remember, though: all actions in the cutscene happen one after another. It means that usually the engine does not see the next action until it stops performing the previous one(your Wait(1) command will not kick in until the hero will have stopped walking).
This is only relevant to cutscene's ID, and only for actions like MoveToPoint() and Spell(). Issuing ActionOverride() commands to other actors is instant and doesn't interfere with ID's queue. In fact, I've found out that using a passive ID is easiest, precisely because it can direct the sequence without distractions. Note, however, that for area transitions the ID should be set to Player1, otherwise it may hang a multiplayer game.

 

PS Also make sure you don't ActionOverride() the ID, it will hang the script.

Link to comment

Thanks, all three of you!

 

I'll take a look at the Spellswords cutscenes, definitely, but I think I know what I want to do now. This is a little more complicated then I expected, but not too complicated, thank you. I think I can do it. Thanks again. :)

Link to comment
This is a little more complicated then I expected, but not too complicated, thank you.
Yeah. Cutscene framework involves using a dozen or so of specific commands on a regular basis, but as long as you're not staging highly detailed dense action sequences you should be fine. Be ready to run a cut 20-30 times before you manage to time and position it into fluent action, though.
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...