Moddified Dialogs in OpenMW-CS

Questions specific to OpenMW-CS can be asked, and content development related topics can be discussed here
Post Reply
User avatar
Kloppix
Posts: 32
Joined: 24 Mar 2014, 14:41

Moddified Dialogs in OpenMW-CS

Post by Kloppix » 18 Oct 2018, 07:02

I was creating a mod in which a new NPC had several ”greeting 1” Topics. Of course I had to move up and down several responses for this NPC.

But now the Topic Infos shows a bunch of “modified” records for ALL NPCs.

Image

1) Wouldn’t this cause conflicts with other mods? Let say I activate my mod after LGNPC, which truly modify the greetings for several NPCs.

2) When I’m changing a mod, how do I know if a response was truly changed or just moved up/down?

User avatar
Zini
Posts: 5532
Joined: 06 Aug 2011, 15:16

Re: Moddified Dialogs in OpenMW-CS

Post by Zini » 18 Oct 2018, 08:00

Well, if you move around info records, they need to be flagged as modified. How else would the move be stored? That being said, we suspect that we don't handle info records correctly. It is possible that we flag records as modified too aggressively. IIRC there is already an issue for that on the tracker.

User avatar
Kloppix
Posts: 32
Joined: 24 Mar 2014, 14:41

Re: Moddified Dialogs in OpenMW-CS

Post by Kloppix » 18 Oct 2018, 19:55

Zini wrote:
18 Oct 2018, 08:00
Well, if you move around info records, they need to be flagged as modified. How else would the move be stored?
Yes, but it should only affect the current NPC.

Let’s say I want to add a new Topic: “Greeting 1” for the actor “Saprius Entrius”. In the original CS you can click on the dialog and clone it or make a new one and the new dialog will appear just there. It won’t affect any other NPC.

Image


But in OpenMW-CS when you make a new dialog (or clone it) the new topic is placed way down at the end of the “greeting 1” for all NPCs. Therefore if I move up back to the original “Saprius Entrius”, a bunch of NPCs are marked as “modified”.

Image
Image

And to answer my first question. Yes. I added just a new greeting for an NPC and if I load the new mod after LGNPC it overrides almost all the greetings from LGNPC. Is that what you mean with aggressively flag records as modified?

User avatar
Zini
Posts: 5532
Joined: 06 Aug 2011, 15:16

Re: Moddified Dialogs in OpenMW-CS

Post by Zini » 19 Oct 2018, 09:23

I see what you mean. Apparently we don't have drag & drop reordering implemented yet. And if you move the record up one step at a time all the surrounding records will be touched. That may be a case of overly aggressive touching behaviour (is it just me or does that sound dirty?) but also a case of an unimplemented feature.

The dialogue editing functions just aren't ready for prime time yet.

User avatar
Ravenwing
Posts: 266
Joined: 02 Jan 2016, 02:51

Re: Moddified Dialogs in OpenMW-CS

Post by Ravenwing » 19 Oct 2018, 20:33

Zini wrote:
19 Oct 2018, 09:23
That may be a case of overly aggressive touching behaviour (is it just me or does that sound dirty?) but also a case of an unimplemented feature.
Lol double entendre, sounds like a bad euphemism, but also literally a dirty edit. If things that you didn't edit overwrite something else, that is definitely a problem. Wouldn't drag and drop behavior be a universal UI feature? Hopefully this isn't difficult to implement here.

This also reminds me, are we planning on having a mod cleaning feature? I vaguely remember you not wanting this Zini, but seems like a basic feature that shouldn't be relegated to an eventual plugin. In this case it would be a stop-gap solution, but it's easy to accidentally make a change and is much easier found in a list of all changes rather than going through all sets of records individually. But maybe this is already implemented and I just don't know how to do it.

User avatar
Zini
Posts: 5532
Joined: 06 Aug 2011, 15:16

Re: Moddified Dialogs in OpenMW-CS

Post by Zini » 20 Oct 2018, 09:21

We have the revert feature, which is basically a manual mod cleaning feature. And you can use the global search feature to get a list of all modified records. I guess we could add some more useful commands (like revert) to the global search context menu.

I don't think it makes sense to have anything more than that in the editor itself. But after 1.0 we will add scripting, which should allow for automation, if required.

Note: The revert feature is currently missing on the info records, because we aren't sure how to implement it. So yeah, really not ready for prime time.

Kasoroth
Posts: 3
Joined: 02 Oct 2018, 06:31

Re: Moddified Dialogs in OpenMW-CS

Post by Kasoroth » 27 Oct 2018, 12:49

Zini wrote:
20 Oct 2018, 09:21
We have the revert feature, which is basically a manual mod cleaning feature. And you can use the global search feature to get a list of all modified records. I guess we could add some more useful commands (like revert) to the global search context menu.

I don't think it makes sense to have anything more than that in the editor itself. But after 1.0 we will add scripting, which should allow for automation, if required.

Note: The revert feature is currently missing on the info records, because we aren't sure how to implement it. So yeah, really not ready for prime time.
I'm assuming that the difficulty with the info records implementation is due to the way it's essentially one big linked list shared by all NPCs (with conditionals to determine which response actually gets used by a particular NPC at a particular time). I can see where this could get messy if you're inserting new info records into an existing topic, because unlike most types of records, the info records have to maintain a specific order.

Obviously when a new record is added, the preceding record needs to be modified to link to the new one. If you then move the new one up in the order, the new "preceding record" also gets changed. The original "preceding record" (which is now the "following record") would then be changed back to point to whatever was originally after it. It seems like the records are still flagged as "modified" even when the linkage has been changed back to the original follower, because modified and then modified back is not considered the same as modified and reverted.

Maybe there could be a cleanup function in the editor that would check "modified" info records to see if they were actually different (different content or different linkage), and revert any that weren't really changed, but had just temporarily been linked differently as some other record was moved up or down the list. Ideally, this cleanup should happen automatically whenever you add/remove/reorder records, so that if you insert a record, and then delete it, it doesn't leave a residual "modified" flag on the preceding record.

If this turns out to be too complicated for the near-term, perhaps a "nuke all modified/added info records from orbit" option would be useful as a temporary mod-cleaning tool for anyone who inadvertently made a mess of their info records while trying to add a few lines of dialog to a mod that was mostly other content (like scripts/items/areas/etc). Without that kind of cleanup tool, it seems like the only alternatives would be to recreate the whole mod from scratch, leave the messy info records sitting in there (potentially interfering with other mods that modify those topics), or use an external mod cleaning tool.

User avatar
Zini
Posts: 5532
Joined: 06 Aug 2011, 15:16

Re: Moddified Dialogs in OpenMW-CS

Post by Zini » 29 Oct 2018, 10:22

Your understanding of the problem is correct. Your ideas might work, however they are really just a workaround. I would prefer to have a proper solution instead.

I have given this some thought and maybe there is a solution. If a neighbouring info record is in base-state we actually do not need to modify it to maintain the correct order. Since modified/added state info records are inserted after the the base records their prev/next fields would be sufficient to place the records in the right spot. I suspect that is also how the vanilla CS is doing it.

This doesn't solve the revert problem, but it should remove the over-aggressive touching.

But this change will require a complete rewrite of the reordering function, including a couple of interfaces. Quite a bit of work and we have an extreme shortage of OpenMW-CS developers right now.

Anyway, I added an issue to the tracker, in case someone wants to give this a go.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests