Jump to content


Photo

Emmeline NPC mod


  • Please log in to reply
149 replies to this topic

#101 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 19 October 2007 - 09:25 AM

Actually, what happened was that I forgot to begin the dialogue at all.

No wonder it wouldn't compile.

theacefes: You have to be realistic as well, you can't just be Swedish!


#102 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 19 October 2007 - 09:35 AM

How do you think I knew what to look for? ;)

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#103 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 19 October 2007 - 09:45 AM

Lol, yeah. *grin* Thanks.

theacefes: You have to be realistic as well, you can't just be Swedish!


#104 Azkyroth

Azkyroth
  • Modder
  • 3496 posts

Posted 19 October 2007 - 09:52 AM

CHAIN3 errors are usually because you aren't beginning your file before you start adding to it. You can do this by putting the following at the beginning of the first dialogue file to compile, usually the pre-joining dialogue:


One of the more common ways to produce them seems to be to have a chain extern to a dialogue like "BIMOEM2". x.x

"Tyranny is a quiet thing at first, a prim and proper lady pursing her lips and shaking her head disapprovingly, asking, well what were you doing (wearing that dress, walking home at that hour, expressing those inappropriate thoughts) anyway? It's subtle and insidious, disguised as reasonable precautions which become more and more oppressive over time, until our lives are defined by the things we must avoid. She's easy enough to agree with, after all, she's only trying to help -- and yet she's one of the most dangerous influences we face, because if she prevails, it puts the raping, robbing, axe-wielding madmen of the world in complete control. Eventually they'll barely need to wield a thing, all they'll have to do is leer menacingly and we fall all over ourselves trying to placate them." -godlizard


#105 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 19 October 2007 - 10:14 AM

Yes, that's true. If you are going to extern to a named state (as opposed to a state number), you need to include it in the specific file you're compiling at the time.

Say I were writing a "Stupid Questions" mod, where different NPCs asked each other stupid questions and expected sensible replies. I could save the entire document as one file, called B!StupidQuestions.d. Ordinarily, it would make more sense to do this as a CHAIN, but I'm going to use normal dialogue coding to illustrate my point.

APPEND BANOMEN
IF ~InParty(Myself)
InParty("Minsc")
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck("Minsc",CD_STATE_NOTVALID)
Global("B!Bridge","GLOBAL",0)~ Bridge
SAY~As I was on my way to the Order, I was accosted by a churl in a boat!~
IF ~~ THEN DO ~SetGlobal("B!Bridge","GLOBAL",1) EXTERN BKELDOR WhatDidHeSay
END
END

APPEND BKELDOR
IF ~~ WhatDidHeSay
SAY ~What did he want from you?~
IF ~~ THEN EXTERN BANOMEN GetHelp
END
END

APPEND BANOMEN 
IF ~~ GetHelp
SAY ~He wanted me to summon aid. So I asked if he was stuck.~
IF ~~ THEN EXTERN BKELDOR Punchline
END
END

APPEND BKELDOR
IF ~~ Punchline
SAY ~And let me guess. He said "No, I'm delivering a bridge. This looks like a good spot!"~
= ~And he wanted you to get some people to help him unload his cargo.~
IF ~~ THEN EXIT
END
END

That will work, because all the EXTERNs point to states that are contained in B!StupidQuestions.d. But if I split that file into Anomen and Keldorn sections, keeping all Anomen's lines in B!StupidQuestions_Anomen.d and all Keldorn's lines in B!StupidQuestions_Keldorn.d, it would give me a CHAIN3 error when it was compiling the first one.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#106 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 19 October 2007 - 10:48 AM

Oh, I see - so a state given in one D file can't transfer to another? Like this, it won't work:

//D file 1.

Append CCEmmeB
IF ~InParty("Minsc")
See("Minsc")
!StateCheck("Minsc",CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
!See([ENEMY])
CombatCounter(0)
Global("CCSilly","GLOBAL",0)~ Sillyface
SAY ~Minsc, your hamster really looks silly.~ DO ~SetGlobal("CCSilly","GLOBAL",1)~
EXTERN BMINSC Sillyhead
END
END

// D File 2.

Append BMINSC
IF ~InParty("CCEmme")
See("CCEmme")
!StateCheck("CCEmme",CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
!See([ENEMY])
CombatCounter(0)
Global("CCSilly","GLOBAL",0)~ Sillyhead
SAY ~Boo is offended by your comment, little elf!~
EXIT
END
END

theacefes: You have to be realistic as well, you can't just be Swedish!


#107 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 19 October 2007 - 11:05 AM

That's right. If they're saved in different dialogue files, for example Emme.d and Minsc.d, it won't work. However, there's nothing to prevent you from putting them both in the same file.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#108 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 19 October 2007 - 11:15 AM

*nods* Lovely. For now I'm hunting down minor code problems (yes, a lot of missed quotation marks, but also a couple unnecessary ones) and after that I'll try to compile it. :)

theacefes: You have to be realistic as well, you can't just be Swedish!


#109 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 19 October 2007 - 11:41 AM

Aaaaand it compiled! *dances* Finally! Thank you so much for your help, all of you!

Now I'm leaving coding alone, for what little is left of the evening.. I need a break.

theacefes: You have to be realistic as well, you can't just be Swedish!


#110 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 06 November 2007 - 05:39 AM

Posting just to let people know that yes, still working on her. :3 I'm just about to start writing her first lovetalk!

theacefes: You have to be realistic as well, you can't just be Swedish!


#111 Lucia

Lucia
  • Member
  • 6 posts

Posted 09 November 2007 - 01:51 PM

Hey! Good luck with this. It sounds like she'd make a fun addition to the party. Keep letting us know how she's turning out -- your progress gives all the rest of us clueless first-time modders hope! :cheers:

#112 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 09 November 2007 - 02:13 PM

Thank you (and good luck to you as well, with Giselle)!

It's really a bit confusing, since I don't know where to start. But I've got one PC talk written, coded and compiled, and the second one is almost done. And.. let's see.. a lot of banter drafts (Ajantis, Alora, Branwen, Coran, Edwin, Eldoth, Imoen, Jaheira, Kivan, Quayle, Kagain and Minsc so far), two finished Korgan banters (yes, some work on BG2 has slipped in) and one which is semi-finished.. and a few flirts. So it'll definitely be completed one day. :3

theacefes: You have to be realistic as well, you can't just be Swedish!


#113 Solar's Harper

Solar's Harper

    Under Star & Sky.

  • Modder
  • 2758 posts

Posted 10 November 2007 - 12:40 PM

Or not... :D

Coding has been the major issue, and finding time inbetween projects, but we're moving slowly so yes, expect more previews and updates, soon. :)

Edit: Forgetful aren't I?

Good luck to you as well with Giselle, Lucia. :)

Edited by Solar's Harper, 10 November 2007 - 12:43 PM.

Classic Adventures - a Total Conversion compilation dedicated to bringing many of the old and new PnP modules into the wonderfully dangerous world that is Baldur's Gate II.   Fancy link button to Downloads page.
 
CA Forum.  Bugs to be squashed, feedback to be welcomed!

Website at: http://classicadventuresmod.com/
~***~***~***~

When in doubt, lockpick a mudcrab!

Beware the nug conspiracy!


#114 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 10 November 2007 - 12:42 PM

LOL, yes, coding is hell. I'm getting better at it, though, and so is Solar, so while it's certainly annoying (wouldn't things be much easier if you didn't have to code it?), it's not that much of a hinder. Boredom and lazyness are the biggest enemies for me.

Edited by Choo Choo, 10 November 2007 - 12:45 PM.

theacefes: You have to be realistic as well, you can't just be Swedish!


#115 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 10 November 2007 - 01:29 PM

Oh, I see - so a state given in one D file can't transfer to another? Like this, it won't work:

(A bit late, but...) Links between named states can work if placed in different .d-files; the important thing to remember is that you compile the files at the same time. Your above example would work if you changed your tp2 code from

COMPILE ~path/to/dfile1.d~
COMPILE ~path/to/dfile2.d~
to

COMPILE ~path/to/dfile1.d~
		~path/to/dfile2.d~
This way, the two files will be compiled at the same time, and the labels would work (if not, you might have to use APPEND_EARLY). :)

(Also, "Append" in those examples should be uppercase. ;))

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#116 Azkyroth

Azkyroth
  • Modder
  • 3496 posts

Posted 10 November 2007 - 01:37 PM

Oh, I see - so a state given in one D file can't transfer to another? Like this, it won't work:

(A bit late, but...) Links between named states can work if placed in different .d-files; the important thing to remember is that you compile the files at the same time. Your above example would work if you changed your tp2 code from

COMPILE ~path/to/dfile1.d~
COMPILE ~path/to/dfile2.d~
to

COMPILE ~path/to/dfile1.d~
		~path/to/dfile2.d~
This way, the two files will be compiled at the same time, and the labels would work (if not, you might have to use APPEND_EARLY). :)

(Also, "Append" in those examples should be uppercase. ;))


Another note: there's actually no logical reason you can't use one .d file for all your dialogue (or, at least, all that's installed within the same component), it's just a lot harder to keep track of that way. I think BtL uses like 4, for instance. And if you have the dialogues in the same .d file you won't have the same issue with compiling and different state names...

"Tyranny is a quiet thing at first, a prim and proper lady pursing her lips and shaking her head disapprovingly, asking, well what were you doing (wearing that dress, walking home at that hour, expressing those inappropriate thoughts) anyway? It's subtle and insidious, disguised as reasonable precautions which become more and more oppressive over time, until our lives are defined by the things we must avoid. She's easy enough to agree with, after all, she's only trying to help -- and yet she's one of the most dangerous influences we face, because if she prevails, it puts the raping, robbing, axe-wielding madmen of the world in complete control. Eventually they'll barely need to wield a thing, all they'll have to do is leer menacingly and we fall all over ourselves trying to placate them." -godlizard


#117 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 10 November 2007 - 01:41 PM

Thank you, SConrad. That kind of made sense, and if it almost makes sense when I am in my current zombie state, it's bound to make sense when I've had some sleep. :)

Good point, Azkyroth.. I do think I'll have different D files, though, since I tend to be somewhat of an organizer obsessor when it comes to these things.

theacefes: You have to be realistic as well, you can't just be Swedish!


#118 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 10 November 2007 - 01:49 PM

Another note: there's actually no logical reason you can't use one .d file for all your dialogue (or, at least, all that's installed within the same component), it's just a lot harder to keep track of that way. I think BtL uses like 4, for instance. And if you have the dialogues in the same .d file you won't have the same issue with compiling and different state names...

But there's no logical reason you can't use more than one .d file, either. Single .d-files with dialogue for a whole mod quickly becomes unwieldy as a mod grows, and your only argument for using one file (the issue with named state linkage) can be solved the way I described in my previous post. :)

I usually advocate splitting up code in multiple files. There is really no reason why you shouldn't, and there are only advantages to be gained from that approach.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#119 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 10 November 2007 - 01:55 PM

*nods* And since I'm an Infinity Explorer junkie, I usually prefer it when they are split up, since it becomes much easier to find what I want to read - banters in the B file, flirts/interjections in the J file, etc. :)

theacefes: You have to be realistic as well, you can't just be Swedish!


#120 Azkyroth

Azkyroth
  • Modder
  • 3496 posts

Posted 13 November 2007 - 02:03 PM

Another note: there's actually no logical reason you can't use one .d file for all your dialogue (or, at least, all that's installed within the same component), it's just a lot harder to keep track of that way. I think BtL uses like 4, for instance. And if you have the dialogues in the same .d file you won't have the same issue with compiling and different state names...

But there's no logical reason you can't use more than one .d file, either. Single .d-files with dialogue for a whole mod quickly becomes unwieldy as a mod grows, and your only argument for using one file (the issue with named state linkage) can be solved the way I described in my previous post. :)

I usually advocate splitting up code in multiple files. There is really no reason why you shouldn't, and there are only advantages to be gained from that approach.


I know. I'm being pedantic. Or something.

*nods* And since I'm an Infinity Explorer junkie, I usually prefer it when they are split up, since it becomes much easier to find what I want to read - banters in the B file, flirts/interjections in the J file, etc. :)


My point is that if you do the .d file right it will compile into all those other dialogues. IE can't read uncompiled .d to begin with, so...

"Tyranny is a quiet thing at first, a prim and proper lady pursing her lips and shaking her head disapprovingly, asking, well what were you doing (wearing that dress, walking home at that hour, expressing those inappropriate thoughts) anyway? It's subtle and insidious, disguised as reasonable precautions which become more and more oppressive over time, until our lives are defined by the things we must avoid. She's easy enough to agree with, after all, she's only trying to help -- and yet she's one of the most dangerous influences we face, because if she prevails, it puts the raping, robbing, axe-wielding madmen of the world in complete control. Eventually they'll barely need to wield a thing, all they'll have to do is leer menacingly and we fall all over ourselves trying to placate them." -godlizard