wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.
http://www.wiremod.com
Apache License 2.0
554 stars 333 forks source link

E2: Add Vehicle Exit Point functionality #1373

Closed CaptainPRICE closed 5 years ago

CaptainPRICE commented 7 years ago

Simple. Add functionality of Vehicle Exit Point to Expression 2: entity:getVehicleExitAng(): Gets exit angles of a vehicle (this will return exit-point angle only if you have set it via setVehicleExitAng; otherwise, it will return invalid/empty angle). entity:getVehicleExitPos(): Gets exit position of a vehicle (this will return exit-point position only if you have set it via setVehicleExitPos; otherwise, it will return invalid/empty vector). entity:removeVehicleExitAng(): Removes exit angles of a vehicle. entity:removeVehicleExitPos(): Removes exit position of a vehicle. entity:setVehicleExitAng(angle): Sets exit angles of a vehicle. entity:setVehicleExitPos(vector): Sets exit position of a vehicle. And also make it respect wire_pod_exit_distance ConVar value (the maximum distance an exit-point can move a player, by default it is set to 1000 units).

I am working on this.

React to this issue: Vote πŸ‘ to support; otherwise πŸ‘Ž

Consider independent E2s. I support :)

edit: I have pushed them, here they are, two pull requests as promised: Without E2 extension With E2 extension

Now it is Your turn, go vote again people, this time you vote for the one to be merged in official Wire :) The one with most up-votes (πŸ‘) should be merged (you can't vote for both!). Please, also post your reason after voting; otherwise, your vote won't count! For example: Why did you vote for it instead of voting for the other one?

RevoluPowered commented 7 years ago

It probably is a good idea, The exit point controller does half of this functionality (if it still exists in wire-mod).

Unsure about if it should be left on by default though, maybe it would be better as an E2 extension?

CaptainPRICE commented 7 years ago

The exit point controller does half of this functionality (if it still exists in wire-mod).

Yes, of course it exists.

Unsure about if it should be left on by default though, maybe it would be better as an E2 extension?

Given that Vehicle Exit Point exists, I see no reason why would it be made as (disabled) E2 extension in the first place, it is core Wire entity..

CaptainPRICE commented 7 years ago

The only thing to take care of here is that the input vector must be validated/checked (such as the point must be inside of world)..

shadowscion commented 7 years ago

If it's possible with core wiremod it should be possible with e2, imo. Same with the other missing things like entity():use(). I don't get this penchant for disabling things by default either.

Divran commented 7 years ago

The reasoning is that E2 is already too powerful. Some people think it's boring that you can do literally anything with one single entity.

It's also to stop bloating. Many other programming languages already suffer from this, and a good example is PHP. For example (and this is just one example), in PHP, there are even so many plugins and extensions that there are often several libraries that all do the exact same thing, and all of them are included and enabled by default (for example, mysql libraries). We don't want E2 to become as bloated as PHP.

In fact, some people argue that we should remove features from E2 to make it less powerful and less bloated, but we don't want to do that either because that may break everyone's old dupes and saved E2s.

A very good compromise to make everyone happy is to not add every feature ever to E2 just "because we can", and instead allow server owners to install plugins to make E2 as powerful as they want. This is what we've been doing for the past few years. Instead of adding a dozen random shitty features a week, we only add those that are objectively useful in every use case. Whether this specific use case matches this description is debatable. I think it doesn't.

shadowscion commented 7 years ago

The reasoning is that E2 is already too powerful. Some people think it's boring that you can do literally anything with one single entity.

I don't think the proper response to something as opinionated as "e2 is too powerful" is to forgo things that are objectively useful. Their arms aren't being twisted here, they don't have to use it.

in PHP, there are even so many plugins and extensions that there are often several libraries that all do the exact same thing

Okay, but this is about adding functionality that isn't there yet.

A very good compromise to make everyone happy is to not add every feature ever to E2 just "because we can", and instead allow server owners to install plugins to make E2 as powerful as they want.

Sounds good in theory, but in reality it just doesn't happen. What does happen is exactly what you said you want to prevent - 500 third party extensions that all do the same thing but with differing functions. You never know what will work where.

Divran commented 7 years ago

I don't think the proper response to something as opinionated as "e2 is too powerful" is to forgo things that are objectively useful. Their arms aren't being twisted here, they don't have to use it.

That argument doesn't work for all servers. For example, take a combat server where the goal is to build tanks and stuff to kill each other. What if they want to play capture the flag with their tanks? Having essentially player setpos (exit point - even if it's distance limited) would be kinda op since people would just teleport to the flag and back again. The argument "you don't have to use it" is just going to piss the admins of these servers off, because they now have to write a bunch of code to block or delete this new function. Personally, I don't really care about this, but other people do, so I have to think about that as well.

Maybe we could add a way to make it easier to block any function you want in E2, like it already is with tools via admin mods, but is that a good idea? That would mean E2 on different servers would probably be even more different than it already is (and that's the argument Syranide gave against adding such functionality).

Okay, but this is about adding functionality that isn't there yet.

Yes, exactly. Your point?

Sounds good in theory, but in reality it just doesn't happen. What does happen is exactly what you said you want to prevent - 500 third party extensions that all do the same thing but with differing functions. You never know what will work where.

No, what I want to prevent is this happening to the official wire repo. If admins want to do it to themselves then it's their funeral.

As I said earlier, we could make it easier to block arbitrary functions and then go crazy and add everything ever, but it seems like that would make you upset as well because then you'll definitely never know what works where. Applyforce will be blocked. setMass will be blocked. Find functions will be blocked. And so on (Of course, it's already possible to do this, it's just harder so not many servers bother). See? The solution that makes the least amount of people upset is the one we are already using. At least now you can be reasonably sure that the server will have the default set of functions.

Again, if we do add a way to block arbitrary functions, personally I wouldn't mind because I only play on a few select servers anyway. I'm basing my arguments here from what other people tell me, and forming a compromise, not from what I think.

CaptainPRICE commented 7 years ago

What if they want to play capture the flag with their tanks? Having essentially player setpos (exit point - even if it's distance limited) would be kinda op since people would just teleport to the flag and back again.

Do you realize a thing then? They can use Vehicle Exit Point still (unless they limited it, in which case they should have modified wire or written some code already, so they will also have to modify E2).

Ok, lets say I do this as a new E2 core extension (enabled by default obviously). Admins/Owners will just have to simply disable it via menu then, just like they should have for Vehicle Exit Point (also this itself doesn't have menu yet).. problem solved?


Since you have just said one "game idea". What I usually do, is provide "anti-cheat" for E2 games, like the one you have described. With my anti-cheat in place (doesn't require PP, it uses data-signals), it is so simple to detect "cheaters", that is a player who uses Vehicle Exit Point (either E2 or wire entity). So, it boils down to the matter of do we really need this as E2 core extension?

Divran commented 7 years ago

Do you realize a thing then? They can use Vehicle Exit Point still (unless they limited it, in which case they should have modified wire or written some code already, so they will also have to modify E2).

I already talked about this in my previous comment, about 4 lines down from the line you quoted. Any self-respecting admin mod these days has the ability to limit individual tools.

Since you have just said one "game idea". What I usually do, is provide "anti-cheat" for E2 games, like the one you have described. With my anti-cheat in place (doesn't require PP, it uses data-signals), it is so simple to detect "cheaters", that is a player who uses Vehicle Exit Point (either E2 or wire entity).

oookay? Seems like a waste of server resources to use E2 to detect these things, since E2 uses way the fuck more than plain lua. but sure whatever

So, it boils down to the matter of do we really need this as E2 core extension?

correct, this is the question

oldmud0 commented 7 years ago

Generally speaking, I support continuing adding functions to the E2 core, as many server admins don't care or don't bother with configuring Wiremod correctly (yet many people in those servers seem to use it). Having to ask an admin to add an E2 extension - and the admin actually doing it - takes a significant amount of time. Otherwise, the number of serious Wiremod servers loaded with all the extensions you want and with admins who actually care about configuring Wiremod is in very limited supply.

However, this extension is not one that should be added to core, because it covers an edge case that seems to give more opportunities for exploitation than genuine application. With this extension, you can basically teleport to any position in the map you want - and what if you mess up your coordinates or decide to use this to trap people? The RP and non-sandbox people won't seem too happy and will be more pressured to remove E2 (or even Wiremod altogether!) if they have not already.

Divran commented 7 years ago

The RP and non-sandbox people won't seem too happy and will be more pressured to remove E2 (or even Wiremod altogether!) if they have not already.

The consensus from the wire team about roleplay servers is generally we don't give a fuck (as far as I know). We pretend it doesn't exist. But yeah all your points are correct

CaptainPRICE commented 7 years ago

With this extension, you can basically teleport to any position in the map you want

You are very wrong there. Don't make the judge until you see the code. For your information: I have made it co-operate with "wire_pod_exit_distance" ConVar. I am working on this, PR is in progress.. I am changing it around a bit. I will provide 2 PRs here, one without E2 extension and another with E2 extension.

CaptainPRICE commented 5 years ago

Dead. I do still have a backup of the repository on my old hard drive tho.. I don't know if I have enough motivation to ditch this. RIP...