Set items for each building

So, i am making a mod by editing the json files.

For instance, a new item called “hospital gown”. I want it to spawn inside hospital rooms. Which file must I edit?

Thanks

Hmm, i think you have to edit the spawn groups? I am really bad at this. But IRCC there is a json called spawngroups or something like that. Still, i only messed with jsons once or twice, so i don’t remember very well. But it’s easy!

Also, welcome! This question may look weird but, where are you from? I think i recognize that name.

Thank you!

I am from Uruguay, where Nacional is a soccer team, thrice World Champion.
I’ll check all the jsons and maybe I find what I am looking for.

I think the json is called item_groups, there you will have to look for a group probably called “hospital” or something.

Yes! I found it.
item_groups.json, under the “hospital_bed” category.

Thank you very much.
Now, I have two more issues I’d like to solve:

a) I created a new monster; which file determines where does that monster spawn? (in which buildings, in forest or in town, density of spawn, etc)

b) Is it possible to increase the infection rate to 100%? I mean, every time you get bit you get infected-

Thanks, any help would be appreciated

[quote=“nacional100, post:5, topic:8906”]Yes! I found it.
item_groups.json, under the “hospital_bed” category.

Thank you very much.
Now, I have two more issues I’d like to solve:

a) I created a new monster; which file determines where does that monster spawn? (in which buildings, in forest or in town, density of spawn, etc)

b) Is it possible to increase the infection rate to 100%? I mean, every time you get bit you get infected-

Thanks, any help would be appreciated[/quote]

a) data/json/monstergroups.json
Unfortunately hospital spawns are still hardcoded in src/mapgen.cpp.
It won’t be hard to add the new zed there, but you’ll have to recompile the game for it to work.

b) No, it’s not possible yet. You’d have to edit the bite function (which would affect everyone) or create a new one just for that one zed

[quote=“nacional100, post:3, topic:8906”]Thank you!

I am from Uruguay, where Nacional is a soccer team, thrice World Champion.
I’ll check all the jsons and maybe I find what I am looking for.[/quote]

Oh god oh god oh god i am from there too!

Salto, uruguay. Bienvenido!

[quote=“Coolthulhu, post:6, topic:8906”][quote=“nacional100, post:5, topic:8906”]Yes! I found it.
item_groups.json, under the “hospital_bed” category.

Thank you very much.
Now, I have two more issues I’d like to solve:

a) I created a new monster; which file determines where does that monster spawn? (in which buildings, in forest or in town, density of spawn, etc)

b) Is it possible to increase the infection rate to 100%? I mean, every time you get bit you get infected-

Thanks, any help would be appreciated[/quote]

a) data/json/monstergroups.json
Unfortunately hospital spawns are still hardcoded in src/mapgen.cpp.
It won’t be hard to add the new zed there, but you’ll have to recompile the game for it to work.

b) No, it’s not possible yet. You’d have to edit the bite function (which would affect everyone) or create a new one just for that one zed[/quote]

A) Ok. But I don’t really want it to spawn in hospitals. Just on the street. Is there a group for that?
Also, what is the difference between “frequency” and “cost multiplier”?

B) The infection rate I’d like to chance is for EVERY zed. So, which file defines the bite?
Also, is it possible to change the time which an infection takes to kill you?

Thanks

[quote=“StopSignal, post:7, topic:8906”][quote=“nacional100, post:3, topic:8906”]Thank you!

I am from Uruguay, where Nacional is a soccer team, thrice World Champion.
I’ll check all the jsons and maybe I find what I am looking for.[/quote]

Oh god oh god oh god i am from there too!

Salto, uruguay. Bienvenido![/quote]

Montevideo! Salud

I don’t really know whether Spanish is allowed in this forum.
I am surprised that CDDA is played in our small republic. I guess you can find fellow countrymen everywhere!
How long have you played Cat?

I have been registered for more than 2 years, hahah. So even more than that. It was really simple back then.
It is allowed as long as you do it in the spanish section! No one is there though. Little expressions are allowed i guess. Así que salud!

I hope you stay more. Because this is kind of awesome, you are first uruguayo i see here!

[quote=“nacional100, post:8, topic:8906”]A) Ok. But I don’t really want it to spawn in hospitals. Just on the street. Is there a group for that?
Also, what is the difference between “frequency” and “cost multiplier”?

B) The infection rate I’d like to chance is for EVERY zed. So, which file defines the bite?
Also, is it possible to change the time which an infection takes to kill you?[/quote]

A) Then add it into all relevant groups that hold regular zombies. There is no street-only group, as far as I know.
“Frequency” means how likely is it to be picked, “cost multiplier” means how much is it “worth” in difficulty.
High frequency means it will spawn more, high cost multiplier means it won’t spawn with others around and will prevent others from spawning.

B) src/monattack.cpp defines bite. But if you change it, you’ll have to recompile the game for it to work and you won’t be able to isolate it in a mod.
Also, it is too big of a difficulty change to get into mainline, meaning you’d have to keep a separate branch and compile the game yourself every time. It’s not worth it.

For infection time, try data/json/effects.json. It has effects “bite” and “infected”. If you change the times on them, it could work.
It’s a json, so it may be possible to isolate the changes into a mod.

Bites, infections, and recovery times still use a fair bit of hardcoded stuff that couldn’t be pulled out to the effects.json. You can change most of their effects, but their times and heal/proceed chances are still hardcoded.

That said you could totally make a new effect that caused massive damage after a certain period of time, remove the special bite attack from zombies and replace it with a percentage chance to infect you with the new effect on each attack, make a second new effect that removes the first one, and then add that second new effect to antibiotics.

The net change would be that zombies have a chance of hitting you with an effect that would automatically kill you after X time (possibly increasing in other harmful symptoms as that point got closer) unless you treated the character with antibiotics.

Ok. I really don’t know anything about modding or compiling . I was just messing up with the .json. I’ll forget about it.

Thank you very much. I was really trying to simulate a The Walking Dead sort of apocalypse, where any bite will infect you. I would also lower the zombies speed and health. You know, in TWD almost anyone can kill a zombie with a single blow to the head.

Am I the first one trying to simulate TWD? I haven’t found much.
And if the changes can’t be isolates into a mod, I’ll just make a copy of the game folder and make all the changes in that folder.
How hard is it to compile/edit those non-json files?

[quote=“StopSignal, post:10, topic:8906”]I have been registered for more than 2 years, hahah. So even more than that. It was really simple back then.
It is allowed as long as you do it in the spanish section! No one is there though. Little expressions are allowed i guess. Así que salud!

I hope you stay more. Because this is kind of awesome, you are first uruguayo i see here![/quote]

I have played CDDA for almost one year now. And I am not planning to leave it to soon. The game is just awesome, nothing the sort of which I have experienced before.
I would like it to be harder though, that’s why I am trying to increase its difficulty, make it more strategic than action-focused. More scavenging-focused than crafting-focused.
Every day should be a challenge, I would like to always be afraid of 3 or 4 zeds cornering me, to strive for food and water everyday.
Once you get yourself a proper armor, a decent melee skill and a good blade, it is very unlikely that CDDA stays as a challenge.

[quote=“nacional100, post:13, topic:8906”]Am I the first one trying to simulate TWD? I haven’t found much.
And if the changes can’t be isolates into a mod, I’ll just make a copy of the game folder and make all the changes in that folder.
How hard is it to compile/edit those non-json files?[/quote]

Many people want different zombies. Not sure about this particular brand.

There are ready guides on how to compile the game. For example, the guides at http://www.wiki.cataclysmdda.com/index.php?title=How_to_compile The first guide works (I wrote it after doing it this way), but it’s not the most straightforward thing around.
If you just want stronger bites, it’s not really worth it. And if you don’t know how to program in C++, you probably couldn’t even edit the file yourself.
I intend to implement modable attacks someday - maybe even soon (after next stable comes out - this should be like, in 2 weeks or so).

[quote=“nacional100, post:14, topic:8906”]I would like it to be harder though, that’s why I am trying to increase its difficulty, make it more strategic than action-focused. More scavenging-focused than crafting-focused.
Every day should be a challenge, I would like to always be afraid of 3 or 4 zeds cornering me, to strive for food and water everyday.
Once you get yourself a proper armor, a decent melee skill and a good blade, it is very unlikely that CDDA stays as a challenge.[/quote]

Yeah, the easy difficulty after 2 days is a big problem in DDA. PRs that make the game easier get in very quickly, PRs that make it harder often require convincing people.
Some sort of difficulty setting would help a lot, but no one wrote one yet.

[quote=“Coolthulhu, post:15, topic:8906”][quote=“nacional100, post:13, topic:8906”]Am I the first one trying to simulate TWD? I haven’t found much.
And if the changes can’t be isolates into a mod, I’ll just make a copy of the game folder and make all the changes in that folder.
How hard is it to compile/edit those non-json files?[/quote]

Many people want different zombies. Not sure about this particular brand.

There are ready guides on how to compile the game. For example, the guides at http://www.wiki.cataclysmdda.com/index.php?title=How_to_compile The first guide works (I wrote it after doing it this way), but it’s not the most straightforward thing around.
If you just want stronger bites, it’s not really worth it. And if you don’t know how to program in C++, you probably couldn’t even edit the file yourself.
I intend to implement modable attacks someday - maybe even soon (after next stable comes out - this should be like, in 2 weeks or so).[/quote]

Wait, wasn’t there a way to change, for example, the bites attack with the jsons and stuff? I am pretty sure something like that was implemented.

Also, Nacional, you can totally lower their speed with the jsons. Health too. Though i don’t remember very much, if you check the “slow zombies” mod folder, in the json, something like that should appear. Also you could modify their stats to give it less resistance, making it have less health.

Though you are asking to make the game harder, and this indeed will make the game far easier. BUT it will make it much more awesome to play with a really big spawn rate and hordes. Add NPCs for buggy and wacky kind of fun.

Also, turning the item spawn rate is really awesome to give everything that “abandoned” feeling, wich is really cool and atmospheric. And it can turn the difficulty up and also make your mod more like you want, IMO.

Trouble with making the game tougher is that rarely does it only make the game harder for developed characters, which is when the difficulty is needed. I’m just as guilty here as everyone else, what with the bots and all.

I’m not sure how you’d make the same three zeds a challenge that a starting char would fear, but might be able to beat–and simultaneously keep a late-game char afraid of 'em. Zeds on the small scale are an early-to-mid-game threat by my estimation.

Only which attacks and how often. For example, bite attack with cooldown 5 and shockstorm attack with cooldown 20.
That’s all - you can’t have 2 zeds use same shockstorm with different range, for example.

It wouldn’t be hard to make other effects modable, though. I would only need to copy the system that someone (I think it was BevapDin) wrote for item actions (the whole “type”: “transform” stuff) and repurpose it for monster attacks. Since item actions and monster actions have similar structure, it should be easy.

[quote=“KA101, post:17, topic:8906”]Trouble with making the game tougher is that rarely does it only make the game harder for developed characters, which is when the difficulty is needed. I’m just as guilty here as everyone else, what with the bots and all.

I’m not sure how you’d make the same three zeds a challenge that a starting char would fear, but might be able to beat–and simultaneously keep a late-game char afraid of 'em. Zeds on the small scale are an early-to-mid-game threat by my estimation.[/quote]
The best way would probably be making players grow powerful less quickly.

By spending the first day on crafting cotton armor, you can have a survivor who shrugs off most regular zombie attack, except ones to the head (cotton hats and balaclavas don’t protect too well). A cotton hoodie+trenchcoat shouldn’t reliably stop zombie punches.
At the same time zombies have 0 armor and thus are easily punchable to death.

Lowering the effect of skills and dexterity on damage and accuracy would also help. And speed at which melee skills grow (they get rng(5,10) practice per every hit). And maybe add a soft cap on training based on some enemy stat, so that you can’t get 10 melee by punching walking punching bags.
At the moment, 14 dexterity is a no-brainer, because it essentially gives 3 starting melee, 3 starting dodge and later on makes crits very reliable. If that 3 melee and 3 dodge didn’t mean much, other stats could get to shine - especially strength, which doesn’t do much for combat (due to affecting mostly the bashing type, which is bad).

Trouble with capping melee skills is that finding high-level sparring partners can be Tricky. Perhaps having the XP gain decrease as you go up would be better: (rng 1, (11-your_level)) as a quick & dirty. Zed armor can be looked into.

[quote=“KA101, post:17, topic:8906”]Trouble with making the game tougher is that rarely does it only make the game harder for developed characters, which is when the difficulty is needed. I’m just as guilty here as everyone else, what with the bots and all.

I’m not sure how you’d make the same three zeds a challenge that a starting char would fear, but might be able to beat–and simultaneously keep a late-game char afraid of 'em. Zeds on the small scale are an early-to-mid-game threat by my estimation.[/quote]

My idea to solve this problem is:

a) Any bite will infect you
b) Although you will be able to kill zombies with one blow, spawn rate will be much higher. So, yo can kill them easily when you face them one per time (like TWD). Y think it is absurd that a single zombie is a challenge for a first-day character. Aren’t zombies slow and clumsy? A kid with a knife should be able to dispatch them by stabbing their head. But, when 3 or 4 of them corner you, it should be more probable that they bite you, infecting you and thus making you be afraid of being cornered. To achieve this, c) and d)

C) armor will never totally protect you. Nowadays wearing a complete winter survivor armor makes you 100% immune to classic zombies. It doesn’t matter if every tile around you is occupied by a zed. You can block and kill them one by one.

d) this is a crazy idea but it would be very nice to implemen . System of “facing”. So, if you hit a zed which is standing on a tile west of you, the zombie at your east can bite your back! So, you can’t dodge him because you are not looking at him. This would make combat MUCH deeper, as an entire system of manoeuvering and positioning must be mastered in order to fight large numbers of enemies.

E) following the same logic, another tasty idea would be enemies making you fall to the ground when 3 or 4 of them attack you at once. It is absurd that zombies hit and bite you from their tile without jumping over you and pushing you to the ground. This would be another feature to make combat more strategy- focused

G) Zombies can’t smell you. After all, they are humans. So, if they cannot smell you, you can hide behind walls and sneak and hide without them noticing you, as long as you don’t make noise. This also increases tactics and thinking when moving from place to place.
It would be also nice for zombies to face in a direction. So, if you throw a talking doll or a radio, the noise will attract them and you can sneak behind their backs while they aren’t looking.
Generating cities with more hiding places, less “square” buikdings, would contribute to this “hide and sneak” strategy when moving.
Ability to crouch? So, you can throw yourself to the floor behind a counter and hope for the zombie which has just entered the shop not to find you.

In my ideal zombie game, every day is a challenge. You NEVER get to master zombies. At any time you can be overrun. You have to fortify your shelter, plant your food, make plans, take difficult decisions, and there is always the chance that a horde breaks through your wall
and invades your home. Always on the run, always afraid, carrying only the strictly necessary. Thinking twice before entering a building, running more often than fighting. But also strategy and creativity being rewarded.

In CDDA, the difference between living for 20 days and 200 days is just patience! In my ideal Zombie Game, every day proves something.

So, every mod which approaches this utopical model is welcome by me. On the long run it can be achieved. But I don’t think that the creators of CDDA will steer in that direction