TeamBG.CoM

TeamBG.CoM: Editing Q&A => Scripting & Dialog Editing => Topic started by: Wisp of Reality on February 22, 2010, 02:05:35 AM

Title: Some help for a complete and utter newbie? (Still isn't working D: )
Post by: Wisp of Reality on February 22, 2010, 02:05:35 AM
To be honest I don't understand anything of what I'm doing, I only understand the concept of IF and THEN...pretty much everything else makes about as much sense to me as the fish dance from MP.

I've been following a tutorial that can be found on G3 http://forums.gibberlings3.net/index.php?showtopic=14359 (http://forums.gibberlings3.net/index.php?showtopic=14359) there (I don't know how to make the link into a single word, I'm sorry)

So I'm trying to do the Advanced section of the tutorial with banters, tree of life dialogue, but I've hit a snag and I can't figure out what I've done wrong. There's quite a big portion of text that has some problem in it but I can't see how it's different from the tutorial (in fact I copy pasted and edited the potions that were to be edited).

I'm not sure exactly what to do (I'm not very good at asking for help, there's so many variables and things you should put in and I'm not sure exactly what I need to put here, wether I should attach the two files I'm having problems with or just type it up. I'm not very good with making decisions either). Er, if you'd like to help I suppose it would be best to specify which would be best, oh dear I think I've made a big hash of this...
Title: Re: Some help for a complete and utter newbie?
Post by: Ardanis on February 22, 2010, 05:00:10 AM
I assume you have troubles trying to compile a file (BAF or D)?

If you file isn't that large, I'd post it, as this way it's simplier. If it is large, say well over 100kb, then attaching archive might be wiser instead. Either way, whatever you like more :)
Title: Re: Some help for a complete and utter newbie?
Post by: Wisp of Reality on February 22, 2010, 04:49:05 PM
I'm not sure if it's trouble compiling or if it's a scripting issue. (Er, but I think it's more likely to be the later)

I know both of these files have problems, I just can't work out what it is... (Although that might be due to the fact I'm not exactly the most patient person in the world)
Thanks in advance for you help.
Title: Re: Some help for a complete and utter newbie?
Post by: MajorTomSawyer on February 23, 2010, 12:36:22 AM
Is it not working but installs perfectly, or does WeiDU give you an error message when doing a test install?
Title: Re: Some help for a complete and utter newbie?
Post by: Wisp of Reality on February 23, 2010, 12:44:24 AM
I'm getting error messages when I install telling me there's something wrong with the 8th or 9th line of DaleB, and some chain problem though I can't see what the chain error is.
Title: Re: Some help for a complete and utter newbie?
Post by: MajorTomSawyer on February 23, 2010, 12:58:00 AM
Ok, remember I am terrible at coding, but this is what I can see that might be the problem:

Code: [Select]
CHAIN
IF ~InParty("HJDale")
InParty("Minsc")
!ActuallyInCombat
Global("HJDaleMinsc","GLOBAL",0)~
THEN HJDaleB DaleMinsc1

~Minsc, what exactly is that...rat you keep with you? I've never seen a rodent of such a bright...orange hue.~

Global("HJDaleMinsc","GLOBAL",0)~

Looking over Ace's awesome tutorial, I noticed that extra tilde was not there:

Code: [Select]
CHAIN

IF ~InParty(â??K#Johnâ?)

InParty(â??Minscâ?)

!ActuallyInCombat //This way they are not in combat

Global(â??K#JohnMinscâ?,â?GLOBALâ?,0) // We havenâ??t had this banter before

THEN K#JohnB JohnMinsc1

~Minsc, how are you?~

I had an issue with a tilde once that was causing issues, so maybe that is the issue? I am not 100% but it could be the problem.

Mind you, there are people much more qualified to answer this question then me. I still have my Iron Modder entry on my home computer (at work right now), and have yet to be able to make it fully work.



Title: Re: Some help for a complete and utter newbie?
Post by: Wisp of Reality on February 23, 2010, 01:38:45 AM
No it doesn't appear to be that...

According to the Weidu message it can't verify the trigger, so obviously it is something to do with that section (er, with what little knowledge I have of it)

It also seems there's a problem with something called 'CHAIN3' (does that mean the third chain? I'm not sure)

Title: Re: Some help for a complete and utter newbie?
Post by: Ardanis on February 23, 2010, 09:04:51 AM
HJDaleB
4th line: trigger verification error is due to missing brackets in ActuallyInCombat()

HJDaleJ
9th line: INJERJECT -> INTERJECT

35th line: IF ~IsGabber(Player1~ THEN HJDale PID1
I don't know what it was supposed to do, and since dialog coding ain't what I'm best at, I have somne difficulties trying to figure it out by myself. Removing it or commenting it out helps.
You also forgot a closing bracket here.

CHAIN3
I have no idea what CHAIN3 itself stands for, but the error is because there're no dialog files called for by the D script. In other words, HJDaleJ and HJDaleB aren't present in the game.
You can either make empty DLG files with DLTCEP or NI and copy them prior compiling or add BEGIN MyDialogFilename at the beginning of your Ds. The latter can be tricky however, if you don't compile them first.
The best thing to do is to add to your tp2 this
Code: [Select]
<<<<<<<<inlined/dummy.d
BEGIN hjdaleb
BEGIN hjdalej
>>>>>>>>
COMPILE ~inlined/dummy.d~
Eight angled brackets create a virtual file in memory with the path specified (in this case it's in the 'inlined' folder, filename being 'dummy.d'). You can however operate with such 'files' as if they were real. If that sounds overcomplicated, you can as well make a real file with the same content and compile it prior to the rest.
Title: Re: Some help for a complete and utter newbie?
Post by: berelinde on February 23, 2010, 12:39:56 PM
35th line: IF ~IsGabber(Player1~ THEN HJDale PID1
I don't know what it was supposed to do, and since dialog coding ain't what I'm best at, I have somne difficulties trying to figure it out by myself. Removing it or commenting it out helps.
You also forgot a closing bracket here.
Missing a BEGIN. Should be
IF ~IsGabber(Player1)~ THEN BEGIN HJDale PID1
Quote
The best thing to do is to add to your tp2 this
Code: [Select]
<<<<<<<<inlined/dummy.d
BEGIN hjdaleb
BEGIN hjdalej
>>>>>>>>
COMPILE ~inlined/dummy.d~
Eight angled brackets create a virtual file in memory with the path specified (in this case it's in the 'inlined' folder, filename being 'dummy.d'). You can however operate with such 'files' as if they were real. If that sounds overcomplicated, you can as well make a real file with the same content and compile it prior to the rest.
Huh. I didn't know tht. Cool beans.
Title: Re: Some help for a complete and utter newbie?
Post by: Wisp of Reality on February 23, 2010, 03:48:23 PM
Thanks, that's fixed it (for now) however adding BEGIN actually made Weidu not want to install it  I've got to do some checks to see if the dialogue is working however, so I'll edit this post if I've had to change it back to having the BEGIN in it.

Title: Re: Some help for a complete and utter newbie?
Post by: berelinde on February 23, 2010, 03:59:00 PM
Yeah, that one is my bad. I didn't look at the original code, but if you're using CHAIN construction, which you appear to be, you would not use BEGIN at all.
Title: Re: Some help for a complete and utter newbie?
Post by: Wisp of Reality on February 23, 2010, 04:03:30 PM
I took out the begin yes but then when I tried to initiate this dialogue with Dale all I got was 'Dale has nothing to say to you' in that awfully defeating red script.
Title: Re: Some help for a complete and utter newbie?
Post by: berelinde on February 23, 2010, 04:46:40 PM
I'm assuming that you're using theacefes' NPC creation guide.

If the mod is installed, you might want to open up the CRE with NI and check to make sure the dialogue file, DV and override scripts are correctly assigned. I've never had any luck assigning them in NI, so I prefer to assign them in the tp2.

This is how I do it:
COPY ~gavin_bg2/creatures/b!gav08.cre~ ~override~
  ADD_CRE_ITEM ~chan01~   #0 #0 #0 ~IDENTIFIED~ ~ARMOR~
  ADD_CRE_ITEM ~shld05~   #0 #0 #0 ~IDENTIFIED~ ~SHIELD~
  ADD_CRE_ITEM ~b!gavrng~ #0 #0 #0 ~IDENTIFIED~ ~LRING~
  ADD_CRE_ITEM ~hamm01~   #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
  SAY NAME1 @4
  SAY NAME2 @4
  WRITE_ASCII 0x248 ~b!gavs~   #8  // assign override script
  WRITE_ASCII 0x2cc ~b!gav~    #8  // assign pre-joining dialogue file
  WRITE_ASCII 0x280 ~b!gavin2~ #32 // assign DV
  WRITE_ASCII 0x34  ~b!gavins~ #8  // assign small portrait
  WRITE_ASCII 0x3c  ~b!gavinm~ #8  // assign medium portrait


I'm also going to have to set up the various 2DA for the NPC

//2da appending for dialogues
APPEND ~pdialog.2da~
~b!gavin2    b!gavp     b!gavj     b!gavd     b!gav25p     b!gav25j     b!gav25d     b!gav25s~
UNLESS ~b!gavin2~

APPEND ~interdia.2da~
~b!gavin2   bb!gav     bb!gav25~
UNLESS ~b!gavin2~


If you've done all that, there's really no reason your NPC shouldn't talk.
Title: Re: Some help for a complete and utter newbie?
Post by: Wisp of Reality on February 23, 2010, 04:50:10 PM
Yes I used NI for assigning everything, but it seems everything else is working, ie the interjection at Nalia's talk, the banter... Just the player initiated dialogue isn't working.

Oh dear, it seems now BG2 won't let me leave the docks area when I pick Dale up... and this is something to do with the mod since I completely uninstalled all other mods, reinstalled the game completely and it still crashes when I leave the docks.

*head desk*
Title: Re: Some help for a complete and utter newbie?
Post by: Wisp of Reality on February 24, 2010, 04:30:13 PM
I managed to solve the crashing problem by starting a new game, player initiated banters are still not working, the interjection isn't coming up and it breaks Nalia's talk up (it doesn't ruin the game it just stops Nalia's talk from completing)

Can anyone help me with this problem?
Title: Re: Some help for a complete and utter newbie?
Post by: Jarno Mikkola on February 25, 2010, 01:50:14 AM
I managed to solve the crashing problem by starting a new game, player initiated banters are still not working, the interjection isn't coming up and it breaks Nalia's talk up (it doesn't ruin the game it just stops Nalia's talk from completing)

Can anyone help me with this problem?
You probably forgot to patch the game... uninstall all mods, patch the game, install the mods again, and then start a new game.
Title: Re: Some help for a complete and utter newbie?
Post by: Wisp of Reality on February 25, 2010, 09:07:35 PM
I did forget to patch the game, however that doesn't seem to have been the problem.