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.

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?
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.
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.
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?
Parts of mwMorroDefaultQuestScript and mwNPCActivateHandler.
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.
Wow, that's a long list. I certainly would be interested in a script that can do the work for us.
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.
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.
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?
Only NPCs dialogue for now and quest stage. Game settings cannot be used in books.
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 :)
Rhyalto wrote:
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.
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.
Bump
This Tutorial is still relevant as of v065
In mwNPCActivateHandler, why are the reference for the names inserted in sMouseButton7/sMouseButton6 instead of being directly inserted in sUActnQuick1/sUActnQuick1?
With v066, I tried replacing:
SetStringGameSettingEX "sMouseButton7|%n" activatingRef
SetStringGameSettingEX "sMouseButton6|%n" activatedRef
With :
SetStringGameSettingEX "sUActnQuick1|%n" activatingRef
SetStringGameSettingEX "sUActnQuick2|%n" activatedRef
And it fixes the I'mpush Button 6 problem. However, I don't know the ramification of such a change and don't know if this is a real solution.
It seems to only work once at game launch, it stops working when the true cause of the problem changes back the value.