This is strange. I never get an option to build a Dark Sanctum after my initial choice to build forge, sanctum or tavern. I've always gone for a tavern first in my gameplay because of income. I'm up to week 57 in this playthrough with zilch succubi support or story events.
Looking around in research.rpy to see whether it relies on a research being complete, there is none for level 1 Sanctum. The only hit on sanctum in there is for "Contact Network" and that structure only has it for
Code:
class ContactNetwork(Research):
uid = 'contact_network'
name = 'Contact Network'
category = 'research and magic'
cost = 40
unlocks = 'Level 2 library, level 2 dark sanctum'
def on_complete(self):
castle.buildings['library'].max_lvl = 2
implying that Level 2 Dark Sanctum relies on Contact Network. Here's another thing about this btw. I never got the option to research Contact Network either so have been limping by on only a level 1 library on this playthrough as well. In previous playthroughs, that was always there or available very early on as far as I remember.
Grepping through the files for all sanctum hits we have a spot in "rowan intro.rpy" where sanctum supposedly is lumped in with all of the level 1 buildings that should be available without any research:
Code:
python hide:
# create starting buildings
for uid in starting_buildings:
castle.buildings[uid].build()
# unlock first level of some buildings - they are available without research
castle.buildings['tavern'].max_lvl = 1
castle.buildings['sanctum'].max_lvl = 1
castle.buildings['forge'].max_lvl = 1
castle.buildings['arena'].max_lvl = 1
Then we have in "events/week_start.rpy" the spot where that initial choice of Forge, Tavern or Dark Sanctum happens:
Code:
"Discuss construction with Skordred":
menu:
'Forge':
$ castle.scheduled_upgrades.append('forge')
$ change_treasury(-all_buildings['forge']['cost'])
$ released_fix_rollback()
scene bg6 with fade
show rowan necklace neutral at midleft with dissolve
show jezera neutral at midright with dissolve
show andras displeased at edgeright with dissolve
#If Rowan built the forge
an "Excellent. Having proper gear should make my orcs actually somewhat decent in battle. I already have someone in mind to serve as forgemaster. I'll have him in by the time Skordred is finished building the forge."
'Dark Sanctum':
$ castle.scheduled_upgrades.append('sanctum')
$ change_treasury(-all_buildings['sanctum']['cost'])
$ released_fix_rollback()
scene bg6 with fade
show rowan necklace neutral at midleft with dissolve
show jezera neutral at midright with dissolve
show andras displeased at edgeright with dissolve
#If Rowan built the dark sanctum
je "I'm glad we're going to finally get sorcerers around here, they'll be able to give Cliohna a hand. Hmm, I'll have to see about getting someone to keep the succubi and incubi in line."
'Tavern':
$ castle.scheduled_upgrades.append('tavern')
$ change_treasury(-all_buildings['tavern']['cost'])
$ released_fix_rollback()
scene bg6 with fade
show rowan necklace neutral at midleft with dissolve
show jezera neutral at midright with dissolve
show andras displeased at edgeright with dissolve
#If Rowan built the tavern
je "The earlier we build our income, the faster we will be able to build everything else. I do hope you put the intelligence we get to good use as well. You're going to be playing catch up when it comes to building our armies."
So castle.scheduled_upgrades.append(whatever) is how things get scheduled to be built then. Where's that happen?
Code:
seeds-of-chaos-0.2.60-pc/game $ find . -name "*.rpy" -exec grep -iH "buildupgrade" {} \;./screens/buildings_screen.rpy: action BuildUpgrade(sel_bld)
./screens/buildings_screen.rpy:#~ textbutton 'Build/Upgrade {}'.format(castle.buildings[sel_bld].up_cost) action BuildUpgrade(sel_bld)
./screens/buildings_screen.rpy: class BuildUpgrade(Action):
Looking at the code in "screens/building_screen.rpy" I see an iteration in the Workshop build menu section where all of the entries in castle.buildings is iterated through (setting bld) to see whether bld.can_be_shown() is true or bld.can_be_built() is true. I was just started on building my breeding pit so I jumped in the console and found that castle.buildings['pit'].can_be_shown() is True while castle.buildings['pit'].can_be_built() is False (probably because I was low on $$$ or it was in process). However both castle.buildings['sanctum'].can_be_built() and .can_be_shown() evaluated to False. So it never appears on the workshop build list on my playthrough.
Anyway, I let my pit get finished triggering the intro scene with Draith. Then I popped back into the console and forced the build of the sanctum:
Code:
castle.scheduled_upgrades.append('sanctum')
After that the castle.buildings['sanctum'].can_be_shown() now returns True. I also had a sanctum in the basement on the next turn