The "problem" you're seeing has nothing to do with weight; it's a consequence of setting uniqueMinDistance=1. I presume you didn't change the value of anyRuinsMinDistance in the Ruins.txt config file, so it's got its default value of 64. That means a #2 can be just 1 block away from another #2, but a #1 has to be at least 64 blocks away from a #2. Once a #2 is spawned, therefore, Ruins is going to keep picking #2 over and over until there's a gap of 64 blocks with no structures (e.g., a wide ocean, if the structures don't spawn on water) and #1 once again becomes an eligible selection, at which point a new random draw is made (33% chance of #1 or 67% of #2, according to the weight values) and the repetition begins anew.
If you want high-density Ruins, a better way to do it is leave uniqueMinDistance=0 in the template files (which is the default; 0 being a special value indicating the global value of templateInstancesMinDistance should be used), and instead set anyRuinsMinDistance=1 and templateInstancesMinDistance=1 in Ruins.txt. You should then get the result you expect.
In general, the value of uniqueMinDistance (and templateInstancesMinDistance) should be equal to or greater than that of anyRuinsMinDistance. Otherwise, you'll tend to get the homogeneity bias you observed, which is almost certainly undesirable. There may be some esoteric situations warranting violation of this guideline, but I can't think of any.
I see, that certainly explains it.
One last question regarding Weight:
Ruins are weighed versus each other right?
If I want some ruins to be much rarer, should I UP the normal ruins weight higher?
Say, for an extreme example, I set ALL normal house ruins to 31, and one special castle as 1:
it would significantly lower the chance of the 1 castle ruin, but still allow it to spawn, just at a very very low chance?
Ruins enforces a floor at Y=8. If you attempt to spawn a structure lower than that (due to, say, embed_into_distance=99999), it will simply spawn at Y=8.
Sweet, no worries then.
A template should specify either acceptable_target_blocks (i.e., spawn only on these) or unacceptable_target_blocks (spawn on anything but these), or neither (spawn on anything). It should never specify both.
So if I ONLY use acceptable_target_blocks, it should work?
Also, good to know about the metadata. Thanks for the pointers; they will come in handy.
There is no parameter unique. The once-per-biome feature you describe does not currently exist in Ruins.
Really? I could have sworn I saw one.
But, I could just set uniqueMinDistance to really high, and it would basically get the same result, right (making it spawn just once)?
What's the highest number I can put in? Or, is there no limit?
I'm not sure what "spawning animals" refers to. Ruins (currently) only places blocks, not entities. It can, however, place command blocks that spawn entities...is that what you mean?
Yes, it is done via commandblocks, specifically for CustomNPC Mod NPCs, since that particular mod doesn't have natural spawning.
Leveling is a whole other can of worms. If you don't want leveling--and most templates don't--set leveling_buffer=-1. Without leveling, the best way to think of max_leveling is as specifying how flat the terrain surface must be to spawn this template. If max_leveling=0, it must be perfectly flat over the entire footprint of the structure to be spawned; if max_leveling=1, it can deviate up and/or down by at most one block; and so on. The max_leveling parameter has nothing to do with blocks being removed if leveling is disabled.
So basically, if I set the number higher, it would have a higher chance to spawn, because it doesn't need to be flat, yes?
Then I should do that for NPC spawns since they're just commandblocks.
There is a special "pseudo-block" you can use in template rules: preserveBlock. This is a directive telling Ruins not to replace the block in that position.
Since you mention base blocks, I suspect you're creating templates via the /parseruin command. If so, your template uses an implicit rule0 to represent air (sort of...this post is long enough without going into a full explanation). If you want your template embedded in a medium like dirt or stone without unsightly air pockets, you can manually edit the parseruin-generated template file to add a new preserveBlock rule onto the end of the rule list, and replace some or all of the 0's in the layers with this new rule. So, instead of...
Or I could maybe use a block (say lapis) when I build and then replace that block with preserveBlock in the template?
Yeah, I mainly use /parseruin, then edit the ruin template.
This isn't currently supported in Ruins, at least not directly. As a workaround, though, you could perhaps create a third template C which simply consists of a single command block that spawns either an A or a B in its place. Move templates A and B to a non-biome folder so they aren't naturally generated on their own. Set C's uniqueMinDistance to some big number, like 4096, and voilà! Your A's and B's are widely separated.
I see. Thanks for the workaround! It will be very handy.
And thank you soo much for answering my questions; it helps a lot!