Mods & Uniqueness Required

Your forum for all discussions around Modding.
ralgith
Posts: 10
Joined: Wed Dec 01, 2021 3:58 am

Mods & Uniqueness Required

Post by ralgith »

I recently submitted my first two mods to the ModHub. Both were declined due to being too similar to a mod by derSchreiner that is already on the ModHub.

My issue is that all of the similarity, in fact most of the code, is boilerplate code needed to make any script mod work. The only line that is completely different, is the one line of code that actually makes a decision.

So, when code is 99% boilerplate, is there a guideline that GIANTS staff uses to decided if someone has copied the mod or not?

To be clear:
  • I was inspired by derSchreiner's mod.
  • I learned how the boilerplate code needed to be from his mod.
  • I created two similar mods, but that have different goals.
  • I was told by the GIANTS staff that I needed permission from the original author to use his code. Which, currently, I have no way to achieve because I do not have contact information for him. Speaking of, derSchreiner, if you would reach out to me in some fashion so we can have a chat, I would appreciate it.
  • I would love to get my mods on ModHub
  • I have the utmost respect, as a software developer, for Intellectual Property.
  • While a quick look at my code makes it appear I just copy/pasted derSchreiner's code, I did not. I had to do a lot of research, being my first exposure to both LUA and the FS modding interface, to find out what the one line that makes a difference needed to be.
  • I plan on making further mods to extend the base functionality found within this pair of mods, and to continue improving the functionality of these.
I look forward to learning more about the process, and no my name here does not match my modder name ;)

Also, due to significant code changes and enhancements based on suggestions from other modders, I will likely be able to make one of these mods distinctive enough that it should pass. That said, I would still like to understand the process better so that I can do things the right way.
User avatar
Dogface
Posts: 1072
Joined: Mon Nov 28, 2016 3:02 pm
Location: PC ⛽ USA

Re: Mods & Uniqueness Required

Post by Dogface »

When you say "boilerplate code" do you mean it is from Giants code? or from derSchreiner? Who originally wrote it?
ralgith
Posts: 10
Joined: Wed Dec 01, 2021 3:58 am

Re: Mods & Uniqueness Required

Post by ralgith »

Boilerplate code is the required structure to make your other code work.
In computer programming, boilerplate code, or simply boilerplate, are sections of code that are repeated in multiple places with little to no variation. When using languages that are considered verbose, the programmer must write a lot of boilerplate code to accomplish only minor functionality
- Wikipedia

For example, this is all boilerplate for a mod to work for overwriting a built in function, but return true if either the original function (superFunc) or my own code are true:

Code: Select all

LuaClassNameHere = {};

function LuaClassNameHere:loadMap(name)
    ClassName.FunctionName = Utils.overwrittenFunction(ClassName.FunctionName, LuaClassNameHere.FunctionName);
end;

function LuaClassNameHere:FunctionName(superFunc, param1, param2, param3, param4)
    return superFunc(self, param1, param2, param3, param4) or
        -- My code that actually changes something here
end

addModEventListener(LuaClassNameHere);
Most of that boilerplate is required if you're appending or whatever on the function too. Just the Utils.overwrittenFunction would be something else.

To wit, that is actually the code from my mod, just obfuscated away. The bit that is different between my code and his is the only bit that matters, the "-- My code that actually changes something here". Coping boilerplate is not, in general software development practices, is not considered taboo. At least, not here in the states.

I even gave credit to him in my comments! Which is also good practice. His mod did inspire mine, and show me how to do the boilerplate.

Code: Select all

-- Copyright Heavy Metal Gaming (aka Dylan Myers) <gamer.hm.2021@gmail.com>
-- GitHub: https://github.com/Dylan-M/FS22_CollectGrassAndStrawAnywhere
-- Based somewhat on, and inspired by, the Collect Straw At Missions mod by derSchreiner
Ziuta Modding
Moderator
Posts: 935
Joined: Sun Jul 17, 2016 9:40 am

Re: Mods & Uniqueness Required

Post by Ziuta Modding »

Unfortunately, with such "complexity" of the original author's script your changes are negligible and it is not suitable for a new mod on MH, only you can report these corrections to the original author to include it in the update of his mod. You can keep it on GitHub and share it with others, but it certainly won't make it to MH. He is about here on the forum, but I don't know if you can contact him: memberlist.php?mode=viewprofile&u=35777
ralgith
Posts: 10
Joined: Wed Dec 01, 2021 3:58 am

Re: Mods & Uniqueness Required

Post by ralgith »

Ziuta Modding wrote: Sat Aug 06, 2022 1:47 pm Unfortunately, with such "complexity" of the original author's script your changes are negligible and it is not suitable for a new mod on MH, only you can report these corrections to the original author to include it in the update of his mod. You can keep it on GitHub and share it with others, but it certainly won't make it to MH. He is about here on the forum, but I don't know if you can contact him: memberlist.php?mode=viewprofile&u=35777
I've been told by GIANTS that it CAN be on ModHub if he agrees. However, he has not responded to my message. So sadly, the simpler one wont make it.

Neither of my mods would be an "update" to his mod, since the purpose is different. I still feel this policy is a little silly, because boilerplate is boilerplate. But, I'm not the policy maker. I can only voice my opinion, in a polite but frustrated fashion, and accept whatever they decide.
Post Reply