I am working on a series of dialogs that are influenced by a decision not to share information about who is sabotaging the castle construction with Burne. By using global variable 240 for this I aim to have; a. Burne's apprentice decline to trade with the PCs on orders from Burne. b. The innkeeper charges the PCs 5gp instead of 2 gp. A successful gather information check may reveal that this was requested by Rufus. c. The captain of the guard will react negatively to the PCs. d. The Evil traders will react postively to the PCs. (having learned that they declined to share information about their activities with burne). They may even offer them a place to rest - in their barn - as long as they remain on good terms with them. Question - What is the id for burnes apprentice that sells scrolls and magic items to the PCs? The apprentice does not have a name and the one NPC named Burnes Apprentice is Prisella, a sorcerer - not the apprentice that sells magic items to PCs.
You can look it up with the ToEEWB, probably by loading in the MOB file associated with the apprentice. Also, a couple of note on dialogue editing, since you seem to be intent on doing lots of it: 1. For voiced NPCs, it is desirable to avoid adding mute lines. The reason is that it creates a clear and ugly seam between the mod and vanilla. I stopped shy of saying it's absolutely mandatory, because there are already several such additions, but do bear that in mind if you intend to add a substantial amount of dialogue. Note that for some things, with a little crafty editing, you can make do by editing existing audio. For substantially complex dialogue, though, I'm afraid it's quite problematic, so please consider reducing it to minimum, delegating lines or whole ideas to unvoiced/new NPCs, etc. 2. Please keep the dialogue node numbers spaced, especially for primary nodes, to allow room for expansion. Good luck! And have fun modding.
One technique I've started using to soften the blow of unvoiced dialog is to use simple existing voiced dialog for part of more complex custom dialog lines. Let's say, for example, you want Burne to reprimand the player for being bad, and let's say that Burne already has voiced dialog somewhere in which he says "Bollocks!" What you can do is write your new line of dialog with the "bollocks" exclamation added ("Bollocks, @pcname@, you are an ass-turd!"), and make a separate audio file for that line which copies only Burne's earlier "bollocks" exclamation. So the player will read "Bollocks, you are an ass-turd!" while hearing only "Bollocks!" As I say, it's imperfect, but it softens the blow. I'll look up the seller's proto for you later ... it's basically a generic proto that is used for all these new sellers (Otis, Screng, etc.), so you'll have to distinguish it in Burne's case by map number or something like that. Code: if (attachee.map == burne's basement): bollocks()
Well I lied about that - they do all have unique protos. Burne's assistant is 14453 and uses py00054generic_merchant (which is what they all have in common, so you'd still have to distinguish him by map or proto number or something).
Just a quick note to say thanks for the assistance and advice on creating new dialogs. I will work on incorporating speech where possible, trying to limit new dialogs to NPCs that don't speak much and allow for spacing between new dialog sections. After I increase my skill at dialogs, I will look into creating new NPCs and how to have them appear on existing maps based on the story state / quest status so that new NPCS appear in Hommlet as the story state advances. But for now, I will focus on learning more about dialogs. (the most important lesson thus far is the difference between == and =). For Burne; added flag 240 and the Fallen Paladin condition as I felt that withholding information is counter to a paladin's ethos (as is accepting a bribe from the traders to keep quiet and I added the fallen paladin condition there too). {140}{That's great news. Who was it?}{That's great news. Who was it?}{}{140}{}{} {141}{It was one of the peasant laborers. He was a spy for the traders, Rannos and Gremag. Apparently they are none too eager to see your castle completed.}{}{8}{}{150}{game.quests[15].state = qs_completed} {142}{Me find it was bad guy working for Rannos and Gremag. They bad people.}{}{-7}{}{150}{game.quests[15].state = qs_completed} {143}{On second thought, I'd rather not reveal who it was.}{}{8}{}{12062}{game.global_flags[240]=1,pc.condition_add_with_args("Fallen_Paladin",0,0)} {144}{Me not turn in bad guy.}{}{-7}{}{12062}{game.global_flags[240]=1,pc.condition_add_with_args("Fallen_Paladin",0,0)} For Smith; added {3}{B:I'd like to browse your wares.}{}{1}{npc.has_met( pc ) and game.global_flags[240]==0}{0}{pc.barter(npc)} {4}{I'd like to browse your wares.}{}{1}{npc.has_met( pc ) and game.global_flags[240]==1}{550}{} {550}{I'm busy, come back next week.}{I'm busy, come back next week.}{}{}{}{} {551}{Why?}{}{1}{pc.skill_level_get(npc,skill_gather_information)>=6}{560}{} {554}{K:}{}{1}{}{20}{} {555}{F:}{}{1}{}{0}{} {560}{Lord Burne says you are not welcome in Hommlet.}{Lord Burne says you are not welcome in Hommlet.}{}{}{}{} {561}{K:}{}{1}{}{20}{} {562}{F:}{}{1}{}{0}{}
Can you spot an error in the code below. I am stumped. Lines 800, 807 and 808 work. The others don't and I can't spot the error - if I change the intelligence check to 1 it works, with -7 and 8 it does not work. {800}{Five gold will get you a small room upstairs for a night.}{Five gold will get you a small room upstairs for a night.}{}{}{}{} {801}{5 gold! It was 2 gold the other day.}{}{1}{pc.skill_level_get(npc,skill_gather_information >=2}{820}{} {802}{Okay. Here's the five gold.}{}{8}{pc.money_get() >= 500}{115}{pc.money_adj(-500)} {803}{Okay. Here's five gold.}{}{-7}{pc.money_get() >= 500}{115}{pc.money_adj(-500)} {804}{I'm a little short}{}{8}{pc.money_get() <= 500}{80}{} {805}{Me wish I had five gold.}{}{-7}{pc.money_get() <= 500}{80}{} {807}{K:}{}{1}{}{100}{} {808}{E:}{}{1}{}{0}{}
801's got a space where there shouldn't be one: Code: pc.skill_level_get(npc,skill_gather_inf[B][COLOR="Red"]_[/COLOR][/B]ormation >=2 It should be: Code: pc.skill_level_get(npc,skill_gather_information >=2 Also, a few tips: assuming you're editing dialog files in Notepad, use the Courier font. This is advantageous for spotting errors because it's one of those fonts that strictly uses the one-space-per-character rule, no matter what character, unlike most others where the display is fluid (and thus not easily read with an eye for inconsistencies). Tip #2: when posting dialog/code here on the boards, use the 'code' tags (the # sign in the post editor). This automatically parses your code using the Courier font, which is helpful for the reasons stated above. (I used it for the two dialog lines above.) Tip #3: it's generally preferable to have spaces on both sides of > = < etc. type qualifiers. I'm pretty sure python works regardless, but having that kind of discipline will keep your code 'tighter' and help you to spot errors. So the line above should actually look like this, ideally: Code: pc.skill_level_get(npc,skill_gather_information >= 2
Here's my problem. The code below changes flag 240 to 1; however, it does not change it back to 0 in lines 141 and 142. game.global_flags[240] = 0 does not appear to change the flag state to zero game.global_flags[240] = 1 "works" Code: {140}{That's great news. Who was it?}{That's great news. Who was it?}{}{}{}{} {141}{It was one of the peasant laborers. He was a spy for the traders, Rannos and Gremag. Apparently they are none too eager to see your castle completed.}{}{8}{}{150}{game.global_flags[240] = 0,game.quests[15].state = qs_completed} {142}{Me find it was bad guy working for Rannos and Gremag. They bad people.}{}{-7}{}{150}{game.global_flags[240] = 0,game.quests[15].state = qs_completed} {143}{On second thought, I'd rather not reveal who it was.}{}{8}{}{12062}{game.global_flags[240] = 1,pc.condition_add_with_args("Fallen_Paladin",0,0)} {144}{Me not turn in bad guy.}{}{-7}{}{12062}{game.global_flags[240] = 1,pc.condition_add_with_args("Fallen_Paladin",0,0)} Any thoughts on why lines 141 and 142 will not change the flag back to 0? Or should I be using a Variable for this?
You should have a semi-colon between the conditions you want to set in the last set of brackets, not a comma: Code: {game.global_flags[240] = 0; game.quests[15].state = qs_completed}
Many thanks, I was trying everything to make it work - and the answer was so simple. What confused me was that lines 143 and 144 with the comma worked. PS: So far if the PCs have declined to tell Burne or Rufus who is altering the orders 1) Burne's apprentice will ignore the players (please let me go back to my duties - with edited sound file), 2) the innkeeper will charge the PCs more (5GP instead of 2GP as "Lord Rufus told me that you are not welcome in Hommlet") and 3) if a Paladin declined to share the information he will become fallen.
Dialog files for Withholding Information From Burne & Rufus on who is changing the construction orders. 1. Burne File with Flag 240 for not sharing information & Fallen Paladin Condition trigger Link 2. Rufus File with Flag 240 for not sharing information & Fallen Paladin Condition trigger Link 3. Dialog of Burne's Apprentice with Sound File and Python File where Prisella ignores the PCs if 240 is triggered. Link for Dialog File Python File (in SCR Folder) Sound File (for Speech Folder) 4. Innkeeper charges PCs 5GP a night, instead of 2GP a night if Flag 240 is triggered Link Note: The PCs can reverse these penalties by telling Rufus or Burne who has been changing their construction orders. This resets Flag 240 to 0. Note: After I extract the Python Script for the merchant in Burne's Basement I will add a dialog pointer so that the PCs who trigger Flag 240 can't purchase items from the apprentice in the basement, unless they have a high bluff skill. ********* I am considering giving the apprentice inventory - magic scrolls and potions that the PCs can acquire by slaying him or picking his pockets. These changes will make the game a bit more reactive to the PCs actions. Now if PCs anger a Lord of Hommlet they will face a slight; but not insurmountable, impediment to their activities as they find that they 1) can't hire Prisella, 2) can't purchase magical items from Burne's apprentice and 3) must pay more to rent a room.
Be careful with personal inventories ... the norm in ToEE is that all of a merchant's stuff dies with him. While this is unrealistic, it's sort of necessary in ToEE in order to distinguish between sellers' personal gear (e.g. the clothes they're wearing) and their merchandise. If they didn't have separate chests tied to the bartering routine, they'd sell you their own underpants. I suppose their chests wouldn't have to be invisible, but this seems to me like it would be exploitable in that it would encourage players to steal stuff all the time. And you'd get a huge windfall from some merchants by killing them. Ah Fong in Nulb comes to mind ... helping yourself to all the exotic stuff in his chest would make you very rich very early in the game. Plus, it's just not the established ToEE norm, which we like to stay with for the most part.
Thanks for the background on personal inventories and merchants. What are your thoughts on giving Burne's Apprentice in the basement of the keep 1 low level scroll in his inventory? f the PCs attempt to pick his pockets and don't get caught they gain access to a low level spell scroll of a spell; such as shatter (affects earth elementals), that they would not normally pick when a wizard levels up but which could be of great use. This scroll would not be available in his barter inventory.
That sounds fine to me. :thumbsup: The only thing I have concerns with is following through with what would seem to make sense in the real world and having their entire merchant inventory available. Even with Burne's guy, that would be a major stroke of good fortune for the player - all those scrolls to be scribed or sold or otherwise used as they see fit.
Merged all the files from post #11 into v7.2. Changes: Ostler will charge 4 gold instead of five for those who don't cooperate with Burne. This is for audio reasons, so he can say he's charging you "two and two gold," because he doesn't say five anywhere. Ostler will not mention Rufus when you ask him why so much. He'll only say he doesn't have time for chit chat. (Audio reasons.) Pishella's dialog won't say she has a conversation with Burne before she refuses to talk with you. This is in case Burne is dead. Being as nothing was ever added for Burne's scrolls seller downstairs, he will still happily trade with you no matter what.