14 posts / 0 new
Last post
qwertyasdfgh
qwertyasdfgh's picture
Moderator
Offline
Last seen: 2 months 4 weeks ago
Joined: 12/15/2011 - 05:50
Karma: 1819
[Tutorial] Using player and NPC names in dialogue (Morroblivion v063 and later)

This isn't really a tutorial, just a small set of instructions for people who would potentially work with dialogue in Morroblivion.

Starting from v063 master you can use dynamic text - player and NPC names - in dialogue responses. To do so insert the following expressions in the response:

  • &sUActnQuick1; - for player name
  • &sUActnQuick2; - for talking NPC name

Syntax is important, i.e. it should always start with "&" symbol and end with semicolon. All the necessary scripts are already in the master, so you don't need to do anything else.

Note on formatting: name will be inserted with a space in front of it, so you don't need to put extra space in there.

Example: The following line:

Greetings,&sUActnQuick1;! My name is&sUActnQuick2;.

When spoken by Caius Cosades to default player will translate into:

Greetings, Bendu Olo! My name is Caius Cosades.

Morrowind used similar method, but it was built into the engine rather than scripted. Currently, most of the dialogue in Morroblivion master still uses generic "outlander" instead of player name, but now it can be changed.

Brainslasher
Brainslasher's picture
Contributor
Offline
Last seen: 2 months 1 week ago
Joined: 05/19/2013 - 11:46
Karma: 718
And I thought his wasn't even

And I thought his wasn't even possible :D .Thanks for the tutorial. Do you have any plans to go through the dialogues to change it back or is there a way to do it automatically? Otherwise I might take a shot at it, though it looks like a really big task.

Oh and also, is it possible to implement factions or faction ranks that way?

qwertyasdfgh
qwertyasdfgh's picture
Moderator
Offline
Last seen: 2 months 4 weeks ago
Joined: 12/15/2011 - 05:50
Karma: 1819
No, I'm afraid it has to be

No, I'm afraid it has to be done manually. I've only replaced a few instances in v063 master to show how it would work.

You can do a text search in Morrowind CS for "%PCName" and "%Name" to see all responses using it.

Oh and also, is it possible to implement factions or faction ranks that way?

Unfortunately, no. In Morrowind NPC could only ever be a member of 1 faction, so it was possible. In Oblivion you can add NPCs to as as many factions as you want, so there is no way to detect which one to display.

llde
llde's picture
Member
Offline
Last seen: 2 weeks 4 days ago
Joined: 09/17/2013 - 07:04
Karma: 361
I'm planning to update the

I'm planning to update the bloodmoon MQ dialogue, the one that I know, to use this.

Only for curiosity: Which is the script that take care of this?

qwertyasdfgh
qwertyasdfgh's picture
Moderator
Offline
Last seen: 2 months 4 weeks ago
Joined: 12/15/2011 - 05:50
Karma: 1819
Parts of

Parts of mwMorroDefaultQuestScript and mwNPCActivateHandler.

zilav
zilav's picture
Contributor
Offline
Last seen: 2 months 1 week ago
Joined: 11/26/2012 - 12:51
Karma: 1338
Here is a sorted list of all

Here is a sorted list of all dialog lines from Morrowind and DLCs containing either %Name or %PCName

http://s217773845.onlinehome.us/files/Morrowind/MorrowindDia...

I can probably write a script in TES4Edit that can use fuzzy matching to find corresponding dialog lines in morroblivion if anyone is interested.

Brainslasher
Brainslasher's picture
Contributor
Offline
Last seen: 2 months 1 week ago
Joined: 05/19/2013 - 11:46
Karma: 718
Wow, that's a long list. I

Wow, that's a long list. I certainly would be interested in a script that can do the work for us.

qwertyasdfgh
qwertyasdfgh's picture
Moderator
Offline
Last seen: 2 months 4 weeks ago
Joined: 12/15/2011 - 05:50
Karma: 1819
If such thing is possible

If such thing is possible that would be amazing. However, responses were often changed in different ways to remove the %PCName and other such things - can a script detect that? 

BTW, some of these responses could be missing from our master - ESPconvereter did quite poor job at converting dialogue, so a lot had to be recreated by hand.

zilav
zilav's picture
Contributor
Offline
Last seen: 2 months 1 week ago
Joined: 11/26/2012 - 12:51
Karma: 1338
I'll take a look later,

I'll take a look later, however I need someone to PM me the latest morroblivion_ob.esm. I only have old version from 2012 that was converted to Skywind, and assume it is severely outdated by now.

Evil Metro
Evil Metro's picture
Member
Offline
Last seen: 5 months 6 days ago
Joined: 05/10/2011 - 17:19
Karma: 55
Couldn't this method be used

Couldn't this method be used to make the identification papers at the Census and Excise office say the player's name instead of saying "Prisoner"? Or does this only work for NPC dialogue?

llde
llde's picture
Member
Offline
Last seen: 2 weeks 4 days ago
Joined: 09/17/2013 - 07:04
Karma: 361
Only NPCs dialogue for now

Only NPCs dialogue for now and quest stage. Game settings cannot be used in books.

Rhyalto
Rhyalto's picture
Offline
Last seen: 5 months 2 weeks ago
Joined: 04/06/2017 - 05:20
Karma: 1
Ok, this post is really old

Ok, this post is really old so this is necromancy, but have some suggestions:

- First at all, sorry my English spelling

- I think inserting the space before the name is unnecessary, and it makes editing a bit confusing:

       "Greetings, &sUActnQuick1;! My name is &sUActnQuick2;."  -- It more "readable" than "Greetings,&sUActnQuick1;! My name is&sUActnQuick2;."

- Labels could be more descriptive itself. ie: &sUActnPCName; instead &sUActnQuick1;

- May be there is a way to insert player faction rank, by checking speaker faction  and the player rank in that faction, but won't work if speaker belongs to couple factions (which shouldn't be the case in Morrowind NPCs, I think).

- I have tried to modify the books by adding a script to replace the label, but its not working because I need to modify the base objects, and seems I can't. By the way, I know a very few basis about script programming so really I didn't think I could make it working, but was fun trying it :)

 

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 1 hour 47 min ago
Joined: 07/22/2016 - 05:01
Karma: 535
Rhyalto wrote:

Rhyalto wrote:

Ok, this post is really old so this is necromancy, but have some suggestions:

Actually, I think necro-posting can very useful and relevant when it comes to Morroblivion development.  Many of the active contributors have moved on to other projects, so a lot of great features and ideas can get overlooked by relatively new members to this forum.  The main danger is in discussing topics that are now deprecated or irrelevant due to changes in more recent versions -- regarding this Player and NPC names, though, I think the code is still working as designed (as of Morroblivion v064).

- About label names: these names were not chosen by Morroblivion devs -- they are hardcoded into the engine and the scripts that were written just take advantage of them.

I'll start playing around with the script code and figure out what the engine can and can't do regarding changing the label names but I fear that I'll just be re-doing the work that was originally done 3 years ago -- ie, finding out that it can't be done.

llde
llde's picture
Member
Offline
Last seen: 2 weeks 4 days ago
Joined: 09/17/2013 - 07:04
Karma: 361
There is a very small subset

There is a very small subset of GameSettings that can be used in dialogue.

I tried myself some time ago.

While there exists ways to create new gamesettings they are not usable in dialogues. The code that manage them is not fully understood yet. I belive they are somehow hardcoded into the routines that manage text. They are mainly used to shown into the tutorial (or planned to use them).

If there is a person that know more about this is Tiawar.

Note: I should have to check if it's possible to use a OBSE plugin to access the RAW string of the dialogues. If this is possible it may be possible to modify it.