Caves of Qud

Caves of Qud

Varied Population
Dune Wraith Village Spawn Fix & Suggestion for 50+ Strata Zone Exclusion
Let me preface by saying, I absolutely love this mod, and it's easily one of my "must-haves" for every new run. Certain zones just feel too empty without it.

The first part of the title, regarding the dune wraiths spawning in villages, a comment on the Description page mentioned it and I've also experienced this. It makes the Salt Dunes start substantially harder than the others. I'm not sure if them spawning inside otherwise safe villages within the salt dunes was an intended behaviour (a comment in one of the mod's XMLs leads to believe it's not), but I've worked out a way to stop it without preventing them from spawning anywhere else.

I have the spawner check the center zone of the currently active zone for whether it's a checkpoint, and if it is, then the spawners delete themselves. Villages all generate with the checkpoint widget, whether classic or not. Classic just ignores it.

Regarding the second part of the title, I've found that the crystalline root biomes that spawn below Eyn Roj will sometimes contain the Crystal of Eve ingredient item, and the alternative population tables/zone generation for strata lower than 50 results in those biomes being substantially more scarce and the ingredient in question with it.

I've made another edit myself, this time to the file that changes the zone generation, to exclude only the specific zone that Eyn Roj spawns in (JoppaWorld.76.5.1.1.Z), and it seems so far to work.

I've never modded a game before and the only coding I've really done has been entirely for myself or (over a decade ago) as a solo developer, so I'm not really sure how to go about making contact or even whether it's considered rude to just make changes to someone else's code like I've done.

I'm more than happy to share the changes I've made if that would help (I'm not even sure if they're the right way to achieve the result, though they work), just let me know the best way to go about sharing them if I'm not being way too presumptive.
Last edited by UnderDoug; 28 Jan @ 9:29pm
< >
Showing 1-5 of 5 comments
John Snail  [developer] 30 Jan @ 3:24pm 
Something might've changed in 1.0 that caused them to start appearing in desert villages again, it's definitely not intended.

Wasn't aware about the thing regarding Eyn Roj, I'll make sure that's working too!
Oh sweet, too easy. I'm looking forward to seeing how you tackle it and whether I got close to your solution or not (I'm confident I've taken some round about way instead of a more elegant one). I've learned an absolute ton so far, and I reckon I'm gonna learn a ton more seeing your fixes. I hope you don't mind that I've been rooting around in the mod files.
John Snail  [developer] 31 Jan @ 5:07am 
Frankly I don't think the fix I have in mind is going to be very elegant either lmfao, I don't know all that much about this game's codebase.

The mod's open source, feel free!
I couldn't figure out a way to get the dune wraiths to not spawn via the XML's alone. Seems the spawners for them will appear in village zones even when excluded from encounters.

My approach was to see if I could find some attribute that village zones have that is relatively unique to villages so that they'd still be able to spawn in ruins and other zones with stuff going on.

What I landed on was the presence of the Checkpoint widget. It seems it's present even in classic, but its functionality gets ignored outside of roleplay.

I had the spawners check the current zone on the first turn, and if the zoneID with the zone coordinates changed to be the center zone of the parasang passes the "IsCheckpoint()" check, it obliterates itself. Say the Zone is JoppaWorld.5.16.0.2.10, they check if JoppaWorld.5.16.1.1.10 is a checkpoint.

That basically covers the entire parasang that the village occupies, and if it's the first part of the spawner code then they'll obliterate before any of the rest can be executed.

Screw it, I'm not explaining very well. This is what I added to the DuneWraithSpawner.cs file:
using XRL.World; // Added by UnderDoug using XRL.World.Effects; ... public override void TurnTick(long TimeTick, int Amount) { // Added by UnderDoug Zone ParasangCenter = The.ZoneManager.GetZone(ZoneID.Assemble(The.ActiveZone.GetZoneWorld(), The.ActiveZone.wX, The.ActiveZone.wY, 1, 1, The.ActiveZone.Z)); if(ParasangCenter.IsCheckpoint()) { ParentObject.Obliterate(); } // End Added by UnderDoug

To exclude the basement of Eyn Roj from the alternate sub-50 strata zone generation, I added the following to the WorldAdditions.cs file:
static bool AddBlueprintsFor(ZoneRequest Request) { if (Request.Z < 61) { return true; } // Added by UnderDoug if (Request.WorldX == 76 && Request.WorldY == 5 && Request.X == 1 && Request.Y == 1) { return true; } // End Added by UnderDoug

The comments are just so you know explicitly what I've added. If you happen to use it as is, please don't bother including those bits.

I'm pretty unfamiliar myself, with the game's codebase. This is my first real foray into modding, and my first proper attempt at C# (I was a PHP webdev almost 15 years ago), so I'm expecting the above to be some ductape at best.

edit:formatting adjustments.
Last edited by UnderDoug; 31 Jan @ 2:35pm
Wakko 20 Jun @ 8:24am 
=== Varied Population 1.0.0.4 Errors ===
<...>/steamapps/workshop/content/333640/3334625003/TrollHero1.cs(43,56): error CS0433: The type 'FireBreather' exists in both '2951662456.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Assembly-CSharp, Version=2.0.210.20, Culture=neutral, PublicKeyToken=null'
<...>/steamapps/workshop/content/333640/3334625003/TrollHero1.cs(48,56): error CS0433: The type 'FireBreather' exists in both '2951662456.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Assembly-CSharp, Version=2.0.210.20, Culture=neutral, PublicKeyToken=null'
<...>/steamapps/workshop/content/333640/3334625003/TrollHero1.cs(85,56): error CS0433: The type 'IceBreather' exists in both '2951662456.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Assembly-CSharp, Version=2.0.210.20, Culture=neutral, PublicKeyToken=null'
<...>/steamapps/workshop/content/333640/3334625003/TrollHero1.cs(90,56): error CS0433: The type 'IceBreather' exists in both '2951662456.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Assembly-CSharp, Version=2.0.210.20, Culture=neutral, PublicKeyToken=null'
== Warnings ==
<...>/steamapps/workshop/content/333640/3334625003/Collapse.cs(14,4): warning CS0618: 'BaseMutation.DisplayName.set' is obsolete: 'All mutations should now have MutationEntries in XML. Set DisplayName on XML node.'
<...>/steamapps/workshop/content/333640/3334625003/Collapse.cs(15,4): warning CS0618: 'BaseMutation.Type.set' is obsolete: 'Should not need to set Type, the category in Mutations.xml should set this.'
<...>/steamapps/workshop/content/333640/3334625003/PhasingTongue.cs(14,4): warning CS0618: 'BaseMutation.DisplayName.set' is obsolete: 'All mutations should now have MutationEntries in XML. Set DisplayName on XML node.'
<...>/steamapps/workshop/content/333640/3334625003/PhasingTongue.cs(15,4): warning CS0618: 'BaseMutation.Type.set' is obsolete: 'Should not need to set Type, the category in Mutations.xml should set this.'
<...>/steamapps/workshop/content/333640/3334625003/MissileStrike.cs(15,4): warning CS0618: 'BaseMutation.DisplayName.set' is obsolete: 'All mutations should now have MutationEntries in XML. Set DisplayName on XML node.'
<...>/steamapps/workshop/content/333640/3334625003/MissileStrike.cs(16,4): warning CS0618: 'BaseMutation.Type.set' is obsolete: 'Should not need to set Type, the category in Mutations.xml should set this.'
== Qud Version ==
Marketing Version: 1.0.4
Marketing Postfix:
Core Version: 2.0.210.20
== Enabled Mods ==
More Modding Goodies! 1.13.0
Limbsmith 0.8.0
Underdark Mutation & Cave Dweller Pack 1.0.1
Starapple Valley 0.0.0
Folk Scrap - scavenging, mildly re-imagined 0.0.0
Recoverable Item Mod Bits 0.0.0
Waldopacks 0.0.0
The Tenfold Path 0.0.0
Dynamic Background Color 5.1.0
1Percent Loot Drops Expanded 0.0.0
Goatfolk *Savages* 0.0.0
Pet Everyone 0.0.0
Want Me, Fear Me 0.0.0
Better Shawls 0.0.0
Animatable Statues 0.0.0
Regrowing Plants 0.0.0
Extra Gas and Breath Mutations 0.0.0
Psych Thralls 0.0.0
Bushwhacking 0.0.0
Pets of Qud - BarsuOfo 0.0.0
More Modifiers 2 [Forked] 0.0.0
Not Nailed Down [Fork] 0.0.0
Fluid Storage 0.0.0
Graven's Grimoire 0.0.0
Telekinesis 0.0.0
Telepathy 0.0.0
Cubed Items 0.0.0
It's Your Choice [Fork] 0.0.0
Smarter Fighters (Better NPC combat AI and skills) 0.0.0
Parallel Worlds 0.0.0
Tinkering skill already gives you Dissasembling 0.0.0
Weightless Scrap Metal 0.0.0
Creature Control 0.0.0
No Ground Dots 0.0.0
Submachine Guns 0.0.0
Reasonable Gameplay Options 0.0.0
You Have Become 0.0.0
Jademouth 1.2.7
Unique Makeovers 1.0.0
Bestiary Expanded 0.1.2.1
Brinedump 1.0.0
CYF Expansion 0.0.0
Cleaning Robots 1.1.0
Choose Your Fighter: Old War 0.0.0
Clever Girl [fork] 1.0.12
Colors of Qud [forked] 1.3.1
Choose Your Fighter 1.1.1
Cromagus CYF Expansion 6.0.0
Hexagun 0.1.0
Hued Ctesiphus for 2.0.206.24+ 0.0.0
Precog Secrets 0.2.0
Tracking Beacons 0.2.0
Regeneration Buff 0.1.0
Battlecry 1.0.0
Bloodymess 2 1.0.0
Fly Criters Animated 1.0.0
MassiveDecorations 1.0.0
Oozes Animated 1.0.0
Solar Condenser Animated 1.0.0
Trash Redone Animated 1.0.0
Niko!!! 0.1.0
Animated Environments 0.1.0
More Natural Features 0.1.0
Shard Thrower 0.1.0
Snapjaw Guerrilla Expansion 0.1.0
Snapjaw Shard Gunners 0.1.0
Defects For Morphotypes 0.2.0
Extra Tonics 0.2.0
Miscellaneous Mutations 1.3.2
Shadows of the Sultanate 0.0.1
Three-sections staffs 0.0.0
Treu 0.0.0
Vibro Crusher 0.0.0
Vibro Crusher x Shtoguns! 0.0.0
Wakko Creatures 0.0.0
Animated Wakko Creatures 0.0.0
Energy Cell Mod Chance Booster 0.1.0
Careful What You Wish For 1.0.1
Alternate Bar-su-ofo 1.0.0
Friendly Graven's Mutation Mod 1.0.0
Friendly Improved Mutations 1.1.0
Gigantism Plus 0.2.7
Live and Think 1.2.1
Logical Morphology 1.0.0
Peculiar Pedestrians 2.0.3
Unstabler genome 1.0.0
Yd Lag Fix 0.1.0
BetterTime 1.0.0
CYF Addon - Eater's Statue Tiles 1.0.2
Collection of Castes and Callings 1.5.0
HighlightDiseaseOnset 1.0.0
Spring Sifrah 0.1.0
Sundry Cybernetics 0.3.0
Tiles, Extended 1.0.0
WM Extended Mutations 1.1.0
Poison Fangs 1.0.0
Exotic Weapons 0.1.52
I'm a Man of Wealth and Taste! 1.0.0
Smart Cookies Are Skillful! 1.1.0
You're Not a Dromad! 1.1.1
Better Pet Selector 0.4.1
Companion's Pact 0.3.0
Shotguns! 1.3.0
< >
Showing 1-5 of 5 comments
Per page: 1530 50