## Is there an RPG where each character controls a group of people? [closed]

I am working on the beta version of an online RPG game with some friends where the players all control a nation. Each player controls a large political party/guild/noble family. My question is if there are any RPGs the forum knows of where each player controls an organization or a group of people instead of a single player.

## How valuable is each magic item slot?

For context: I recently made a mid-level gunslinger character who wields a 15 lb. double-barreled shotgun. This is a problem, because this gunslinger only has 7 STR, so their light load is only 23 lbs. I wanted to solve this with an item that gave me continuous Ant Haul, and noticed that there already exists a wondrous item that does exactly this, but it’s a belt slot item, which obviously would interfere with a Belt of Incredible Dexterity.

In theory I could get an item with Ant Haul for a different magic item slot, but putting an existing wondrous item effect on a different item slot has to be very heavily regulated, due to the popularity of each slot, so my question is this: Which item slots would you consider of equal demand to the Belt slot? Or to bring it to a broader scope;

How high in demand would you consider each magic item slot in relation to one another?

ʸᵉˢ ⁱ ᵃᵐ ᵃʷᵃʳᵉ ᵗʰᵃᵗ ᵐᵘˡᵉᵇᵃᶜᵏ ᶜᵒʳᵈˢ ᵉˣⁱˢᵗ

## Can two spells with AOEs intersect each other?

If my Triton character casts Wall of Water and my friend who is a Warlock casts Hunger of Hadar, can both of these spells intersect one another? My DM does not know to how to respond to this question. Both spell descriptions say

centered at a point you can see within range

I was thinking the warlock could cast the wall at some place then I cast my wall at a point next to the wall so they both intersect. Would that work? Also what about both walls being casted at the same point? Such as the warlock holding an action to cast it on the tree, then when I cast my wall at the same tree both of our spells would come out at the same time at the same area. Can this work?

## Aggregate Multiple Instances of Each Row Without Multiple Seq Scans

I am trying to perform some mathematical operations in PostgreSQL that involve calculating multiple values from each row, then aggregating, without requiring multiple Seq Scans over the whole table. Performance is critical for my application, so I want this to run as efficiently as possible on large data sets. Are there any optimizations I can do to cause PostgreSQL to only use a single Seq Scan?

Here’s a simplified example:

Given this test data set:

``postgres=> CREATE TABLE values (value int); postgres=> INSERT INTO values (value) SELECT * from generate_series(-500000,500000); postgres=> SELECT * FROM values;   value ---------  -500000  -499999  -499998  -499997  -499996 ...  499996  499997  499998  499999  500000 ``

And I want to perform this query that counts 2 instances of each row, once by the `value` column and once by the `abs(value)`. I’m currently accomplishing this with `CROSS JOIN`:

``SELECT   CASE idx   WHEN 0 THEN value   WHEN 1 THEN abs(value)   END,   COUNT(value) FROM values CROSS JOIN LATERAL unnest(ARRAY[0,1]) idx GROUP BY 1; ``

Here’s the `EXPLAIN ANALYZE` result for this query. Notice the `loops=2` in the Seq Scan line:

``postgres=> EXPLAIN ANALYZE SELECT ....                                                           QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------  HashAggregate  (cost=82194.40..82201.40 rows=400 width=12) (actual time=997.448..1214.576 rows=1000001 loops=1)    Group Key: CASE idx.idx WHEN 0 THEN "values".value WHEN 1 THEN abs("values".value) ELSE NULL::integer END    ->  Nested Loop  (cost=0.00..70910.65 rows=2256750 width=8) (actual time=0.024..390.070 rows=2000002 loops=1)          ->  Function Scan on unnest idx  (cost=0.00..0.02 rows=2 width=4) (actual time=0.005..0.007 rows=2 loops=1)          ->  Seq Scan on "values"  (cost=0.00..15708.75 rows=1128375 width=4) (actual time=0.012..82.584 rows=1000001 loops=2)  Planning Time: 0.073 ms  Execution Time: 1254.362 ms ``

I compared this to the case of only using 1 instance of each row rather than 2. The `1 instance` query performs a single Seq Scan and runs ~50% faster (as expected):

``postgres=> EXPLAIN ANALYZE SELECT postgres-> value, postgres-> COUNT(value) postgres-> FROM values postgres-> GROUP BY 1;                                                        QUERY PLAN -------------------------------------------------------------------------------------------------------------------------  HashAggregate  (cost=21350.62..21352.62 rows=200 width=12) (actual time=444.381..662.952 rows=1000001 loops=1)    Group Key: value    ->  Seq Scan on "values"  (cost=0.00..15708.75 rows=1128375 width=4) (actual time=0.015..84.494 rows=1000001 loops=1)  Planning Time: 0.044 ms  Execution Time: 702.806 ms (5 rows) ``

I want to scale this up to a much larger data set, so performance is critical. Are there any optimizations I cause my original query to run with only 1 Seq Scan? I’ve tried tweaking query plan settings (`enable_nestloop`, `work_mem`, etc)

## Other Attempts

Here are some other approachs I tried:

1. Using `UNION` still performs 2 Seq Scans:
``SELECT    value,    COUNT(value) FROM (   SELECT value FROM values UNION   SELECT abs(value) AS value FROM values ) tbl GROUP BY 1; ``
``postgres=> EXPLAIN ANALYZE ...                                                                   QUERY PLAN -----------------------------------------------------------------------------------------------------------------------------------------------  HashAggregate  (cost=130150.31..130152.31 rows=200 width=12) (actual time=1402.221..1513.000 rows=1000001 loops=1)    Group Key: "values".value    ->  HashAggregate  (cost=73731.56..96299.06 rows=2256750 width=4) (actual time=892.904..1112.867 rows=1000001 loops=1)          Group Key: "values".value          ->  Append  (cost=0.00..68089.69 rows=2256750 width=4) (actual time=0.025..343.921 rows=2000002 loops=1)                ->  Seq Scan on "values"  (cost=0.00..15708.75 rows=1128375 width=4) (actual time=0.024..86.299 rows=1000001 loops=1)                ->  Seq Scan on "values" values_1  (cost=0.00..18529.69 rows=1128375 width=4) (actual time=0.013..110.885 rows=1000001 loops=1)  Planning Time: 0.067 ms  Execution Time: 1598.531 ms ``
1. Using PL/PGSQL. This performs only 1 Seq Scan, but ARRAY operations in PL/PGSQL are very slow, so this actual executes slower than the original:
``CREATE TEMP TABLE result (value int, count int); DO LANGUAGE PLPGSQL \$  \$     DECLARE     counts int8[];     row record;   BEGIN      counts = array_fill(0, ARRAY[500000]);     FOR row IN (SELECT value FROM values) LOOP       counts[row.value] = counts[row.value] + 1;       counts[abs(row.value)] = counts[abs(row.value)] + 1;     END LOOP;      FOR i IN 0..500000 LOOP       CONTINUE WHEN counts[i] = 0;       INSERT INTO result (value, count) VALUES (i, counts[i]);     END LOOP;   END \$  \$  ; SELECT value, count FROM result; ``
``postgres=> \timing Timing is on. postgres=> DO LANGUAGE PLPGSQL \$  \$   ... DO Time: 2768.611 ms (00:02.769) ``
1. Tweaking Query Plan Configuration. I tried changing `enable_seqscan`, `enable_nestloop`, `work_mem`, and cost constraints and could not find a configuration that performed better than original.

## In Roll for Shoes Prison Module, how much hp should each character have?

The "Prison Module" module by Mongoose systems (given out free in 2020) offers a variant rule for Roll For Shoes involving wounds and scars: you take a wound when you are attacked, hit by a trap, or fail a dangerous action, and if you take a second wound in the same place, it becomes a scar that cannot be healed anymore. It says that if you take as many scars as you have HP, you die. However, I cannot find in the module anywhere how much HP you have. Should I just have them roll a d6? Do I set an HP level based on their class? Or what was the intent here?

## How do I make my terms for each product display via foreach loop? (woocommerce)

This is my current loop to display my products via woocommerce. When I do print_r(\$ category_array); It returns the array, but when I try to use a function to call it so I can do what I want to with the data, it makes and my entire screen doesn’t display after the loop. Maybe it’s a mistake in my function? Still very new to woocommerce and wp_loops. Thank you

``            <?php             // WP_Query arguments             \$  args = array(                 'p'                      => 'product',                 'post_type'              => array( 'product' ),                 'order'                  => 'ASC',                 'post_per_page' => 20,             );              // The Query             \$  query = new WP_Query( \$  args );              // The Loop             if ( \$  query->have_posts() ) {                 while ( \$  query->have_posts() ) {                     \$  query->the_post();                     function filter_categories(\$  categories) {                             foreach (\$  categories as \$  category) {                                 echo \$  category->name;                             }                     }                       ?>                     <div class="row">                         <div class="col-2">                             <?php echo the_post_thumbnail(get_the_ID(), 'thumbnail'); ?>                         </div>                         <div class="col-7">                             <a href="<?= get_permalink(); ?>"><?= the_title()?></a>                             <br/>                             <?php                             \$  category_array = get_the_terms(get_the_ID(), 'product_cat');                             filter_categories(\$  category_array);                             ?>                         </div>                         <div class="col-3 text-right ">Price</div>                     </div>                     <?php                 }             } else {                 // no posts found             }              // Restore original Post Data             wp_reset_postdata();             ?> ``

## How can I make the flag to be true and false but each time only once?

``using System.Collections; using System.Collections.Generic; using UnityEngine; using Cinemachine;  public class UnlockCrate : MonoBehaviour {     public Animation anim;     public IKControl ikControl;     public GameObject securityKeyPad;     public CinemachineVirtualCamera virtualCam;     public CinemachineFreeLook freeLookCam;     public CamerasControl camerasContorl;      private bool playAnimOnce = false;      private void Update()     {          if (!playAnimOnce)         {             if (ikControl.handFinishedMove == true)             {                 securityKeyPad.SetActive(true);                 virtualCam.enabled = true;                 freeLookCam.enabled = false;                 Cursor.visible = true;                 camerasContorl.enabled = false;                             }              playAnimOnce = true;         }         else if (playAnimOnce)         {             securityKeyPad.SetActive(false);             virtualCam.enabled = false;             freeLookCam.enabled = true;             Cursor.visible = false;             camerasContorl.enabled = true;             playAnimOnce = false;         }     } } ``

The problem is that the playAnimOnce flag is false then true then false then true all the time. I want that if it’s false do something and then only if it’s true do something else.0

Should I use another flag helper and how ?

## User database and a personal questionnaire for each user

I run a WordPress based website for a sports club. Due to current COVID-19 restrictions every member must fill out a form answering Covid related questions before they come to every training session. This is currently done using paper.

I would like to move this process online however, I’m not sure how to achieve this.

I was thinking of getting every user to register for an account on the website and then have them complete the form electronically.

Every member has a membership number. Is there a way they could register by putting in the membership number and making a password? This way I wouldn’t have to make all the accounts myself and not everyone can register, only people with an membership number.

I also do not know how to make a form for each user. I would have to be able to keep track of who has completed the form and who hasn’t.

If anyone can help I’d really appreciate it.

## How to setup GSA for each project has its own base?

I have a pack of projects in different niches but one language (en). The preferred TLD is a .com and this is easy setup. But!

I have a specially prepared bases for

project 1 = base1  (niche websites  list)
project 2 = base2  (niche websites  list)

Can I use (and how to set up) in one interface this idea?

4 project works in one time and get websites  list each project own website list? Likes this way:

project 1 from  folder C:/project1-base/identified
project 2 from  folder C:/project2-base/identified

Thank you !

## Randomly assign n elements to n agents such that each agent only knows its own element

### Problem

I’m working on an app that involves shuffling and distributing playing cards to players. As a challenge, I tried to solve this problem in a way that doesn’t require a trusted intermediary.

In other terms, the task is to find a distributed algorithm that

• uniquely assigns $$n$$ agents numbers $$1..n$$
• allows each agent to know nothing about the assignment but its own
• when revealing the assignment, allows other players to verify the assignment

We also assume that knowing other’s assignment is an advantage for each agent, and revealing its own prematurely a disadvantage. Agents are also assumed to be able to talk with each other in a way hidden from all other agents.

## Partial solution

The solution I came up with works only under the assumption that adversaries do not collaborate.

The idea is to create a set of $$n$$ nonces, and assign each agent exactly one nonce. The set is then passed from agent to agent in an agreed upon order, hidden from all others, until each agent received the set exactly once. Each time an agent receives the set, it swaps its nonce with a new one, memorizes the new nonce, and confirms receival of the set to the others. This entire procedure is done twice, at which point, all agents have received the set at least once after all other agents swapped their nonces, making it impossible to recognize and hence map the nonces to the other agents.

When the last agent receives the set the second time, it shares it with everyone, and all agents confirm to the others that their nonce is contained in the set. The agents then assign a number to each nonce in the set based on an agreed upon random seed, giving us the required unique assignment.

To allow ownership verification, instead of the nonces, agents put the hash value of their nonce on the set, revealing the actual nonce only when verification is required.

The problem with this solution is that if adversaries are allowed to collaborate, each time an adversary receives the set, they can compare their versions, identify changes and potentially derive which nonce belongs to other agents, allowing them to know what number got assigned to them.

All ideas are appreciated!