pioneer icon indicating copy to clipboard operation
pioneer copied to clipboard

ECM crime - Don't use your ECM near a station

Open zonkmachine opened this issue 1 year ago • 1 comments

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.

ecmdischarge

zonkmachine avatar Sep 07 '24 12:09 zonkmachine

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.

impaktor avatar Sep 07 '24 17:09 impaktor

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? 🤔

fluffyfreak avatar Feb 25 '25 10:02 fluffyfreak

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.

sturnclaw avatar Feb 25 '25 16:02 sturnclaw

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.

zonkmachine avatar Mar 29 '25 17:03 zonkmachine

Heh, handful of reputation decrease could be apt as well.

bszlrd avatar Mar 29 '25 18:03 bszlrd

Rebased and gave it a quick test. I also tested it rebased on #6128 and it works intended with no overaggressive police.

zonkmachine avatar May 05 '25 22:05 zonkmachine

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 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.

OK. Looking into it.

zonkmachine avatar May 05 '25 23:05 zonkmachine

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.

Would unlawfulUseECM work?

zonkmachine avatar May 12 '25 12:05 zonkmachine

  • Rebased on latest master
  • onUseECM changed to unlawfulDischargeECM
  • Radius of ban effect same as effective radius (4 km).

zonkmachine avatar May 12 '25 13:05 zonkmachine

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

zonkmachine avatar May 12 '25 14:05 zonkmachine

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.

sturnclaw avatar May 13 '25 21:05 sturnclaw

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.

zonkmachine avatar May 14 '25 16:05 zonkmachine

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?

sturnclaw avatar May 14 '25 18:05 sturnclaw

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?

zonkmachine avatar May 14 '25 21:05 zonkmachine

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:

sturnclaw avatar May 23 '25 19:05 sturnclaw

That's fine - this illustrates my point about hardcoding the legal system within C++ though... 😉

Right, got it!

I think this PR is ready.

zonkmachine avatar May 23 '25 20:05 zonkmachine