How to create all possible permutations?

there is a problem:

I have 5 letters – a,b,c,d,e and 20 places. I have to use each letter at least once but no more than 10 times. So the result can look like {a,a,a,a,a,a,a,a,a,a,b,b,b,b,b,b,b,c,d,e},… etc. I need to find all possibilities.

I was trying something like this:

    With[{n = 5, k = 20}, Join @@ Table[IntegerPartitions[s, {k}, Range[n]], {s, k, n k}]] 

And then changing numbers to letters. Then I can delete cases where there is no a,b,c,d or e and also cases with more than 10 same letters.

But I would prefer a solution, where I don’t have to delete these cases but I can set conditions before evaluation. Thanks for your help!

Is it possible to ask Mathematica to give all the roots of the given function?

I have this equation

$ $ 36 \cos \frac{3 x}{4} \cos \frac{27 x}{20} \left(\cos \frac{3 x}{5} +2 \cos \frac{21 x}{10} \right)=0 $ $

Is it possible to ask Mathematica to give all the roots of the function on the domain $ 0<x<4\pi$ ? Preferably as a rational multiple of $ \pi$ ? (the plot of the function is attached)

36 Cos[(3 x)/4] Cos[(27 x)/20] (Cos[(3 x)/5] + 2 Cos[(21 x)/10]) == 0  

enter image description here

Securing a replay-based leaderboard system (as much as possible)

A few years ago, I implemented a basic online leaderboard system in one of my games that sent encrypted score data over the wire. The encryption keys were stored in the game client’s binary. Of course, the leaderboards got hacked the same day they were released.

I have now released a new game on Steam, and I’ve worked hard to implement fully-deterministic game logic and a replay system.

The replay system works by simply replaying the user’s input that was recorded in a previous playthrough. The fully-deterministic game logic ensures that the replay will work on any machine, independently of the game’s FPS.

Now, it is time for me to implement online leaderboards.

My idea is to create a server version of the game executable which receives replay files over the network, replays them on some remote machine, and adds the score to a database if the replay data is valid.

While this prevents cheaters from simply sending a fake score to the server, it opens up many other cheating avenues, including:

  • Tool assisted creation of replays, either by slowing down the game speed or by manually crafting a replay file after reverse-engineering its format (the game is open-source).

  • Taking someone else’s replay and sending it over the network, changing data regarding who the replay belongs to.

I could somehow encrypt and compress the replay data before sending it over (or saving it on the user’s local machine), but since the game is open-source, it would be easy to reverse-engineer the encrypted replay format.

What is a good way of securing a replay-based online leaderboard system?

One possible idea I had is to have the server generate an encryption key / token for a specific user which is only valid for a small amount of time, send it over to the client, and only accept replays that are encrypted with that key. This would prevent users from uploading older replays to the server, but in theory it should work — am I missing something?

is it possible to use a net and shove in the same turn? [duplicate]

My PC has multiple attacks. I would like to know if it is possible to hit with a net (first attack) and then shove the opponent (second attack). Apparently using a net prevents to make a second attack; on the other hand, shove is not properly an attack. Thanks for the replies 🙂

Net:

When you use an action, Bonus Action, or Reaction to Attack with a net, you can make only one Attack regardless of the number of attacks you can normally make.

Shove:

Using the Attack action, you can make a Special melee Attack to shove a creature, either to knock it prone or push it away from you. If you’re able to make multiple attacks with the Attack action, this Attack replaces one of them.

Are two non-exchangable currencies possible in an MMO?

Imagine an Adventure Coin and a Merchant Coin.

Adventure coins can be spent on training and equipment, at in-game shops, but cannot be transferred between players.

Merchant coins can be transferred between players, and are used for investing in land, ferries, mills, etc.

Do any existing MMORPGs have such a system?

How can this work in the face of "bad money drives out good"?

Is creating a Dimensional Plane possible in 5e without DM fiat?

I’d like to create a dimensional pocket inside my armored wagon. Duration should be permanent, but if that’s not possible longer lasting is better. It would be fine if I have to refuel it every so often.

Can wizards go about doing this, or is it up to DM fiat now?

I’m used to being able to do this in older editions through magic item creation or the spell Genesis.

What is the longest possible time a player character can spend preparing their spell list?

Steve is a hypothetical PC with 20 levels in Wizard and an intelligence modifier of +5, and as such he can prepare a total of 25 spells every day. He also has all spells a Wizard could ever learn in this spell book, due to a DM who is really generous in giving out spell scrolls.

One morning he says to himself: "Today I am going to cast something amazing, I just can’t decide what". So he sits down and prepares all possible 9th level spells and as many 8th level spells as he can in addition to that. Resulting in him spending 9 minutes each preparing 16 9th level spells (from the PHB, XGtE and TCoE) and 8 minutes each preparing 9 8th level spells. This results in him spending a total of 216 minutes that morning preparing his spell list.

When it is almost noon, he stumbles out of his room, hungry beyond imagination, down to the dining area of the local tavern, he is currently residing in. He is eager to tell his party members all about his amazing plan and finally eat his first meal of the day. To his astonishment his friends are nowhere to be found. They had waited for him for more than 3 hours, planning their whole adventuring day in the process. They are now on their way to kill that green dragon terrorizing the neighboring kingdom, with or without Steve.

"I made a terrible mistake" Steve mutters to himself. "I didn’t even realize how much time had passed. I must be the worst time-wasting spell preparer in tbe history of the multiverse."

But is he really the one who spend the most possible time imaginable to prepare his spell list or is there any way for a player character to spend more time preparing their spell list then Steve did?

wildcards in user black list – possible?

Hello,

is it possible to use wildcards in user’s blacklist?

why ?

I want to filter out some words in domains –  like all domains with “.ru”  or “.tk” or….   (many)

there is the option to remove urls containing  ..  but i have quite a long list of strings to filter out.  it takes a lot of time to manually do it.  is there a way to automate it?  maybe through users blacklist??

thank you

is it possible to get an ability score of 30 or more an any way? how?

I have noticed spellcasters ability to get bonus spells from having a high ability score depending on class (wisdom for clerics and paladins, intellgence for wizards, charisma for bards and sorcerers, I forgot about druids and rangers). Well, what I want to know is, is there a way for someone to get one of their scores up to 30? That includes temporary affects such as spells (ones that aren’t permanent, but ones that are count too of course) and items of any type that could raise that one score. If you can find a away for any of them, that works, but it would be great for someone to find a way to do so for all three (I do know that the solutions would be similar, but different for each score). If you can’t find a way for those scores to get up to 30 but you do have one for strength, dexterity, or constitution, that work too.

Is it possible to clone a game, and make modifiactions to it?

I basically want to know whether or not it is possible to copy a mobile game and make it into a new game by modifying it . I want to be able to access , moderation tools and basically alter, things like charcters, events, in ap purchases etc. Alter it to make it different enough from the original and make it available to other users. The game I want to copy is no longer in the play stores and I want to change that.