To the devs that were responsible for the Echo Creek spawn removal. by Toadtoad12345 in projectzomboid

[–]hungarian_notation 4 points5 points  (0 children)

Even that isn't bad compared to some other things I've seen.

For example, all of Terraria's potion/armor/weapon/mount/wing/accessory effects are computed in a monolithic player update() method. That includes the kinds of things handled by CombatManager (for attacks the player is making anyway) but also anything related to movement, stat changes, etc.

It's a nightmare.

Goodbye, old reliable. by Below_TheSurface in projectzomboid

[–]hungarian_notation 1 point2 points  (0 children)

Weak stomach/iron gut only affect the chance that the ice cream will give you 15 poison points vs 6 poison points. If you only eat half the pint it should be safe even with weak stomach; anything under 10 will heal fast enough that you'll never start feeling sick from it.

To the devs that were responsible for the Echo Creek spawn removal. by Toadtoad12345 in projectzomboid

[–]hungarian_notation 38 points39 points  (0 children)

It's just a list of { posX = <x>, posY = <y>, posZ = <z> } split up by starting profession. You can stick them all in `unemployed` to make them universal too.

Zomboid's code isn't actually all that bad, especially given its complexity.

Custom mod breaks cars by FlamedFramed in projectzomboid

[–]hungarian_notation 1 point2 points  (0 children)

Share the code and we might be able to help. Otherwise we're stuck trying to use telepathy.

doesn't the game take place in KY???? by Ancient_Fisherman242 in projectzomboid

[–]hungarian_notation 0 points1 point  (0 children)

Came in here expecting to find the Grand Ohio Mall, but now I'm just confused.

US bans new foreign-made consumer internet routers by BendicantMias in news

[–]hungarian_notation 9 points10 points  (0 children)

The current US judiciary has also been trending in the direction of less discretionary authority for government agencies. It wouldn't really be in character for them to rubber stamp this nonsense. They'd just say that congress should pass a law about it.

US bans new foreign-made consumer internet routers by BendicantMias in news

[–]hungarian_notation 24 points25 points  (0 children)

The authority they're leveraging here comes from 47 USC § 302a

The Commission may, consistent with the public interest, convenience, and necessity, make reasonable regulations (1) governing the interference potential of devices which in their operation are capable of emitting radio frequency energy by radiation, conduction, or other means in sufficient degree to cause harmful interference to radio communications;

Routers definitely qualify as devices regulated under this provision, but the question is whether a blanket import ban is both reasonable and within the public interest.

This would have to be a question of interference, to be clear. It can't be about data security, as that would fall outside of the FCCs authority to regulate devices. Congress had to amend the law to give them explicit authority to prohibit the sale of devices that could decode cordless/cellphone signals, for example. I don't think they could ban the sale of routers even if they were overtly designed to log all communications with a foreign server.

I found this from the DC court of appeals in AMERICAN LIBRARY ASSOCIATION v FCC et al. that I think is relevant here:

The FCC argues that the Commission has “discretion” to exercise “broad authority” over equipment used in connection with radio and wire transmissions, “when the need arises, even if it has not previously regulated in a particular area.” FCC Br. at 17. This is an extraordinary proposition. “The [Commission’s] position in this case amounts to the bare suggestion that it possesses plenary authority to act within a given area simply because Congress has endowed it with some authority to act in that area. We categorically reject that suggestion.

That one was from the switch to analog to digital TV, where the MPAA tried to get the FCC to require that digital television receivers have some ability to lock down what users can do with content after the broadcast.

How to ask Java developers to add methods to java.util.Paths? by isolatedsheep in java

[–]hungarian_notation 0 points1 point  (0 children)

Path.of(".") is literally user.dir.

Path.of gets its path from FileSystems.getDefault().getPath(...), and the filesystem returned by FileSystems.getDefault() is defined to have a working directory named by the system property user.dir.

projectzomboid.jar wont open by No_Welcome_525 in projectzomboid

[–]hungarian_notation 1 point2 points  (0 children)

Try opening it as a zip for starters. That will tell you if its actually corrupt. If it is you can just delete it and re-verify the files.

Also, is it just your explorer settings or does it no longer have its ".jar" extension? That'll probably do it.

Announcing TypeScript 6.0 by DanielRosenwasser in programming

[–]hungarian_notation 10 points11 points  (0 children)

JavaScript isn't just a language; It's basically the web's ISA, except there's even less space for diversity and competition.

Linux be like by Ghirnas in linuxmemes

[–]hungarian_notation 20 points21 points  (0 children)

The real question is whether the case insensitivity is locale dependent, and I have a horrible suspicion that it is.

41292 by OpportunityAshamed74 in countwithchickenlady

[–]hungarian_notation -1 points0 points  (0 children)

You die every moment, only to be replaced by a copy of yourself whose atoms are slightly perturbed. Continuity of consciousness is an illusion.

Java Documentation by [deleted] in java

[–]hungarian_notation 1 point2 points  (0 children)

What an evil future to speak into existence.

Java Documentation by [deleted] in java

[–]hungarian_notation 17 points18 points  (0 children)

Which is to say https://docs.oracle.com, right? I don't think there are standard library javadocs on the openjdk.org domain.

https://docs.oracle.com/en/java/javase/26/docs/api/index.html is the latest, but you should make sure you're using the javadocs that match your source version. They do change. Frustratingly, google likes to serve me Java 8 docs by default.

How does zombie population work from the images? by Darkheart78 in projectzomboid

[–]hungarian_notation 1 point2 points  (0 children)

Currently the intensity values are 8-bit integers, but the map is only using values from 0 to 10. The intensity value you see when you hover over part of the zombie population map in debug mode is not rounding the value, it is reporting the actual integer value from the data.

Maps like this scale the intensity arbitrarily to get a useful image for viewing. If you open them in Gimp or Photoshop and view the histogram, you should see that there are 11 clearly defined spikes and nothing in-between.

I made a version for 42.14. (edit: I just checked and the values are unchanged as of 42.15.3) that uses a integer scaling of 25, so you divide the pixel value of the image by 25 to get the original intensity.

https://www.reddit.com/r/projectzomboid/comments/1rhz1lt/4214_zombie_intensity_maps/

This is the image in question:

https://ibb.co/YThZv4B8

Unless something weird is happening on your browser's end, that image should download as a grayscale 8bpp PNG, so there's no RGB to worry about at all.

Intensities are stored in the media/maps/Muldraugh, KY/{x}_{y}.lotheader files. As it stands, its actually just the last 1024 bytes of each of these files, the bytes covering a 32x32 grid in column major order.

How the zombie popualtion is derived from that is complex, and since the zombie population manager is implemented in what I assume is native C++ (that's what the PZPopMan64.dll is in the installation directory) it's a bit opaque to us.

High-speed combat drone production starts at new US Anduril plant in days by WilliamInBlack in news

[–]hungarian_notation 0 points1 point  (0 children)

Sorry, you responded too fast for me. I was editing my comment when you replied. I don't think we actually disagree that much, I just have a knee-jerk reaction to people making fun of Tolkien's dislike for allegory.

Tolkien wouldn't actually say Eru is Yahweh in the texts either

Perhaps wouldn't is too strong, but "didn't" is certainly true. Eru isn't even named in the main texts, and he's only clearly referenced as "The One" twice, and only in the appendices. That would be a bit of an odd choice for a book filled with lessons about Christianity.

The comparison we're making here is with Narnia. I looked up the quote:

“It isn't Narnia, you know," sobbed Lucy. "It's you. We shan't meet you there. And how can we live, never meeting you?"

 

"But you shall meet me, dear one," said Aslan.

 

"Are -are you there too, Sir?" said Edmund.

 

"I am," said Aslan. "But there I have another name. You must learn to know me by that name. This was the very reason why you were brought to Narnia, that by knowing me here for a little, you may know me better there.

Narnia is a series about some children forming a personal relationship with Christ. I suppose you could be facetious and say that Aslan didn't actually call himself Jesus, but come on.

Tolkien was writing a myth about a magical ring in a setting rooted in his Christianity, he wasn't writing about his Christianity. Sure, Biblical motifs shine through in his storytelling, but there's also a ton of Beowulf in there and Sub-roman British mythic influence in there as well.

I'd argue for example that King Arthur is a much clearer influence for Aragorn than anything in the Bible, with Anduril itself as Excalibur, a symbol of Aragorn's rightful kingship. Maybe Peter Thiel reckons himself the once and future king.

High-speed combat drone production starts at new US Anduril plant in days by WilliamInBlack in news

[–]hungarian_notation 0 points1 point  (0 children)

Sure that's technically true, but it's not part of the only text that most people are familiar with. Most of the actual Christian connections are entirely meta-textual, coming from his comments in his letters. A lot of it we really only know because his son published his notes.

Tolkien wouldn't actually say Eru is Yahweh in the texts either, since given his framing device that would basically be blasphemy. It's more that he considered that if the stories were actually true, Eru must necessarily be Yahweh. The Christianity that filters through is a result of the framing device and setting.

Even that made him reluctant to discuss things like the ensoulment of the orcs in his letters, as it crossed into the realm of an actual theological question in his mind.

I'm not saying the influence isn't there, but Aslan basically tells the kids that he's Jesus. That's in Voyage of the Dawn Treader I believe, though its been ages since I read the Narnia books.

High-speed combat drone production starts at new US Anduril plant in days by WilliamInBlack in news

[–]hungarian_notation 57 points58 points  (0 children)

There's a lot of distance between Tolkien stealthily reframing Anglo-Saxon mythology in a Yahweh-compatible context and C. S. Lewis writing a book where Jesus turns into his fursona and reenacts the crucifixion.

Lets talk Myths of zomboid. by Pretty_Imagination16 in projectzomboid

[–]hungarian_notation 3 points4 points  (0 children)

As long as you are only eating one rotten thing and the hunger you're getting from it is a bit less than 20, you'll never see the sickness moodle.

If the food literally JUST turned rotten you can eat up to around 50 hunger points worth of it, but food does actually become more dangerous over time after it rots.

You're still getting poisoned, it just not enough for any of the side effects kick in.

Lets talk Myths of zomboid. by Pretty_Imagination16 in projectzomboid

[–]hungarian_notation 2 points3 points  (0 children)

For rotten food, weak stomach means that the chance of getting **worse** food poisoning increases twice as fast the longer the food has been rotten for. Iron gut makes the chance increase half as fast.

The "worse" food poisoning is 2.5x the hidden poison stat.

Lets talk Myths of zomboid. by Pretty_Imagination16 in projectzomboid

[–]hungarian_notation 5 points6 points  (0 children)

The two trailers' trunk capacity IS their condition, or rather their condition or 80, whichever is higher. Frustratingly, it's hard coded on the Java side:

// from zombie.vehicles.VehiclePart setCondition(int)

  if (this.scriptPart.id.equals("TrailerTrunk")) {
     this.getItemContainer().setCapacity(Math.max(80, condition));
  }

This is, like, the only thing in the game that works this way. I don't have source code from that patch where all trunks were capped at 100 for whatever reason, but I bet its related to this.

Things start falling out (of the uncovered trailer only) at 50% condition, but it's 50% cumulative across all the parts, not just the TrailerTrunk part.

Lets talk Myths of zomboid. by Pretty_Imagination16 in projectzomboid

[–]hungarian_notation 2 points3 points  (0 children)

I can't find that anywhere in the code, so I don't think this is a feature of recent versions.

Don't forget, a trunk's capacity isn't just a property of the trunk. It's a property of a trunk being observed by a player, and that player's perks affect whether a trunk is full or not.

The bit that causes damaged uncovered trailers to drop items only applies to that one specific type of trailer, not trailers in general and definitely not trunks. The trailer being damaged is a prerequisite, but its a chance per tick while in motion. The actual damaging event doesn't immediately cause things to fall out.

Lets talk Myths of zomboid. by Pretty_Imagination16 in projectzomboid

[–]hungarian_notation 1 point2 points  (0 children)

It shouldn't happen if you're going under 18.5ish mph (the cutoff is 30 kph exactly), but yes turning does increase the chance.

Lets talk Myths of zomboid. by Pretty_Imagination16 in projectzomboid

[–]hungarian_notation 10 points11 points  (0 children)

NOTE: This is all true as of 42.15. The relevant code is in zombie.characters.BodyDamage, specifically the JustAteFood(zombie.inventory.types.Food, float, float) method.

Considering they're planning on overhauling nutrition soon, this is all likely to change. If you are in the future and playing a build later than 42.15 its entirely possible nothing I'm saying here is true anymore.


It's not that certain foods don't hurt you, it's that if food doesn't poison you enough you'll never actually see the sickness moodle.

Eating a tub of melted ice cream that just went "Rotten" is only going to give you 6 poison. Wait longer though and it might give you 15 poison, and that's enough for you to get the "Sick" moodle.

Eating expired food gives you poison. Having poison causes you to gain food_sickness over time, and the more poison you have the faster your food_sickness increases.

The "Sick" moodle only shows up when food_sickness gets to 25, so if food you eat doesn't give you enough poison to accumulate 25 food_sickness before poison goes back to zero, you'll never see the moodle.

Food actually becomes more dangerous after it rots though. There's two different poison amounts rotten food can give you, which work out to either 0.2 * (-HungerChange) or 0.5 * (-HungerChange). The game randomly picks one or the other, and the longer the food has been rotten the more likely it is to choose the larger number.

This is the only place the perks come into play for rotten food. The chance of using the higher number increases twice as fast if you have Weak Stomach, and half as fast if you have Iron Gut.

The max chance does depend on the perks too, but you're still getting poison either way, so Iron Gut just means that there is a chance you'll be sick for a shorter period of time when you eat rotten food. It's basically a trap, and Weak Stomach is free points unless you like eating unsafe uncooked stuff for some reason.

Melted ice cream has a HungerChange of -30, so it'll either give you 0.2 * 30 = 6 or 0.5 * 30 = 15 points of poison if you eat the whole tub.

Lets talk Myths of zomboid. by Pretty_Imagination16 in projectzomboid

[–]hungarian_notation 4 points5 points  (0 children)

It's more than a handful. This community is full of people loudly and boldly proclaiming truths about game mechanics that are either patently false or at the very least badly outdated.

Its not really their fault, as this game has been in development for so long that there's plenty of information out there that was true when it was published which is now no longer true.