Jump to content

Question to CK2 Modding


Merlchen

Recommended Posts

Hello,

 

i try to build my first Mod and encounter a problem i couldnt handle myself, so i hope you can help me with it.

 

For my first steps, I use a tamplate and there are sentence which start with a "#" and i hope someone can tell me what that "#" makes? and whether i can delete them without harm the script.

 

Sincerely

Merle

 

P.S.: Google Translate for the Win \o/

Link to comment

Hello,

 

i am sorry but after some hours reading i encounter another problem i couldnt handle. I try to use a Option of a Event to trigger randomly one of three other ones and first it seemed to work but now in the testing i always end up in the last one.

 

option = { # Versucht den Traum zu leben
        name = "Event01_Op1"
        random_list = {
                  34 = {narrative_event = { id = Event02.A tooltip = "Event A" }
                  }
                  33 = {narrative_event = { id = Event02.B tooltip = "Event B" }
                  }
                  33 = {narrative_event = { id = Event02.C tooltip = "Event C" }
                  }
        }
 
Is it not work like that? I hope you can help me again.
 
Sincerely
Merle
Link to comment

 

so i have to use Event02.001 as ID and it will work? Thank you for your help genericlogin ^-^

 

 

Yes, and you also have to specify the namespace with a line at the beginning of the file (and any other file where the event is referenced), such as "namespace = Event02". I would suggest picking a namespace that refers to your mod in some way, though. It's far less likely to run into a namespace conflict that way than a generic sort of name.

Link to comment

Hello,

 

i found a new problem i couldnt handle, Sorry for being so annoying but i hope you can help me again.

 

I added a picture to my event and then i linked to the next event and tried to give it a other picture but that didnt show up.  I guess it is again something with IDs?, the first Picture is just "wake_up" and it works, the other one is "wake_up_001" and didnt work. Is it not allow to have number in the name?

 
spriteTypes = {
        spriteType = {
                 name = "Wake_up_001"
                 texturefile = "gfx/event_pictures/Wake_up_001.dds"
                 noOfFrames = 1
                 norefcount = yes
                 effectFile = "gfx/FX/buttonstate.lua"
}
 
or is it not allow to repead the spritetype again and again?
 
spriteTypes = {
        spriteType = {
                 name = "wake_up"
                 texturefile = "gfx/event_pictures/wake_up.dds"
                 noOfFrames = 1
                 norefcount = yes
                 effectFile = "gfx/FX/buttonstate.lua"
}
spriteTypes = {
        spriteType = {
                 name = "Wake_up_001"
                 texturefile = "gfx/event_pictures/Wake_up_001.dds"
                 noOfFrames = 1
                 norefcount = yes
                 effectFile = "gfx/FX/buttonstate.lua"
}
 
in the same file?
 
Sadly i am really easy to confused.
 
Sincerely
Merle
 
Link to comment

Don't repeat the spritetypes, just the spritetype.  Like so...

spriteTypes = {
        spriteType = {
                 name = "wake_up"
                 texturefile = "gfx/event_pictures/wake_up.dds"
                 noOfFrames = 1
                 norefcount = yes
                 effectFile = "gfx/FX/buttonstate.lua"
     }
        spriteType = {
                 name = "Wake_up_001"
                 texturefile = "gfx/event_pictures/Wake_up_001.dds"
                 noOfFrames = 1
                 norefcount = yes
                 effectFile = "gfx/FX/buttonstate.lua"
     }
}

You could also continue this on like this...

spriteTypes = {
        spriteType = {
                 name = "wake_up"
                 texturefile = "gfx/event_pictures/wake_up.dds"
                 noOfFrames = 1
                 norefcount = yes
                 effectFile = "gfx/FX/buttonstate.lua"
     }
        spriteType = {
                 name = "Wake_up_001"
                 texturefile = "gfx/event_pictures/Wake_up_001.dds"
                 noOfFrames = 1
                 norefcount = yes
                 effectFile = "gfx/FX/buttonstate.lua"
     }
        spriteType = {
                 name = "Wake_up_002"
                 texturefile = "gfx/event_pictures/Wake_up_002.dds"
                 noOfFrames = 1
                 norefcount = yes
                 effectFile = "gfx/FX/buttonstate.lua"
     }
        spriteType = {
                 name = "Wake_up_003"
                 texturefile = "gfx/event_pictures/Wake_up_003.dds"
                 noOfFrames = 1
                 norefcount = yes
                 effectFile = "gfx/FX/buttonstate.lua"
     }
}

Also, I see in "wake_up.dds" you leave the first letter uncapitalized.  Verify your file names to ensure that you actually need to capitalize "Wake_up_001.dds"

Link to comment

Hello,

 

me again ^-^

 

I found in the CK2 modding wiki the option to have multi discribtion for a event.

character_event = {
  id = mymod.733
  desc = EVTDESCmymod.733.1
  desc = EVTDESCmymod.733.2
  desc = EVTDESCmymod.733.3
  desc = EVTDESCmymod.733.4
}

My question is now is, can i make it to a "random_list" block to adjust the percent numbers like:

random_list = {
        40 = {desc = EVTDESCmymod.733.1
	}
	15 = {desc = EVTDESCmymod.733.2
	}
	45 = {desc = EVTDESCmymod.733.3
	}
}

and if, can i do the same for  the title? i have one event that will jump one step back by one of the option you can choose, to the second option of the first step. But i want to adjust the Title and desc by the jump back just abit to make it fit with the second step choose without making a whole new event to keep the chain simple.

 

I am sorry for all my questions but i hope you can help me.

 

Sincerely

Merle

Link to comment

Hello,

 

me again ^-^

 

I found in the CK2 modding wiki the option to have multi discribtion for a event.

character_event = {
  id = mymod.733
  desc = EVTDESCmymod.733.1
  desc = EVTDESCmymod.733.2
  desc = EVTDESCmymod.733.3
  desc = EVTDESCmymod.733.4
}

My question is now is, can i make it to a "random_list" block to adjust the percent numbers like:

random_list = {
        40 = {desc = EVTDESCmymod.733.1
	}
	15 = {desc = EVTDESCmymod.733.2
	}
	45 = {desc = EVTDESCmymod.733.3
	}
}

and if, can i do the same for  the title? i have one event that will jump one step back by one of the option you can choose, to the second option of the first step. But i want to adjust the Title and desc by the jump back just abit to make it fit with the second step choose without making a whole new event to keep the chain simple.

 

I am sorry for all my questions but i hope you can help me.

 

Sincerely

Merle

Honestly I have no idea.  I haven't had a reason to try to add an event with multiple descriptions.

 

I do have one decision event where I want to have options removed after they've been clicked which leads to a fifth option that will only show after the first four have been executed.  I do that by using character flags, then have the 5th event clear all the flags set by the first four events.

Link to comment

Here is an event from my current mod.  

narrative_event = {
	id = mercom.4
	desc = "mercom4"
	picture = castle_1
	title = mercom_recruit_desc2
	
	is_triggered_only = yes # Triggered from .2
	
	option = {
		trigger = { not = { has_character_flag = mercomopt1 }
		}
		name = "mercom3a"
		narrative_event = { id = mercom.5 days = 2 } 
	}
	option = { 
		trigger = { not = { has_character_flag = mercomopt2 }
		}
		name = "mercom3b"
		narrative_event = { id = mercom.62 days = 4 }
	}
	option = { 
		trigger = { not = { has_character_flag = mercomopt3 }
		}
		name = "mercom3c"
		narrative_event = { id = mercom.7 days = 4 }
	}
	option = { 
		trigger = { has_character_flag = mercomopt1
				has_character_flag = mercomopt2
				has_character_flag = mercomopt3
			}
		name = "mercom3d"
		narrative_event = { id = mercom.11 }
	}
	#Exit Event Chain
	option = { 
		name = "mercom3e"
	}
}

As you can see, Option 1, 2, and 3, will only show up if they don't have a certain character flag.  But those options lead to events that have options that set those flags...

option = {
		name = "mercom524a"
		set_character_flag = mercomopt1
		narrative_event = { id = mercom.51 }
		}

In this way I can ensure that once an event is ran, it doesn't run again from that decision tree.  You can also use those flags to check to see if some other events have already ran.  For instance in the code below...

	option = { 
		trigger = { has_character_flag = mercomopt1
				has_character_flag = mercomopt2
				has_character_flag = mercomopt3
			}
		name = "mercom3d"
		narrative_event = { id = mercom.11 }

This option only shows up if all three of the other flags have been set.

 

Does that clear it up?

Link to comment

Hello,

 

thank you for all your help and Explanations. ^-^ Yes it helps me alot and clears it up for me.

desc = {
	trigger = {
	        has_character_flag = trigger_option_one 
	        }
	text = mymod02_003_descB
}
desc = {
	trigger = {
		NOT = {
			has_character_flag = trigger_option_one 
		}
	}
	text = mymod02_003_descA
}

picture = building_hallway_one

title = {
	trigger = {
		has_character_flag = trigger_option_one
	}
	text = mymod02_003_TitleB
}	
title = {
	trigger = {
		NOT = {
			has_character_flag = trigger_option_one
		}
	}
	text = mymod02_003_TitleA
}


I used your advice in this way and it works \o/ thank you so much.  ^_^

 

Is it possible to set 3 flags in a random_list with percent? i tried it like this but it didnt worked.

hidden_tooltip = {
	random_list = {
		60 = {narrative_event = { id = mymod02.004 }
                      set_character_flag = trigger_option_one
		}
		30 = {narrative_event = { id = mymod02.003 }
                      set_character_flag = trigger_option_two
		}
		10 = {narrative_event = { id = mymod02.001 }
                      set_character_flag = trigger_option_three
		}
	}
}

Sincerely

Merle

Link to comment

So in your code...

hidden_tooltip = {
	random_list = {
		60 = {narrative_event = { id = mymod02.004 }
                      set_character_flag = trigger_option_one
		}
		30 = {narrative_event = { id = mymod02.003 }
                      set_character_flag = trigger_option_two
		}
		10 = {narrative_event = { id = mymod02.001 }
                      set_character_flag = trigger_option_three
		}
	}
}

You're trying to set flags at the same time the events are fired.  Instead, set the flags inside of the events themselves.  So in the narrative event mymod02.001 you could do it immediately, or only when an option is chosen.  See below.

 

Immediate. 

narrative_event = {
	id = mymod02.001
	desc = "mymod02desc"
	picture = prettypicture
	title = mymod02001title
	immediate = { set_character_flag = flaggyMCflag }
	is_triggered_only = yes
	
	option = {
		name = "mymod02Option1"
		narrative_event = { id = mymod02.002 }
		}
	option = {
		name = "mymod02Option2"
                narrative_event = { id = mymod02.003 }
		}
}

Or make it dependent on when they choose an option.

narrative_event = {
	id = mymod02.001
	desc = "mymod02desc"
	picture = prettypicture
	title = mymod02001title
	is_triggered_only = yes
	
	option = {
		name = "mymod02Option1"
                set_character_flag = flaggyMCflag
		narrative_event = { id = mymod02.002 }
		}
	option = {
		name = "mymod02Option2"
                set_character_flag = flaggyMCflag2
                narrative_event = { id = mymod02.003 }
		}
}

You could of course also make the second option set the same flag as the first option does.  But in that case, it's simpler to just utilize the immediate function instead.

Link to comment

Hello,

 

it is really nice that you help me so much and explain it all to me. I put now all together and it works ^-^ thank you very much forit.

narrative_event = { # 
    id = mymod02.004
	desc = {
		trigger = {
			has_character_flag = trigger_option_one
		}
		text = mymod02_004_descb
	}
	desc = {
		trigger = {
			NOT = {
				has_character_flag = trigger_option_one
			}
		}
		text = mymod02_004_desca
	}

	picture = building_hallway_one

	title = {
		trigger = {
			NOT = {
				has_character_flag = trigger_option_one 
			}
		}
		text = mymod02_004_Titlea
	}
	title = {
		trigger = {
			has_character_flag = trigger_option_one 
		}
		text = mymod02_004_Titleb
	}
	
	is_triggered_only = yes 
	only_women = yes
	
	trigger = {
		is_female = yes
		is_adult = yes
	}
	option = { # 
		name = "mymod02_004_Op1"
		hidden_tooltip = {
			clr_character_flag = trigger_option_one
			narrative_event = { id = mymod03.007 }
		}
		ai_chance = {
			factor = 33
		}
	}
  	option = { # 
		name = "mymod02_004_Op2"
		hidden_tooltip = {
			clr_character_flag = trigger_option_one
			narrative_event = { id = mymod03.008 }
		}
		ai_chance = {
			factor = 30
		}
	}
	option = { # 
		name = "mymod02_004_Op3"
		tooltip_info = shy
		hidden_tooltip = {
			set_character_flag = trigger_option_one
			narrative_event = { id = mymod03.009 }
		}
		trigger = {
			trait = shy 
   		}
		ai_chance = {
			factor = 30
		}
	}
}

I am sure it looks chaotic ^^ but with your help it works now like i needed it.  :heart:

 

Thank you

 

Sincerely

Merle

Link to comment

Hello,

 

i want to ask a more general questinon to Modding.

 

At which point you can say you have a Mod? At the first Event you add to the game or need it more content to call it  a mod? 

 

I ask to have a clue at which point it is a good idea to try to share it.

 

Sincerely

Merle

Link to comment

It depends on what exactly you want to change or how far you want to go. A mod in CKII can be anything one that affects your initial char that allows them easy access into money and troops, or a trait that can appear allow over the word, or an event that has the perimeters you specify. The answer to you question in short is what ever you want it to be. Though, I would say to be a mod it has to change the game in some way and work, which I hope your mod does.

Link to comment

Hello,

 

i want to ask a more general questinon to Modding.

 

At which point you can say you have a Mod? At the first Event you add to the game or need it more content to call it  a mod? 

 

I ask to have a clue at which point it is a good idea to try to share it.

 

Sincerely

Merle

 

I concur with thatunkownguy as well.  Even if it's just a random event that can fire or an event chain.  If it's something you enjoy playing the game with, then someone else will too.  

 

Feedback can be quite helpful after you post it as well.  People might request things or suggest directions you hadn't thought about and all of the sudden you're excited and updating it.  

Link to comment

Hello,

 

i found a new problem where you maybe can help me?

 

i try to ask if someone has as primary title King or Queen. Can i do it on that way?

if = {
	limit = {
		primary_title = {
			title = k_*
	        }
        }
        wealth = 200
}

i tried to see if it work in Game but wasnt sure on the resualts.

 

or is it :

if = {
	limit = {
	        tier = king
	}
	wealth = 200
}

Sincerely

Merle

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • 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