Mod Idea -Darkest Days-

Hello, I’ve played CDDA for about a year now, and I thought of something I’m certainly going to need help with if I want the idea to become something. I am rather… poor with my ability to mod, but I am certainly willing to learn if it means I can add an optional mod to this already stunning community.

To be simple, I want to create a mod that adds a nice twist on how one balances traits and certain items.
What could that be outside of our own challenges we give ourselves?
And I thought… get rid of the sky, remove sunlight. The world degrades into a realm that is forever dark (Save for the computers and cars with their headlights still on :P)
That would change a great deal of things. Getting rid of the sun would be quite cold, for an example!

But then something else bounced off of this thought. Playing in the fog, or a blizzard! Keeping the sun, but cripple visibility to maybe four or five tiles away(making PER much more valuable with view range)

I searched to see if anyone else posted an idea like mine, but I didn’t see anything close to what I want to try to create.
I’d like for some of us to give it a shot. And if anyone whats to give me tips on how I might go about making this,I would greatly appreciate it! :slight_smile:

Grreetings, Antixinsane, and welcome to The Forums :). I really like the “Perpetual Darkness” idea- that would be really fun to play since you’d always be scared and on the edge of your seat.

As for tips, a lot of the stuff is moddable (items, most buildings), but I believe weather is hardcoded- that is, you can’t edit a .json file to change it. Instead, to change weather to make it nighttime permanently, one would have to actually download the source code, edit it, and then compile it.

It would be a lot of work to edit weather compared to other stuff, but still doable ;). However, if it comes to items or creatures that you ever need help modding, I can totally help.

Not necessarily.

It could be a world option with caching. This would require about 10 lines of code total AND it could allow not only turning off the light altogether, but scaling it (to make “Kinda Dark Days Ahead” and “Not Dark At All Nights Ahead” worlds).

This would require: adding the option in options.cpp (just finding the section for world option and copy+pasting+modifying one of those), caching the option in the same file (ctrl+f “CIRCLEDIST” to see how it’s done) and then finally using the new cached variable to modify the amount of sunlight in calendar.cpp in calendar::sunlight.
Well, maybe not 10 lines of code, but I’m pretty sure 20 should be enough. Maybe 30 if you also clipped the light to available range to avoid negative light and ultra-huge light.

I would think something like this would be more suited to a “world parameters” json file, so you could set something like the propensity for weather types in json, natural view distance (capped at bubble boundary), etc. In fact, it could probably be rolled into the regional settings stuff.

Mods would make use of it, every day player probably wouldn’t ever need it though.

I would definitely play that mod.

Isn’t there a type of creature, shadows or something, that can’t exist in lit areas? Because you just removed the biggest obstacle to them moving everywhere.

Don’t know if you’d want them to play a greater role in your mod idea. Don’t know if I’ve recalled correctly. The addition of a “hug your light source or the monsters close in” dynamic might be way too Amnesia, or it might be friggin’ awesome. Either way I’d be kind of interested in where this goes, provided looting with perpetual cover doesn’t just make it way too easy.

I think a way to combat that is to use the mod for zombie nightvision, but it’s best left to the player to decide if they want to add that level of terror.

Not necessarily.

It could be a world option with caching. This would require about 10 lines of code total AND it could allow not only turning off the light altogether, but scaling it (to make “Kinda Dark Days Ahead” and “Not Dark At All Nights Ahead” worlds).

This would require: adding the option in options.cpp (just finding the section for world option and copy+pasting+modifying one of those), caching the option in the same file (ctrl+f “CIRCLEDIST” to see how it’s done) and then finally using the new cached variable to modify the amount of sunlight in calendar.cpp in calendar::sunlight.
Well, maybe not 10 lines of code, but I’m pretty sure 20 should be enough. Maybe 30 if you also clipped the light to available range to avoid negative light and ultra-huge light.[/quote]

I’ll let you know if I can get it working.
Thanks everyone for the advice!

I like this idea and would play it.

I haven’t played since version 2717 (waiting for Z levels) but this would totally screw over solar power; which I always relied upon. It would actually force me to make use of petrol for once…cool.

An amazing and exhilarating idea, to be honest. An --== ||| Open-World-Dungeon ||| ==–

This would make all the light sources “a thing”. It would require omnisensory perception, extraordinary dexterity and adapting to artifical light sources. The sound component to CataDDA should then exist, a valuable addition to the RL system. Other than plain, undead monsters, mutated and introduced species could develop sets of delicate organs for illuminating their vicinity, adding to the increased effectiveness of night vision in predatorial ranks. To conclude, instead of binoculars - your sense of smell would act as farsight in moderate wind.

Playing a mutated monster with blob-pets, a necromancer acting alongside his bloodthirsty minions or a plain rogue/shadowthief would pose a whole 'nutha balance against the present, perk-fueled and profession-ridden chaos. I dub this a worthy fork candidate, at least in my head it surely is.

Bright flashes following acid attacks to stun and burn opponents? This would instigate a new Cataclysm era, if you ask me.

I’d play it if it was gradual. I.e. every year the days get darker and nights get longer. And it gets colder.
CDDA: Winter Is Coming.

I’m in favour of the spooky Silent Hill styled fog. Playing with perpetual limited visibility while unknown horrors skulk just beyond your vision seems like great fun. Great nightmare fueled, panic inducing fun.

Yeah I’d definitely be down for this.

I’ve tried following the instructions and a few guides full of tips, but it seems my current ability is too primitive to make this work. A majority of the time spent so far was finding, reading, and staring at the screen of code and having to remind myself that there is a method to this madness artwork.

I’m looking into why what I’ve applied isn’t working as intended.
It sounded so easy! lol

Still need to find that off switch for the sun…

[quote=“Murphy, post:10, topic:9567”]I’d play it if it was gradual. I.e. every year the days get darker and nights get longer. And it gets colder.
CDDA: Winter Is Coming.[/quote]

Once I can get a good 0.02 going, I’ll try adding that as a choice. I may be getting ahead of myself, but I’ve been thinking about adding some creatures once it’s a mod. Along with a small amount of flavor items and a few lines of lore.

Ambient light calculations are all in src/calendar.cpp in function sunlight().
It’s a 30 line function, nothing too complicated.

[quote=“Coolthulhu, post:14, topic:9567”]Ambient light calculations are all in src/calendar.cpp in function sunlight().
It’s a 30 line function, nothing too complicated.[/quote]

calendar.cpp doesn’t even contain the word sunlight in my source?

Where did you download the source from?
You may have an outdated version.

That’s how it looks in the newest:

Yeah, I was using the source I got from the CDDA website.
Highly probable that it was outdated.

Just so everyone knows, if you think you can do it better… than I say “you are welcome to build this for me, and I will play it shamelessly.”

You can say I have no idea what I’m doing, and 99% of people will agree.
But I’m trying to do it anyway, using what help I’ve been given to the best of my ability. It may take me a very long time before I get it working!

This here might be an intresting change from your regular Cata.
It kinda needs steampower to compensate the lack of solarpower and since plants don’t grow also a alternative way to get plants or some new editable stuff.
Oh, and a generator to provide energy to welders, freezers etc.

I’m actually trying this, as Coolthulu said it’s really super simple to mod.

Its rather cool, but considerably easy (as monsters can’t see you) but the part that involves a forever freezing earth is somewhat challenging.

Should probably mod some shadow enemies and give night vision to zeds…
Making batteries more common might be worth a try as well.

Well, if someone wanted zombie nightvision, they could just activate the zombie nightvision mod on top of this one (once someone codes it).

If anyone has a tentative version, I would be happy to test it out if you could post it in this thread.

As far as the descending temperature over time, it was suggested in another thread that someone work on a mod of this nature.
Also, I remember a couple of versions ago, there was a specific bug in the game that caused this very process to occur for some players in certain worlds, but obviously it was corrected quickly.
Kevin would probably know the specific code that caused this to happen, and I’m sure he could code it in as a mod in a hot second. :3

I think it would probably be best to have two separate mods for the loss of sunlight over time and the descent of temperature, so that you could have a world that has either both or one of the two. Both would probably be fun to play, depending on your preference.