• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Custom River Stamps

So the maps I had been generating to test the new stamps were set to spawn no towns and no wilderness POIs because I wanted to maximize the number of rivers. For testing purposes, you know.

But when I started generating test maps with towns and wilderness POIs, I noticed a potential issue arising when using giant 1024x1024 stamps: the worldgen simply won't place any river stamps that it thinks will interfere with its placement of towns or where it wants to draw roads.

The huge river stamps do still have a chance of spawning, but it's very low because it's just a matter of luck that a river might spawn in an area that doesn't happen to have any towns or roads nearby. It all comes down to dice rolls, and the dice don't favor 1024x1024 sized stamps.

My next experiment will be to create 512x512 sized copies of those large stamps. BUT I'll keep the original large stamps in the mix. I want to know if the worldgen algorithms are "smart" enough to pick and choose river stamps for placement based on suitability (size in this case), or if the algorithm is purely based on dumb luck.
 
Interesting. That suggests to me RWG isn't scaling the stamp, or only scaling it to a limited amount.

Your observation leads me to wonder if 256x256 and 128x128 stamps are possible.
 
Interesting. That suggests to me RWG isn't scaling the stamp, or only scaling it to a limited amount.

Your observation leads me to wonder if 256x256 and 128x128 stamps are possible.

I wouldn't bet my life on it, but I'd bet a nickel that the game would indeed use smaller stamp sizes.
 
And here we go. Now using a total set of 12 custom stamps (six 1024x1024 and six 512x512 copies), here are the results on a 4k map:

20250724093423_1.jpg

1 vanilla river and 3 custom rivers. One of the rivers is kinda big, but I'm not sure if it's an undersized 1024 stamp or an oversized 512. Either way, the game used the stamps it needed to use. It would take a lot more test runs to draw any real conclusions, but I'm super lazy and it looks good enough to me!

One thing to note is that I currently have a lot of extra 1-tile settlements spawning (old oversized wilderness POI converted to tiles). They are set to force spawn for testing purposes. So it may be that all those extra settlements and dirt roads are overcrowding the map and preventing rivers from spawning where they otherwise would. Just something to keep in mind.
 
I resized one of my existing canyon stamps to 512x512. It works. This shows the image file on the right and the resulting canyon in RWG on the left. Below that is a view in-game.

canyon01.png


canyon.png

I fired up Photoshop to make a test canyon by hand.

New 512x512, RGB color mode, 8 bit, background transparent, 72 DPI. Inserted a black (0,0,0 so that Red is zero) "ZZ" in 300 point font. See next image from RWG. It looks nasty on the edges for probably reasons that Cpt Krunch mentioned but that I don't understand.

BTW, in RWG "Cracks" are "Canyons"... (e.g. canyon_zztong_01.png in a Stamps folder at the top level of a modlet.)

Screenshot 2025-07-24 172230.png
 
FYI, if you look in the original vanilla rwgmixer.xml, you'll find the xml settings for rivers and canyons, which includes the scale that they can spawn in at.
 
Unfortunately I got sidetracked by something mentioned earlier. Namely, the custom settlements (old oversized wilderness POIs) and how they are crowding my maps. I've been using the methods worked out by @stallionsden and @zztong to make my settlements, and they spawn perfectly. Problem is, they spawn TOO perfectly.; every settlement now has a 100% chance to spawn on every map -- which is great for testing the POIs -- but bad for everything else.

So I've been trying to figure out how to give a random chance for settlements to spawn. But 1) city/town spawn probabilities don't appear to be exposed to xml anymore in the rwgmixer, and 2) the limited xpath v1.0 supported by 7DTD doesn't allow any sort of random() or math.random() function calls.

I think I've figured out a work-around, though. If you pair a "fake" district & tiny 5x5 streettile with your REAL district for each custom settlement, and set the spawn_weights appropriately, you can sort of hack a random roll into the settlement spawn. When the fake district gets selected by rwg, all that spawns it its little 5x5 prefab instead of a full-size tile. That's important because it prevents a giant blank 150x150 tile imprint from being stamped into the terrain, which is what will happen with a regular blank tile.

So that seems to work, but the $!@#% dirt road is STILL being drawn to the fake district location, even though there's no RoadExit in the little 5x5 prefab! Not sure what to do about that... 😓
 
@EvilPolygons , do you end up with biome decorations under the water of your rivers? I'm messing with craters and end up with crater lakes that have things like cars and other stuff in them.

Yep, but that happens in vanilla a lot, too, from what I've seen. At some point (I think around A20?) they added tires and cars as deco to water biome areas.

However! Inspecting a bunch of my own river stamps on a whoooole bunch of test maps, it seems as though something might be amiss because I'm occasionally seeing ground decos that I don't think should be on the river bottoms. It may be because the gradient colors aren't quite right (going from river bottom to riverbank), or it might be because my alpha channel blending is off.

I'm still banging my head on the wilderness tile/POI issue though. Once I have that figured out I'll come back to the river stamps.

I really like your canyon stamps, btw. I hope you'll have the fixed 512x512 versions in your next ZZTong prefabs update! 😁
 
I really like your canyon stamps, btw. I hope you'll have the fixed 512x512 versions in your next ZZTong prefabs update!

I did make all four of those stamps into sizes RWG can deal with. It will be in the 2.2-ZZ030 release along with a few POI bug fixes.

I was kicking around craters earlier to day, mostly having ChatGPT write a python script to make them. It kinda worked; kinda didn't. I wasn't entirely happy with the results, but it was close.
 
Eureka! I did it! Stallionsden said it wouldn't work, but I did it anyway! Because I'm stubborn!

A one-tile township/district superclass that can spawn multiple completely individual wilderness tile/POIs, allowing you to control spawn probabilities!

I'll make a separate post about it since it doesn't really belong here.
 
Back
Top