Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Is it wrong to "stitch" some parts of other people's code along with yours?  (Read 840 times)

SlimeOfSteel

  • Bay Watcher
  • Novice Programmer
    • View Profile

Title.

To go into a bit more detail of what I mean, I'm not talking about stealing someone else's Lua (or Ruby) file and passing it off as your own. I mean using a fragment of someone else's code.

For example, let's say I wanted to make a ListPrompt (from the guiScript class). I'm not sure what the format is, so I take a look at a pre-existing file with a functional ListPrompt to see the proper syntax.

Or, let's say I wanted to add a new item to a table of the same type. I look at an existing file, see the code used (like one or two lines), and copy it into my code.

If I do that, is that wrong? I don't want to piss off anybody by mistake. I'm not exactly a Lua professional, so I tend to look at other code files and try and learn why the parts of the code work the way they do.
« Last Edit: April 11, 2018, 10:09:20 am by SlimeOfSteel »
Logged
It works, but I don't know why.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile

I doubt most people would care, but if you take a nontrivial amount of code from someone else's mod (say, taking a nontrivial Lua function, or a creature's RAWs), it would be good etiquette to mention where you got it from in comments or by mentioning it in a post where you release your mod.

If you're just referencing someone else's code to see how a particular Lua function is used or something, then that's different.  Presumably any code calling that function has to work that way, which you could have learned from any possible source and really isn't special or specific to someone else's work.  In that case, attributing it would be kind of overkill.
Logged
Through pain, I find wisdom.

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile

Sorry, I've got a trademark on [CURIOUSBEAST_GUZZLER] now. I'll be requiring a cut of your Twitch revenue every time a bear attacks your fort.

...just kidding, it's all open source, per Toady One's decree. :P Just credit other mods for borrowed content or inspiration.
Logged
DF Vanilla-Spice Revised: Better balance, more !!fun!!
http://www.bay12forums.com/smf/index.php?topic=173907.msg7968772#msg7968772

LeadfootSlim on Steam, LeadfootSlim#1851 on Discord. Hit me up!

Enemy post

  • Bay Watcher
  • Modder/GM
    • View Profile

Sorry, I've got a trademark on [CURIOUSBEAST_GUZZLER] now. I'll be requiring a cut of your Twitch revenue every time a bear attacks your fort.

In that case, I'm claiming AT_PEACE_WITH_NATURE. All your cats are belong to us.
Logged
My mods and forum games.
Enemy post has claimed the title of Dragonsong the Harmonic of Melodious Exaltion!

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile

Youre no longer allowed to use dragonfire, fire jets, or fireballs. Theyre mine. So is any interaction that causes a transformation into a creature that has a body part that falls off when a connected body part made of a tissue that boils away at room temperature is done dissolving. Inb4 that other guy that actually came up with that method lol

In all seriousness, nobody will really care, as long as you at least mention where you took something from, if at all. Everybodys raws will end up similar anyway because on certain things theres an order in which tokens must be listed, and for the rest, theres a precedent for organization in a similar fashion to the vanilla raws, kinda.
« Last Edit: April 11, 2018, 04:31:35 pm by Eric Blank »
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

scamtank

  • Bay Watcher
    • View Profile

We're all building the same crusty puke-soaked idiot ass-backwards cathedral here.
Logged

Klisz

  • Bay Watcher
  • Dabbling Modder
    • View Profile

Square brackets are now copyright Klisz. If you use them in any of your raws, you must give me at least half your money in royalties.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution

Square brackets are now copyright Klisz. If you use them in any of your raws, you must give me at least half your money in royalties.
Money that is generated regardless of source** :P Tax the man like the Dirty Govt.
Logged