OpenMW-CS and Companion Project 3.1 giving me fits - dialogue loop

Questions specific to OpenMW-CS can be asked, and content development related topics can be discussed here
Post Reply
User avatar
Darklocq
Posts: 48
Joined: 12 Feb 2017, 18:41
Location: California

OpenMW-CS and Companion Project 3.1 giving me fits - dialogue loop

Post by Darklocq »

So, I've installed Grumpy's Companion Project 3.1 (the ultimate basis for most companions that are functional in OpenMW), and followed the instructions (to the extent the Bethesda CS ones apply to OpenMW-CS) to create a customized companion – not a changing of the included one, but a new one. No matter what I do, I get a dialogue loop in response to every non-vanilla dialogue option (i.e., I get the Greeting 0 response), and have to use Goodbye in the console to even get out of the loop. My dialogue options appear, and so do the response items under them (e.g. a menu about following or not, and options to follow, stay put, or wander the immediate area, or dismiss the dialogue as a mistaken choice – any of those options including the latter, results in Greeting 0 being repeated, instead of the expected response.

I've started from scratch five times, in case I'm glitching it with typos or something.

What I'm doing:
  • Installed Companion_v3.1.esp in its own data dir, loaded it, and tested the sample companion it comes with, who is working flawlessly: PlaceAtPC->1gr_Comp2, 1, 100, 0
  • Opened this mod in OpenMW-CS, and duplicated this NPC, and customized it, with a new ID.
  • Gave it its own scripts, as copy-pastes of the originals, changed their names (in the mod and in their own Start lines); then changed the first script's references to the second script to reflect the name of my fork of the second script; then updated the second script internally for a self-referential StopScript command. The ReadMe says to do all of this, step by step. The only thing not applicable is the "click this, then that"-style noob instructions for navigating the GUI of Bethesda's CS app.
  • Created a new Greeting 0 for my companion.
  • Created a new Topic for follow/stay/guard commands that is the same as the original, just with its own name.
  • Duplicated the Topicinfos for the original commands, also at new names, now referring to the new Topic, and set to my new NPC as Actor, and also customized the text a little.
  • Did the same with the combat topic, and the "other" topic, and their Topicinfos.
  • Quadruple-checked everything; ran Verify.
  • Saved my mod-of-a-mod as a .omwaddon. Loaded it after the original mod. Both the original NPC and my new one (drq_Yenivaer) appear when added to the world via the console. Mine appears to work fine, until you try to do anything with her companion dialogue options; she will inventory-share, etc. The mod's original stock companion still works fine, followed me out of the room, and went and killed some hapless hostiles with me.
  • Started over. Did clean-saving routines. Fixed a bug in the original (one dialogue response was mistakenly set for females only), propagated this fix to my version. Also added the script names to the End commands at the end of the scripts, in case that might matter.
  • Exact same failure. Repeated several times, using different Topic names, same fail each time.
Archive: Here is a .ZIP file of my .omwaddon (a simplified one with only the follow/stay dialogue option, enough to demonstrate breakage). Everything I added can be found with an ID search on substring `drq_`.

What on earth could I be doing wrong? I'm a scripter for a living (bash, perl, PHP, etc.) so this is really making me feel like I suddenly got dain bramage. Been trying to debug this for over 8 hours, and I get the feeling there's some "secret trick" I don't know about. If I understood Morrowind Scripting for Dummies correctly, all the variables declared and used in the scripts are local, so do not need to have unique names. Now I'm wondering if the order in which I created the resources makes a difference (e.g., do I need to do NPC, then scripts, then greeting, then Topic, then Topicinfos? Or scripts, then NPC, then ...? Does it matter?).

PS: What I would much rather do is duplicate the contents of the original .esp as a .omwaddon, and customize it as an all-new plugin with several added companions (each with own scripts, but some shared resources like waterbreathing ability spells), without having to load the original .esp in my game at all. But I can't yet figure out a way to do anything like that. And the problem might happen anyway if I try to do multiple companions in it, or even just one but also have the original .esp loaded (or any other companion mod that used some resources from it without renaming them). Even better would be a way to work with .esp files directly in MacOS, so if I can develop a usable companion mod I can realease it for everyone not just OpenMW users. But I'll take any help I can get to even have this work in my local game at this point!

OpenMW-CS is somewhat confusing and awkward to me (like, why can't I duplicate a Topicinfo and change the topic? I seem to have to create a blank one and manually do every single field in it, to mostly-duplicate an existing one). This is my first attempt to do anything with the app other than using Verify to debug problematic mods, fixing script typos, and nerfing excessive stats on mod-added gear.
User avatar
Darklocq
Posts: 48
Joined: 12 Feb 2017, 18:41
Location: California

Re: OpenMW-CS and Companion Project 3.1 giving me fits - dialogue loop

Post by Darklocq »

Anyone, anyone?
User avatar
Darklocq
Posts: 48
Joined: 12 Feb 2017, 18:41
Location: California

Re: OpenMW-CS and Companion Project 3.1 giving me fits - dialogue loop

Post by Darklocq »

Where did everyone go? ;-)
User avatar
DestinedToDie
Posts: 1181
Joined: 29 Jun 2015, 09:08

Re: OpenMW-CS and Companion Project 3.1 giving me fits - dialogue loop

Post by DestinedToDie »

Have you tried doing it in Morrowind CS and seeing if the behavior is the same?
aesylwinn
Posts: 243
Joined: 14 Dec 2015, 20:30

Re: OpenMW-CS and Companion Project 3.1 giving me fits - dialogue loop

Post by aesylwinn »

Well, this is a little late, but I'll reply in case Darklocq wants to coninue with this, or someone else has this same issue. I am not that knowledgeable about TopicInfo's so take what I say with a grain of salt. Anyway..

TopicInfo's have an order associated with them, and this order is very important. Currently in your addon, you have your choice TopicInfo (response "Yes, %PCName?") at the very top of the list. This is not what you want. Instead, you want the choice TopicInfo to be at the very bottom of the list. When the game decides what to show the user, it goes through the list from top to bottom. If the TopicInfo meets all of the InfoConditions, it is selected. Since your choice TopicInfo is at the top and has no conditions, the game always shows it. To move the choice TopicInfo to the bottom, you need to right click on it and left click "Move Down" until you can no longer move it down. Doing so fixed your problem for me (You will also need to manually move the script lines, a current bug in the editor.)

Reflecting on this issue, the editor probably needs better ordering indicator.
Darklocq wrote: 24 Jun 2017, 20:04 What I would much rather do is duplicate the contents of the original .esp as a .omwaddon, and customize it as an all-new plugin with several added companions (each with own scripts, but some shared resources like waterbreathing ability spells), without having to load the original .esp in my game at all.
The editor can do this. In fact you did this when creating your mod. Notice that your file does not depend on the Companion esp. When you choose to edit an esp file, the editor will open it up as the current project. When you save, it is saved as an owmaddon file. If you did want to depend on the esp file, you would choose the "create a new addon" option and select it as a dependency.
Darklocq wrote: 24 Jun 2017, 20:04 Even better would be a way to work with .esp files directly in MacOS, so if I can develop a usable companion mod I can realease it for everyone not just OpenMW users.
If you want to support the original morrowind engine, it's probably best to use the original CS. From what I understand, some users have had success renaming the file so it ends with .esp, but it is not officially supported.
Darklocq wrote: 24 Jun 2017, 20:04 OpenMW-CS is somewhat confusing and awkward to me (like, why can't I duplicate a Topicinfo and change the topic? I seem to have to create a blank one and manually do every single field in it, to mostly-duplicate an existing one).
When you choose to clone a record (right click menu), you can change the name. Unfortunately this appears to be broken at the moment.
User avatar
AnyOldName3
Posts: 2666
Joined: 26 Nov 2015, 03:25

Re: OpenMW-CS and Companion Project 3.1 giving me fits - dialogue loop

Post by AnyOldName3 »

If you want to support the original morrowind engine, it's probably best to use the original CS. From what I understand, some users have had success renaming the file so it ends with .esp, but it is not officially supported.
I think it actually is officially supported. Pull requests have been rejected because they've had the potential to break this feature.
aesylwinn
Posts: 243
Joined: 14 Dec 2015, 20:30

Re: OpenMW-CS and Companion Project 3.1 giving me fits - dialogue loop

Post by aesylwinn »

AnyOldName3 wrote: 25 Aug 2017, 13:34 I think it actually is officially supported. Pull requests have been rejected because they've had the potential to break this feature.
Which pull requests? I looked around a bit and found these quotes by Zini here.
The files produces by the editor will not be compatible with MW. Saving them in a way that they can be mistaken for MW content files (by giving them the extension esp or esm) is a terrible idea. It would cause confusion to no end.

Any arguments about being able to fix these files by running them through an additional tool (e.g. the original CS) are meaningless, because we still have files coming out of the editor that look like esp or esm files and are not compatible with MW esp and esm files. People will produce these and they will upload these. And then other people will get confused about why their downloaded files are not working in MW (or project ProjectAedra, if that ever finishes).
I don't even want to think about the fallout we would get from that.
And later in the same thread.
I am sorry, but I am not having this discussion again. It has already been explained why we can't save in ESP and ESM format (hint: we can not generated MW script bytecode).
These would suggest it is unsupported (especially after 1.0 is finally reached). In any case, I don't know of anyone testing whether or not esp/esm files saved by the editor are compatible with the original engine, and thus I consider the functionality unsupported.
User avatar
Darklocq
Posts: 48
Joined: 12 Feb 2017, 18:41
Location: California

Re: OpenMW-CS and Companion Project 3.1 giving me fits - dialogue loop

Post by Darklocq »

DestinedToDie wrote: 16 Jul 2017, 12:03 Have you tried doing it in Morrowind CS and seeing if the behavior is the same?
I'm not on MS Windows, and am disinclined to pay MS for (or to pirate) a Windows license to run in a VM for one app.

I understand the OpenMW project's "we will not emit Bethesda bytecode" thing. However, I'm hoping someone in a jurisdiction without the US's overly corporation-favoring copyright regulations will eventually produce a direct ESP/ESM editor for Unix-like operating systems, so I can compile and use it in macOS.
User avatar
Darklocq
Posts: 48
Joined: 12 Feb 2017, 18:41
Location: California

Re: OpenMW-CS and Companion Project 3.1 giving me fits - dialogue loop

Post by Darklocq »

Regarding:
I think it actually is officially supported.
versus:
These would suggest it is unsupported
I can't imagine that renaming a .owmaddon to .esp would produce a file that the vanilla game engine could use, since the formats are different. It could be helpful if OpenMW itself could understand that a file named .esp which had .omwaddon content was okay to use and would use it right. This would allow us to patch a broken mod without breaking dependencies that other mods have on the buggy mod, without having to use a separate .omwaddon file long with the original .esp, but just replace the .esp.

However, it's probably true that someone would eventually re-distribute a .omwaddon file with a .esp name and confuse people. So, if that feature (intentional or otherwise) were to go away, it would probably be for the best, as long as we do not suffer the 255 mod limit that the Bethesda engine has; having to add whole bunch of tiny .omwaddon patch files for various old mods would rapidly cut into the mod limit. I've filed a ticket about the mod limit (some deny there is one, but I get a CTD every single time I try to add more that 255 mods, or did under 0.42, the last time I tried.

I still need to prepare some test data for that (they want a ZIP file with 256+ mods in, which will take time to put together, from mods that do not have any nutty "you can never post my mod to any site other than where I uploaded it in 2004" restrictions, and which I know actually work in OpenMW without crashing it for some reason not related to number of mods loaded).
User avatar
Darklocq
Posts: 48
Joined: 12 Feb 2017, 18:41
Location: California

Re: OpenMW-CS and Companion Project 3.1 giving me fits - dialogue loop

Post by Darklocq »

aesylwinn wrote: 25 Aug 2017, 02:32 TopicInfo's have an order associated with them, and this order is very important. Currently in your addon, you have your choice TopicInfo (response "Yes, %PCName?") at the very top of the list. This is not what you want. Instead, you want the choice TopicInfo to be at the very bottom of the list. When the game decides what to show the user, it goes through the list from top to bottom. If the TopicInfo meets all of the InfoConditions, it is selected. Since your choice TopicInfo is at the top and has no conditions, the game always shows it. To move the choice TopicInfo to the bottom, you need to right click on it and left click "Move Down" until you can no longer move it down. Doing so fixed your problem for me (You will also need to manually move the script lines, a current bug in the editor.)
Thanks. I will look into this. I've never even seen the "Move Down" feature. I really wish OpenMW-CS had more documentation. In re-working another mod, I've been messing with TopicInfos a lot, but have been managing the issue with conditions (which is a hassle sometimes). I'll see about the ordering thing. It wasn't clear to me that there is any kind of order, when it comes to how stuff is stored in the file, because the editor just assigns random-looking gibberish IDs to the resources, like [topicname]#fa9320c0340340b20 and so on; plus the list of records isn't fixed, but re-orderable all sorts of ways like by actor, race, class, etc.

[time passes] Okay, I just figured out how to do that. You can't work with the search results pane, but have to go into Characters > Topic Infos. Which doesn't work helpfully in multiple ways. Any new topics I've added are not grouped with existing ones, even if I sort by actor, so their order isn't ever going to be clear. And the IDs are not shown, so if a bunch of them start with the same text, I don't know which one I'm working with unless I open it for editing again (and a bug is corrupting data when I leave one open then move it; I reported that one in #4355). Hmph. Well, we are warned that OpenMW-CS is alpha software ...
Post Reply