gambit37 wrote:I think it's a mistake to keep your code, just because you "already wrote it" that way. As minmay points out, defining the same item 6 times is pointless and inefficient, and you should always strive for efficiency in any code that you develop. Code is cheap: be prepared to rewrite and delete it when necessary, and don't hang on to stuff you don't need.
In addition, you now have code in two places: your script in the editor, and your object definitions file. Your script now depends on external code, when it doesn't really need to.
Modding (and by extension, coding in general) is more than just making something work. It's also about clarity, efficiency, performance and optimisation. Why stick with an inefficient method for your script when there is a better way to do it?
I agree with the fundamentals you've stated as it pertains to development. I've been a software dev for over 10 years. However, in a video game Mod I hardly find it necessary to invest all of that time and energy. Especially since you only named a small number of quality control factors. What about unit testing and regression testing? Never test your own code is a golden rule. So should no one ever build a Mod until they have a dedicated testing team? Hardly.
In this case, a player will experience zero noticeable issues over the fact that 6 identical items were created instead of simply using the "id" reference. It was a good learning experience that FeMaiden created custom objects. The fact that it was done under the wrong assumption is irrelevant. Now the author has a better understanding of an Asset Name vs Asset ID as well as custom object creation.
I left plenty of "bad code" in my own Mod, none of which causes any performance issues nor bugs. While there are always better ways to do things, one has to consider the target environment and target audience, because what comes before Continuous Improvement is "Resource Management." That's a critical factor in software development that your post completely ignores.
Considering the number of sales of Grimrock 2, the total number of downloads for all Grimrock 2 Mods, and the fact that every Mod is non-commercial... leaving "bad code" in a Mod should literally be expected; as long as the code isn't resulting in gameplay defects.
Often times people focus very heavily on the technical aspects of a game because, well, they have no talent or skill on the creative design side. I have seen Mods where the source code was gorgeous, but the gameplay bored you to tears. I call those Mods, "nerd candy." Some people gain enjoyment staring at good code, others could care less and just want to play a good game.
Lastly, there are a great number of legendary games that have plenty of "bad code" that lead to bugs, some just visual, others more critical.
"All your base are belong to us" comes to mind
