Jump to content

CK2 Modding Quick Question Thread


Recommended Posts

Hello! A Beginner here. How should i edit the following mod so that its modified copy may run alongside the original mod without conflicts ? I am looking to  utilize the below mod as a base for my personal modifications. If successfull, i would then later request for the original creator's consent for sharing my modifications with everyone here. Thanks a lot!

 

 

 

Link to comment
  • 1 month later...

Just recently got in to modding, and learning the ropes. So I'm trying to make a Temple great work and its upgrades available to another religion group, but there's a bit of the script I don't understand, specifically:



    allow = {
        trigger_if = {
            limit = { NOT = { religion_group = pagan_group } }
            religion_group = pagan_group
        }

    }

 

What does it mean? How does it differ from a simple allow = { religion_group = pagan_group }  ? And finally how do I add another religious group into it? Thanks in advance. 

Link to comment

I have an idea for a mod that focuses on incest that I would like to start working on, but I need a few questions answered first to see if what I'm looking to achieve is possible. I also plan on making it a big overhaul like mod that is probably beyond my capabilities as some one who is new to modding, so I was wondering if anyone was willing to help or join me so we can make it as extensive and fleshed out as possible as well as ensuring compatibility with other mods and maybe implementing other mods with the authors' permission. I guess that's all I have to say so onto the questions.

 

  1. I would like to know if it is possible with a religion to restrict marriages to only dynasty/family members, so that followers of that religion can only marry family members. I was told I could use an event to break the marriage, but I want to know if there is not another way. I know in vanilla there are religions like Zoroastrianism, Messalianism and reformed pagan religions with the "Divine marriage" doctrine that allow close kin marriages, but want to make sure my dynasty members are doing the same.                                
  2. I would like to know how to make a trait that will determine a characters actions. inspired by things like visual novels and anime I want to add traits like brocon or siscon, where the character with said trait will target their brother or sister respectively for things like seduction, carousing and family, and will accept anything from that person such as invitation to court, stop backing plot, etc. I have made a trait before, but it only modified stats.
Link to comment
On 1/9/2021 at 9:07 AM, Cluth999 said:

Just recently got in to modding, and learning the ropes. So I'm trying to make a Temple great work and its upgrades available to another religion group, but there's a bit of the script I don't understand, specifically:




    allow = {
        trigger_if = {
            limit = { NOT = { religion_group = pagan_group } }
            religion_group = pagan_group
        }

    }

 

What does it mean? How does it differ from a simple allow = { religion_group = pagan_group }  ? And finally how do I add another religious group into it? Thanks in advance. 

The point of the trigger_if section here is to not check and not display condition "religion_group = pagan_group" unless the limit "NOT = { religion_group = pagan_group }" is true. In this case its functionally identical to "allow = { religion_group = pagan_group }", but it results in a cleaner tooltip if "religion_group = pagan_group" is true.

See here for slightly more details on trigger_ifs: https://ck2.paradoxwikis.com/Scripting#Trigger_If

You could add in your mod's religion with something like:
 

allow = {
    trigger_if = {
        limit = {
            NOR = {
                religion_group = pagan_group
                religion_group = <your religion group>
            }
        }
        OR = {
            religion_group = pagan_group
            religion_group = <your religion group>
        }
    }
}

 

Link to comment
  • 2 weeks later...
  • 3 weeks later...
  • 3 weeks later...
7 hours ago, rookie189 said:

Anyone know if theres anyway to have a opinion_of_male/opinion_of_female without adding some kind of male/female traits or character modifiers?

I assume you mean attaching the opinion modifier to a character/npc without using a trait or modifier, then no. Not that I am aware of.

Link to comment

Hi people. I'm trying to create some mod for EU4, but I have problem with localisation files. I can't add working localisation for my custom religion, and what worse, for my custom events.  What I did was:

Creating Religion: 00_religion

Creating Localisations files: atlantidian_l_english

And custom event: Atlantida

And localisation: atlantida_events

But nothing work. My event get error, missing localisation. So what am I doing wrong?

00_religion.txt atlantidian_l_english.yml Atlantida.txt atlantida_events.yml

Link to comment

So, Ive, been trying to make a new char that takes over vassalage from the original vassal but cant figure out how.

Ive tried:

abdicate_to whenever I run this it abdicates to the right character but then creates a separate country aka not a vassal of the PC or liege 

 

set_defacto_vassal does nothing

 

vassalize_or_take_under_title does nothing

 

 

Edit: found out what was the problem. It was the rank of the character that I made

Link to comment
  • 5 months later...

Is anyone familiar with the artifact equip/unequip functions? I assumed it was some kind of decision but if it is I haven't been able to find it. I'm wanting to make an artifact do the opposite of normal, where you can only unequip if it meets certain conditions or at the very least maybe an event tied to a character modifier or something that triggers immediately after unequipping that automatically reequips the artifact.

Edited by rookie189
Link to comment
  • 2 months later...

Hello

This is my first time attempt to do anything modding related myself in CK2
I want to integrate the events of one mod into DWR by adding the pregnancy check.
When I just added the operation to the events they couldn't be triggered in game anymore.

Is there a simple (or at least not overly complicated) way to patch this?

Link to comment
  • 1 month later...

Anyone know what could cause event spawned troops to randomly despawn? I made a super simple decision to spawn troops using a scripted effect and it works fine but if I go to war, the second I get done sieging the first holding the whole 3k troops just randomly disappear without fail. If I leave them in my capital, they just sit there no problem, they even fight if enemy troops run over them, I just can't use them for anything else apparently.

 

I thought maybe I borked the decision as I'm not very familiar with making custom decisions, but it happens even if I just command prompt the event.

 

I'm playing the Guardians of Azeroth overhaul mod, and it has a bunch of events that spawn event troops, and they work fine, I can siege all I want with no issue, it's just my custom event and event troops that aren't working for some reason.

 

Spoiler

event.png.9c3576538b3abb31b14f9af07aa122ee.png

Spoiler

967865966_scriptedeffect.png.3f38138bcdfa22e8a8d73b3a951bc155.png

Spoiler

decision.png.3e9f5aa916ed734a4507cd9328eed002.png

 

Link to comment
On 1/4/2022 at 1:35 AM, rookie189 said:

Anyone know what could cause event spawned troops to randomly despawn? I made a super simple decision to spawn troops using a scripted effect and it works fine but if I go to war, the second I get done sieging the first holding the whole 3k troops just randomly disappear without fail. If I leave them in my capital, they just sit there no problem, they even fight if enemy troops run over them, I just can't use them for anything else apparently.

 

I thought maybe I borked the decision as I'm not very familiar with making custom decisions, but it happens even if I just command prompt the event.

 

I'm playing the Guardians of Azeroth overhaul mod, and it has a bunch of events that spawn event troops, and they work fine, I can siege all I want with no issue, it's just my custom event and event troops that aren't working for some reason.

 

  Hide contents

967865966_scriptedeffect.png.3f38138bcdfa22e8a8d73b3a951bc155.png

 

 

This does not appear to address the problem, but have you tried writing the troop number twice (in the brackets)?

 

That is the only way I have seen spawned troops implemented anywhere, even when it's the same one 95% of the time.

Link to comment
On 1/5/2022 at 7:30 AM, bunt776 said:

This does not appear to address the problem, but have you tried writing the troop number twice (in the brackets)?

 

That is the only way I have seen spawned troops implemented anywhere, even when it's the same one 95% of the time.

 

You know what's funny? I assumed I had done something so horribly wrong I would have to scrap the mod and start completely over so I gave up and started playing the Game of Thrones mod. I made another spawn unit event and the EXACT same thing happened.

 

I did what you said, and it worked! I was told having the two numbers in the bracket just had to do with how the army was split up but apparently, it's much more significant.

 

I really appreciate you pointing that out, it would have never occurred to me that that might the problem. Thank you!

Link to comment
  • 3 months later...

Does anyone know if there's a way to prevent the player from leaving a society? I was looking to mod House of O to make the slave status more "immersive".
Ideally I'd like to just remove the "leave" button or make it non-interactable.

Alternatively maybe it could be configured so that leaving causes you to automatically re-join at your current rank, though I don't know if you can do that without interfering with any society-specific events.

Link to comment
  • 1 month later...

Anyone see something I don't? I've gone over these lines countless times but my brain just can't see what's wrong.

The first event picture displays correctly but every picture after won't display.

 

=========event_pictures.gfx

 

spriteTypes = {
    spriteType = {
        name = "wv_stroll01_path"
        texturefile = "gfx/event_pictures/wv_stroll01_path.dds"
    }
spriteTypes = {
    spriteType = {
        name = "wv_stroll02_clearing"
        texturefile = "gfx/event_pictures/wv_stroll02_clearing.dds"
    }
spriteTypes = {
    spriteType = {
        name = "wv_stroll03_night"
        texturefile = "gfx/event_pictures/wv_stroll03_night.dds"
    }
spriteTypes = {
    spriteType = {
        name = "wv_stroll04_wounded"
        texturefile = "gfx/event_pictures/wv_stroll04_wounded.dds"
    }
spriteTypes = {
    spriteType = {
        name = "wv_stroll05_fuck"
        texturefile = "gfx/event_pictures/wv_stroll05_fuck.dds"
    }

 

===========General_event.txt

 

namespace = WVlycan

#Wounded Wolf in the Woods(Forest)
# Choosing your path
narrative_event = {
    id = WVlycan.0001
    title = wv_lycan_woods_encounter00
    window = "BiggerEventWindow"
    desc = EVTDESCWVlycan.0001
    picture = wv_stroll01_path
    is_triggered_only = yes # wv_forest_stroll_decision
    trigger = { #For now, pc must be adult female, might add men later
        is_female = yes
        is_adult = yes
        NOT = { trait = incapable }
        NOT = { trait = in_hiding }
    }
    option = { # Keep walking through forest
        name = WVlycan.0001a
        narrative_event = { id = WVlycan.0002 }
    }
    option = { # go back home, for now
        name = WVlycan.0001b
    }
}
narrative_event = {
    id = WVlycan.0002
    title = wv_lycan_woods_encounter00
    window = "BiggerEventWindow"
    desc = EVTDESCWVlycan.0002
    picture = wv_stroll02_clearing
    option = { # rest in the clearing
        name = WVlycan.0002a
        narrative_event = { id = WVlycan.0003 }
    }
    option = { # go back home, for now
        name = WVlycan.0002b
    }
}
narrative_event = {
    id = WVlycan.0003
    title = wv_lycan_woods_encounter00
    window = "BiggerEventWindow"
    desc = EVTDESCWVlycan.0003
    picture = wv_stroll03_night
    option = { # Follow the sound.
        name = WVlycan.0003a
        narrative_event = { id = WVlycan.0004 }
    }
    option = { # go back home, for now
        name = WVlycan.0003b
    }
}
narrative_event = {
    id = WVlycan.0004
    title = wv_lycan_woods_encounter00
    window = "BiggerEventWindow"
    desc = EVTDESCWVlycan.0004
    picture = wv_stroll04_wounded
    option = { # Help the creature
        name = WVlycan.0004a
        narrative_event = { id = WVlycan.0005 }
    }
    option = { # Run away Run away
        name = WVlycan.0004b
    }
}
narrative_event = {
    id = WVlycan.0005
    title = wv_lycan_woods_encounter00
    window = "BiggerEventWindow"
    desc = EVTDESCWVlycan.0005
    picture = wv_stroll05_fuck
    option = { # You get up and stumble away in shock
        name = WVlycan.0005a
        add_trait = depressed
        set_character_flag = wv_main_quest_start
    }
}

 

 

 

Link to comment

It should just be 1 spriteTypes

 

By doing it in multiples like that, you are missing a lot of brackets to close each block

On 5/22/2022 at 1:23 PM, BitterBlue said:

Anyone see something I don't? I've gone over these lines countless times but my brain just can't see what's wrong.

The first event picture displays correctly but every picture after won't display.

 

=========event_pictures.gfx

 

spriteTypes = {
    spriteType = {
        name = "wv_stroll01_path"
        texturefile = "gfx/event_pictures/wv_stroll01_path.dds"
    }
    spriteType = {
        name = "wv_stroll02_clearing"
        texturefile = "gfx/event_pictures/wv_stroll02_clearing.dds"
    }
    spriteType = {
        name = "wv_stroll03_night"
        texturefile = "gfx/event_pictures/wv_stroll03_night.dds"
    }
    spriteType = {
        name = "wv_stroll04_wounded"
        texturefile = "gfx/event_pictures/wv_stroll04_wounded.dds"
    }
    spriteType = {
        name = "wv_stroll05_fuck"
        texturefile = "gfx/event_pictures/wv_stroll05_fuck.dds"
    }

 

Link to comment
  • 4 weeks later...
  • 1 month later...

Does anyone know why sometimes when you add targetted decisions or events to files that already contain targetted decisions or evens sometimes events near the bottom do not work. However when you put them into a new txt file they work. And no other changes were made?

 

I already checked brackets to make sure there were no bracket issues and the code executes just fine once they are pasted into another file. How to avoid this? Its a huge pain to have 9 million text files each with a handful of events or decisions and then god forbid you make a change to one and the ones below stop working. Then you have to analyze why.

 

Is there a way to reduce the chance this happens and does anyone have any tips about how to deal with it when it does?

Link to comment
  • 3 weeks later...

I dont want to start new thread. 
Anyone knows which mod is this event from? I cant close it, selecting sell loot just makes it appear again and again. It always fires, i tried earlier saves and it always happens.
Is there some way i can find out where is this from? Or just close the event window just like that?

ck2_1.png

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