[1.0] Night Vision 1.1: Everybody was night-time fighting...

Started by drumad, August 03, 2018, 06:48:45 PM

Previous topic - Next topic

drumad



1.0. or: How I Learned to Stop Worrying And Love The Dark


Attennn'shun Colonist...
You've had your eyeballs removed and replaced by mech-damn machinery,
You can spot the mole on my left private cheek through bright red devilstrand pants from a hundred tiles away.
I've seen you hit a squirrel with an autopistol at max range while riding backwards on a thrumbo...

And yet, why in the hive do you keep slowing to a centipedean crawl whenever you touch the slightest bit of shadow?

You are worse than a wimp with the flu.



1.1. Everybody was night-time fighting...du du du du duh duh duh duh duuuh


...on this fine and dark night, I, Private Cheek, will to teach you the sly and deadly art of night-time fighting,
forged by the ancients of the first Sparta, tempered in the wars of antiquity, sharpened by Urb-World gangs, honed by...
...yes?...
...I don't give a damn if I said I would teach you this two quadrums, two minutes or two years ago,
when I say 'I will teach you', what do you say??
...Damn straight, you're honoured.



Features:

  • Adds Night Vision: No slow down in darkness. No negative thoughts
  • Adds Photosensitivity: Faster in darkness. Slower in bright light
  • Includes corresponding positive or negative thoughts
  • New Apparel: Night vision goggles, tinted goggles, and the adv. night vision helmet. All unlocked via vanilla research.
  • Bionics: Adds night vision to bionic eyes and similar. Adds a new eye implant that gives photosensitivity, with its own research.

  • Supports Alien races (e.g. add natural photosensitivity to any human-like race)
  • Customisable settings for headgear (e.g. add night vision to the cowboy hat)
  • Customisable settings for any bionics or health conditions that effect the eyes (e.g. remove night vision from bionic eyes, or make luciferium even more potent with a custom buff in both bright light and darkness)

New Features for NightVision 1.1:
The light multiplier (night vision in darkness, photosensitivity in bright light) now affects:

  • Ranged and Melee Hit chance: e.g. shooting or striking a poorly lit target is harder without night vision, but easier with photosensitivity.
  • Ranged Cooldown: cooldown after firing weapons is increased in darkness without nightvision, but decreased with photosensitivity. The changes depend on the shooter's skill: as skill increases the negative effect decreases while the positive effect increases.
  • Melee Dodge Chance: depends on the difference in vision between the attacker and target, e.g. if the attacker does not have night vision and the target does, the target's dodge chance will be increased; and vice-versa.
  • Adds a chance for a sneak attack: if the attacker has better vision than the target, there is chance the attack will be a sneak attack; i.e. 100% hit chance, and undodgeable.

  • Enemies will now tend to prefer cover that is in darkness (if they use cover).
  • Humanoid enemy aggro range in darkness/bright light is now affected by their vision: i.e. if they don't have night vision, you can sneak closer to their outposts or siege camps at night.
  • Added a new raid: Late game. Can only trigger during a solar flare.

  • These features can be individually disabled if you choose.


Download:
GitHub
Steam


Details:
Extends Rimworld's light and dark mechanics.
Rather than all human-like pawns having the same 20% debuff to movement and work speed when in darkness, Night Vision uses three categories:


  • Night vision: Work and move at the same speed no matter how dark it is. No negative thoughts from darkness.
  • Photosensitive: Work and move 20% faster in complete darkness, but 20% slower in v.bright light. Positive thoughts in darkness, negative thoughts in bright light.
  • Default (vanilla): Work and move 20% slower in complete darkness. Negative thoughts in darkness.
Darkness means < 30% light  &  bright light means > 70% light.

Notes:
  • As in vanilla, the magnitude of the effect increases the closer the light level gets to 0% or to 100%.
  • For bionic eyes and the like, the effect scales with the number of implants (i.e. a colonist needs a full set of bionic eyes to get night vision).
  • Does not change the surgery success chance due to light - that stat is actually related to the bed, not the surgeon.
  • In order to craft the retro-reflector implant (for photosensitivity), a raw tapetum lucidum has to be extracted via surgery from certain animals.
  • Or you can just buy one. Its stocked by shaman traders, and sometimes exotic traders.
  • Included in the mod are a few example patches for any modders or xml junkies who want to support Night Vision out of the box.


Possible future plans:
Find a job, or:
Extend the day-night, light-darkness system with factions, incidents, world quests, night caravaning, night predators and anything else before I get sick of shadows and shades and buy a sun lamp. This mod is partly just a framework to set more interesting stuff up.



Credits
Clankwork for the art
Pardeike for the Harmony library
Marnador for the Rimworld font
Madman666 for the combat features idea

And thanks to all the Rimworld modders whose code I've perused and purloined in making this mod, including (though not limited to): ChJees, erdelf, XeoNovaDan, NoImageAvailable, Mehni, Jecrell ... and pretty much anyone else who has released a mod in the last couple months





[1.1.2]30/10/18
fix for compatibility with numbers

[1.1.1]28/10/18
Changed some descriptions for clarity

[1.1.0]25/10/2018
Rimworld version 0.19 => 1.0
Combat Features added
Fix: psych glow incorrectly triggering for photosensitive pawns
Other stuff

[1.0.2] 07/08/2018
Changed Rimworld version from 1.0 to 0.19

[1.0.1] 04/08/18:
Minor fixes and changes. Steam release

[1.0.0] 03/08/18: Initial Release



Madman666

Does it by any chance revive penalties for shooting at targets covered by darkness (countered by night vision)? It would be a really nice detail to revive.

Mehni

This looks like a real labour of love and I'll be adding it to my modlist.

Canute

Quote from: Madman666 on August 04, 2018, 08:15:49 AM
Does it by any chance revive penalties for shooting at targets covered by darkness (countered by night vision)? It would be a really nice detail to revive.
Not to forget to add Darkness bomb/trap :-)

Madman666


drumad

Quote from: Madman666 on August 04, 2018, 08:15:49 AM
Does it by any chance revive penalties for shooting at targets covered by darkness (countered by night vision)? It would be a really nice detail to revive.

Not yet. But that's a great idea. I'll see what I can do.

Quote from: Mehni on August 04, 2018, 08:59:16 AM
This looks like a real labour of love and I'll be adding it to my modlist.

Aye, it was torturous at times, but on the whole it was pretty fun. And in doing it, I learnt C# and, pretty much, programming. Anyway, thanks for the feedback, appreciate your mods.

Quote from: Canute on August 04, 2018, 09:59:06 AM
Not to forget to add Darkness bomb/trap :-)

Oft, I had been thinking of adding flares, but darkness bombs could be interesting.

Canute

Quote from: Madman666 on August 04, 2018, 10:43:44 AM
Quote from: Canute on August 04, 2018, 09:59:06 AM
Not to forget to add Darkness bomb/trap :-)

Darkness bomb? You lost me there.
When all your pawn wear night/infra vision glasses, throw a darkness bomb.
Then the target's get a big malus on accuracy, while your pawn don't.
Basicly like smokepop belt, but instead to cover you with smoke, you cloud the attacker or area they need to pass.


Madman666

Just roofing stuff will be enough though? Roofed tiles without a close light source are considered in darkness, so... Introducing a thermal vision goggles that bypass the smoke effect might be nice though.

drumad

Updated: just changed Rimworld version from 1.0 to 0.19.
Working on adding combat mechanics: light will effect ranged acc.  , melee acc. , melee dodge, and ranged cooldown. Ranged cooldown effect will probably decrease with shooting skill ==> the idea is a inexp shooter will probably need to look at the weapon while reloading but a pro would not.

Madman666

This is really damn nice! I really missed that shooting acc debuff when you aiming at someone in a dark spot! Roofed bunkers will be officially revived again! :)

drumad

Updated Night vision to 1.1:
-added combat features
-added some AI effects
-added a new raid type

see the OP for details.

@Madman666, sorry for the wait, enjoy

Madman666

Holy..!!! What an amazing update and you even credited me for some reason xD! Thank you, @drumad. Can't wait to try it out! This is so much more than just a simple dark\lit shooting accuracy modifier! Truly nicely done.

Also some new ideas for consideration:
- Thermal vision gear for shooting through smoke! That d be nice along with proper smoke nade. Having select few guys shooting out of smoke cloud without penalties can be really viable tactic.
- Flashbang grenades for temporary blinding the target with various effects depending on the type of vision target has.
- Maybe some kind of concealment mechanic during night? Reducing outpost aggro range during night assault is pretty close though. Maybe for AI as well. Like a really small party of enemies trying to sneak in, which can only be spotted when special conditions are met (i.e. nightowl with night vision spots them), otherwise sabotaging\wrecking\stealing something from your colony. A solid reason to have some people on night watch duty.

I'll post some more, if i come up with something else while i play xD

drumad

quick update to change some descriptions for clarity

@madman666, aye, i'm thinking about adding some sort of stealth mechanic for enemies. not sure how it will work just yet. i'd like to have it linked to another raid: as in a small group approach stealthily to destroy turrets then a larger raid appears, but that could be hella complicated to do

Ruisuki

maybe just set the first raid to steal things and immediately run and then trigger a second as soon as they out

NoCanDo