ECM crime - Don't use your ECM near a station
I hesitated a bit to submit this because of the overly harsh reaction if you happen to press the ecm button while taking off, but this is the same for all crime, dumping waste or firing a weapon. You will be terminated. I also think there could be some more around this like a couple of the lights going out on the platform or the BBS being out of order the next time you land there. ECM should be used responsibly.
I hesitated a bit to submit this because of the overly harsh reaction if you happen to press the ecm button while taking off,
Always wise to have some distance in situations of discharge....
I do believe the new equipment system aims to add a arm/disarm for weapons, but I could be wrong. Would be good to have for ECM as well.
I don't mind the naming of onUseECM that seems to match the rest of our scheme 🤷
Don't we have a crime system where we issue a fine and DON'T try to kill the player? 🤔
My specific problem was that the onUseECM event is only ever triggered if the ECM system has been clicked within a specific radius of a space station, which is absolutely not the behavior you'd expect from the event name.
In general, the ECM system really needs a re-think and I'd prefer to avoid hardcoding more behaviors into it until we've had a chance to do a design pass over it.
Thanks for the feedback!
DON'T try to kill the player? 🤔
Memo: don't try to kill the player...
I had a vague idea that you could have things break down on the station if it's close enough when you fire the ECM. Such as some of the light's on the pad going out or the BBS being blank after an outage with a message of failure.
Heh, handful of reputation decrease could be apt as well.
Rebased and gave it a quick test. I also tested it rebased on #6128 and it works intended with no overaggressive police.
I do believe the new equipment system aims to add a arm/disarm for weapons, but I could be wrong. Would be good to have for ECM as well.
One for both i assume.
Don't we have a crime system where we issue a fine and DON'T try to kill the player? 🤔
It's not really fine tuned. The level over which the police will 'open fire until dead' is a fine of 300$. The lowest base fine of any crime is 500$. It's addressed in https://github.com/pioneerspacesim/pioneer/pull/6128
Heh, handful of reputation decrease could be apt as well.
That would be appropriate, yes. And a future BBS news flash module will bring it up.
My specific problem was that the
onUseECMevent is only ever triggered if the ECM system has been clicked within a specific radius of a space station, which is absolutely not the behavior you'd expect from the event name.
OK. Looking into it.
My specific problem was that the
onUseECMevent is only ever triggered if the ECM system has been clicked within a specific radius of a space station, which is absolutely not the behavior you'd expect from the event name.
Would unlawfulUseECM work?
- Rebased on latest master
- onUseECM changed to unlawfulDischargeECM
- Radius of ban effect same as effective radius (4 km).
Given that you're hesitant about submitting it,
The issue I had with this PR is the sudden execution by the police if you use it in proximity of a space station. This is fixed in https://github.com/pioneerspacesim/pioneer/pull/6128
This is acceptable. I'd prefer to eventually move the responsibility for generating the unlawfulDischargeECM event into Lua, as the current implementation hardcodes part of the legal system in C++. That's not an immediate concern right now however, and can be tackled in the future when countermeasures gameplay is looked at in more depth.
OK, squashed. The only thing I can think of that's left to do here, is decide on the level of fine and distance of effect. The base fine 500$ is the same as three other offences (illegal jump, weapons discharge, and contract fraud). The distance is the same as the range of effect (4 km) and maybe it could be a multiple of this. I have no preference of either of those values and it can be tweaked later.
A good "fudge" number for enforcement range would be around 15km from the city center, as that prevents any of the buildings for currently-generated cities from being within the effect radius.
The fine being $500 is fine by me, though maybe we make it $750 since it's more difficult to "accidentally" click the ECM button?
The fine being $500 is fine by me, though maybe we make it $750 since it's more difficult to "accidentally" click the ECM button?
I changed it to $750 to get some variation.
A good "fudge" number for enforcement range would be around 15km from the city center, as that prevents any of the buildings for currently-generated cities from being within the effect radius.
I thought selecting the legal range would be trivial. It only is if it's within the ECM_RADIUS. We explicitly test for ECM_RADIUS here:
https://github.com/pioneerspacesim/pioneer/blob/9f0f20639afe91bc5c415713665d5cc8acc44205/src/Ship.cpp#L727
If it's larger I think I would have to create an outer test for the legal range and that would kind of look bad. Maybe wait with this until you move it to the LUA side?
If it's larger I think I would have to create an outer test for the legal range and that would kind of look bad. Maybe wait with this until you move it to the LUA side?
That's fine - this illustrates my point about hardcoding the legal system within C++ though... :wink:
That's fine - this illustrates my point about hardcoding the legal system within C++ though... 😉
Right, got it!
I think this PR is ready.