Coding Spelunky Edge Roll Mechanic

Inspired by the recently released Spelunky 2, I’ve been making Spelunky clone from scratch using Monogame for gamedev coding practice.

I’ve successfully coded the basic platforming mechanics: terrain collision solving, gravity, running and jumping, even having the camera pan up or down after pressing those buttons for a half-second.

The next thing I am trying to implement is edge-hanging. Getting the basic case of hanging after falling onto an edge in the right way was easy enough. I basically just checked for the right conditions and added a boolean in my player class for whether the player is hanging, which prevents left/right motion and keeps the player from falling when it’s true.

My question is: how can I implement the edge-rolling mechanism, where you can roll over edges into an edge-hang by pressing down as you walk off? I don’t understand what extra information I need to store or how to smoothly transition the player from being halfway on the edge to hanging off of the edge one block lower.

Right now the player just kind of falls away from the edge after walking off, as you would expect with the basic mechanics so far.

Any advice is appreciated! Thanks for your time.

Mechanic to find lodgings in settlement: Pathfinder 1e

Is there a mechanic in 1st Edition Pathfinder for a party to find good lodgings in a settlement (town/village/city)? I seem to recall reading it somewhere but I can’t nail down the source or the exact mechanic.

I think it’s something like a gather information check to a specified DC, passing = finding a good place and fail = some seedy place.

If anyone knows, would you be able to link the source and the exact rule?

Is there a “help mechanic” in Macho Women With Guns?

Macho Women With Guns 2e uses a GURPS-like 3d6 roll-under resolution mechanic. We were playing it today and we happened into a scene where all the characters needed to cooperate on a group effort (the PCs were the Spice Girls and they were trying to do a karaoke performance to defeat an opponent).

I looked around and couldn’t find any sort of aid/group/help/collaborate/whatever mechanic to reflect when multiple Macho Women are attempting to cooperate on the same task. I ended up making everyone roll and just added up the points by which they made/didn’t make the roll but that had its problems – whenever the roll was hard or easy the sums “ran away” quickly in that direction over a lesser number of opponents.

An answer from a similar game like MWwG 1e would be fine; obviously the d20 Modern-based Mongoose edition has one but it’s not relevant or compatible. We couldn’t think of a mechanic for it in GURPS either or I would have just cribbed that.

What mechanic would be used for taking an opponents weapon from it’s sheath on his belt in combat?

Here is the scenario.

I am attacking a fighter with a crossbow. I run out of bolts and am unnamed as he charges at me with a spear. My opponent has a short sword on his belt. He misses with his initial spear attack and its my turn.

I want to take his sword from it’s sheath and if possible attack him with it. What process or series of checks need to be made for this to work?

Mechanic implications of the Psionics tag?

Quite a few monsters have the Innate Spellcasting trait. Some of them, such as the Gith (MM) and the Neothelid (VGtM) have a trait called Innate Spellcasting (Psionics) instead.

I cannot recall having seen any mechanic referencing the fact whether or not someone is a psionic. So my question is: Does the Psionics tag on Innate Spellcasting have mechanic implications?

Another syntax for Anydice mechanic question

I’m trying to build a function to model not just a roll of the dice, but to have boolean operators to toggle using various powers that effect the dice. I’ve gotten everything to work except for one thing- looking at the result of the roll, seeing if a ‘1’ was rolled and then changing that ‘1’, but only once.

The dice mechanic is for Cryptomancer, and it works by takinging your rank in a skill which is 1 to 5 and rolling that many d10’s plus a number of d6’s that total to 5 dice. For d10s, 1’s are always botches (-1), numbers under the target number are 0’s and numbers equal to or greater the target are successes (+1). On the d6’s 1s are botches, 6s are success and everything else is 0.

I’ve been using custom die for my rolls but set the function up to build the roll off just a skill number and challenge number. Here’s what i got so far-

function: sb B:n sp P:n skill SKILL:n vs CHALLENGE:n{ if P=1{ ROLL: SKILLd{-1,0:(CHALLENGE-2),1:(10-CHALLENGE),2}+(5-SKILL)d{-1,0:4,1} } else { ROLL: SKILLd{-1,0:(CHALLENGE-2),1:(11-CHALLENGE)}+(5-SKILL)d{-1,0:4,1} } if B=1{ if 5@ROLL=-1{ ROLL:ROLL+2 } } result:ROLL }

The goal is that you can toggle things by entering a 1 or 0 for the values B and P to turn them on or off. P=1 makes all ’10s’ rolled be worth +2 success instead of +1. B=1 is suppose to check the last value of the roll, and if a -1 is present add 2 to the whole total, there by turning one and only one botch into a success, even if there are multiple botches in the roll.

Everything works till i turn on B. then i get an error that the boolean operation if can only be used on numbers. Turns out 5@ROLL isn’t giving me the lowest roll of 5 dice but the probability of what that roll will be. How do i fix this? How can i convert ROLL:d into ROLL:s?

How to calculate the probabilities for eliminative dice pools (dice cancelling mechanic) in Neon City Overdrive?

The game Neon City Overdrive uses the following resolution mechanic for checks:

  1. create a pool of Action Dice and (possibly) another pool of differently-colored Danger Dice (all d6, generally up to 5 or 6 dice in each pool)
  2. roll all the dice
  3. each Danger Die cancels out an Action Die with the same value – both are discarded
  4. the highest remaining Action Die (if there is any) is the result (the precise meaning of which is irrelevant for the purposes of this question)
    • any extra Action Dice showing 6 (i.e. in addition to the single highest die read as the result) provide a critical success (called a boon)

I’m struggling to find the proper way to model the probabilities of this mechanic in anydice.

I realize that a good starting point would be this answer to a very similar question regarding the mechanic in Technoir (which clearly was a source of inspiration for Neon City Overdrive). Unfortunately, despite my best efforts I can’t say I fully comprehend how the code provided there works, and there’s an important difference between the two games: in Technoir a single "negative die" eliminates all matching "positive dice", whereas in NCO this happens on a one-to-one basis.

I would be very grateful for any help.

FFG SWRPG mechanic payment costs

In an Fantasy Flight Games Star Wars RPG Campaign:
For various reasons I want to pay a random NPC mechanic to perform an attachment modification check on my weapon instead of my character doing it himself. Assuming I supplied all materials and supplies what would be a expected base cost for his services (assume Core World legal establishment ~Rebellion era).

This comes up because my GM has a GM-PC droid which I “own”. He forces me to pay said droid any time I want him to do anything (including mechanics checks). This is sometimes way overpriced for mundane things like this, which is fine because I can just find another mechanic somewhere on a world somewhere. The mechanic will then charge me an even more ridiculous amount with no negotiation forcing me to use “my” droid. I need proof of correct base amounts to show my GM to clarify what the mechanic should be paid, regardless of what the droid demands.

Thank you.

RPG with core mechanic based on grouping dice under a specific sum

A few years back, I read an RPG which used the core dice mechanic of rolling a number of d10s, then arranging the dice into sets, such that the dice in each set added up to no more than a specified limit. Both the number of sets and the number of dice in each set were involved in determining the final result, but I’m pretty sure the actual numbers on the dice and their sum were not relevant aside from limiting which dice could be grouped together.

Many/most of the examples of using the dice mechanic were framed in a context of combat, emphasizing that several groups of only two dice each would represent a flurry of multiple quick, weak strikes, while a single group of, say, six dice is a single, powerful blow.

I know that “roll a bunch of d10s and group them” might sound like ORE, but this system was definitely not ORE. In ORE, the grouping is dictated by which dice roll the same number as each other, while in the system I’m trying to remember, the player chooses how they wish to group the dice and, in the case of opposed rolls, the rolling and grouping are done in secret, creating a strategic element of trying to guess how the other person will choose to group their dice (lots of small groups, one big group, or a mix of small and large) so that you can group yours in the most effective way to counter them.

AnyDice: How to calculate opposed roll probabilities for an unusual mechanic

I’m currently playing with a dice mechanic that is basically: Roll 2d10, compare each dice to a target number. If one rolls equal to or below the TN, it’s a weak success. If both roll equal to or below, it’s a strong success.

I’ve managed to figure out the probabilities behind that (not on Anydice – but I’ve done it manually in Google Sheets).

I’ve hit a stumbling block when it comes to opposed rolls. How it works is:

  1. Both parties roll their 2d10 and compare to the attribute they’re rolling.
  2. Count the number of successes (equal to or below the attribute)
  3. The party with the most successes wins

The complicated part (mathematically, anyway). Is that 2 fails is a draw, and if both parties get 1 success, then the highest roll (below the stat) wins. If both parties have 2 successes then the highest roll wins, or the second highest if the highest number is the same. If both parties still have the same number then it’s a draw. Basically it’s a blackjack system. Roll high but below the target number.

It’s quite simple in practice but I have no idea how to calculate the probabilities.

To give an example, the player swings a sword with their 6 strength. They score a 2 and a 5 (two successes). The monster dodges with its 5 agility and scores a 1 and a 5. Both scored a 5 so that’s a tie, but the player’s 2 is higher than the monster’s 1. The player deals damage.

I hope I’ve explained myself correctly. If anyone could help me, it would be greatly appreciated. I’ve reached the edge of my mathematical ability here.