phupdup

Well-Known Member
Oct 24, 2019
1,391
1,091
During my test playthrough, I noticed smelting never come up for available research. I think in the past it used to be dependent on Ordering Chaos and/or Military Tactics being completed, but now it looks like the devs intended it to become available when the level 1 forge is built. However they blew the logic on the req_met method for it so that it never becomes available. It's possible they may have been planning on tying it to new researches for Excavation and Advanced Excavation that are currently disabled and probably meant to impact the iron production from mines. There's also "The Riddle of Steel" disabled in there which is probably for a planned level 3 forge. So maybe they were in the middle of editing when the code freeze happened for this latest release. At any rate:

Code:
    class Smelting(Research):
        uid = 'smelting'
        name = 'Smelting'
        category = 'metalwork'
        cost = 100
        unlocks = 'Level 2 forge'

        def req_met(self):
            return castle.buildings['forge'] == 1

        def on_complete(self):
            castle.buildings['forge'].max_lvl = 2
becomes

Code:
    class Smelting(Research):
        uid = 'smelting'
        name = 'Smelting'
        category = 'metalwork'
        cost = 100
        unlocks = 'Level 2 forge'

        def req_met(self):
            return castle.buildings['forge'].lvl == 1

        def on_complete(self):
            castle.buildings['forge'].max_lvl = 2
I've attached a core/research.rpy which has this along with the Dark Subterfuge fix I posted earlier.
 
  • Like
Reactions: Einarr the Red

zetsupetsu

Active Member
Dec 22, 2019
934
1,941
Is there no cg for the Alexia x Sil scene yet? I triggered it but it seems to be regular black screen for me.
 

phupdup

Well-Known Member
Oct 24, 2019
1,391
1,091
I'm at week 64 on the walktrhough with my new Building framework and have all buildings and upgrades done with the exception of a single one: the lvl 2 upgrade for the Arena. I had just finished the last research that was still available (Basic Summoning) since its completion does nothing when the summoning chamber building is set to not be able to build. I think in the past, the devs had only enabled this thing as a convenient debug location to manually trigger events they wanted to test.

Looking into the prereq for lvl2 arena shows it depending on Military Logistics. However, I've already researched that so the devs must have been up to something in core/research.rpy to mess this up.

Code:
    class MilitaryLogistics(Research):
        uid = 'military_logistics'
        name = 'Military Logistics'
        category = 'military'
        cost = 100
        requires = 'Military tactics'
        unlocks = 'Level 3 barracks.'

        def req_met(self):
            return castle.researches['ordering_chaos'].completed and (castle.buildings['barracks'].lvl >= 2 or castle.buildings['arena'].lvl >= 1)

        def on_complete(self):
            castle.buildings['barracks'].max_lvl = 3
The prereqs documented for the lvl 2 barracks and lvl 1 arena both say that the Ordering Chaos research must be completed. So the req_met method for Logistics says that this must have been completed and that at least one of the two buildings/upgrades must be built before Military Logistics is available to research. That seems reasonable, but notice that the on_complete only bumps the max_lvl for the Barracks and does nothing for the arena as was apparently advertised. Problem...

Right after Logistics is the entry for Military Recreation and guess what we find:

Code:
    class MilitaryRecreation(Research):
        uid = 'military_recreation'
        name = 'Military Recreation'
        category = 'military'
        cost = 100
        requires = 'Military tactics'
        unlocks = 'Level 2 arena.'

        def req_met(self):
            return castle.researches['military_tactics'].completed

        def on_complete(self):
            castle.buildings['arena'].max_lvl = 2
So it's actually this research that bumps the arena instead. I'll need to go back into my new buildings framework to fix the prereq listing for lvl 2 Arena, but that's a documentation problem. The coding problem is that at week 64 with everything possible researched, Rowan was never given the option to research Recreation. It depends on Military Tactics.

Code:
    class MilitaryTactics(Research):
        uid = 'military_tactics'
        name = 'Military Tactics'
        category = 'military'
        cost = 40
        unlocks = 'Level 2 barracks.'

        def on_complete(self):
            castle.buildings['barracks'].max_lvl = 2
This also was never made available for research even though its lack of a req_met method would have made it immediately available to begin research the first time Rowan steps into the library to meet Cliohna at week 4. It's whole Raison D'etre is to make the level 2 barracks available, but at some point, the devs decided to have that rely on Ordering Chaos:

Code:
    class OrderingChaos(Research):
        uid = "ordering_chaos"
        name = "Ordering Chaos"
        category = "military"
        cost = 50
        unlocks = 'Level 2 Barracks and Level 1 Arena'

        def on_complete(self):
            castle.buildings['barracks'].max_lvl = 2
            castle.buildings['arena'].max_lvl = 1
            castle.military += 1
That's a bit of a mess, but why does Military Tactics never show up to be researched when there's apparently nothing to stop it from appearing using the normal system for research dependencies? Without it being done, Military Recreation is cock blocked. One system wide grep for military_tactics later shows the real culprit is in screens/researches_screen.rpy:

Code:
# controls for researches
screen researches_screen(force_choose_research=False, finished_research=None):
    # uid of selected research
    default sel_rs = None

.
.
.

        text 'Available researches' style 'room_listbox_caption'
        hbox:
            pos (55, 130)
            spacing 20
            ysize 556
            # list of researches
            frame:
                background 'listbox_border'
                xpadding 3
                ypadding 3
                vpgrid:
                    cols 1
                    xsize 400
                    mousewheel True
                    scrollbars 'vertical'
                    spacing 1
                    for rs in sorted(castle.researches.values(), key=lambda r: r.category):
                        # show research only if it can be researched
                        if rs.uid not in ["military_tactics", "world_and_the_war"] and rs.req_met():
Why in Kharos' name are there specific checks in the iterator to drop Military Tactics and "World and the War" from the displayed research list? It's a pretty arbitrary spot to be doing things like this in a file apart from the main file for research code. That rs.req_met() check should be the only thing here. The method returning False would drop an item for consideration.

This was obviously an attempt to remove showing things for researching that are now about as useful as an ashtray on a motorbike. I think the reason why these two ended up here was because they were starting game research items that never had a req_met override method written for them to return False. The prototype class Research defines this method to return True by default. So they could have done something like this over in core/research.rpy instead:

Code:
   class WorldAndTheWar(Research):
        uid = 'world_and_the_war'
        name = 'World and the War'
        category = 'history'
        cost = 40
        unlocks = 'Background info, choices in events.'
going to

Code:
   class WorldAndTheWar(Research):
        uid = 'world_and_the_war'
        name = 'World and the War'
        category = 'history'
        cost = 40
        unlocks = 'Background info, choices in events.'

   def req_met(self):
      return False           #obsolete/borked/Motorbike ashtray
Indeed, here's a followup to "World and the War" that has also been declared to be a motorbike ashtray. It already had a req_met overrride so the code maintainer just added a return False statement to it.

Code:
    class HistoryOfRosaria(Research):
        uid = 'history_of_rosaria'
        name = 'History of Rosaria'
        category = 'history'
        cost = 50
        requires = 'World and the war, visit Rosaria'
        unlocks = 'Background info, resources in realm, choices in events.'

        def req_met(self):
            # "visit Rosaria" check is automatic because the game starts there
            #TODO
            return False
            return castle.researches['world_and_the_war'].completed
Getting back to why we can't have a lvl 2 Arena upgrade built. The devs obviously shot themselves in the foot by making Military Tactics obsolete without adjusting the req_met method of Military Recreation. This:

Code:
    class MilitaryRecreation(Research):
        uid = 'military_recreation'
        name = 'Military Recreation'
        category = 'military'
        cost = 100
        requires = 'Military tactics'
        unlocks = 'Level 2 arena.'

        def req_met(self):
            return castle.researches['military_tactics'].completed

        def on_complete(self):
            castle.buildings['arena'].max_lvl = 2
should either become:

Code:
    class MilitaryRecreation(Research):
        uid = 'military_recreation'
        name = 'Military Recreation'
        category = 'military'
        cost = 100
        requires = 'Military tactics'
        unlocks = 'Level 2 arena.'

        def req_met(self):
            return castle.researches['military_logistics'].completed

        def on_complete(self):
            castle.buildings['arena'].max_lvl = 2
or possibly

Code:
    class MilitaryRecreation(Research):
        uid = 'military_recreation'
        name = 'Military Recreation'
        category = 'military'
        cost = 100
        requires = 'Military tactics'
        unlocks = 'Level 2 arena.'

        def req_met(self):
            return castle.researches['ordering_chaos'].completed and castle.buildings['arena'].lvl > 0

        def on_complete(self):
            castle.buildings['arena'].max_lvl = 2
The former implies more turns have passed since it takes time to research, we have barracks at level 2 or greater and are dealing with more orcs recruited that are now causing a morale problem. The latter may be more a scenario of maximizing morale by building arena upgrades before we necessarily have tons of orcs underfoot. It may be useful for those life choices Rowan makes that end up crushing morale more.
 

phupdup

Well-Known Member
Oct 24, 2019
1,391
1,091
One thing about getting the Nasim chamber built is that it causes a little bit of a continuity error with Nasim and the event where Rowan comes to him to ask about a treatment for Alexia. This would obviously be the point where the dialog would branch if the chamber is found and the two talk about maybe using it. Instead there's only a dialog about Skordred "losing" it on the blueprints and then the first treatment scene being done in Nasim's library cubicle.
 

Rein

Active Member
Game Developer
May 8, 2017
759
2,718
Instead there's only a dialog about Skordred "losing" it on the blueprints and then the first treatment scene being done in Nasim's library cubicle.
Hm, bugged then. There are lines for the chamber being built on triggering the event.

Ah well, we'll fix it next release.
 

spacemix

Member
Dec 30, 2020
309
501
Does anyone know where this scene is? Is it when Rowan "fakes" a more severe punishment for Alexia after she is outed for helping Heleyna escape?
You don't have permission to view the spoiler content. Log in or register now.
 

eagersecret

Newbie
Feb 1, 2019
66
23
Hi, how do I get shaya X rowan scenes? I'm already week 53 and still no shaya scenes.
Also missing the scene to sweet talk Jezera after capturing 2 villages. I have captured 3 villages.
 
Last edited:

phupdup

Well-Known Member
Oct 24, 2019
1,391
1,091
I think I did manage to trigger most or all of this new Shaya arc in a previous playthrough before I got into testing my new Building framework. The obvious thing is getting Shaya introduced to the castle by building the Brothel. This will be presented somewhat out of order because I started with a grep of the events.rpy files for "shaya", and she's been around the scripts for quite a while. Also there's a collection of a dozen shayaCluexx flags and a counter that gets bumped when they are set. This is all probably for future scripting and seems to be in use in lieu of using the NPC relation attribute that will be adjusted up or down and then checked for Alexia, Draith, Cliohna and others.

Code:
game/events/ruler_events_6.rpy:    event('jezera_and_shaya_personal_time', triggers="week_end", conditions=('castle.buildings["brothel"].lvl >= 1', 'week >=4'), group='ruler_event', run_count=1, priority=pr_ruler)
This is actually an event with Jezera and Shaya that Alexia can eavesdrop on in the brothel. If Alexia opts to tell Rowan about the convo later, there's a setting of a flag shayaClue3 and a bump of a shayaClueScore variable.


Code:
game/events/ruler_events_22.rpy:    event('shayas_gift', triggers="week_end", conditions=('castle.buildings["brothel"].lvl >= 1', 'week >=4'), group='ruler_event', run_count=1, priority=pr_ruler)
Shaya goes to see Rowan in the throne room with Intel the brothel picked up on a caravan. The dialog differs depending on the level of Rowans corruption, but there's no sex or setting of variables. This event has been around for a while now.


Code:
game/events/ruler_events_38.rpy:    event('shaya_capital', triggers="week_end", conditions=("castle.buildings['brothel'].lvl >= 1",), group='ruler_event', run_count=1, priority=pr_ruler)
Shaya comes to Rowan with a business proposal but needs 100 from the treasury. There's extra dialog if Rowan had sex with Shaya before (shayaSex), but the whole scheme to pull out 100 and then put 10 back in each week for 20 weeks isn't implemented. There's also no code (yet?) to impact her relations if he goes along with the scheme or declines it.


Code:
./events/ruler_events_32.rpy:      event('rowans_reward', triggers="week_end", conditions=('0 < castle.buildings["brothel"].lvl > 0',), group='ruler_event', run_count=1, priority=pr_ruler)
A mysterious figure drops off some intel by Rowan's door in the middle of the night, and he brings it to Jezera. She rewards him with a private show by Shaya in the brothel (button menu option appears in brothel location).

That condition check is one of the weirdest things I've ever seen to see whether the brothel is built. Someone needs to put down the bong for a bit.

This private dance (sex) event has dialog which differs depending on whether the flag shayaSilkSeen is set, and that happens at the end of the event. So this private dance can be triggered more than once assuming our anonymous snitch decides to drop by again.

Code:
./events/ruler_events_39.rpy:  event('cup_of_tea', triggers="week_end", conditions=('privateDanceSeen',),group='ruler_event', run_count=1, priority=pr_ruler)
This event follows the private dance after a week or so and has Rowan dropping by the brothel to see Shaya. Jezera is having tea with her and the dialog will differ depending on whether shayaClue3 is set during Alexia's little peeping tom show event. Sets shayaClue7 and bumps the shayaClueScore counter. Menu choices asking her about herself set other flags and bump the score as well. Rowan only gets to pick 3 questions to ask.

At the end of the event, Shaya invites Rowan to be her arm candy at an orgy held back at her old brothel.


Code:
./events/ruler_events_39.rpy:  event('password_is_fidelio', triggers="week_end", depends=('cup_of_tea',),group='ruler_event', run_count=1, priority=pr_ruler)
The event for Shaya's orgy at her old brothel with Rowan as her escort. Rowan can ask a third party about the meaning of Shaya's veil and get another shayaClue flag set.



Hi, how do I get shaya X rowan scenes? I'm already week 53 and still no shaya scenes.
Also missing the scene to sweet talk Jezera after capturing 2 villages. I have captured 3 villages.
 
  • Like
Reactions: pabo
4.00 star(s) 165 Votes