Mod Ren'Py Abandoned Time For Dragons - Defiler Wings: Deranged Dragon Mod [29-07-2020] [Jman]

3.50 star(s) 8 Votes

Jman9

Engaged Member
Jul 17, 2019
2,295
957
Okay, I put percentage boosts to HP and MP - and this cheaty virility of yours - into the game, so you don't have to do all this replacing.

I also added a 'proper' virility, which is another word for 'cock-blocking'. :p You can't get eggs of higher quality than your current virility, which is raised by size evolutions and a special one.

Edit:
Not sure why knight combat just crashed.
They're all dead, probably. Fixed it a while ago. Try using this in knight.rpy:
Code:
    python:
        for tr in traps:
            if len(knight.party) <= 0:
                break
            if tr.id.startswith('trap_generic'):
                unit = knight.party[random.randrange(0,len(knight.party))]
                unit.hp -= 1 * unit.resist('phys')
                if unit.hp < 1:
                    knight.party.remove(unit)
            elif tr.id.startswith('trap_tentacle'):
                unit = knight.party[random.randrange(0,len(knight.party))]
                unit.hp -= 2 * unit.resist('phys')
                if unit.hp < 1:
                    knight.party.remove(unit)
            elif tr.id.startswith('trap_spike'):
                unit = knight.party[random.randrange(0,len(knight.party))]
                if unit.id == 'champion' and not 'spike_trap_evasion' in knight.ability_list:
                    unit.hp -= 9 * unit.resist('phys')
                    if unit.hp < 1:
                        knight.party.remove(unit)
                else:
                    unit.hp -= 3 * unit.resist('phys')
                    if unit.hp < 1:
                        knight.party.remove(unit)
            elif tr.id.startswith('trap_fire'):
                unit = knight.party[random.randrange(0,len(knight.party))]
                unit.hp -= 5 * unit.resist('fire')
                if unit.hp < 1:
                    knight.party.remove(unit)
            elif tr.id.startswith('trap_ice'):
                for unit in knight.party:
                    unit.hp -= 2 * unit.resist('ice')
                if unit.hp < 1:
                    knight.party.remove(unit)
            elif tr.id.startswith('trap_arrow'):
                for y in xrange(6):
                    unit = knight.party[random.randrange(0,len(knight.party))]
                    unit.hp -= 1 * unit.resist('phys')
                    if unit.hp < 1:
                        knight.party.remove(unit)

    if len(knight.party) < 1:
        window hide
    
        $log.clear()

        "The Dragon\'s mighty trap collection finished off all the invaders before they even reached his minions. Oh well, not all Knights are the stuff of legend."
        jump knight_fight_end

    python:
        for x in range(lair.get_defence(mode = 'minion')):
            if len(knight.party) <= 0:
                break
            unit = knight.party[random.randrange(0,len(knight.party))]
            unit.hp -= 1 * unit.resist('phys')
            if unit.hp < 1:
                knight.party.remove(unit)

    window hide
    
    $log.clear()

    if len(knight.party) < 1:
        "The Knight\'s party found an ignoble end while fighting the Dragon\'s minions. Oh well, not all Knights are the stuff of legend."
        jump knight_fight_end
I'm not guaranteeing anything, though. :p
 
Last edited:
Aug 18, 2020
85
10
I am complimented by your additions! I will still include them in the current guides until the next version rolls around, though. On another note, is the "Time_for_Dragons-1.1.1-pc-DDM\game\_story\hunt" code not translated fully, or am I missing something? Also, is there a way to add a marker to a dragon, like the ones that unlock forest/frost/stone/fire hatcheries? I cannot seem to find those either, as I do not know what search terms to use.
 

zzczys

Active Member
Jul 20, 2019
851
143
You get the most basic hatchery green, when you have the quest to have 1 green spawn in lair

Other hatchery is unlocked by winning specific encounters.

Forest - kill the border guard, which also unlocks the alva home
stone - demolish the steamgun, unlocks the dwarf home
frozen - defeat the jotun
firery - defeat the ifrit



Apparently the ifrit's home has abt 8 explosive traps and I added 2 more, so like 10 explosions, pretty sure that did the knight in....
 
Last edited:
Aug 18, 2020
85
10
Thanks for the advice, but I think I found it in forest.rpy in hunt in _story. It is something called a room_prototypes['wood_mana_crystal']. Currently searching for it in the files using Notepad++. Again, I do not mean to be condescending, but I appreciate the help
 

zzczys

Active Member
Jul 20, 2019
851
143
After putting in the knight fix something else;


Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/_script/lair/lair - sleep report.rpy", line 44, in script call
    call lb_event_knight_go_to_lair
  File "game/_script/lair/knight.rpy", line 656, in script
    python:
  File "game/_script/lair/knight.rpy", line 657, in <module>
    for x in range(lair.get_defence(mode = 'minion')):
AttributeError: 'Lair' object has no attribute 'get_defence'

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/_script/lair/lair - sleep report.rpy", line 44, in script call
    call lb_event_knight_go_to_lair
  File "game/_script/lair/knight.rpy", line 656, in script
    python:
  File "F:\test\Time_for_Dragons-1.1.1-pc-DDM\renpy\ast.py", line 900, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "F:\test\Time_for_Dragons-1.1.1-pc-DDM\renpy\python.py", line 1930, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/_script/lair/knight.rpy", line 657, in <module>
    for x in range(lair.get_defence(mode = 'minion')):
AttributeError: 'Lair' object has no attribute 'get_defence'

Windows-8-6.2.9200
Ren'Py 7.2.2.491
Время для Драконов: Королевство Монстров 29-07-20
Tue Sep 01 10:14:56 2020
 

zzczys

Active Member
Jul 20, 2019
851
143
Old code block;

Code:
    python:
        for tr in traps:
            if tr.id.startswith('trap_generic'):
                attempts = 0
                unit = knight.party[random.randrange(0,len(knight.party))]
                while unit.hp < 1 and attempts < 1000000:
                    unit = knight.party[random.randrange(0,len(knight.party))]
                    attempts += 1
                unit.hp -= 1
            if tr.id.startswith('trap_tentacle'):
                attempts = 0
                unit = knight.party[random.randrange(0,len(knight.party))]
                while unit.hp < 1 and attempts < 1000000:
                    unit = knight.party[random.randrange(0,len(knight.party))]
                    attempts += 1
                unit.hp -= 2
            elif tr.id.startswith('trap_spike'):
                attempts = 0
                unit = knight.party[random.randrange(0,len(knight.party))]
                while unit.hp < 1 and attempts < 1000000:
                    unit = knight.party[random.randrange(0,len(knight.party))]
                    attempts += 1
                if unit.id == 'champion' and not 'spike_trap_evasion' in knight.ability_list:
                    unit.hp -= 9
                else:
                    unit.hp -= 3
            elif tr.id.startswith('trap_fire'):
                attempts = 0
                unit = knight.party[random.randrange(0,len(knight.party))]
                while unit.hp < 1 and attempts < 1000000:
                    unit = knight.party[random.randrange(0,len(knight.party))]
                    attempts += 1
                unit.hp -= 5
            elif tr.id.startswith('trap_ice'):
                for unit in knight.party:
                    unit.hp -= 2
            elif tr.id.startswith('trap_arrow'):
                for y in xrange(6):
                    attempts = 0
                    unit = knight.party[random.randrange(0,len(knight.party))]
                    while unit.hp < 1 and attempts < 1000000:
                        unit = knight.party[random.randrange(0,len(knight.party))]
                        attempts += 1
                    unit.hp -= 1

        for x in range(lair.defence - traps_defence):
            attempts = 0
            unit = knight.party[random.randrange(0,len(knight.party))]
            while unit.hp < 1 and attempts < 1000000:
                unit = knight.party[random.randrange(0,len(knight.party))]
                attempts += 1
            unit.hp -= 1
        
    window hide
    
    $log.clear()
 

Jman9

Engaged Member
Jul 17, 2019
2,295
957
On another note, is the "Time_for_Dragons-1.1.1-pc-DDM\game\_story\hunt" code not translated fully, or am I missing something?
It is fully (but sometimes poorly) translated, but I might have broken something. Tell me what encounter has an issue with translations and I'll see what I can do.

Also, is there a way to add a marker to a dragon, like the ones that unlock forest/frost/stone/fire hatcheries? I cannot seem to find those either, as I do not know what search terms to use.
For locations, it's e.g. 'dragon.landmark('castle_cleared')'. For rooms, e.g. 'room_prototypes['wood_mana_crystal'].unlocked = True'.

AttributeError: 'Lair' object has no attribute 'get_defence'
Code:
        def get_defence(self,mode = 'all'):
            result = 0
            if mode in ['minion','all']:
                for minion in self.minions:
                    result += random.randint(int(minion.attack),int(minion.attack+minion.attack_mastery))

                for room in self.rooms:
                    if room.id == 'guard_post':
                        if room.minion:
                            result += random.randint(int(2*minion.attack),int(2*minion.attack + 2*minion.attack_mastery))

                if hasattr(self,'mob_power'):
                    result = int(result*self.mob_power)

            if mode in ['traps','all']:
                for room in self.rooms:
                    result += room.defence
           
            if mode in ['all']:
                if hasattr(self,'base_defence'):
                    result += self.base_defence

            return result
Edit:
Forest - kill the border guard, which also unlocks the alva home
stone - demolish the steamgun, unlocks the dwarf home
These unlocks will move to post-conquest.

Apparently the ifrit's home has abt 8 explosive traps and I added 2 more, so like 10 explosions, pretty sure that did the knight in....
Probably a combination of traps and minions, 5*10 damage isn't enough to kill even a lone Knight.
 
Last edited:
Aug 18, 2020
85
10
The untranslated stuff seems to be vestigial, and I mostly found it in the "Time_for_Dragons-1.1.1-pc-DDM\game\_story\hunt" with the only one I really checked being forest.rpy .
 

Jman9

Engaged Member
Jul 17, 2019
2,295
957
There are translation files for those in 'game/tl'. It's pretty annoying to go back and forth between these, so I'm usually moving proofread stuff into the main files. Since I'm not translating the mod back into Russian, that's okay.

Any Russian text still in the actual encounter files means I probably haven't proofread it (yet?).
 

zzczys

Active Member
Jul 20, 2019
851
143
Like this;

Code:
    python:
        for x in range(lair.get_defence(mode = 'minion')):

        def get_defence(self,mode = 'all'):
            result = 0
            if mode in ['minion','all']:
                for minion in self.minions:
                    result += random.randint(int(minion.attack),int(minion.attack+minion.attack_mastery))

                for room in self.rooms:
                    if room.id == 'guard_post':
                        if room.minion:
                            result += random.randint(int(2*minion.attack),int(2*minion.attack + 2*minion.attack_mastery))

                if hasattr(self,'mob_power'):
                    result = int(result*self.mob_power)

            if mode in ['traps','all']:
                for room in self.rooms:
                    result += room.defence
            
            if mode in ['all']:
                if hasattr(self,'base_defence'):
                    result += self.base_defence

            return result

            if len(knight.party) <= 0:
                break
            unit = knight.party[random.randrange(0,len(knight.party))]
            unit.hp -= 1 * unit.resist('phys')
            if unit.hp < 1:
                knight.party.remove(unit)

    window hide
    
    $log.clear()

    if len(knight.party) < 1:
        "The Knight\'s party found an ignoble end while fighting the Dragon\'s minions. Oh well, not all Knights are the stuff of legend."
        jump knight_fight_end
 

zzczys

Active Member
Jul 20, 2019
851
143
Works partly;

1598929644272.png

then;

Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/_script/lair/lair - sleep report.rpy", line 44, in script call
    call lb_event_knight_go_to_lair
  File "game/_script/lair/knight.rpy", line 671, in script
    jump knight_fight_end
ScriptError: could not find label 'knight_fight_end'.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/_script/lair/lair - sleep report.rpy", line 44, in script call
    call lb_event_knight_go_to_lair
  File "game/_script/lair/knight.rpy", line 671, in script
    jump knight_fight_end
  File "F:\test\Time_for_Dragons-1.1.1-pc-DDM\renpy\ast.py", line 1678, in execute
    rv = renpy.game.script.lookup(target)
  File "F:\test\Time_for_Dragons-1.1.1-pc-DDM\renpy\script.py", line 886, in lookup
    raise ScriptError("could not find label '%s'." % str(original))
ScriptError: could not find label 'knight_fight_end'.

Windows-8-6.2.9200
Ren'Py 7.2.2.491
Время для Драконов: Королевство Монстров 29-07-20
Tue Sep 01 11:07:05 2020
Perhaps just jump back to lair view or full view?
 
Aug 18, 2020
85
10
I have found some pieces of code that I think are relevant to locking evolutions behind events. They are as follows:
Code:
        evolution_prototypes = {}
        for key in evolution_raw:
            evolution_prototypes[key] = Evolution(key)
That thing above goes in line 246 of script.rpy in theory, and this next snippet would go in whatever event you want to lock the evolution behind, I think:
Code:
            if not history.event('event_evolution_test') and room_prototypes['green_mana_crystal'].unlocked:
                $history.flag('event_evolution_test')
                $evolution_prototypes['locked_evolution'].unlocked = true
I have no idea if this would work, and I do not know where half the rrelevant information is, like where the $history.flag true/false statments are stored, or what text to put in the evolution requirements. I'm guessing something like: if history.event('event_evolution_test').unlocked ?
 

zzczys

Active Member
Jul 20, 2019
851
143
Grrr indentation error somewhere;

Code:
    python:
        for tr in traps:
            if len(knight.party) <= 0:
                break
            if tr.id.startswith('trap_generic'):
                unit = knight.party[random.randrange(0,len(knight.party))]
                unit.hp -= 1 * unit.resist('phys')
                if unit.hp < 1:
                    knight.party.remove(unit)
            elif tr.id.startswith('trap_tentacle'):
                unit = knight.party[random.randrange(0,len(knight.party))]
                unit.hp -= 2 * unit.resist('phys')
                if unit.hp < 1:
                    knight.party.remove(unit)
            elif tr.id.startswith('trap_spike'):
                unit = knight.party[random.randrange(0,len(knight.party))]
                if unit.id == 'champion' and not 'spike_trap_evasion' in knight.ability_list:
                    unit.hp -= 9 * unit.resist('phys')
                    if unit.hp < 1:
                        knight.party.remove(unit)
                else:
                    unit.hp -= 3 * unit.resist('phys')
                    if unit.hp < 1:
                        knight.party.remove(unit)
            elif tr.id.startswith('trap_fire'):
                unit = knight.party[random.randrange(0,len(knight.party))]
                unit.hp -= 5 * unit.resist('fire')
                if unit.hp < 1:
                    knight.party.remove(unit)
            elif tr.id.startswith('trap_ice'):
                for unit in knight.party:
                    unit.hp -= 2 * unit.resist('ice')
                if unit.hp < 1:
                    knight.party.remove(unit)
            elif tr.id.startswith('trap_arrow'):
                for y in xrange(6):
                    unit = knight.party[random.randrange(0,len(knight.party))]
                    unit.hp -= 1 * unit.resist('phys')
                    if unit.hp < 1:
                        knight.party.remove(unit)

    if len(knight.party) < 1:
        window hide
    
        $log.clear()

        "The Dragon\'s mighty trap collection finished off all the invaders before they even reached his minions. Oh well, not all Knights are the stuff of legend."
        jump knight_fight_end

    python:
        for x in range(lair.get_defence(mode = 'minion')):

        def get_defence(self,mode = 'all'):
            result = 0
            if mode in ['minion','all']:
                for minion in self.minions:
                    result += random.randint(int(minion.attack),int(minion.attack+minion.attack_mastery))

                for room in self.rooms:
                    if room.id == 'guard_post':
                        if room.minion:
                            result += random.randint(int(2*minion.attack),int(2*minion.attack + 2*minion.attack_mastery))

                if hasattr(self,'mob_power'):
                    result = int(result*self.mob_power)

            if mode in ['traps','all']:
                for room in self.rooms:
                    result += room.defence
          
            if mode in ['all']:
                if hasattr(self,'base_defence'):
                    result += self.base_defence

            return result
        
        if len(knight.party) <= 0:
                break
            unit = knight.party[random.randrange(0,len(knight.party))]
            unit.hp -= 1 * unit.resist('phys')
            if unit.hp < 1:
                knight.party.remove(unit)

    window hide
    
    $log.clear()

    if len(knight.party) < 1:
        "The Knight\'s party found an ignoble end while fighting the Dragon\'s minions. Oh well, not all Knights are the stuff of legend."
        jump knight_fight_end
 
Aug 18, 2020
85
10
Yo, is there an error log that says where the error is? I tried loading the game a couple times with indentation errors, and it told me it could not load if tabs were found anywhere in the loaded code, and it told me what line it was and which file
 

zzczys

Active Member
Jul 20, 2019
851
143
I fix one and leads to another mismatch. I fix all it says break outside loop.
 
Last edited:

zzczys

Active Member
Jul 20, 2019
851
143
where does this code block go? putting it top with the other def statement doesnt work, putting into the new code block causes indentation mismatch grrrrr


Code:
        def get_defence(self,mode = 'all'):
            result = 0
            if mode in ['minion','all']:
                for minion in self.minions:
                    result += random.randint(int(minion.attack),int(minion.attack+minion.attack_mastery))

                for room in self.rooms:
                    if room.id == 'guard_post':
                        if room.minion:
                            result += random.randint(int(2*minion.attack),int(2*minion.attack + 2*minion.attack_mastery))

                if hasattr(self,'mob_power'):
                    result = int(result*self.mob_power)

            if mode in ['traps','all']:
                for room in self.rooms:
                    result += room.defence
          
            if mode in ['all']:
                if hasattr(self,'base_defence'):
                    result += self.base_defence

            return result
 

zzczys

Active Member
Jul 20, 2019
851
143
Dont know what is wrong, still getting AttributeError: 'Lair' object has no attribute 'get_defence'

Ignore it and fight the whole party anyhow.
 

Jman9

Engaged Member
Jul 17, 2019
2,295
957
ScriptError: could not find label 'knight_fight_end'.
Put in 'knight_fight_end' like this:
Code:
label knight_fight_end:

    $ knight.save_girls_combat_stats_attack = 0
    $ knight.save_girls_combat_stats_attack_mastery = 0
    $ knight.save_girls_combat_stats_hp = 0

I have found some pieces of code...
Hmm, where? Nothing like that in my copy. :confused:

Code:
        evolution_prototypes = {}
        for key in evolution_raw:
            evolution_prototypes[key] = Evolution(key)
No such thing as an 'Evolution' class. :(

...this next snippet...
Code:
            if not history.event('event_evolution_test') and room_prototypes['green_mana_crystal'].unlocked:
                $history.flag('event_evolution_test')
                $evolution_prototypes['locked_evolution'].unlocked = true
With some more work, this would just lock all evolving until you have the first hatchery unlocked. Why would you want to do that? o_O

...where the $history.flag true/false statments are stored...
In the 'history' object. :D

...something like: if history.event('event_evolution_test').unlocked ?
Close. It's 'if history.event('event_evolution_test'):' or 'if history.has_flag('event_evolution_test'):'.

where does this code block go?
Code:
        def get_defence(self,mode = 'all'):
Uh, somewhere in 'lair - classes.rpy'. Should have mentioned that, sorry.
 
3.50 star(s) 8 Votes