How to make crime meaningful for rich players?

For the D&D 5e campaign I’m DMing, the party has been caught for a murder of a government official and put on trial. Out of character, a player pointed out that his character can just pay for a Resurrection to be cast, absolving them of the crime. I pointed out that the trauma would still be criminal, and he responded that he can just cast Modify Memory, so the person will have no memory of the incident (which could be beneficial to both parties; the option to not even remember a traumatic experience seems pretty tempting to me).

How do I handle the consequences of a murder as a DM? If the person is restored to life and no one remembers the murder, it seems like no crime has been committed.

More broadly, most crimes I can think of can simply be fixed with magic. Assault (and even some more heinous crimes I won’t mention) can be "fixed" with healing/modify memory. Rejuvenate / reincarnate will even restore body parts.

A mending spell applied repeatedly can fix some types of property damage.

If you could find a wizard/sorcerer willing to do it, a Wish spell could "fix" pretty much anything.

The important players here are a cleric and wizard(the wizard started the discussion with me). All level 13 (so they have access to 7th level regenerate). The cleric chose the noble backstory, and has a good bit of gold to burn.

Ultimately, my broadest question would be: how do I make laws apply to (rich) players who seem to be able to use magic to "undo" crimes committed? While I have D&D 5e in mind, any sufficiently powerful magic system would appear to have this problem as far as I’m concerned.

What is a make sense (meaningful) example of language that an unrestricted grammar could generate?

I have learned that:

  1. Unrestricted grammar is used to define (or describe) a formal language.
  2. Unrestricted grammar is used to define recursively enumerable set [https://en.wikipedia.org/wiki/Recursively_enumerable_set][1].

I’d like to find a meaningful example for #1 case which is similar to below context sensitives grammar example to learn the purpose of unrestricted grammar. I could find a meaningful example for context sensitives grammar but I could not find a one for the unrestricted grammar yet. Could you help me?

Language for “Network racing game record” with below record instances:

Mr. Bean Male Player 1

Ms. Emma Female Player 2

Mr. Hải n/a Computer 3

Ms. Tú n/a Computer 4

Production rule:

S ⟶ Title Name TAB Sex UserType TAB Rank

Title WomanName ⟶ "Ms. " WomanName

Title ManName ⟶ "Mr. " ManName

WomanName TAB Sex "Player" ⟶ WomanName TAB "Female" "Player"

ManName TAB Sex "Player" ⟶ ManName TAB "Male" "Player"

Name TAB Sex "Computer" ⟶ Name TAB "n/a" "Computer"

Name ⟶ WomanName

Name ⟶ ManName

Sex ⟶ "Male"

Sex ⟶ "Female"

UserType ⟶ "Player"

UserType ⟶ "Computer"

Rank ⟶ "1"

Rank ⟶ "2"

Rank ⟶ "3"

Rank ⟶ "4"

WomanName ⟶ "Emma"

WomanName ⟶ "Tú"

ManName ⟶ "Bean"

ManName ⟶ "Hải"

TAB ⟶ "\t"

How can I help my players make meaningful choice during dungeon navigation?

Foreword: I run a D&D 4e campaign, but I think that this question is overall system-agnostic.

Recently I’ve somewhat shifted my D&D campagin towards a more traditional dungeon crawling style. However, a problem I’ve noticed is that when the PCs are exploring a dungeon, they have no way of choosing where to go next except by random chance. For example, if the current room has two exits, they have will have no way to choose which door to go through except by flipping a coin.

I’d like to change this, because I don’t want the players to be forced to act at random. I want the players to have enough information that they can make strategic decisions about their movement through the dungeon, but I’m just not sure how to do that.

How can I give my players hints as to what they’ll find in different dungeon paths, so that they can make logical decisions about how to explore the dungeon?

Balancing Karma rewards to be meaningful

I have a shadowrun 5e group that sadly only comes together once or twice a month. In that group we focus most of our time on the roleplaying aspect of the game, rather than advancing the run itself. This leads to up to 3 months until a official run (just as a reference) is completed.

Those runs reward about 6-9 Karma per PC if they have fulfilled every optional goal as well. In addition to that we like to pass up to 50% of the default values as RP-Karma as a reward for very well played scenes, leaving a runner with an average of maybe ~9 Karma in 3 months => ~3 Karma per month.

Considering that for example Strength 4 to 5 costs 20 Karma we are looking at over half a year of charakter play and about 9 play sessions just to raise one attribute.

Is this supposed to be so awfully slow or are the rewards calculated for groups who rush through 2 or 3 runs in one evening (I heard those exist).

I am trying to just multiply every Karma gained by 4 or 5, but still this feels kinda slugish in comparison with other systems.

How do you balance your character progression?

How to assign users unique and meaningful identifiers to child users while avoiding various pitfalls?

In my application, we need to assign unique identifiers to users, but this is turning out to be trickier than I would have thought.

We load all users from a bulk feed, and do all the assigning programmatically. Users can’t pick their own.

We also want all user names to be the same length, for certain display purposes.

Also, the users are students in a school district, and they are children, some of them quite young, so the names have to be short and reasonably memorable. So just generating a 7 digit code isn’t very user friendly.

We know the name of each child, but there are laws about identifying children. We wouldn’t want, for instance, someone to be able to post a screenshot of their username online and have someone be able to identify their real name.

My first idea for this was to choose, say, the first 3 characters of the first name, the first 2 characters of the last name, and then append a sequence number to avoid collisions. So mine would be something like josfr123.

This failed, though, because some kids have names with fewer than 3 letters. But the more damning problem was that a small number of these combinations produced swear words, and that is so bad in software for children that we can’t allow it to happen even once.

It turns out to be surprisingly hard to prevent this, because there are so many combinations of letters that don’t spell anything, but if you tried to read them out loud, you’d get something obscene. Catching all of these, reliably, seems impossible, and even if I could, I’d still need to find some way to generate a name for that user.

So what to do?

NPC died a meaningful death, would You let the players to ressurect him? What is Your expirience?

I’m DMing for a group of six people.

On last session we had an NPC sacrifice himself to save the people he was entrusted to defend. I don’t want to go into details here but after he killed himself, sacrificing his gift and curse of immortality, for every other soul he cared for, his duty….. me and my players were crying.

On the final scene my voice almost failed me.

After the session they said they loved and hated the end at the same time; it was beautiful and horrifying. After the session they asked me if there was any way they could saved him and how. We talked through all of what happened for over 2 hours, it was 4 am, we started at 4 pm. One of the players whose character was a best friend with an NPC, he saved him from a death sentence (NPC was innocent) said he was heartbroken.

They said that they were so happy for him (an NPC) to find a closure, and they were happy for him to be free at last, and at the same time they so much wanted him to live and be happy.

I loved him too, but I know what he would have wanted, and it was so meaningful for everyone, I don’t want to ruin it.

They want to resurrect him even and give all they have to let him live free. In our world a soul must be willing to return.

I have no idea what to do… I want him back for them to see him again in the future, to see him happy, and at the same time I want this moment to remain powerful for all of them.

Any advice, guys?

E: Sub-process /usr/bin/dpkg returned an error code (1) – but how do I find the meaningful error messages in APT’s output?

I have encountered various package management problems that cause APT commands to fail with output that ends with this line:

E: Sub-process /usr/bin/dpkg returned an error code (1) 

Occasionally other error codes may appear such as 100 which means dpkg is not there, but 1 is the most common error code.

Unfortunately this error code tells me almost nothing about what actually caused the error or how I should solve it. Almost every package management issue I see, regardless of its cause or solution, produces the same error!

So, where will I find the useful part of the output, which I can search for online or ask questions about on Ask Ubuntu?

How to intelligently discover and track meaningful changes in HTML with a C++/Qt backend, that facilitates accurate scraping and code injection?


Backstory (You can skip)

I work with Qt almost exclusively, and with the design philosophy, of

Develop everything as an API

The practice particular to this question, is the tracking of class members, emitting signals whenever their value changes.

For example, here is a general way I treat class members with the API philosophy, that for each member, there are a minimum of four components:

public:         QUrl url();            // returns a copy of m_Url  public slots:         void setUrl(QUrl url); // A designated url setter  signals:         void urlChanged();     // emits a signal whenever setUrl() is used  private:          QUrl m_Url;            // the object itself, with its state protected 

This has worked very well for me so far, given that as soon as I need to add functionality dependent upon m_Url, I need only do this:

connect(this, &MyClass::urlChanged, &foo, &MyOtherClass::doBar); 

And this is dependable because fundamentally, foo.com/foo to foo.com/bar will always be a meaningful change, the perfect signal that informs me when to try JavaScript code injection. (Well not really perfect. Race conditions arise, making code injection convoluted and messy, one of the issues I would like to solve by designing a better API than what I have now.)


Now, I must say HTML and web development were not my original fortes into programming, and as such I did not understand why these signals would exist:

  • https://doc.qt.io/qt-5/qwebenginepage.html#selectionChanged
  • https://doc.qt.io/qt-5/qwebenginepage.html#urlChanged
  • https://doc.qt.io/qt-5/qwebenginepage.html#titleChanged

But, there was no signal for htmlChanged. Instead, all you have is:

  • https://doc.qt.io/qt-5/qwebenginepage.html#toHtml

Which is a function that will grab the current state. I would have to manually call it on a timer every time I wanted to check for a state change.

So that is what I did, to which I then discovered that even a static web page’s HTML, or at least the one I was working with, was in constant flux, in which the changes were not meaningful whatsoever, and as such is why no such signal was included by the Qt developers.

The heart of the issue

So I know what you are saying, “meaningful is a subjective and situational term”, so let me define what I mean by meaningful

This is a snippet of HTML, say out of 10000 lines, the change that I was picking up upon a webpage:

<div class="chat-bubble right" style="top: 0px; opacity: 1;"> 

changes into this

<div class="chat-bubble right" style="top: 0px; opacity: 0.997396;"> 

and goes back again in a constant loop. The fact that it goes back to the original state in a constant loop, is what makes this change not meaningful, and for that issue, it is not something that I know how to intelligently keep track of. My original strategy of just detecting every change in the html string and parsing it on an interval, seems to me, to be a very bad approach.

And yet, that being said, I do really need signals that will tell me when things like a button appears or a timer runs out, so that I can then inject JavaScript code which will push said buttons at proper times.

The fundamental questions

  • How do I intelligently discover and keep track of meaningful changes in HTML? Like for example, lets say that only one value changes in a 100,000 line html document changes; Do I reparse the entire document, compare, and find the change, or is there a way to avoid all of that and fish out the difference?

  • What API design philosophies, or existing API’s, should I employ when interfacing with HTML, that will give me the correct signals to do code injection, or when to scrape data?

The answer ideally needs to take into account, that the backend is Qt/C++ oriented, so I can interface easily with the other libraries I depend on. I can do things like inject JQuery into the webpage, or track printfs and the like. If it matters, the current engine I am using is based upon Chromium, https://wiki.qt.io/QtWebEngine