• Pre order now!

    Paradox Development Studio brings you the sequel to one of the most popular strategy games ever made! Crusader Kings III is soon upon us and you can pre order it today!


    Releasing September 1st 2020

Zarathustra_the

General
76 Badges
Nov 3, 2011
1.957
978
  • Victoria 2: A House Divided
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • King Arthur II
  • The Kings Crusade
  • Magicka
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Naval War: Arctic Circle
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mare Nostrum
  • Stellaris - Path to Destruction bundle
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Call to arms event
  • Cities in Motion
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Stellaris: Ancient Relics
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Magicka 2: Ice, Death and Fury
  • Crusader Kings II: Conclave
  • Stellaris
  • Warlock: Master of the Arcane
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
@Meneth @Divine hey guys, it appears the damage_unit and damage_unit_morale effects are broken. When used in the following way In a scripted effect, all the effects defined after are registered as unknown tokens. I am not sure if it is just an issue with damage_unit, but it does seem as if there is something strange happening.
Code:
magic_dmg_effect = {
    while = {
        limit = {
            event_target:magic_caster = {
                check_variable = { which = zdmg value = 1    }
            }
        }   
        event_target:magic_caster = {
            subtract_variable = { which = zdmg value = 1 }
        }
        random_list = {
            1 = {

            }
            4 = {
                damage_unit = 5
            }
            2 = {
                damage_unit = 10
            }
            1 = {
                damage_unit = 15
            }
            1 = {
                damage_unit = 20
            }
            1 = {
                damage_unit = 25
            }                           
        }
    }
}
 

Divine

Programmer
Super Moderator
33 Badges
Dec 26, 2005
546
843
  • Semper Fi
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • For the Motherland
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Magicka: Wizard Wars Founder Wizard
  • Magicka 2 - Signup Campaign
  • Stellaris Sign-up
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Diplomacy
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
damage_unit effect has the following syntax:

damage_unit = {
amount = x OR percentage = x
(type = <unit_type>)
}

Where valid unit types are corresponding to the base unit types; light_infantry, heavy_infantry, pikemen, light_cavalry, knights, archers, special_troops, galleys, light_troops, or heavy_troops. It should also be able to find defined special troops. The effect needs either an amount or a percentage set. The targeted unit type is an optional syntax.
 

Zarathustra_the

General
76 Badges
Nov 3, 2011
1.957
978
  • Victoria 2: A House Divided
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • King Arthur II
  • The Kings Crusade
  • Magicka
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Naval War: Arctic Circle
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mare Nostrum
  • Stellaris - Path to Destruction bundle
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Call to arms event
  • Cities in Motion
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Stellaris: Ancient Relics
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Magicka 2: Ice, Death and Fury
  • Crusader Kings II: Conclave
  • Stellaris
  • Warlock: Master of the Arcane
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
damage_unit effect has the following syntax:

damage_unit = {
amount = x OR percentage = x
(type = <unit_type>)
}

Where valid unit types are corresponding to the base unit types; light_infantry, heavy_infantry, pikemen, light_cavalry, knights, archers, special_troops, galleys, light_troops, or heavy_troops. It should also be able to find defined special troops. The effect needs either an amount or a percentage set. The targeted unit type is an optional syntax.
So I need to define the unit type as well?

Further query, Can I use the any_controlled_unit scope from within the random_army scope to grab all the units in the army itself? Or will I need to scope via an alternative means to grab units belonging to an enemy at a specific province?
 
Last edited:

ngppgn

Field Marshal
17 Badges
Jan 29, 2011
3.515
653
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Heir to the Throne
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: The Old Gods
damage_unit effect has the following syntax:

damage_unit = {
amount = x OR percentage = x
(type = <unit_type>)
}

Where valid unit types are corresponding to the base unit types; light_infantry, heavy_infantry, pikemen, light_cavalry, knights, archers, special_troops, galleys, light_troops, or heavy_troops. It should also be able to find defined special troops. The effect needs either an amount or a percentage set. The targeted unit type is an optional syntax.
So we now can sink ships!? Wonderful!

BTW, what are counted as light_troops and heavy_troops, and how are they affected when an amount = x is given? Do each of the light troop type lose x or is x the joint loss?
 

Zarathustra_the

General
76 Badges
Nov 3, 2011
1.957
978
  • Victoria 2: A House Divided
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • King Arthur II
  • The Kings Crusade
  • Magicka
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Naval War: Arctic Circle
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mare Nostrum
  • Stellaris - Path to Destruction bundle
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Call to arms event
  • Cities in Motion
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Stellaris: Ancient Relics
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Magicka 2: Ice, Death and Fury
  • Crusader Kings II: Conclave
  • Stellaris
  • Warlock: Master of the Arcane
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
So we now can sink ships!? Wonderful!

BTW, what are counted as light_troops and heavy_troops, and how are they affected when an amount = x is given? Do each of the light troop type lose x or is x the joint loss?
NPGN the Light Infantry and Heavy Infantry are the default troop types. So the heavy infantry and Light Infantry you can get from holdings for instance. Looking at that, only special_troops is going to hit multiple types of troops at once.