[answered] changing / renaming ID support

Involved development of the OpenMW construction set.
Post Reply
User avatar
asmo
Posts: 228
Joined: 18 Sep 2014, 21:20

[answered] changing / renaming ID support

Post by asmo » 24 May 2015, 12:41

What speaks against the possibility of renaming IDs in the CS?

What it would be useful for:
[*] A mod contains entities which have IDs that start with a number e.g. 123_hello_script. OpenMW throws an error and refuses to start when a script has an ID like that. This is a correct behaviour. Anyhow, to fix the mod it would be really helpful if you could just do
..... search ID "123_abc_xxx" and replace by "abc_xxx"
At the moment a clone has to be created for each entity. As well TopicInfo needs to be changed since it contains references to other entities. Unfortunately there is a bug which results in discarded TopicInfo entries.

[*] Fixing ID name inconsitencies.
[*] Changing ID names to comply with the "rules" of the community if a modder allowed using his work in your own mod.
E.g. from originalModder_bigMod_script to derivingModder_greatMod_script ...
Last edited by asmo on 14 Sep 2015, 16:22, edited 1 time in total.
gentoo Linux - rolling release

User avatar
asmo
Posts: 228
Joined: 18 Sep 2014, 21:20

Re: changing / renaming ID support

Post by asmo » 24 May 2015, 13:55

Zini in the bug tracker:
"You can not rename IDs. The data structures/file formats do not allow that. If we were to implement a rename feature, it would perform a clone and delete anyway, which is certainly not what would be expected from a rename function. I prefer the cumbersome variant here for the sake of clarity."
How about having an option to allow ID renaming. Something like "expert settings" (and a warning like "Don't mess with it if you don't know what you're doing." :twisted: ) - it could contain a checkbox next to "Allow renaming of IDs". A mouseover could give another warning - "This will create a clone and discards the original".
Another way would be just having a checkbox next to "rename IDs" reading "activate" in the search subview. It has to be activated to make ID renaming work and would not remember its (active) status after a renaming was done.

I tried to achieve renaming IDs by using sed 's,01_Pal,Pal/g' but it did - unsurprisingly - not lead to a usable mod file.

[Edit: I hope it's more understandable now. ^^]
Last edited by asmo on 24 May 2015, 21:05, edited 1 time in total.
gentoo Linux - rolling release

User avatar
sjek
Posts: 407
Joined: 22 Nov 2014, 10:51

Re: changing / renaming ID support

Post by sjek » 24 May 2015, 14:19

The data structures/file formats do not allow that. If we were to implement a rename feature, it would perform a clone and delete anyway
can deleting done cleanly ?
"life is crazy"
"craziness has beauty which only crazies understand" some movie clip in the head.
https://wiki.openmw.org/index.php?title=Testing

User avatar
asmo
Posts: 228
Joined: 18 Sep 2014, 21:20

Re: changing / renaming ID support

Post by asmo » 24 May 2015, 14:27

sjek wrote:can deleting done cleanly ?
Is that not clear at the moment? :shock:
gentoo Linux - rolling release

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest