Template talk:U4NPCDialog
Turns Away[edit]
Needs one more optional parameter, turns. This is the chance the character will turn away from conversation. This is coded as n/256 chance, but the I think the template should accept a simple integer and rendered as percentage:
{{U4NPCDialog | name=Joe | turns=12 | pronoun=He | look=A drunken fighter | job=Yo ho ho... and a bottle... of rum... hic... | health=And a bottle of... | keyword0=STON | response0=The yellow stone is in the dungeon Despise... | keyword1=RUM | response1=Rum... hic... | trigger=RUM | question=Give me rum?... | yes=Thanxth... my friend Joe can help with the stones... hic... | no=Ah, be a joe! }}
NAME | Joe |
Turns away | 12% |
Pronoun | He |
LOOK | A drunken fighter |
JOB | Yo ho ho... and a bottle... of rum... hic... |
HEALTH | And a bottle of... |
STON | The yellow stone is in the dungeon Despise... |
RUM | Rum... hic... |
Trigger | RUM |
Question | Give me rum?... |
YES | Thanxth... my friend Joe can help with the stones... hic... |
NO | Ah, be a joe! |
- The thing about that is, I think there's more to do w/it than the turns-away probability. I think it also determines the likelihood of "en guard fool!". I've been calling it the "patience index".
- It seems to be purely a "Foo turns away" mechanic. The dice are rolled once at initiating conversation, and again each time the player says something to the character. For example, JOE might respond to RUM by turning away rather than asking his question. I like JOE. One possible answer to his question reveals one of his keywords, which is a rare thing in Ultima IV. Uniblab (talk) 02:17, 9 September 2021 (UTC)
- But if we're giving this much data on NPCs, why stop there? You can't improve your Honesty in conversations, can you? I'm pretty sure there's the opportunity to improve Sacrifice w/some of them. W/the beggars, you can "GIVE" and improve Sacrifice that way. Other than that, the only special keyword I can think of is "JOIN".
- Only Humility is impacted by conversations. GIVE is a separate mechanic, but yes that impacts Sacrifice at a fixed rate no matter how much or little you give. Bear in mind there is a cool-down timer for the Humility and GIVE impacts; i.e., the game won't let you grind Humility or Sacrifice by just parking next to someone and talking over and over. Uniblab (talk) 02:17, 9 September 2021 (UTC)
- I was thinking of tagging the 8 who can join somehow, something unobtrusive a la the ankh for Humility, but I think that could go in the page summary/header/legend. The JOIN responses are all in avatar.exe, so those can also be stated just once in the page summary/header/legend. Uniblab (talk) 02:17, 9 September 2021 (UTC)
- BTW, I'm not a big fan of links in titles and try to avoid it when possible. I think I'm going to change this template so as to try to link the NPC's name to the corresponding article.--The Ultra-Mind (talk) 20:50, 6 September 2021 (UTC)
- I think there ought to be a link to their biography page, but some of our biographies don't match directly to the character's name as it is in the TLK file, so I can't just rely on an automatic tool to provide the target; I'll need to proof-read things. Uniblab (talk) 02:17, 9 September 2021 (UTC)
- But you realize that this "en guard fool!" reaction does happen w/these impatient NPCs, right? I had a bum Apple ][ disk once where I think it was Rob Frazier's patience index was all screwed up and he'd usually attack me on the spot, but with enough repetition, I was able to force a situation where I'd get "he turns away". But even with a working game, you can still find yourself drawn into combat with these NPCs. I believe that would only happen when conversation is initiated.
- If you're sure about the cool down, maybe it should be mentioned in a "Game Mechanics" section or something.
- You're right about the naming of NPCs' articles. That's why I've been modifying other templates to override the automatic linking and formatting of parameters. I'll just have to do the same thing w/this one.--The Ultra-Mind (talk) 14:18, 9 September 2021 (UTC)
- Is true. 16 steps for giving for compassion, 16 steps for humility and 100 for spirituality from Hawkwind. Surprising sacrifice from giving blood doesn't have a cool down; guess giving blood was enough. I can give code links for a source of anyone would like. -- Fenyx4 01:15, 11 September 2021 (UTC)
- Although I should add that it isn't exactly that number. It is, for example, currentSteps/16 != previousAttemptSteps/16. Which means if you did it on step count 31 and then on 32 you would get a gain both times even though they are 1 apart. -- Fenyx4 01:22, 11 September 2021 (UTC)
- Is true. 16 steps for giving for compassion, 16 steps for humility and 100 for spirituality from Hawkwind. Surprising sacrifice from giving blood doesn't have a cool down; guess giving blood was enough. I can give code links for a source of anyone would like. -- Fenyx4 01:15, 11 September 2021 (UTC)
- I think there ought to be a link to their biography page, but some of our biographies don't match directly to the character's name as it is in the TLK file, so I can't just rely on an automatic tool to provide the target; I'll need to proof-read things. Uniblab (talk) 02:17, 9 September 2021 (UTC)
I went ahead and implemented it, although, I wish I could say it was as easy as several iterations of regex. I made the trigger parameter optional, since we don't have any data for it. Anyone who wants to introduce that "turns" ratio is welcome to.
You'll notice that I switched from using MediaWiki markup to HTML. Even though it shouldn't have been necessary according to some of our existing templates, whenever I tried to use a parser on rows (a la {{#ifeq: }}) it made a huge mess. According to something I read, the answer is HTML.--The Ultra-Mind (talk) 13:38, 6 November 2021 (MDT)