## EllepticPi argumet is complex. so can not plot it. How to handle this problem?

``inttau[r_]=-(1/Sqrt[0.0345106153943703 - ((37.3042 - r) (-25.578 + r) (62.8822 +   r))/(3000 r)]) ``

This is my function of r, now I integrated it w r t r

``tauanalytical[r_] = Integrate[inttau[r], r] ``

This is what I got after integration, I got this result.

``-((2.3094 Sqrt[1. + 62.1447/r] (-31.0723 + r) EllipticPi[3.,ArcSin[0.57735 Sqrt[1. + 62.1447/r]], 1.])/Sqrt[-0.965489 + 20./r + 0.000333333 r^2]) ``

later I tried to find the numerical value of;

``tauanalytical[30] // N  ``

I got this, no the exact number , which I was expecting

``-126.491 EllipticPi[3., -1.5708 + 0.153761 I, 1.] ``

Here the second argument of Ellepticpi comes out to be imaginary , it should be real . Please provide necessary assistance.

## How should I as a GM handle a player *character* who has a bad memory?

There is a player in my campaign who’s characters defining trait is that they have a bad memory.

I like creating mechanical representations of character traits if it makes sense to do so.

I’ve given the player a Homebrew feat called "bad memory" that basically says "roll disadvantage on any memory based intelligence checks".

My reasoning being that a character with bad memory should not have the same statistical probability of rolling well on a memory based check as a character with a good memory.

This player is adamantly fighting me on this though.

This is his reasoning:

The game already has the scaffolding and complexity in the locations where it is required. There are reasons why things like forgetfulness are included in the traits and features yet don’t have mechanics attached to them. If it was appropriate they would have been added by the devs. Mechanics which make it harder to use a character, and especially mechanics which remove abilities from players, are things which are only used in very rare cases and only ever for very short periods.

Note: This player is a very good role-player. It feels wrong to me to not represent the bad memory mechanically though.

How should I as a GM handle this situation?

## How do I handle rerolls for Savage Worlds

I know the Wildcard rolls function like this output [highest of [explode 1d6] and [explode 1d6]] How can I factor in a reroll? Assuming I miss the target number of 4, reroll the output [highest of [explode 1d6] and [explode 1d6]].

Everything I try does not run…

## How to handle time in D&D 5e

I want to run a campaign where time is a central factor, in the sense that NPCs will be certain places at certain times, and learning these patterns is important, but I’m not sure how to handle it. In combat, I can use the “one turn is 6 seconds” rule, but how do I keep track of time elapsed while my players traipse around the town? While they talk to NPCs?

## How should a player and GM handle an ability that necessitates a player seeing a GM’s roll?

A Dual-Cursed Oracle gets the following Revelation at 1st level:

Misfortune (Ex): At 1st level, as an immediate action, you can force a creature within 30 feet to reroll any one d20 roll that it has just made before the results of the roll are revealed. The creature must take the result of the reroll, even if it’s worse than the original roll. Once a creature has suffered from your misfortune, it cannot be the target of this revelation again for 1 day.

This can be used against any creature, including those the GM controls; indeed, that appears to be the intent of the ability, hence the name Misfortune. The problem is that in order for it to work on said creatures, the player needs to see the GM’s die roll, which to my knowledge is generally frowned upon, and see it whenever any enemy makes any save since Misfortune can potentially be activated at any time. Is there a better way to handle this?

Similar abilities include a Fate Cleric’s Tugging Strands, and a Nornkith’s Fate Weaver.

## How do I handle players that don’t care for the rules I put in place as the DM and question everything I do?

I am DMing a game of dnd 5e or close to it. It’s a homebrew campaign. We are mostly new to D&D with the exception of 2 players that play with other groups.

I have 2 players that seem to question everything I do as a DM and make the game hard to DM. One of the things they question is cantrips.

I had one of my players call my ruling stupid and log out. To put it into context I make my players roll to see if they can land the cantrip. 2 of my players have recently questioned why they have to roll at all and why it just doesn’t do what they believe it should do. But there is nothing in the rules about rolling and cantrips.

It was a cantrip called "mend" and he was trying to use it to repair his armor which had been broken. I made him roll to see how well he repaired it and he got a 2 so it didn’t repair much. He went behind my back and spoke to another player about how it was stupid and "that’s not how cantrips work" even though he was able to cast the spell, just not well.

I don’t want to just put my foot down and say "I’m the DM, what I say goes" but they won’t listen to my reasoning and just keep saying I’m wrong. How do I handle this situation? It’s getting to the point where I am considering stopping DMing all together.

## Is MySQL more scalable than PostgreSQL due to the difference in how they handle connections?

I’m trying to decide if either MySQL or PostgreSQL would be more suitable for an application that will get hit by potentially thousands of simultaneous requests at a time.

During research, one fact that stands out is that PostgreSQL forks a new process for each connection, whereas MySQL creates a new thread to handle each connection.

• Does this mean that MySQL is more efficient than PostgreSQL at handling many concurrent connections?

• How much of an impact does this difference have on how well both systems scale? Is it something that I should worry about to begin with?

## How do you handle a difficult DM in D&D?

I am currently in a long-running game with friends and family. The question is, what do you do about an inconsistent and abusive GM?

Example: Recently mid-session, there was a routine turn of combat played out similarly to any other combat we have done in the past. During this one, however, arbitrarily the DM decided to change already ruled upon and established ways in which we did combat. When it was pointed out to the DM that a ruling had already been made by them in the past that contradicts their ruling now, and that we had been playing this way for the entire campaign, he refused to hear it.

This was then followed up by a simple statement of "We can discuss it later, lets continue". But when that was said, the DM took a harsh "How Dare You" type of stance, loudly berated the player for suggesting that it could be discussed at a later time, proclaimed that there would be no discussion as it was "already had", and made it clear no questions were to be raised on their rulings.

The player and DM then proceeded into a circular "I don’t want to stop gameplay, we’ll talk later." followed by "We will not talk later, you are ruining this whole session by questioning me" argument that effectively killed the entire night.

In this instance I do not know how things should proceed. Should we inform the player that regardless of inconsistency and contradiction to previous rules they have to deal with the DM’s decisions and the fact that they won’t discuss anything further at a later time, or should we confront the DM letting them know that they don’t have to bend to player requests/questions, but losing it over the "audacity" of someone saying they will talk about a ruling later is pretty crazy.

I know in D&D that the DM is ultimately the decision maker, but is it ok for them to change their own rulings arbitrarily, and to tell players they aren’t allowed to discuss it?

This is not a campaign we can simply walk away from as it is a family event, but how do we address a DM like this IF we should address it at all?

## How to structure MySQL database tables for users and how to handle adding/removing permissions?

I am making a database structure for users, who can become part of a group, and within that group the admin of the group can assign as many permissions to a user as they would like.
This part seems easy. I have 4 tables:

`` USERS           GROUPS             PERMISSIONS      PERMISSIONS_GROUPS -------  ---------------------    --------------    ------------------- | UID |  | GID | UID(creator) |   | PID | NAME |    | UID | GID | PID | ``

I think this is the best way to handle this. I have a few questions about how to handle permissions for the creator of the group, and how to handle permissions if I were to delete a permission or add a permission.
For instance, when a user makes a group. Do I query all of the permissions and in a `while` loop insert a `PERMISSIONS_GROUPS` record for every row in the `permissions` table? If I add a new permission, do I have to query every `UID` from the `GROUPS` table and run a `while` loop to insert the new permission into `PERMISSIONS_GROUPS`? I just want to make sure I am not missing something simple here. For structure/scripting I am using `MySQL` and `PHP`.

## Window handle is invalid

I’m trying to implement an input listener for FNA (modern version of XNA). Since FNA does not supply any sort of way to listen to native input this has to be done through the windows API and native calls. This is how I set this up:

``public KeyboardListener(GameWindow window) {     var procedurePointer = Marshal.GetFunctionPointerForDelegate<WindowProcedure>(Procedure);     procedure = new IntPtr(SetWindowLongPtr(window.Handle, GWL_WNDPROC, procedurePointer.ToInt64()));     if (procedure == IntPtr.Zero)     {         var error = GetLastError();         throw error switch         {             ERROR_INVALID_WINDOW_HANDLE => new InvalidOperationException("Invalid window handle"),             _ => new InvalidOperationException(\$  "Unknown error message '0x{error:X4}'")         };     } }  // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowlongptra#parameters private const int GWL_WNDPROC = -4;  // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowlonga [DllImport("user32.dll", CharSet = CharSet.Unicode)] private static extern int SetWindowLongPtr(IntPtr hWnd, int nIndex, long dwNewLong);  [DllImport("Kernel32.dll", CharSet = CharSet.Unicode)] private static extern uint GetLastError(); ``

I construct the keyboard listener during the `Initialize` method of `Game`:

``class MyGame : Game {     protected override void Initialize() {         new KeyboardListener(Window);     } } ``

This is the method call that reports the error: `SetWindowLongPtr(window.Handle, GWL_WNDPROC, procedurePointer.ToInt64())` and it throws `"Invalid window handle"`. It’s worth noting that the example code I saw converted the pointers to `Int32` instead of `Int64`, but I am on a 64 bit machine so the pointers can not fit in 32 bits.

### What I’ve tried & figured out so far…

• Debugging tells me that both `window.Handle` and `procedurePointer` are non-null and at least point to something.
• I have tried to initialize it earlier or later, but that doesn’t seem to make a difference.
• Other native methods such as `SDL2.SDL.SDL_MinimizeWindow(Window.Handle)` work perfectly fine and don’t complain about the window handle.