When it comes to Lua code, what is plagiarism?

Turret 49

Member
Besides SRB2's wiki and its source code on github, I've been using other mods to help learn how Lua works and have applied that learning to my own code. But if for example a mod does something I wanted to do but didn't know how to code (breaking FoFs, breaking spikes, wall angle detection, or a randomized sound list), and the mod is not marked [Reusable], how do I avoid plagiarism when it's where I learned how to do the code from?
 
When it comes to Lua code, what is plagiarism?
1639058053516.png

Basically taking code 1:1. Say there is a gamemode/character/something that does a cool mechanic, so instead of trying to code it yourself, you just rip it from the source, attach it to your script, and call it a day. Maybe even claim it as yours.
That's considered plagiarism.
There may be some nuances I'm not taking into account.

how do I avoid plagiarism when it's where I learned how to do the code from?
As suggested, you can join the SRB2 Discord server, head over the scripting channel and ask for help on how to code these things yourself.

Alternatively, you could ask the original author of the code if you can take that fragment you want. Some of the authors may be willing to give it to you (with or without credit needed), maybe even offer some advice on how to use it; results and conditions vary.


There are some things that can't reasonably constitute plagiarism due to the triviality of it; among those you mentioned:
  • randomized sound list
    • No idea what's this one about, but if it's about choosing a sound at random to play, it's a matter of making a table, selecting a random entry, and playing it. There are many ways to achieve this too, all simple enough.
  • breaking FoFs
    • If this is to break walls on contact, 2.2.9 introduced a skin flag that destroys shatter FOFs upon contact: SF_CANBUSTWALLS
      Otherwise, yes, I can see the predicament.
  • breaking spikes
    • Upon contact? You can use the collision hooks to intercept the collision, tell the game that no it didn't happen lol, and kill the spike.
 
  • randomized sound list
    • No idea what's this one about, but if it's about choosing a sound at random to play, it's a matter of making a table, selecting a random entry, and playing it. There are many ways to achieve this too, all simple enough.
Yeah, I didn't know how to set up a table or select entries from it, haha..
  • breaking FoFs
  • breaking spikes
For the FoFs, it was breaking floors, and that's pretty hardcoded into Fang and Amy's abilities and animation states without having to do some FoF checking code manually in Lua, and I didn't know how to do that.
For the spikes, I wanted to imitate how Metal Sonic destroys spikes in an area rather than just the one he hit, and that required doing a for loop looking through a thingslist for each spike, and I didn't understand it at the time.

It's just a case to me of like.. I've learned how to do to some things I was having trouble with, but it's from reading and taking bits of code from some non-reusable character mods I've played and modifying them for my own needs. So I'm left questioning "How okay was it was to do that?".

Alternatively, you could ask the original author of the code if you can take that fragment you want. Some of the authors may be willing to give it to you (with or without credit needed), maybe even offer some advice on how to use it; results and conditions vary.
I guess that's the best thing I can do, then?
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top