Updating ROBLOX Gear

Self-teaching is an excellent way to learn programming, and looking through the code of existing models is one way to do that, but there’s no guarantee that the code you open up is good code. However, a person could always depend on the ROBLOX scripts to learn from, right? Surely those would be programmed in an efficient, readable format. I ended up taking a peek at some of the gear after I read on a thread that a lot of them were breaking due to updates – the ones I looked through weren’t broken, but the code could definitely be better – it’s not something I would recommend beginners to study.

My main goal is to improve the structure of the gear scripts so that they would be decent study material, but I’ll also be making sure that all of them are compatible with FilteringEnabled, as unfortunately some old gear aren’t compatible. Since they won’t be official, I plan on releasing a model that will automatically replace ROBLOX gear in places that contain the model with the FilteringEnabled-compatible, working gear which can also be opened up and explored by novice programmers and played around with.

Starting with the gravity coil, I noticed right off the bat that the variable names weren’t the best (i.e. the programmer called the anti-gravity effect the “GhostState”), the physics behind it weren’t clarified that well, and there was a lot of unnecessary code (i.e. creating a named onEquipped function while it was only called from tool.Equipped:connect()), so I cleaned it up a bit.

Here’s the original gravity coil code

Here it is cleaned up

With all of the bloat code chopped off, and the comments being a little more descriptive, soon-to-be programmers shouldn’t have much trouble navigating through it. Of course, I’m not perfect so if I screwed something up with that please tell me :frowning: I’d also really appreciate it if anyone had a list of all the gear IDs or some code to use HTTPService to fetch all of the gear IDs (I’ve never use HTTPService before).

Due to the nature that gear is sold on the catalog, they’re bound from actually using gear made by users which don’t work for ROBLOX. We are actively fixing gear, though newer gear is a higher priority. However, there’s quite a few administrators also fixing gear when they’re given an opportunity to do so. I for one haven’t had a chance to work on them in a little while. Gear is also preferred to be fixed through a ticketed list through reports, that way they can keep track of them and their fixes.

If anything, users are encouraged to email Info@Roblox.com about broken gear. Explaining, especially in detail does help your case. They also really appreciate it if you point out where in the code lies an error, and possibly how to fix it.

I remember (Becky?) saying something along the lines of that a while back – I don’t intend for these to replace the current gear. God, if the admins had to go through the corporate processes to approve these, it would be hell, but for users who do have FilteringEnabled games or users who want clean code to learn from, they’d be able to plop this into their game and benefit right away. Gear was my first pick on what to clean up and publish for free over winter break because everyone is free to use it without being looked down upon for using free models. Had I released a bunch of vehicles and guns or whatnot, users would not be able to use them in their games without worrying about being called “free-modelers”, so the gear was an excellent opportunity.

Looking at your code, I would much rather use GetConnectedParts on the torso as well :P. That way, broken joints don’t effect the added force.

Anyway, this is out of my control, but what I think you should do - if you and some others constructed a list of some vastly used gears, that way we know what is of higher priority. Then, try emailing it to Info@Roblox.com. If you can convince them that they are more important, then that may support your idea.

I honestly understand your view, though I don’t make these decisions.

Wouldn’t that ignore all parts attached to limbs other than the torso? i.e. the tool, or a pauldron attached to the character’s shoulder. I suppose I could recursively search through parts with :GetConnectedParts() though.

I really like it Echo. I’ve rewritten the gravity coil code too. I think you’ll find my code, as usual, is much more verbose, but also much more reliable, and hopefully easier to understand. It also degrades gracefully and errors out nicely with relevant errors and information. My main goal here is to provide code that reliably works no matter what—a common issue with ROBLOX gear.

You’ll notice several design decisions which handles edge cases.

Here’s the code:
http://hastebin.com/ixodovisib.lua

And here’s the model:

[quote] Due to the nature that gear is sold on the catalog, they’re bound from actually using gear made by users which don’t work for ROBLOX. We are actively fixing gear, though newer gear is a higher priority. However, there’s quite a few administrators also fixing gear when they’re given an opportunity to do so. I for one haven’t had a chance to work on them in a little while. Gear is also preferred to be fixed through a ticketed list through reports, that way they can keep track of them and their fixes.

If anything, users are encouraged to email Info@Roblox.com about broken gear. Explaining, especially in detail does help your case. They also really appreciate it if you point out where in the code lies an error, and possibly how to fix it. [/quote]
All the old music gear guitars are totally broken
Banjo - Roblox

[quote] All the old music gear guitars are totally broken
Banjo - Roblox [/quote]

Actually, it looks like Luckymaxer patched those up about 4 weeks ago – the banjo works fine now. Is there a specific guitar gear that isn’t working still?

Yeah, I patched the guitars up a few weeks back.

PS: The ‘m’ in Luckymaxer is supposed to be lowercase :uhhh:

LUCKYmAXER

[quote] Yeah, I patched the guitars up a few weeks back.

PS: The ‘m’ in Luckymaxer is supposed to be lowercase :uhhh: [/quote]
Thanks a bunch B)

I can’t say how thankful the community is for engineers like you, luckymaxer, who engage with the community and genuinely care.

Thank you!