Jump to content

Recommended Posts

Thank you for your answer. I understand from what you are saying that the vanilla file on_birthday does not contain all the possibilities that exist and that it can be completed in the way you suggest. That makes sense. However, I have tried it and it still does not add the trait. I know the trait itself is functional because I can add it through an ordinary event. I do believe the event in question is triggered by the on_action because the error_log indicates that a variable has been set ( the setting of the variable is done immediately after the trait is added  and by the same event ETB.2).

This is very puzzling.

Link to comment

Hey, I'm trying to work on a mod and I've got the basics done but something isn't working right and I can't figure out why. Anyone who could take a look and let me know that would be great. I am using some of DocToska's code as a framework for this mod pending his approval since he was doing so many of the same things i was trying to figure out how to do already.

I have a character interactions file that has the line 

			trigger_event = dominance.1


which should direct to this code: 

 

Spoiler

namespace = dominancemod

# Selected prisoner gets trained
dominance.1 = { 
    type = character_event
    title = dominance.1.t
    theme = prison
    override_icon = {
        reference = "gfx/interface/event_window/type_intimidation.dds"
    }   
    override_background = {
        event_background = dungeon
    }

    desc = {
        first_valid = {
            triggered_desc = {
                trigger = { is_female = yes }
                desc = dominance.training.desc_female
            }
            desc = dominance.training.desc_male
        }
    }

    theme = prison
    left_portrait = {
        character = root
        animation = admiration # happiness # schadenfreude
    }
    right_portrait = {
        character = scope:recipient
        animation = prisondungeon # fear
        remove_default_outfit = yes
    }

    immediate = {
        play_music_cue = "mx_cue_prison"
    }

    option = {
        name = dominance.training.a

        scope:recipient = {
            increase_wounds_effect = { REASON = beaten }
            if = {
                limit = {
                    NOR = {
                        has_trait = lustful
                    }
                }
                add_stress = minor_stress_impact_gain
            }
            else = {
                add_stress = medium_stress_impact_gain
            }

            if = {
                limit = { 
                    is_female = yes 
                    is_pregnant = no
                    #fertility > 0.1
                }
                had_sex_with_effect = {
                    CHARACTER = scope:actor
                    PREGNANCY_CHANCE = seduce_pregnancy_chance
                }
            }
        }

        scope:actor = {
            if = {
                limit = { 
                    is_female = yes 
                    is_pregnant = no
                    #fertility > 0.1
                }
                had_sex_with_effect = {
                    CHARACTER = scope:recipient
                    PREGNANCY_CHANCE = seduce_pregnancy_chance
                }
            }
            add_stress = minor_stress_impact_loss
            trigger_event = dominance.2
        }

    }
}

 


Instead however in game it brings up a different event located further down the same file:

 

Spoiler

dominance.2 = {
    type = character_event
    title = dominance.2.t

    desc = {
        first_valid = {
            triggered_desc = {
                trigger = { is_female = yes }
                desc = dominance.2.desc_female
            }
            desc = dominance.2.desc_male
        }
    }

    theme = prison
    override_icon = {
        reference = "gfx/interface/event_window/type_intimidation.dds"
    }   
    override_background = {
        event_background = dungeon
    }

    left_portrait = {
        character = root
        animation = happiness # love
        remove_default_outfit = yes
    }
    right_portrait = {
        character = scope:recipient
        animation = shame
        remove_default_outfit = yes
    }
    
    option = {
        name = {
            trigger = { is_female = yes }
            text = dominance.2.a.female
        }
        name = {
            trigger = { is_female = no }
            text = dominance.2.a.male
        }
        custom_tooltip = dominance.2.a.tt
    }
}

 


Which is only supposed to trigger in response to the first event. I had previously removed a third event I was working on but had not finished as the third event had been the one called in game instead of the first so I thought I had done something wrong just with that one event but it seems that was not the case. I'm sure I'm missing something super basic. 

Link to comment
3 hours ago, crazycaitycat said:

Hey, I'm trying to work on a mod and I've got the basics done but something isn't working right and I can't figure out why. Anyone who could take a look and let me know that would be great. I am using some of DocToska's code as a framework for this mod pending his approval since he was doing so many of the same things i was trying to figure out how to do already.

I have a character interactions file that has the line 


			trigger_event = dominance.1


which should direct to this code: 

 

  Hide contents


namespace = dominancemod

# Selected prisoner gets trained
dominance.1 = { 
    type = character_event
    title = dominance.1.t
    theme = prison
    override_icon = {
        reference = "gfx/interface/event_window/type_intimidation.dds"
    }   
    override_background = {
        event_background = dungeon
    }

    desc = {
        first_valid = {
            triggered_desc = {
                trigger = { is_female = yes }
                desc = dominance.training.desc_female
            }
            desc = dominance.training.desc_male
        }
    }

    theme = prison
    left_portrait = {
        character = root
        animation = admiration # happiness # schadenfreude
    }
    right_portrait = {
        character = scope:recipient
        animation = prisondungeon # fear
        remove_default_outfit = yes
    }

    immediate = {
        play_music_cue = "mx_cue_prison"
    }

    option = {
        name = dominance.training.a

        scope:recipient = {
            increase_wounds_effect = { REASON = beaten }
            if = {
                limit = {
                    NOR = {
                        has_trait = lustful
                    }
                }
                add_stress = minor_stress_impact_gain
            }
            else = {
                add_stress = medium_stress_impact_gain
            }

            if = {
                limit = { 
                    is_female = yes 
                    is_pregnant = no
                    #fertility > 0.1
                }
                had_sex_with_effect = {
                    CHARACTER = scope:actor
                    PREGNANCY_CHANCE = seduce_pregnancy_chance
                }
            }
        }

        scope:actor = {
            if = {
                limit = { 
                    is_female = yes 
                    is_pregnant = no
                    #fertility > 0.1
                }
                had_sex_with_effect = {
                    CHARACTER = scope:recipient
                    PREGNANCY_CHANCE = seduce_pregnancy_chance
                }
            }
            add_stress = minor_stress_impact_loss
            trigger_event = dominance.2
        }

    }
}

 


Instead however in game it brings up a different event located further down the same file:

 

  Reveal hidden contents


dominance.2 = {
    type = character_event
    title = dominance.2.t

    desc = {
        first_valid = {
            triggered_desc = {
                trigger = { is_female = yes }
                desc = dominance.2.desc_female
            }
            desc = dominance.2.desc_male
        }
    }

    theme = prison
    override_icon = {
        reference = "gfx/interface/event_window/type_intimidation.dds"
    }   
    override_background = {
        event_background = dungeon
    }

    left_portrait = {
        character = root
        animation = happiness # love
        remove_default_outfit = yes
    }
    right_portrait = {
        character = scope:recipient
        animation = shame
        remove_default_outfit = yes
    }
    
    option = {
        name = {
            trigger = { is_female = yes }
            text = dominance.2.a.female
        }
        name = {
            trigger = { is_female = no }
            text = dominance.2.a.male
        }
        custom_tooltip = dominance.2.a.tt
    }
}

 


Which is only supposed to trigger in response to the first event. I had previously removed a third event I was working on but had not finished as the third event had been the one called in game instead of the first so I thought I had done something wrong just with that one event but it seems that was not the case. I'm sure I'm missing something super basic. 

I would guess that actor may trigger first irrelevant of it's location in the script. Thus the trigger_event = dominance.2 is being triggered right away. But I'm not expert. I would try putting different stat changes through out the code to see what code is running.

Link to comment
9 hours ago, Adroit said:

hmnnn, not sure then - maybe post a snippet of your event where you're trying to add the trait?  And th elog?

Here is the event:

Spoiler

# .31 Virgin trait assignment on adulthood (hidden event)
ETB.2 = {
    hidden = yes # hidden from the player

    trigger = {
            age = 16
            NOT = { has_character_flag = et_virginity_checked }
            NOT = { has_trait = virgin }
    }
    
    immediate = {
        if = {
            limit = {
                OR = {
                    is_pregnant = yes
                    is_married = yes
                    is_concubine = yes
                    has_relation_lover = yes
                }
            }
            add_character_flag = et_virginity_checked # to avoid future virgin checks
        }
        else = {
            add_trait = virgin
            add_character_flag = et_virginity_checked    # When virginity is eventually lost, the flag remains so you can't get the trait a second time
            set_variable = { name = deflower_exp value = 0 }
        }    
    }
}

I was wondering if it could be a scope issue since it seems a lot of the on_actions don't have scopes connected to them?

Link to comment

The error_log

Spoiler

[10:40:27][dlc.cpp:290]: Invalid supported_version in  file: mod/ugc_2221255258.mod line: 8
[10:40:30][pdxassetutil.cpp:99]: Duplicate texture 'male_clothes_secular_western_nudity_01_diffuse.dds' found (current path 'gfx/models/portraits/attachments/male_clothes/secular/western/nudity_01/male_clothes_secular_western_nudity_01_diffuse.dds', previous path 'gfx/models/portraits/attachements/male_clothes/secular/western/nudity_01/male_clothes_secular_western_nudity_01_diffuse.dds')
[10:40:32][pdx_entity.cpp:2970]: Blend shape attributes shouldn't have non-zero default values, in: entity 'female_body_entity' attribute 'bs_body_pussy'
[10:40:34][eventmanager.cpp:199]: Event #ETV.1 is missing a desc in events/ETVisit_events.txt
[10:40:34][eventmanager.cpp:199]: Event #ETV.2 is missing a desc in events/ETVisit_events.txt
[10:40:34][eventmanager.cpp:199]: Event #ETV.3 is missing a desc in events/ETVisit_events.txt
[10:40:34][eventmanager.cpp:199]: Event #ETV.4 is missing a desc in events/ETVisit_events.txt
[10:40:34][eventmanager.cpp:199]: Event #ETV.5 is missing a desc in events/ETVisit_events.txt
[10:40:34][eventmanager.cpp:199]: Event #ETV.6 is missing a desc in events/ETVisit_events.txt
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_education_intrigue
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_education_diplomacy
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_education_stewardship
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_education_martial
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_education_learning
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_lifestyle_reveler
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_lifestyle_blademaster
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_lifestyle_hunter
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_lifestyle_mystic
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_lifestyle_physician
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_depressed
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_lunatic
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_possessed
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_wounded
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_beauty_bad
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_beauty_good
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_intellect_bad
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_intellect_good
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_physique_bad
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_physique_good
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_kinslayer
[10:40:37][trait.cpp:1143]: Missing trait group localization trait_education_martial_prowess
[10:40:37][jomini_effect.cpp:309]: Variable 'deflower_exp' is set but is never used
[10:40:52][pdx_achievements_steam.cpp:288]: Invalid achievement: mother_of_us_all_achievement

You can see in the penultimate line that the event sets the variable.

In CK2 I would have checked in the charinfo but that has disappeared. Do you know if it has been replaced by something else? It was really useful.

Link to comment

I also want to add a virgin trait on startup to all characters. In CK2 you had the on_action on_startup which has been replaced by on_game_start, but I have no more success in making that work.

I was wondering if using the trait file could work. By setting <birth = 100> I suppose all newborn characters will get the trait. There no longer seems to be the possibility to have a hidden trait. Ideally the virgin trait should be hidden until a character get a lover or spouse. The absence of virginity for a non married character could then be a secret which if discovered be used to blackmail the character or its family ( revealing it could cause a betrothal to be broken of, etc ).

Anyhow, lots of ideas but I first need to learn the CK3 language. I was starting to get the hang of CK2 so I find it kind of frustrating.

Link to comment
3 hours ago, joemann said:

I also want to add a virgin trait on startup to all characters. In CK2 you had the on_action on_startup which has been replaced by on_game_start, but I have no more success in making that work.

 

If it should be hidden until exposed and have otherwise no effects, you probably want to add it as a variable, not a trait. Like with an on_birth_child event (those expand the default ones) calling something like this:
 

namespace = purity

purity.0001 = {
	hidden = yes

	immediate = {
		scope:child = {
			set_variable = {
				name = virgin
				value = 1
			}
		}
	}
}

I'm pretty sure you could do something similar for all characters with an on_game_start, but I'm not sure yet how to scope to everyone in such a hidden event.

Link to comment
On 9/3/2020 at 11:09 PM, thenoirangel said:

Yes, go to \Steam\SteamApps\common\Crusader Kings III\game\common\religion\doctrines and open the 00_doctrines.txt file and you'll find this:

 


doctrine_polygamy = {
        piety_cost = {
            value = faith_doctrine_cost_mid
            if = {
                limit = { has_doctrine = doctrine_polygamy }
                multiply = faith_unchanged_doctrine_cost_mult
            }
        }
        parameters = {
            number_of_spouses = 4
            spouse_piety_loss = yes
        }
    }

 

Thanks, mate.

Link to comment

I have looked and tried, anyone know how to make a ruler work like a normal knight? I thought it would maybe be a simple line that makes them like any other character, but cant find a file that that info.

I really like that you can put a knight as commander, and they still fight and show a kill tally.

It seems like a ruler commander does not fight.

Any advice or help would be appreciated.

Thank you.

Link to comment

Not sure if that's been mentioned, but regarding breast scaling and clipping clothes, that seems to be a problem with the method used not the system, because a character with DNA set to 100% breast size has exactly no problems with any garment in the game (well, with the exception of headwear that extends to boobs).

Link to comment
8 hours ago, Anonymous said:

Not sure if that's been mentioned, but regarding breast scaling and clipping clothes, that seems to be a problem with the method used not the system, because a character with DNA set to 100% breast size has exactly no problems with any garment in the game (well, with the exception of headwear that extends to boobs).

I think the game has a problem with something like having a religion with forced nudity but then using the barbershop to put on clothes.  I believe it uses a separate breast shape for clothing and doesn't swap it out properly in that instance.  This is just conjecture on my part, but is where I was having trouble.  You can see a definite shape change when a character goes from clothed to nude.

Link to comment
26 minutes ago, SirCarcass said:

I think the game has a problem with something like having a religion with forced nudity but then using the barbershop to put on clothes.  I believe it uses a separate breast shape for clothing and doesn't swap it out properly in that instance.  This is just conjecture on my part, but is where I was having trouble.  You can see a definite shape change when a character goes from clothed to nude.

It does use a separate breast shape for clothes.

Breast Shapes.jpg

Link to comment
     populate_recipient_list = {
        scope:actor = {
            every_courtier = {
                limit = {
if = {
                    limit = {
NOT = { scope:actor.faith_amazonian }
}
NOT = { sex_opposite_of = scope:actor }

}
  • Please help I'm trying to check if the actor doesn't have faith_amazonian then run the NOT = { sex_opposite_of = scope:actor } (which works on it's own. If they do have the faith_amazonian then the NOT = { sex_opposite_of = scope:actor } shouldn't run.
    The error I keep getting is Expected "NOT = {", but got "NOT = " whatever that means. Not sure if I'm leaving
     
Link to comment
On 9/11/2020 at 9:16 AM, joemann said:

I also want to add a virgin trait on startup to all characters. In CK2 you had the on_action on_startup which has been replaced by on_game_start, but I have no more success in making that work.

 

 

Do the following in the on_action.txt

The trick for it to work well is to call your event multiple times as there are lots of characters that are created in the first few days and week from various other scripts (they are not born)

Quote

on_game_start = {
    # Fire the event now but also in a few days to catch all characters that are generated by script in the first few days of game creation
    events = {
        CCCore.1  # Init the mod.
       delay = { days = 1 }
        CCCore.1  # Init the mod.
       delay = { days = 5 }
        CCCore.1  # Init the mod.
       delay = { months = 1 }
        CCCore.1  # Init the mod.
       delay = { months = 6 }
        CCCore.1  # Init the mod.
    }
}

 

 

The other trick is in the event itself. The on_game_start is called without any scope. So you need to look at all characters. Note the "every_living_character"

 

 

 

Last thing. I would recommend you also add a random_yearly_everyone_pulse = {}

That way you will eventually catch any later character that is created (instead of being born) and avoid characters with missing traits.

 

Quote

CCCore.1 = {

    type = empty

    immediate = {
        set_global_variable = {
            name = cc_circMod_present
            value = 301
        }
 
        every_living_character = {
            trigger_event = CCCore.20
        }
    }

}

 

 

Link to comment

Thanks coleman1, this is very useful. I did quite a lot of modding in CK2 but I find CK3 very different. Since there is not yet a fleshed out modding wiki, this type of info is really helpful.

I am a bit disappointed in CK3 from a modding perspective, I find it quite complicated and given that modding 3D models is completely out of my capabilities, the graphics part is feels bland. Although I like the fact that your characters are "in the picture" they only have one pose (standing around) which ends up being a bit boring. I hope that future dlc's or more proficient modders wil remedy this.

Link to comment

Can you change the way the game generates random characters? Basically I want there to be more hight variance, because right now the tallest women (60-70%) are slightly taller than the shortest men (40-50%). I want the game to generate super tall characters that are up to 100% tall. Also I want there to be more fat characters.

 

In the 01_genes_morph there's age_preset_height which has "curve" parameter. How does it work? Could I achieve anything by changing it?

Link to comment
9 hours ago, hamimobe said:

Can you change the way the game generates random characters? Basically I want there to be more hight variance, because right now the tallest women (60-70%) are slightly taller than the shortest men (40-50%). I want the game to generate super tall characters that are up to 100% tall. Also I want there to be more fat characters.

 

In the 01_genes_morph there's age_preset_height which has "curve" parameter. How does it work? Could I achieve anything by changing it?

Not sure but I believe that modifying the templates would do this?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use