• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Showing developer posts only. Show all posts in this thread.
Is there a way to make the wife of a dead character pregnant in the history files?
(When the bookmark is in between the death of the father and birth of the son)

Code:
1000026077 = {
    name = "Ormr" #Iceland: Jónsson
    dynasty = 485
    religion = catholic
    culture = norse
    father = 1000026074
    mother = 1000026096
    1196.1.1 = {
        birth = yes
    }
    1225.1.1= {
        add_spouse = 1000026180
    }
    1241.9.5 = {
        death = yes
    }
}
1000026180 = {
    name = "Álfheiðr" #Iceland: Njálsdóttir
    religion = catholic
    culture = norse
    1191.1.1 = {
        birth = yes
    }
    1241.4.1 = {
        [PREGNANT] = yes
    }
    1275.1.1 = {
        death = yes
    }
}
1000026086 = {
    name = "Ormr" #Iceland: Ormsson
    dynasty = 485
    religion = catholic
    culture = norse
    father = 1000026077
    1242.1.1 = {
        birth = yes
    }
    1270.1.1 = {
        death = yes
    }
}
You can use an effect clause and impregnate them but there is no way of making sure a set child comes out like it would if you went forwards to the point where the child is scripted to exist
 
  • 1
Reactions:
I saw something recently about CK2 mod files being able to use the EU4 line 'supported_version = "x.x"'. Looking at the EU4 wiki, it implies it only checks major version (2.5, not 2.5.1). Is that so? If so, it's an issue, since I have a mod that is valid for 2.3.0 to 2.4.0, but not 2.4.1. Another version is valid for 2.4.1 or later, but not 2.4.0. It seems impossible to mark either one correctly. Secondarily, is it possible to specify more than one major version (2.3 & 2.4)?

Ideally, I should be able to specify a minimum and maximum, with minor version, but I'm guessing that's not available. :(
What has been added is a supported_checksum = yes/no condition with the ability to define the supported checksums in the.mod file as a list. Not a supported version line. Look here for Divine's post about it
 
Can someone help me with this exceptions.log? I have no idea what this means, I never had anything similar before the update. CK2 CTDs during loading wiht my mod activated, can't figure out why...

Code:
######## EXCEPTION: 0xC0000094 at address: 0x018DC881: INT DIVIDE BY ZERO
Version: CK2/branches/2_5_1
27871

02/17/16 17:46:16
c:\jenkins\workspace\ck2-live-r-steam-windows\ck2\source\province.cpp(142) +10 bytes (CProvince::CProvince)
c:\jenkins\workspace\ck2-live-r-steam-windows\ck2\source\map.cpp(332) +45 bytes (CMap::InitPostRead)
c:\jenkins\workspace\ck2-live-r-steam-windows\clausewitzii\clausewitzlib\persistent.cpp(60) +0 bytes (CPersistent::Read)
c:\jenkins\workspace\ck2-live-r-steam-windows\ck2\source\map.cpp(95) +0 bytes (CMap::CreateFromFile)
c:\jenkins\workspace\ck2-live-r-steam-windows\ck2\source\ck_application.cpp(1061) +12 bytes (CCKApplication::LoadDatabases)
c:\jenkins\workspace\ck2-live-r-steam-windows\ck2\source\ck_application.cpp(698) +0 bytes (CCKApplication::InitGame)
c:\jenkins\workspace\ck2-live-r-steam-windows\ck2\source\ck_application.cpp(369) +0 bytes (CCKApplication::Init)
c:\jenkins\workspace\ck2-live-r-steam-windows\ck2\source\main.cpp(794) +0 bytes (SDL_main)
c:\users\rikard.aslund\desktop\external_libs\sdl-1.3.0\src\main\windows\sdl_windows_main.c(145) +13 bytes (main)
c:\users\rikard.aslund\desktop\external_libs\sdl-1.3.0\src\main\windows\sdl_windows_main.c(202) +7 bytes (WinMain)
f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c(275) +28 bytes (__tmainCRTStartup)
It seems like you've either explicitly set the define NDefines::NEngine::EVENT_PROCESS_OFFSET to 0 in defines.lua or that the entry is missing from your defines file. This value needs to be > 0. Try to make sure that the entry is existing and has a correct value and poke me in this thread with a reply if that doesn't work.
 
  • 1
Reactions:
How do I do in order to change a characters infamy negatively as an event effect? change_infamy = -100 doesn't seem to work.
The syntax for change infamy is:
Code:
change_infamy = {
    value = x
    localisation = y
}
Where x is the value which can be decimal and y is the string seen when you hover over someone's infamy value
 
  • 1
Reactions:
By excluding if from the potential of the normal merchant republic (e.g. set a flag when the character is landed with you custom government, and require that flag to be absent to qualify for the normal merchant republic).

Speaking of basic questions, I asked this before, and @richvh answered, but because of how did I set the question I didn't understood the answer.

I asked wether FROM = { FROM = {} is equivalent to FROMFROM = {} or equivalent to FROM = {}, and he answered "yes". Can someone clarify wether this mean yes to the first alternative or yes to the second?
FROM = { FROM = { } } is equivalent to FROMFROM = { }
 
What does the duration mean? Does it end after that time?

This doesn't do anything (but at least it doesn't break the file):
Code:
 299.1.1 = { effect = { add_alliance = { who = 53 years = 10 } } }
Who takes a scope, the duration is how long it lasts
 
So is there any way to scope to character 53 from the character history file?

Code:
44 = {
    name = Bob
    dynasty = 44
    religion = catholic
    culture = irish
    272.7.19 = { birth = yes }
    299.12.25 = { effect = { add_alliance = { who = 53 years = 10 } } }
    350.1.1 = { death = yes }
}
^This doesn't do anything
Well you are adding an alliance which can only be done between characters with titles so just scope to "53" 's title and then do holder_scope and then add the alliance between the characters
 
Can't do that from character history. I'd have to make an on_chronicle_start event. Was really hoping to do this from character history. ah well
Why not? Do your landed characters not have title history's associated to their titles? If they do then there is no reason it should not work, and if they don't I have to ask why
 
You should be able to set title flags in the title history using effect and if not just set them in a character history for that title using effect and then scoping to said title
 
@loup99 : Vanilla is 3072 x 2048

How does localisation for the Conclave DLC council work? I have custom localisation for the normal positions (steward, spymaster, etc.) but the Council uses vanilla localisation.
That is a bug with the localisation, IIRC it has been reported and they have said they have fixed it for the next version I think
 
  • 1
Reactions:
How do you run a console command from within a mod file? Eg. I'm trying to toggle "charinfo" from the intrigue menu.

Code:
    turnon_charinfo = {

        potential = {
           ai = no
            has_character_flag = cheats_enabled
            NOT = { has_global_flag = charinfo }
        }

        allow = {
            always = yes
        }

        effect = {
            set_global_flag = charinfo
        }

        revoke_allowed = {
            always = no
        }

        ai_will_do = {
            factor = 0
        }
    }

Somewhere in there I'd like to activate "charinfo", and then I'll write a "turnoff_charinfo" function to reverse it. I plan to do the same with "quickbuild".

I don't know how to run console commands from the mod file. Any help?
You can't, you just have to use the console like normal. Console commands are not usable as effects
 
You can sort of create new death reasons with illness traits. If you make something like has_drowned as a trait and make it an illness one then add in a death localisation for it you can add the trait to a character and then do death = { death_reason = death_trait }
The localisation for the death reason need to be has_drowned_death and will be default start with "Died "
 
  • 1
Reactions:
Tried all the normal scopes before I found this Actor.
Actor is not a traditional scope like ROOT, father etc instead it is only used in localisation and event then only in a few specific circumstances hence why you are probably encountering issues. I kinda doubt you will wind a scope that will work how you want it to I am afraid
 
I have an question does anyone know how to make the options have more than four slots I was thinking of having a few pages, I have 15 options can only have three on each one, then I need a Next page not sure how to make an next page event to fire so it shows the next page for each of them I have the localization stuff done and all. Not sure how to make an event to show next page in events.

This is what I got so far for the events.

option = { # Next Page
name = EVTOPTDUoC.252
}
}
You can do one of two things really.
You can make your next page option give them another event with more options or you can have the next page option give them a flag which is the trigger for sets of three options to appear.