-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fine-grained Illegal/Atrocity Control (was Parrot and Author governments enforce only Human and Hai systems.) #5141
Conversation
This (Cap'n Hector's ES imitation fining you and in general being a harassment to "illegal" play) is intended behavior. Plugins that add atrocity outfits are more than welcome to also modify the Author and Parrot governments to disable their ability to fine, or to add enforcement regions to limit the scope in which they fine |
The fine is fine, but he goes full hostile if you use the "atrocity" property. Is that also intended? Is "atrocity" never meant to be used in stock? Is this the intended behavior if content ever used it? I'm happy to change approach if there's a more as-intended way of implementing it, or closing if it's working as intended. |
Yes, the atrocity property invokes a death sentence for the player. If the player is landed and caught, they will promptly die. If in flight (e.g. scanned with "atrocity" goods/outfits or attempting planetary domination), then the player's relationship with that government becomes immediately hostile. |
"Atrocity" is intended to only be put on things that are so terrible that authors and responsible governments have included it on "destroy all instances upon discovery" lists. Rather like the "Omega Particle" in Star Trek lore. |
My question is whether, specifically, "Cap'n Pester" should attack the player on sight. He tends to be a bit out of scale with the locals in most parts of the galaxy. |
That's certainly true, but is consistent with the reference. What could be done, and I wouldn't be opposed to, would be to make the Parrot government only enforce within non-human systems, via an |
Now only restricts Parrot and Author to enforcing in Human and Hai space.
That was difficult to test. Had to temporarily patch the source code to make them appear a lot more often to get it working. I figured that they should probably enforce in Hai space too. |
An alternate solution would be a bit more expansive, but preserve the current fining behavior.
The bits from 2) are probably viable in their own pull, as the atrocity mechanic is not exactly used often and the current behavior seems not-quite-right, for governments that scan the player but don't care about atrocities. |
So if I understand you, the idea is that after the Free Worlds questline, the current state should be restored, and you should be attacked by Pester in say... Korath space? If that's the case, I'll have to rethink the content I'm developing (plugin for now, but trying to keep it stock-like). |
Implemented a new 'legality' node that allows individual governments to treat specific outfits or missions differently. No change to stock gameplay.
Pure mechanism now, no policy at all. No change to existing gameplay of stock or plugins that don't use it. And a nice new feature. And it still lets me solve the problem I'm having in my plugin. |
I like the idea of being able to set legality and fines differently depending on the government, but would you be able to provide some clarification of the syntax? In the example legality block, the named legality would be an atrocity in the Republic and a fine of 20,000 in the Free Worlds, but what does the And how I do integrate the legality block into an outfit? "Illegal name" and "Atrocity name" is a little unclear; do I replace For example, is this syntax proper or am I butchering it?
|
@BaddestApple Yes that's correct. Looks like you have it. And yes, the two defaults are mutually exclusive, exactly as you think. I was just listing all the recognized syntax, not providing an example. |
Anyway, I really like the idea of being able to establish different legalities for outfits. Could this be used to establish variable legality, not just between something being an atrocity versus being merely illegal, but also allow something to be legal? For example, the Remnant overall have an ambivalent attitude towards nerve gas. In their view, dead is dead: Killing someone by shooting them is just as bad as killing them with poison or blowing up their ship. There's nothing "good" or "noble" about it, it is just something unpleasant that sometimes needs to happen. Soldiers are expected to use the most appropriate tool for the job, whatever that happens to be. So they wouldn't care if someone was carrying nerve-gas... Unless the person wasn't friendly with the Remnant, in which case they'd be likely to "kill on sight" anyone with Nerve Gas. |
@Zitchas I'm pretty sure that if you set the fine to 0, by saying "default illegal 0" or "illegal 0", that the outfit or cargo is considered legal either by default, or by that government. I used it that way in my own test case. It wouldn't be very difficult to add the name "legal" to those cases, if anyone's still interested in this patch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs conflict resolution at a bare minimum; style fixes would be appreciated too.
w.r.t completeness:
- I'd like to see ideas / mockups for displaying variable legal status for outfits which are only illegal to certain governments, which would be obscured from the player based on the current PR.
- Should legality definitions be extendable via events?
- How should the game handle plugins defining the same legality node? As I read it, due to use of
map::emplace
, the first value always wins, which is the opposite behavior of most of the game's data models.
#ifndef LEGALITY_H_ | ||
#define LEGALITY_H_ | ||
|
||
#include "DataNode.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a forward declaration, with the full include in the TU.
// Duplicated for outfitter display. | ||
attributes[child.Token(0)] = legality->GetFine(nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like a better place for this is in OutfitInfoDisplay
, where we could then show additional details about the illegality of the given item in this or neighboring systems, or some other manner, that enables the player to know that some government / planet they are aware of (and probably only those they are friendly with / could land on) disapprove of the given outfit.
There definitely exists an argument for deferring that implementation of viewing the additional details to a follow-up PR, but a counterargument is that the current outfit display system does not hide information about an outfit being legal (or not), while with this system it could.
#include "System.h" | ||
#include "Legality.h" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a number of style nitpicks in the patch, e.g. unalphabetized includes, syntax like T* identifier
instead of T *identifier
, and non-spaced operators (e.g. var=-1
instead of the desired var = -1
).
@@ -16,6 +16,7 @@ PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
#include "Weapon.h" | |||
|
|||
#include "Dictionary.h" | |||
#include "Legality.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a forward declaration rather than an include, since this class only holds a pointer to the type
} | ||
else if(child.Token(0) == "atrocity") | ||
{ | ||
if(child.IsNumber(1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not your fault, but the class method really looks incorrect... "of course 1
is a number..."
To avoid calling child.Token(1)
when there is just "atrocity"
:
if(child.IsNumber(1)) | |
if(child.Size() < 2 || DataNode::IsNumber(child.Token(1)) |
I'd say "Yes, definitely" to the "should they be extensible via events?" question. Honestly, the more that events can change, the better. Especially for something like legalities. Heh. It'd actually be kind of interesting if "what is legal" in the Republic change a bit depending on how campaigns end. If you end up on the checkmate ending, then, say, certain illegal outfits aren't fined as heavily. (or maybe certain atrocities aren't are merely heavily fined) |
There's been some discussion on the Discord channel regarding whether to assign illegality at the government side of things or in the outfit itself. General consensus - and the approach I support - is behind doing it on the government panel. This prevents the problem of spoiling the existence of governments that the player hasn't met, and we can move any player-facing information to the logbook by creating an entry (and corresponding popup) any time they encounter an illegal outfit being sold. We'll also be instituting a new hailing panel that pops up when ships scan you, and it's cleanest to just do that all from the same place; the government definition. It's my hope that we can implement such a change as part of a more comprehensive smuggling overhaul as outlined in #6314 . |
I just noticed that one of the PRs I was asked to do is a duplicate of this (#6407) |
Vaguely paying attention but really not having the time to update the conflicts. Have at it. |
We really did it in different ways. Too different for me to be able to implement any of this really. I don't see any change tehhowch asked that I can actually apply to my PR.
As far as I can see its been a year this is open and you haven't found the time to address tehhowch's requests. |
I could probably find the time to clear the conflicts, but some of the requests looked a lot more involved than that. I'm not currently developing a plugin anymore, so a deep dive isn't likely at the moment. Your PR would have solved my problem anyway. |
In that case I'll be closing this PR since we prefer to only have active PRs open. |
Original Motivation
"Cap'n Pester" often shows up and scans the user. Normally this is fine, but if the player has any outfits with the "atrocity" property set, then suddenly they're being attacked by a Quarg Wardragon that just sorta shows up out of nowhere. That's a bit much even for such a terrible outfit.
New Approach
I added a new "legality" block to define how individual governments react to a class of outfits or mission cargos. They look like this:
The change is entirely backwards-compatible, but now in missions you can say "illegal name" and in outfits you can say either "illegal name" or "atrocity name", depending on how you want it to show up in the outfitter. Now there is no change to stock gameplay of any sort, or to gameplay of plugins that don't use the new feature.
Testing Done
Ran a savegame unmodified and tested both legal and illegal missions and outfits. Tried again with outfits from a plugin that uses the new feature as well.
How to test
Start a regular mission, visit Sol, get scanned. Nothing. Start an illegal mission, visit Sol, get scanned - fined. Start an atrocious mission, visit Sol, get scanned - dead. Same with outfits and outfits in cargo.