Jump to content


Mod for the pacifist request


  • Please log in to reply
46 replies to this topic

#21 Carinna

Carinna
  • Member
  • 19 posts

Posted 12 December 2009 - 09:38 PM

OK, this is dangerous stuff, because you are expecting that no one else has already messed with all this. And in a modern Mega install, that is getting to be like skating across Lake Champlain in January - used to be a safe bet it was ok to drive your truck across, but nowadays you will be lucky to make it in a snowmobile. But to give you a leg up on the basics, here is a first rough pass -


I really should read these posts in order ... :unsure: (and have a previous post to this on the 1st page)

Also, I wondered if I should just rewrite the entire scene from beginning to end. It seems like that should take care of both the referencing problems and the possible conflict with other mods. It'll be a lot to plaster on here, though. Is there some way to manage posting it without overwhelming the board?

Edited by Carinna, 12 December 2009 - 09:39 PM.


#22 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 12 December 2009 - 09:46 PM

To be honest Carinna, your code is probably already better than what I could do (and cmorgan's undoubtedly is). I still have problems reading code like ++ ~blah~ + unless it's spelled out for me <_<. Can't really add much, but I can reemphasise that you can comment your own dialogue with //comment or /* comment */ as cmorgan has done. The engine simply skips those comments. Also, we use APPEND and WEIGHT -1 (with condition checks like variables) for a number of dialogues, also as some examples above, but I do know that you should do that whenever sensible. We had some problems in Aurora with dialogues firing without such conditions when we really didn't intend it.

Edit: Don't worry about overwhelming the board with CODE tags heh - there is far worse spam here :D. It's preferable to post code with those tags IMO - you can use CODEBOX but that results in a scrollbox within a scrollbox (sometimes within another) which can be even more hard to read, particularly in some browsers.

Edited by Miloch, 12 December 2009 - 09:50 PM.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#23 Carinna

Carinna
  • Member
  • 19 posts

Posted 12 December 2009 - 09:58 PM

To be honest Carinna, your code is probably already better than what I could do (and cmorgan's undoubtedly is). I still have problems reading code like ++ ~blah~ + unless it's spelled out for me <_<. Can't really add much, but I can reemphasise that you can comment your own dialogue with //comment or /* comment */ as cmorgan has done. The engine simply skips those comments. Also, we use APPEND and WEIGHT -1 (with condition checks like variables) for a number of dialogues, also as some examples above, but I do know that you should do that whenever sensible. We had some problems in Aurora with dialogues firing without such conditions when we really didn't intend it.


I appreciate all the help everyone is providing with the dialogue here; it may take me awhile, but I think I can reasonably learn to write in .d. What I have absolutely no idea how to begin doing, however, are the changes necessary for the scenes that have no dialogue (how do you unlock a door that is locked in the vanilla game - the one in the room where Khalid is lying dead, specifically). I can't do that. And there is no dialogue required to change that.

That said, what is the significance of the weighting on the variables for the command WEIGHT -1? I don't understand how it would be used (is there some place to reference all these commands together, like a dictionary of them?). Giving weight to the dialogue responses, certainly, but I'd need to know what caused them to begin at the wrong time, wouldn't I?

And I'll put more comments in next time.

THANK YOU!

#24 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 12 December 2009 - 10:20 PM

What I have absolutely no idea how to begin doing, however, are the changes necessary for the scenes that have no dialogue (how do you unlock a door that is locked in the vanilla game - the one in the room where Khalid is lying dead, specifically). I can't do that. And there is no dialogue required to change that.

Oh, well that probably involves modding script files (.bcs compiled or .baf uncompiled). Like I said earlier, those are (to me anyway) easier than modding dialogue, though you still have to look out for variables. But they're a bit more linear anyway, for the most part. Just have to figure out which ones they are. They are probably the area scripts to begin with. (You are probably familiar with the IESDP there already - if not, it is the modder's best friend :)).

That said, what is the significance of the weighting on the variables for the command WEIGHT -1? I don't understand how it would be used (is there some place to reference all these commands together, like a dictionary of them?). Giving weight to the dialogue responses, certainly, but I'd need to know what caused them to begin at the wrong time, wouldn't I?

I don't really understand it myself, but from what I do understand, all dialogue blocks have equal WEIGHTs unless otherwise specified. Meaning they'll execute in the given order if no other conditions are checked. If they are checked, those conditions have to be true for the dialogue block to fire. You can override this order with WEIGHTs. If you have conditions and want to make sure your block fires, the easiest (perhaps laziest) way to do it is by specifying a WEIGHT of -1, which means it will fire (in theory, if the conditions are right) before other blocks. [Unless there are other blocks with a weight of -1, in which case *those* should be read in order, and be "outweighed" by others with a WEIGHT of -2. But now I'm babbling, because I've never even seen any code like that, let alone written it...] Otherwise, it might not fire at all, because some other block might override it. Eh, does that make sense? :blink:

Oh, and I wasn't saying you needed more comments btw... was just saying if you did have them (which you seemed to) there's no harm in putting them in your .d file prefaced by a // or enclosed by /* and */ tags. I'm not known for heavy code commenting, but it can help particularly in .d since it's very non-linear.

Edit: orcish != English

Edited by Miloch, 12 December 2009 - 10:22 PM.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#25 Tieflingz

Tieflingz

    SS Promotionist

  • Member
  • 100 posts

Posted 13 December 2009 - 06:30 AM

... altering the game so that everyone was forced to come to a peaceful solution for everything... altering the game so that everyone is not forced to come to a violent solution to everything.

Ah ha ha good way to put it but sounds pretty much the same to me!

It'd be an interesting mod indeed, but not exactly the most ideal playthrough for me, that's something personal now so don't mind me.

But of course, this would bring certain peaceful solutions to most part of the game (Which they should have sometimes) and should be encouraged!

Edited by Tieflingz, 13 December 2009 - 06:32 AM.

I am: Human-Essentric (Halflings/Gnomes/Dwarves/Tieflings are favored)
Fetish: Backstab Ability (That includes Blackguards!)
Alignment: Mainly Any Evil and, to some extent, Chaotic Neutral
Nemesis:
Aasimar (Unless s/he's evil like Belueth the Calm)
Elf (I just don't like those pointy ears)
Paladin (You could guess why)
Weapon of Choice:
Short Sword/Thrown Daggers + Buckler

#26 Carinna

Carinna
  • Member
  • 19 posts

Posted 13 December 2009 - 08:30 AM

It'd be an interesting mod indeed, but not exactly the most ideal playthrough for me, that's something personal now so don't mind me.


Of course it isn't for everyone; no mod is. It's not going to be all-inclusive to begin with, though, anyway. I'm just trying to change it so that things like doors remaining locked until everything in the room is dead go away on the main line quests. You can still get violent if you want to; the mod won't take that away.

Anyhow, here is the revised code, hopefully made a little more readable after following cmorgan's example. I'm still not clear on the transition away from Caehan 6 (fixed from my previous error of Caehan 7). I checked the other places where I reverted back to the vanilla game, and they were all correctly called.

BEGINCODE
/* Altered dialogue for Jaylos/Caehan/Gracen scene in Five Flagons Inn Chapter 3 */
/* Scene progresses as in vanilla game until the conversation progresses to the following point:*/

/* Diverted from Caehan.dlg state 6, so the transition goes directly there. */
/* I've kept the options for the old behavior by copying the original replies as the first four in the reply list for the top-level dialogue below. */
/* Those first four replies are sent back to the original dialogue (Jaylos.dlg) */
/* This is proposed as a new dialogue named nkJaylos.dlg, i.e. not APPENDed to any existing dialogue (unless that is the only way to do it?) */

ALTER_TRANS CAEHAN // Caehan.dlg
BEGIN 6 END // 6
/* Does this divert from ~CAEHAN~ 6 ? It should be the only diversion away from the original. */
BEGIN 1 END // 1
/* There is only this one transition, so hopefully this is correct? */
BEGIN //
/* Not sure if the end of the transition should still go here or not. Will it transition if so? Or will putting it after the changes cause the dialogue to revert back to the original after it should have stopped altogether? */


IF ~~ nkJaylos
SAY ~[JAYLOS] All right, everyone, just calm down.~ /* copied from original */
++ ~[PC] You don't know the naa-aame, you don't know the naa-aame.~ EXTERN ~JAYLOS~ 13 /* copied from original */
+ ~Gender(Player1,FEMALE)~ + ~[PC] Maybe I know the name very, very well! Maybe it's MY name! Maybe I'm the contact!~ EXTERN ~JAYLOS~ 15 /* copied from original */
+ ~Gender(Player1,MALE)~ + ~[PC] Maybe I know the name very, very well! Maybe it's MY name! Maybe I'm the contact!~ EXTERN ~CAEHAN~ 7 /* copied from original */
++ ~[PC] Listen to your pal, friend. You are in big trouble.~ EXTERN ~JAYLOS~ 2 /* copied from original */
++ ~[PC] How DO I know you really know the name? You could just be trying to get me to talk.~ + nkJaylos1 /* only new response */
END

IF ~~ nkJaylos1
SAY ~[JAYLOS] I guess we'll find out soon enough.~
IF ~~ THEN DO ~SetGlobal("JaylosSpawn",AR0511",2)CreateCreature("BODFGT03",[652.814],10) + nkJaylos2
END

IF ~~ nkJaylos2
/* Not sure if Gracen should be called by his creature name, BODFGT03, or his actual name in [GRACEN] wherever he speaks */
SAY ~[GRACEN] What's going on here? I'm Gracen. Were all of you to meet me here?~
++ ~[PC] WE were. I don't know what these two are doing.~ + nkJaylos3
++ ~[PC] Actually, we're here to teach you a lesson for crossing the Shadow Thieves.~ + nkJaylos5
++ ~[PC] What happened to using your name for the password?~ + nkJaylos4
END

IF ~~ nkJaylos3
SAY ~[JAYLOS] Now wait just a minute! WE were here first!~
= ~[GRACEN] Keep your voices down! We should not wait here long. Your new berth is beneath the graveyard district, behind the blue stone doors.~
++ ~[PC] That's all we needed to know. Now you shall feel the wrath of the Shadow Thieves.~ EXTERN ~Bodfgt03~ 7 /* copied from original */
++ ~[PC] Might I ask what our reward was to be again? I would like it clarified.~ EXTERN ~Bodfgt03~ 8 /* copied from original */
++ ~[PC] Well, we shall be on our way, then.~ /* only new response */
IF ~~ JOURNAL ENTRY ~Aran's tasks to receive the Shadow Thieves' aid
I have successfully posed as a defector from the Shadow Thieves and met the contact, although I have learned little beyond the fact that the rival guild is based in the Graveyard District. Hopefully, this is all the information that Aran Linvail requires.~ EXIT
/* Gracen does not respond if he is fooled; he, Jaylos, and Caehan simply leave */
END

IF ~~ nkJaylos4
SAY ~[JAYLOS] I knew you didn't know the name, SPY!~
++ ~[PC] No, you are the spies! Let's get them, Gracen!~ EXTERN ~Bodfgt03~ 2 /* copied from original */
END

IF ~~ nkJaylos5
SAY ~[GRACEN] I shall make sure you cannot report what you have seen! Time to die, fools!~
IF ~~ JOURNAL ENTRY ~Aran's tasks to receive the Shadow Thieves' aid
The defectors from the Shadow Thieves have been killed and the contact who had come to collect them attacked me. I discovered that the rival guild is based in the Graveyard District, but little else. Hopefully, this is all the information that Aran Linvail requires.~ EXIT
/* This journal entry is copied from the original. Alternatively it can EXTERN back to it, but I don't know how to reference an external response */
END

/* All EXTERN calls go back to the original dialogue and end in a fight */
/* In all cases the line going to the EXTERN was lifted verbatim from the original */

ENDCODE

I am hoping this clears up the problem where the dialogue was sent to the Bodfgt03 selection where the PC has to guess Gracen's name. Guessing his name shouldn't arise with the dialogue options given above.

THANK YOU TO EVERYONE FOR YOUR HELP! :Bow:

Edited by Carinna, 13 December 2009 - 08:31 AM.


#27 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 13 December 2009 - 08:34 AM

Carinna, believe me - if I can learn to do it, you can :)

If you are researching how things work (which is a good idea now that you have a basic idea of what it is you want to do) check out the tutorials at SHS, PPG, and G3. When you get some legs under yourself, I am building an NPC and 'blogging" it at G3, and building an NPC is 90% dialog coding, so there are lots of explanations and hints there with Aran Whitehand.

The quickest way of explaining weights might be there, but I can short-cut some of it -

dialog files are lists of states - states = cards.

If I build a bunch of states in order, they get put in that order (of install or compilation), so

1
2
3
4
5

The game looks for the first available, skipping any with no condition set (if it says IF ~~ statename or IF ~~ THEN statename, etc, with nothing between the tildes, then it is a hard-coded link between two states. You can only get it to run when you are coming from something that expects only that).

BUT if I add a WEIGHT setting, they move up in the order. So if I have conditions like this:

1 = talked to once and male
2 = talked to once and female
3 = just killed Viconia in a fit of rage
4 = just had bhodi encounter
5 = if variable is set to 1

then I have a problem I need to solve. I want the "killed Vicci" state to be more important than the "talked to wonce" states, because I am not going to have a nice first-meeting conversation with the NPC if the NPC just witnessed a drowicide, justifiable or not. So i am going to give it

IF WEIGHT #-1 ~condition_that_says_drowdeath~ THEN BEGIN myStateThatTalksAboutViccy

and the WEIGHT will move it to the top of the order. It WILL NOT CHANGE THE STATE NUMBER. This is important, especially to you - the number you find for the dialog to break into does not change, just the weight the engine puts on it. so, the states are not renumbered, just reordered:

3 = just killed Viconia in a fit of rage
1 = talked to once and male
2 = talked to once and female
4 = just had bhodi encounter
5 = if variable is set to 1

Now, the engine looks and checks each state in order in the dialog file, and the right one will play.

#28 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 13 December 2009 - 08:44 AM

You need to go back and make sure all the tildes (~) are in the right place, and do some more linking (some places end with a comment -
and no worries about tons of code, that's what the forums are for. but you can make it easier if you use

[ c o d e ] code in the space [ / c o d e ]

without the spaces.

For the journal entry, you need the title on one line, then two hard-returns, so that weidu understands that the first line is the title, then the next line is the journal text.

You also need to make sure you are assigning things to the right stuff - there is no APPEND - END block in sight there - recheck my posts, because I tinkered with them, I think, after you visited - the ALTER_TRANS works on the original file, so it needs to be outside of an APPEND block. But anything that expects to be compiled into regular dialog files needs a target.

IF ~~ nkJaylos3
SAY ~[JAYLOS] Now wait just a minute! WE were here first!~
= ~[GRACEN] Keep your voices down! We should not wait here long. Your new berth is beneath the graveyard district, behind the blue stone doors.~


This won't work as you think. Gracen is BODFect. etc. and needs to be able to say his line,; right now Jaylos is saying both lines in a multi-say. In the original, BODFetc. etc. gets a call to his dialog, which is why I put it in a CHAIN form,ation at the end. :) Everything inside of an IF <> END block will be said by the single NPC speaker, and followed by a transition(reply0 by the user ("PC"). To get other NPCs to speak, you have to either EXTERN to their dialog files, or build a CHAIN construction.

Keep poking at it, and comparing with other sources, and you will teach yourself pretty quickly.

Hopefully, someone remembers if calling a + 0, + 1 in the original state works - my usual bag is to keep as independent of the original dialog as possible, and not tie back into it unless I absolutely have to. Other dialog-coders wandering about have more/better suggestions?

P.S. - Miloch suffers from Orcish Modesty. He is generally right, and uncommonly logical - there are mods out there (and I have coded for some) that use WEIGHT #-2, -3, etc, even -99, and they work exactly as Miloch says, pushing each higher n the order than others with higher numbers in relation to eachother. Ignore them, though. The only reason someone is doing that is that they are modifying an existsing mod quickly, playing with weight order in relation to other weights. Usually over many complicated files. The better way to do it is to actually recode your stuff in the correct order of install, the use -1 to get the important stuff up to the top of existing vanilla content when you need to. It will save you hassle when troubleshooting, believe me - write in evaluation order. Domi used to say "build backwards, end to beginning, and make sure that each condition does not block everything else unless it absolutely has to" or something like that.

Edited by cmorgan, 13 December 2009 - 08:54 AM.


#29 Carinna

Carinna
  • Member
  • 19 posts

Posted 13 December 2009 - 10:30 AM

You need to go back and make sure all the tildes (~) are in the right place, and do some more linking (some places end with a comment -


Oh. I was trying to copy how you did the links. Originally I had them (for example) as " + JAYLOS.DLG state 13" and then I saw that you had them as "~EXTERN ~JAYLOS~ 13" so I thought that was the way to make the link back to the original. I think I have the links to the new stuff as "+ nkJaylos2" (for instance). I do put comments after I call the link; is this not advisable? I saw one done this way on the original with Near Infinity, so that's why I did it.

and no worries about tons of code, that's what the forums are for. but you can make it easier if you use

[ c o d e ] code in the space [ / c o d e ]

without the spaces.


Oh, good, thank you! I tried the codebox but didn't care for the result.

For the journal entry, you need the title on one line, then two hard-returns, so that weidu understands that the first line is the title, then the next line is the journal text.

You also need to make sure you are assigning things to the right stuff - there is no APPEND - END block in sight there - recheck my posts, because I tinkered with them, I think, after you visited - the ALTER_TRANS works on the original file, so it needs to be outside of an APPEND block. But anything that expects to be compiled into regular dialog files needs a target.


I fixed the journal entry; I have added in the APPEND, now that I understand what is being done with it. Hopefully, this takes care of the problem you describe below, although I tried to address it without chaining (the chaining makes it more difficult for me to follow).

This won't work as you think. Gracen is BODFect. etc. and needs to be able to say his line,; right now Jaylos is saying both lines in a multi-say. In the original, BODFetc. etc. gets a call to his dialog, which is why I put it in a CHAIN form,ation at the end. :) Everything inside of an IF <> END block will be said by the single NPC speaker, and followed by a transition(reply0 by the user ("PC"). To get other NPCs to speak, you have to either EXTERN to their dialog files, or build a CHAIN construction.


/* Altered dialogue for Jaylos/Caehan/Gracen scene in Five Flagons Inn Chapter 3 */
/* Scene progresses as in vanilla game until the conversation progresses to the following point:*/
/* Diverted from Caehan.dlg state 6, so the transition goes directly there. */
/* I've kept the options for the old behavior by copying the original replies as the first four in the reply list for the top-level dialogue below. */
/* Those first four replies are sent back to the original dialogue (Jaylos.dlg) */


ALTER_TRANS CAEHAN // CAEHAN.DLG
BEGIN 6 END // 6
/* Does this divert from ~CAEHAN~ 6 ?  It should be the only diversion away from the original. */
BEGIN 1 END // 1
/* There is only this one transition, so hopefully this is correct? */
BEGIN //
/* Not sure if the end of the transition should still go here or not.  Will it transition if so?  Or will putting it after the changes cause the dialogue to revert back to the original after it should have stopped altogether? */ 
 
APPEND ~JAYLOS~

IF ~~ nkJaylos
SAY ~[JAYLOS] All right, everyone, just calm down.~ /* copied from original */
++ ~[PC] You don't know the naa-aame, you don't know the naa-aame.~ EXTERN ~JAYLOS~ 13 /* copied from original */
+ ~Gender(Player1,FEMALE)~ + ~[PC] Maybe I know the name very, very well!  Maybe it's MY name!  Maybe I'm the contact!~ EXTERN ~JAYLOS~ 15 /* copied from original */
+ ~Gender(Player1,MALE)~ + ~[PC] Maybe I know the name very, very well!  Maybe it's MY name!  Maybe I'm the contact!~ EXTERN ~CAEHAN~ 7 /* copied from original */
++ ~[PC] Listen to your pal, friend.  You are in big trouble.~ EXTERN ~JAYLOS~ 2 /* copied from original */
++ ~[PC] How DO I know you really know the name?  You could just be trying to get me to talk.~ + nkJaylos1 /* single response going to new dialogue */
END

IF ~~ nkJaylos1
SAY ~[JAYLOS] I guess we'll find out soon enough.~
IF ~~ THEN DO ~SetGlobal("JaylosSpawn",AR0511",2)CreateCreature("BODFGT03",[652.814],10) ~EXTERN ~nkGracen~
END

IF ~~ nkJaylos2
SAY ~[JAYLOS] Now wait just a minute!  WE were here first!~
IF ~~ EXTERN ~nkGracen~ 2

IF ~~ nkJaylos3
SAY ~[JAYLOS] I knew you didn't know the name, SPY!~
++ ~[PC] No, you are the spies!  Let's get them, Gracen!~ EXTERN ~BODFGT03~ 2
END

END // of APPEND to JAYLOS.DLG

APPEND ~BODFGT03~

IF ~~ nkGracen
/* Can I call the file nkGracen if it gets appended to BODFGT03?  Or should it be nkBodfgt03? I'm trying to avoid having his variable end in a number because it gets confusing with the state numbers */
/* Not sure if Gracen should be called by his creature name, BODFGT03, or his actual name in [GRACEN] wherever he speaks */
SAY ~[GRACEN] What's going on here?  I'm Gracen.  Were all of you to meet me here?~
++ ~[PC] WE were.  I don't know what these two are doing.~ EXTERN ~nkJaylos~ 2
++ ~[PC] Actually, we're here to teach you a lesson for crossing the Shadow Thieves.~ + nkGracen1
++ ~[PC] What happened to using your name for the password?~ EXTERN ~nkJaylos~ 3
END

IF ~~ nkGracen1
SAY ~[GRACEN] I shall make sure you cannot report what you have seen!  Time to die, fools!~
IF ~~ JOURNAL ENTRY ~Aran's tasks to receive the Shadow Thieves' aid


The defectors from the Shadow Thieves have been killed and the contact who had come to collect them attacked me.  I discovered that the rival guild is based in the Graveyard District, but little else.  Hopefully, this is all the information that Aran Linvail requires.~ EXIT
END // of ALTER_TRANS CAEHAN

IF ~~ nkGracen2
SAY ~[GRACEN] Keep your voices down!  We should not wait here long.  Your new berth is beneath the graveyard district, behind the blue stone doors.~
++ ~[PC] That's all we needed to know.  Now you shall feel the wrath of the Shadow Thieves.~ EXTERN ~BODFGT03~ 7
++ ~[PC] Might I ask what our reward was to be again?  I would like it clarified.~ EXTERN ~BODFGT03~ 8
++ ~[PC] Well, we shall be on our way, then.~
IF ~~ JOURNAL ENTRY ~Aran's tasks to receive the Shadow Thieves' aid


I have successfully posed as a defector from the Shadow Thieves and met the contact, although I have learned little beyond the fact that the rival guild is based in the Graveyard District.  Hopefully, this is all the information that Aran Linvail requires.~ EXIT
/* Gracen does not respond if he is fooled; he, Jaylos, and Caehan simply leave */
END // of ALTER_TRANS CAEHAN

END // of APPEND to BODFGT03.DLG

P.S. - Miloch suffers from Orcish Modesty. He is generally right, and uncommonly logical - there are mods out there (and I have coded for some) that use WEIGHT #-2, -3, etc, even -99, and they work exactly as Miloch says, pushing each higher n the order than others with higher numbers in relation to each other. Ignore them, though. The only reason someone is doing that is that they are modifying an existing mod quickly, playing with weight order in relation to other weights. Usually over many complicated files. The better way to do it is to actually recode your stuff in the correct order of install, the use -1 to get the important stuff up to the top of existing vanilla content when you need to. It will save you hassle when troubleshooting, believe me - write in evaluation order. Domi used to say "build backwards, end to beginning, and make sure that each condition does not block everything else unless it absolutely has to" or something like that.


I don't believe I have any instances where the game has to check for some event before calling the correct dialogue. There is one involved in this scene (something about neutral or friendly; it's not obvious to me what it's talking about), however it comes up before my changes take effect, so the original should (hopefully) cover it. Once my changes take place, they are already talking.

The only problem I can foresee is that Gracen might not start talking at the right moment, since I am creating a new spawn for him. In the vanilla game, he spawns in the hallway and doesn't start talking until he walks into the room or sees you.

I did the coding to begin with by looking at the tutorial here at SHS. It, like your NPC creation blog, used the example of a new NPC. The problem with that as applied to what I am doing is that if you are creating a whole new character, you can't possibly reference stuff that character said in the vanilla game. I know I could re-write it all, but that seems excessive, considering I am making minimal changes to the dialogue in the first place.

THANK YOU!!

Edited by Carinna, 13 December 2009 - 10:48 AM.


#30 Carinna

Carinna
  • Member
  • 19 posts

Posted 13 December 2009 - 01:33 PM

This has gone from being a request for content to a "please help me with this mod" -- so I am moving it over to the "mod help" forum.

THANK YOU AGAIN to everyone for your help here!

#31 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 13 December 2009 - 02:19 PM

Sorry I'm late with the helpful hints. Went away for a few days and came back to find that this went from a request for someone to make such a mod to an actual plan to make the mod yourself. Bravo! That's the best way to get what you want.

If I'm not too late to make a suggestion, I'd sit down and identify the specific places in the game where you want to be able to solve a quest without killing somebody. Make a list and publish it. Include as much information as you can about each item, including possible alternatives and possible alternate rewards. For example, "Sahuagin City, PC must kill the mad king or the prince to progress. Both instances require much death and destruction througout the city, since all area sahuagin attack PC on sight. The high priestess gives PC an orb. Script it so the orb renders hostile sahuagin non-hostile unless either prince or king is attacked. The prince gives the PC a potion to drug the king. Place a new sahuagin, a chamber servant, near the king who can take the king out of action without turning the court hostile. The king is then drugged, presumaby placed in captivity, and out of gratitude, the prince allows the party to progress to the next area. If they attempt to kill the prince to get the wave halberd, though, the city goes hostile, same as before."

This makes it easier for other modders to see what you want and possibly help you out. If I saw an alternative quest laid out like that, I might even be tempted to take on that specific quest, since it's a project of manageable size with a clear objective and a definite plan.

"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


#32 Carinna

Carinna
  • Member
  • 19 posts

Posted 13 December 2009 - 06:03 PM

If I'm not too late to make a suggestion, I'd sit down and identify the specific places in the game where you want to be able to solve a quest without killing somebody. Make a list and publish it. Include as much information as you can about each item, including possible alternatives and possible alternate rewards. For example, "Sahuagin City, PC must kill the mad king or the prince to progress. Both instances require much death and destruction througout the city, since all area sahuagin attack PC on sight. The high priestess gives PC an orb. Script it so the orb renders hostile sahuagin non-hostile unless either prince or king is attacked. The prince gives the PC a potion to drug the king. Place a new sahuagin, a chamber servant, near the king who can take the king out of action without turning the court hostile. The king is then drugged, presumaby placed in captivity, and out of gratitude, the prince allows the party to progress to the next area. If they attempt to kill the prince to get the wave halberd, though, the city goes hostile, same as before."

This makes it easier for other modders to see what you want and possibly help you out. If I saw an alternative quest laid out like that, I might even be tempted to take on that specific quest, since it's a project of manageable size with a clear objective and a definite plan.


Thank you, I will do that. I've already gotten the first part of the game done that way for myself (though I didn't include the Sahuagin City since you can go directly to the Underdark from Spellhold). I love your solution, though, so might like to use it (with credit, of course; if you don't mind) in a possible later version. Right now I'm trying for the minimum necessary to get through the game, regardless of PC choice. It gets harder, though once you get to the Underdark.

QUESTION: How do you get the door out of the Underdark open without having help (willing or unwilling) from Adalon? This is a question about the vanilla game.

Also, I've moved this topic over to here:
http//www.shsforums.net/index.php?showtopic=43670
since it is now a request for modding help.

Again, THANK YOU! I'm hoping trying that will help with the parts of the mod I really can't do. :)

#33 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 13 December 2009 - 07:49 PM

I'm not the most advanced coder out there. I'm not even in the top 500. If I wanted to get that area transition unlocked without Adalon, I'd look at how it's done *with* Adalon and move forward from there. In all likelihood, I'd see if there was a way that I could use her still and not have to do the fake eggs thing. Basically, I'd look for a workaround that involved the least game-tweaking necessary.

By the way, you do know that you don't have to kill anybody besides golems to get the egg switch done, right? You go to do the egg thing and Solaufein meets you and says "Use these eggs instead. And by the way, take my fake piwalfi cloak so Phaere thinks I"m dead." Nobody but the Matron Mother and Phaere die, and I figure they had it coming, anyway, since one encourages the party to kill innocents and the other forces my male PC to betray his manipulative avariel/domineering c***/Viconia and bed a really slutty drow. The last two euphamisms are meant to show that bad things exist even in the so-called innocent version. Few object to the Aerie or Jaheira romances, despite the fact that one is manipulative in the extreme and the other forgets her late, mutilated husband in a matter of days just because her former foster-son is hot. So... you'd be sparing Solaufein, taking false evidence to Phaere, not killing a single innocent dragon, and still getting the evil drow killed by the demon they gate in. If you wanted to avoid the whole gating sequence, that's another quest, and another set of parameters to work around.

"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


#34 Carinna

Carinna
  • Member
  • 19 posts

Posted 14 December 2009 - 08:56 AM

I'm not the most advanced coder out there. I'm not even in the top 500. If I wanted to get that area transition unlocked without Adalon, I'd look at how it's done *with* Adalon and move forward from there. In all likelihood, I'd see if there was a way that I could use her still and not have to do the fake eggs thing. Basically, I'd look for a workaround that involved the least game-tweaking necessary.

By the way, you do know that you don't have to kill anybody besides golems to get the egg switch done, right? You go to do the egg thing and Solaufein meets you and says "Use these eggs instead. And by the way, take my fake piwalfi cloak so Phaere thinks I"m dead." Nobody but the Matron Mother and Phaere die, and I figure they had it coming, anyway, since one encourages the party to kill innocents and the other forces my male PC to betray his manipulative avariel/domineering c***/Viconia and bed a really slutty drow. The last two euphamisms are meant to show that bad things exist even in the so-called innocent version. Few object to the Aerie or Jaheira romances, despite the fact that one is manipulative in the extreme and the other forgets her late, mutilated husband in a matter of days just because her former foster-son is hot. So... you'd be sparing Solaufein, taking false evidence to Phaere, not killing a single innocent dragon, and still getting the evil drow killed by the demon they gate in. If you wanted to avoid the whole gating sequence, that's another quest, and another set of parameters to work around.


I have no objection to Phaere and Ardulace getting killed by the demon.  What I want to prevent is having the party be killers (I couldn't stop Phaere and Ardulace short of killing them anyway), though I don't mean they (the party) can summon hordes of whatever and have the summons do the killing, either.   IMO Phaere and Ardulace made their own decisions; they're adults.  Even if Phaere was tortured to make her the way she is, there is nothing to be done about it now.

I realize that for the end quest of getting the eggs, no one has to die (and I don't kill anyone to do it, either).  However, to get to that point, you have to provide the blood of something that was formerly living to Ardulace.  If you don't, Phaere will never give you access to the eggs (unless I am missing something).  The only way to get that blood would be to kill who it belonged to.

I don't like any of the romances, either, for the reasons you mention (nor do I like Anomen, whose bloodbath would scare me away permanently in real life, even if I could stand his personality up until then).

Anyhow, thank you, and I am trying to do the least invasive method possible.  I just wasn't sure if there was some way to open the doors without seeing Adalon first.  You mention some other quest as an alternative.  What is that?

Edited by Carinna, 14 December 2009 - 12:59 PM.


#35 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 14 December 2009 - 02:15 PM

One of the items you can use to satisfy the "body part" requirement is the eyestalk of an elder beholder. Zyraen's Miscellany offers Ust Natha accelerator that lets you avoid most of the killing in the Underdark, and lets you walk a short distance to kill one beholder. Since beholders are abominations, and since your character doesn't seem to mind killing abominations, that should work.

In the meantime, I'll wait to see some of the other parts of the game you think might be improved by alternative quest solutions. It's possible that I can help you with some of them.

Edited by berelinde, 14 December 2009 - 02:27 PM.

"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


#36 yarpen

yarpen

    Drunken Superhero

  • Member
  • 257 posts

Posted 16 December 2009 - 09:05 AM

Yes, for additional dialogue options based on Intelligence/Wisdom/Charisma trio. I think that mod looks very promising, especially when your character is a Paladin and should avoid killing humanoids (with very few exceptions). I'd love to see a possibility of making enemy uncoscious or fleeing from battlefield - and granting to character xp value similiar to those from killing (even a bit larger because you don't get fallen enemie's loot). I think that Sword Angel kit has something like this. I hope that amount of alternative solutions will increase. (Berelinde, short question, weren't you making mod known as Alternatives?)

#37 Carinna

Carinna
  • Member
  • 19 posts

Posted 16 December 2009 - 02:04 PM

One of the items you can use to satisfy the "body part" requirement is the eyestalk of an elder beholder. Zyraen's Miscellany offers Ust Natha accelerator that lets you avoid most of the killing in the Underdark, and lets you walk a short distance to kill one beholder. Since beholders are abominations, and since your character doesn't seem to mind killing abominations, that should work.

In the meantime, I'll wait to see some of the other parts of the game you think might be improved by alternative quest solutions. It's possible that I can help you with some of them.


Thank you.  I am currently working on finding all the remaining places in SoA that require a kill before the game will proceed (I'm about to go to Suldanessallar, so hopefully it won't take much longer).  Although I originally stated that in my case I didn't mind killing golems, undead, or extra-planar creatures not on their home plane, I thought for this mod that I should provide alternatives for killing for as many types of creatures as possible, to give the most role-playability to others who might want to be more restrictive than I was.  I wouldn't mind coming up with some way to not kill the vampires, either, but can't think of a convincing method or reason for doing so (at least, not without creating a much, much more involved mod than I want to for my first try).  So I am passing undead off as "dead already" for at least the first version of this mod.  All that is to say that I really don't want to be forced to kill beholders, either.  But I believe I've already come up with a simple solution for not needing to kill to exit the Underdark (will post with other solutions when I finish SoA again).


Yes, for additional dialogue options based on Intelligence/Wisdom/Charisma trio. I think that mod looks very promising, especially when your character is a Paladin and should avoid killing humanoids (with very few exceptions). I'd love to see a possibility of making enemy uncoscious or fleeing from battlefield - and granting to character xp value similiar to those from killing (even a bit larger because you don't get fallen enemie's loot). I think that Sword Angel kit has something like this. I hope that amount of alternative solutions will increase. (Berelinde, short question, weren't you making mod known as Alternatives?)


Thank you!  It's nice to know there could be someone besides me playing this when it's finished!  As far as making an enemy unconscious, there is already a mod to get quest (and other) items from them (providing the items are carried items and not blood or their head or something).  It's not on the mod downloads page, though, since the author never moved it from there.  Try Kwait_W's "search body" mod. Rendering someone unconscious so Kwait's feature can be used is somewhat problematic, however.

The changes I envision could be based on Wisdom/Charisma when a dialogue is necessary to prevent hostility, but I will need much more help in writing the conditions for the dialogue if it is done that way.  Other changes don't require any interaction and would just be added to the game for anyone (doors being unlocked, for instance).

Edited by Carinna, 16 December 2009 - 02:06 PM.


#38 yarpen

yarpen

    Drunken Superhero

  • Member
  • 257 posts

Posted 16 December 2009 - 03:16 PM

I don't like KwiatW's solution because it's far from vanilla game and rules. I'm thinking in how many situations player is forced to kill someone to get an item. If there's not so many of this sort of situation, additional dialogue when character is helpless (unsoscious, charmed, held etc.) would suit the game just fine. Even not for pacifist players, solution of beating someone with barehands (not as Monk!) and THEN using some negotiations would be appreciated.

#39 Carinna

Carinna
  • Member
  • 19 posts

Posted 16 December 2009 - 03:34 PM

I don't like KwiatW's solution because it's far from vanilla game and rules.


Ah.  I like it because it seems more realistic.  In real life, if you rendered someone unconscious, you could go through their stuff and take what you wanted.  In BG, you have to kill them to do that if you don't use KwaitW's mod (or one like it, if there is another).  But not everyone thinks like I do, I know.

I'm thinking in how many situations player is forced to kill someone to get an item. If there's not so many of this sort of situation, additional dialogue when character is helpless (unsoscious, charmed, held etc.) would suit the game just fine. Even not for pacifist players, solution of beating someone with barehands (not as Monk!) and THEN using some negotiations would be appreciated.


Well, for the first version, I am only concerned with the main line quests that you MUST do to complete the game.  For those there are only about 3 places (maybe another in Suldanessallar; I'll be sure after I play through it this time) you need to, not counting killing vampires (or Irenicus or his Tree-of-Life parasites).  If I enjoy doing this one and I get much better at modding, then I will probably upgrade it to add more no-kill options to the side quests that require a gratuitous kill right now.

This reminds me:  To avoid fighting the black dragon in Suldanessallar, does anyone know if there is a minimum Charisma or other stat requirement (or minimum gold/treasure requirement)?

Edited by Carinna, 16 December 2009 - 03:36 PM.


#40 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 16 December 2009 - 03:51 PM

This reminds me: To avoid fighting the black dragon in Suldanessallar, does anyone know if there is a minimum Charisma or other stat requirement (or minimum gold/treasure requirement)?

You need to have at least 30k gold. There are no other requirements for buying off the dragon.