RimWorld

RimWorld

93 ratings
Sneaky Bastard for Combat Extended
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5, 1.6
File Size
Posted
Updated
92.102 KB
1 Sep, 2024 @ 11:09am
15 Sep @ 3:42pm
26 Change Notes ( view )

Subscribe to download
Sneaky Bastard for Combat Extended

In 2 collections by turkler
turkler's Combat Extended mods
12 items
The best of the Experience
43 items
Description
Cheat death and gamble with your life. Dodge.

This mod, to put it simply, adds a dodge mechanic which effectively allows a pawn to simply ignore damage which they would otherwise take.

How does it work?

There are two calculations, one for humanoids and another for animals.

For humanoids:

- Dodged projectiles pass straight through the pawn.

- By default, a pawn has a base 0% chance to dodge a projectile.

- You can only dodge projectiles. Bullets, grenade frags and shrapnel can be dodged while molotov cocktails cannot be.

- Every 0.05 of movement speed above 4.60 adds 1% to projectile dodge chance. (4.60 is the default move speed of a healthy baseliner human with no modifiers.) This means that a pawn with a movement speed of 5.00 c/s would gain a +8% modifier while a pawn with a movement speed of 10.0 c/s would gain a +108% modifier. The latter value would be rounded down to 90.

- Every 1 mass below 20 adds 1% to projectile dodge chance while every 1 mass above 20 will deduce 1% from projectile dodge chance. This means that a completely nude pawn with no items in their inventory would gain a +20% modifier while a pawn carrying 40 mass of items would gain a -20% modifier.

- Every 0.1 of body size directly translates to gaining/losing 5% dodge chance. This means that a pawn with a body size of 0.5 would gain a +25% modifier while a pawn with a body size of 1.1 would gain a -5% modifier.

- If a pawn is engulfed in blind smoke, the density of the smoke is directly added to their chance to dodge.

- Only living creatures can dodge ranged attacks. Mechanoids and other non-humans cannot dodge projectiles.

For animals:

- By default, an animal has a base 15% chance to dodge a projectile.

- Animals can only dodge projectiles. Bullets, grenade frags and shrapnel can be dodged while molotov cocktails cannot be.

- Every 1% of movement capacity directly translates to gaining/losing 1% dodge chance. This means that an animal with a movement capacity of of 200% would gain a +100% modifier while an animal with 80% moving capacity would gain a -20% modifier.

- Every 0.1 of body size directly translates to gaining/losing 3% dodge chance. This means that an animal with a body size of 0.2 would gain a +24% modifier while a pawn with a body size of 1.1 would gain a -3% modifier.

- If an animal is engulfed in blind smoke, the density of the smoke is directly added to their chance to dodge.

- Calm hunt prey cannot dodge.

Q&A

What's the purpose of this mod?
The new dodge mechanic allows quite a few new gameplay styles:

Very light enemies - nudist tribals and such - can now stand a chance against more solidly armed opponents.

Ultratech brawlers with melee weapons can now very reliably close the gap between themselves and their attacker, using their movement speed to their advantage.

...so on and so forth.

Do I need your other mod, Smoke Dodge for Combat Extended, alongside this?
No, this mod has all functionaly of Smoke Dodge built-in and a lot more. That mod will still be available standalone for those who only want a smoke dodge mechanic.

How's performance?
TLDR: Zero impact during normal gameplay and only a tiny, effectively zero, impact during intense combat scenarios. I made the code as light as I could make it.

Long version: My mod has two components to it:
- A projectile dodge stat, calculated like any other stat.
- A harmony patch targeting a bit of code in Combat Extended that's only run when a projectile overlaps a pawn's hitbox. This code checks whether the projectile can hit the pawn in question. I harmony prefix patch onto this code and add a simple dice roll based on the pawn's projectile dodge stat. The projectile either goes clean through or hits the pawn as normal based on the result of this dice roll. The harmony patch takes 0.004ms on average. (Yes, not 0.04ms, 0.004ms.)

Do you think you're funny, re-introducing RNG mechanics to Combat Extended?
Yes.

Interested in participating in the development of my mods? Join the Discord server!
[discord.gg]
64 Comments
Czahorb 8 Aug @ 7:40pm 
true. birds are weird. (Cause their drones ran by the goverment /s)
turkler  [author] 8 Aug @ 4:25pm 
ok know-it-all, yes there is technically a version of ce compiled for 1.6. that version does not work, odyssey and a lot of 1.6 stuff if still not patched and there are still a lot of oddities (like, birds, for one)
turkler  [author] 8 Aug @ 3:28pm 
bro ce itself does not work in 1.6, what are you on about?
zeus57007 8 Aug @ 3:25pm 
possibly a dumb question, but does this work in 1.6?
tinfoil hat bird 25 May @ 8:10pm 
Extremely frustrating mod 10/10
ekisai 12 May @ 3:37pm 
did forget to say that what i did was pretty stupid but it works
Bach 10 May @ 8:30am 
it is payday now!!
turkler  [author] 1 May @ 9:38am 
@ekisai ooo alright, good luck with that!
ekisai 1 May @ 9:21am 
"probably" is good enough for me