dnd 5th – How to manage a table mixing too often the role of the player of selection and that of the players?

So, after a while, I came back to play RPG live (not online) because one of my friends, who is used to D & D 3.5, asked me to help him with a 5th table where almost all players are new to D & D (most have already played other systems before).

The problem is that both parties seem to be confusing their role in the game. For example, the very first narration of the DM imposed forced movements on a player character (the DM moved the PC itself, instead of the player describing where she was). wanted the character to go). Another example is that the DM constantly told how the characters feltfor example, "you are afraid," "you trust that person" (when they cast a bad glimpse at a high deception roll), and so on.

Similarly, players often wonder if an NPC should behave as he did, which has significantly slowed the pace of play. Players also seem to have a problem with the suspension of disbelief – or just trust the DM – complaining about how something happened. For example, an auxiliary NPC appeared "from nowhere" and the players lost a lot of time complaining that their characters did not perceive the NPC to cross it before (which could easily be a teleportation magic, an illusion, the simple fact is a very good stealthy roll, or an infinite number of other explanations).

In itself, I do not think it would be a problem if everyone had fun, but as I mentioned, my main concern is that these arguments slow down the game too much. note that everyone is a little frustrated with everything.

The DM eventually resorted to (a bad IMO) in-game solution (which was to knock out the player's PC, which slowed down the game for a few hours) so that the story could continue, but in addition to Be extremely temporary, he also (rightly, I guess) further frustrated the player.

For more precision, the DM does not intend to fuck in the air with the players; From what I understand, he does it to advance the story. The players, meanwhile, have the feeling that all that is not going according to their expectations / projects is the fact that the DM tries to make them mess and lose too much time to argue about it.

In short, how can I gently remind them that the role of the players is to describe the actions and feelings of their character (and that the DM must avoid interfering in this part), while the role of the DM is to describe the environment, the consequences of the actions and the behavior of the NPCs (and the players should probably believe that if the DM says that something has happened, then something has happened, and do not lose a half time in a dispute over whether it is impossible, unfair or otherwise).

I feel that this could be related to their previous RPG experiences that involved a bit of the old dynamic "DM vs. Players". That's why sometimes the DM seems to think he should Obligate the PCs to do something (do not believe that the player has the honesty / the ability to play according to what makes more sense)1 and the players feel that everything is a diabolical plan of the DM to kill their characters.2

If relevant, the adventure is a homebrew (based on a book written by the DM).

The players are all between 20 and 30 years old, with the exception of a 19-year-old girl (and perhaps the least problematic – she is very calm and has experience in 5th).

1 More details on an example already mentioned: an NPC lied to the PC. This particular PC did not have any kind of a priori information to know it was a lie (although other computers had, so the player had it) and had a very bad test Insight. The DM immediately reported that "You trust him!" The player accepted – and he was going to play role-play in that sense, that is to say there was no reason for the DM Obligate this on the player / character.

2 The NPC who "came out of nowhere", on which the players lost minutes to argue, was in fact an ally. They feared the NPC would appear behind them because they thought they were being murdered. In the end, she was just an ally who was watching them closely to see if she could trust them and help them eventually. She decided to leave the shadows when she thought there was enough evidence that the PCs were trustworthy.

theme settings – Drupal 8 selection, storage, custom font caching

I would like you to talk about font paths and font caching in Drupal 8 (8.7.2).

My goal is to use a custom font without using the @ font-your-face-face module.

Just to try, on my local installation, I added the font family to line 17 of core / themes / bartik / css / components / site-branding.css

At this point, my font file resides in my computer's folder, the Drupal chachage is disabled.

In fact, the font is displayed correctly – no need to put the font file in a drupal directory, no need to set a path to the font file.

How can this work? How does Drupal know where to shoot the police?

Even stranger, fonts remain correctly displayed even after deleting the desktop font file and removing the cache in Drupal.

Can anyone understand how Drupal extracts and stores fonts?

Thank you very much in advance

dynamic programming – Selection of elements from two arrays without duplicate index to obtain the maximum sum

Given two tables of length n, you must choose exactly k the values ​​in Table 1 and n-k the values ​​in the other array, such that the sum of these values ​​is maximum, with the constraint that if you choose a value in any index of the array, you can not choose in the same index of the second array.

I have encountered this type of question in many places but I have never been able to solve it, and I still have the intuition that it is about A dynamic programming problem but never able to prove it. I do not understand well if there is a dynamic solution or not?

Raycasting – What is the most effective way to implement accurate ray selection for scenes with large mesh?

I'm wondering how to implement ray selection in the most efficient way for scenes with very large stitches (> 1 million faces)? Right now I'm using BulletSharp physical envelope with TriangleMesh that works but is not very fast … Sometimes bulletsharp crashes because the allocator can not mallocer a large enough memory block in an adjoining zone. 32bit process.

I am looking for alternatives to BulletSharp in C #. I found that the Helix Toolkit used a number of bytes per inner mesh to perform the radius selection, but did not provide a collision test between the meshes, which I would have also need at some point.

My current conclusion is that it is best to use the Helix Toolkit method for ray selection and a custom method for the mesh collision test because I do not need body simulations rigid.

8 – Webform dynamic selection options based on the state of another element

Suppose that there are two elements selected with dynamic options (via an option hook, derived from an external resource): A and B. There is also a data source providing a relationship determining the B options to appear when a particular selection is displayed. A is chosen.

The source data for each element in addition to the relationship data source can not be predicted or controlled by Drupal.

For example:

A Options at a particular moment

| name | code |
| Group 1 | 1 |
| Group 2 | 2 |
| Group 3 | 3 |

Options B at a particular moment

| name | code |
| Thing 1 | 1 |
| Thing 2 | 2 |
| Thing 3 | 3 |

Relationships at some point.

| group | thing
| 1 | 1 |
| 1 | 2 |
| 1 | 3 |
| 2 | 1 |
| 2 | 2 |
| 3 | 3 |

So, if group 1 is selected for A, options 1, 2 and 3 should be options for B

If group 2 is selected for A, then things 1 and 2 should be options for B

If group 3 is selected, only thing 3 should be an option for 3.

We are currently implementing this requirement via the basic FAPI and ajax callbacks, but we would like to convert it to use Web forms.

What would be the recommended approach to solve this problem with Webforms? Do not forget that modifying source data is not an option, as it can not be predicted or controlled by our unit and adjustments must be reflected in real time.

python – I was wondering if I could have a perspective on optimizing a function that has nested for loops for feature selection?

I looked for a tutorial and created a function based on his script. It is basically used so that I can select dependent variables that constitute a subset of a data block. It works but it's very, very slow.

How could I flatten a nested for loop like this?

I tried to implement an enumerated version but it did not work. Ideally I
as the complexity of being linear, currently it is at 2 ^ n. I do not know how I
can flatten the nested for loop, so that I can add the results of a function to a list.


Let 𝑀_ {0} be the null model that contains no predictor. This model simply predicts the sample mean of each observation.

For 𝑘 = 1,2, ...., 𝑛:
Adapt all models (𝑛  choose) containing exactly predictors.

Choose the best one from these models (𝑛 choose) and call it _𝑘.
Here, the best is defined as having the smallest measure 𝑅𝑆𝑆 or equivalent.

Select the best model among 𝑀0, 𝑀1, ..., 𝑀𝑛 using a prediction error validated by the cross ,, BIC, 𝑅2𝑎𝑑𝑗 or any other method.
# This function integrates a subset of a data frame representing
# variables (X) and a column for the dependent variable (Y). This function is suitable
# separate models for each possible combination of k predictors (which is
# according to the column length of X), then select the best subset. the
The resulting output is an image.

def BestSubsetSelection (X, Y):
Number of predictors
k = len (X.columns)
# Stores RSS from a linear regression model
RSS_list = []
    # Stores the R square from a linear regression model
R_squared_list = []
    # Stores the features for a given iteration.
feature_list = []
    # Stores the number of features used for a given iteration. This corresponds to the list of features.
numb_features = []

    # Loop on all possible combinations of k features
for k in the range (1, len (X.columns) + 1):
# Loop on all possible combinations: from 11, choose k
for combo in itertools.combinations (X.columns, k):
# Store temporary results
temp_results = fit_linear_reg (X[list(combo)], Y)

# Add RSS to RSS lists
RSS_list.append (temp_results[0])

# Add R-Squared list To R-Squared list
R_squared_list.append (temp_results[1])

# Add feature / s to the list of features
feature_list.append (combo)

# Add the number of features to the list of features
numb_features.append (len (combo))

df = pd.DataFrame ({
& # 39; No_of_Features: numb_features,
& # 39; RSS & # 39 ;: list_RSS,
& # 39; R-Squared & # 39 ;: R_squared_list,
& # 39; Features: list_functions

# Find the best subsets for each number of features

# The smallest RSS
df_min = df[df.groupby('No_of_Features')['RSS'].transform (min) == df['RSS']]# The largest value of R squared
df_max = df[df.groupby('No_of_Features')['R-Squared'].transform (min) == df['R-Squared']]display (df_min)
display (df_max)

# Add columns to the dataframe with the RSS and R-Squared values ​​of the best subset
df['min_RSS'] = df.groupby ('No_of_Features & # 39;)['RSS'].transform (min)
df['max_R_Squared'] = df.groupby ('No_of_Features & # 39;)['R-Squared'].transform (max)

return df

A copy of the full implementation can be found here: https://github.com/melmaniwan/Elections-Analysis/blob/master/Implementing%20Subset%20Selections.ipynb

algorithms – Data structure for selection of K elements and summation

I have a problem in which I can select a number Z of elements in a given array, execute XOR on each of them with a given value Q any number of times. I must do this optimally so that the sum of the array is maximized. Is there a data structure I can use that can do this effectively or an algorithm I'm not aware of?

I tried to find the maximum possible value for each element (using XOR / ignoring it), sorting the array, then making the selection, but that did not work too, which leads me to think that the greedy approach will not work here.

I am mainly looking for an algorithm that can help or a data structure, not necessarily the code.

For example, given Table 1 2 3 4 5, Z = 2 and Q = 4, the answer is 23 because I can take XOR from 1 and 2 with 4 and from 3 and 4 with 4 as well.

programming practices – Implementation of multilevel random selection


I have a structure like this:

  • level 1 elements represented by a capital letter (A, B, C, D, …)
  • level 2 elements represented by a lowercase letter (a, b, c, d, …)
  • level 3 elements represented by numbers (1, 2, 3, 4, …)

these elements are grouped in a "combination" composed of:
(level 1 element, level 2 element, level 3 element) always in that order.
for example. (A, c, 5)

Let's say that level 1 objects are only 4: A B C D
Level 2 elements are the first 10 letters: a, b, c, d, e, f, g, h, i, j
level 3 elements are represented by natural numbers up to 30

All possible combinations are not considered valid! The appropriate combinations are grouped in a list:

(A, f, 3)
(A, f, 8)
(A, f, 10)
(A, j, 23)
(B, h, 1)
(D, D, 30)
(D, g, 18) 

The combination list does do not allow duplicates so each combination is unique.


  • Select at random 1 item from 1 level out of all possible (A B C D)
    for example. the random selection gives: A
  • Collect all the combinations that have A as lvl 1 item:
(A, a, 12)
(A, f, 3)
(A, f, 8)
(A, f, 10)
(A, j, 23)
  • Now starting at level 2, there are 2 elements in these 5 combinations (a, f, j), an item is selected at random. Let's say that the selection gives F.
    retrieve all the combinations that have F as n ° 2
(A, f, 3)
(A, f, 8)
(A, f, 10)
  • From level 3, there are 3 elements in these 3 combinations (3, 8, 10), an item is selected at random. Let's 8.
    identify the unique combination:
(A, f, 8)

In addition, this process is repeated to choose a second random combination. But in this case, there is another limitation. The new combination can not contain the same level 1 element. So, it has the following form:
(all but A, level 2 element, level 3 element) or
(not A, level 2 article, level 3 article)

All these operations are performed to transmit the combination to another application as input.


  1. What do you think could be the most effective way to implement such a process?
  2. Is it worth it to use a relational database? (I'm waiting for a very complex query)
  3. Is it better to perform this type of operation using a programming language?
    for example. pandas dataframe in Python)

PS: I do not know if this question belongs to this section, so please give me comments about it.

python – optimizing the selection of subsets

I have a vector with about 300 different categories. I have to select a subset of this vector that maximizes the result of a given function. Can any one tell me what kind of problem it would be? And how could I solve this problem? In some places I have suggested using a genetic algorithm by selecting random subsets, but I do not know if that would really be the best path.
Another important information is that for each selected subset, the function takes about 30 seconds to perform the calculations.

woocommerce – selection of categories containing products with label / category

I have a lot of product categories on the website – 100+
some products are marked "is_new" via a custom field. When this happens, they are automatically assigned to a "New" product category. Which means that each product can be assigned to its own category + category "New".
When I go into the new category in the front-end, I want users to see all categories that contain "new" products for navigation.

What would be the best way to do this? First select all the "new" products and then get a tree from their categories? or is there a better way?