Merlchen Posted January 26, 2017 Posted January 26, 2017 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/
seelenoede Posted January 26, 2017 Posted January 26, 2017 these are just comments. You can safely delete them. However it is always good to write good and explaining comments in your code, so you and others can better keep track of what you want and what happens in the next few lines, etc.
Merlchen Posted January 26, 2017 Author Posted January 26, 2017 Hello, thank you very much. That helps me alot, that i can just delete all the confusing things It makes it more clear form me. ^^ Sincerely Merle
Merlchen Posted January 26, 2017 Author Posted January 26, 2017 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
genericlogin Posted January 27, 2017 Posted January 27, 2017 Those aren't valid event IDs. The wiki has information on modding that may help: ID and namespace.
Merlchen Posted January 27, 2017 Author Posted January 27, 2017 Hello, so i have to use Event02.001 as ID and it will work? Thank you for your help genericlogin ^-^ Sincerely Merle
genericlogin Posted January 27, 2017 Posted January 27, 2017 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.
Merlchen Posted January 27, 2017 Author Posted January 27, 2017 Hello, thank you ^^ i changed it and it works \o/ The namespace is also choosen now, thank you for the advice, you are a big help for me. Sincerely Merle
Merlchen Posted January 27, 2017 Author Posted January 27, 2017 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
Mr_Treason Posted January 28, 2017 Posted January 28, 2017 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"
Merlchen Posted January 28, 2017 Author Posted January 28, 2017 Hello, it works \o/ thank you so much with your adjustments and advice all pictures shown up. ^-^ Sincerely Merle
Merlchen Posted January 28, 2017 Author Posted January 28, 2017 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
Mr_Treason Posted January 29, 2017 Posted January 29, 2017 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.
Merlchen Posted January 29, 2017 Author Posted January 29, 2017 Hello, mh so you can add a invisible marker? That tells the event to choose a other Option? Is it like adding a trait? "set_character_flag = event_OP1_taken " ? Sincerely Merle
Mr_Treason Posted January 30, 2017 Posted January 30, 2017 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?
Merlchen Posted January 30, 2017 Author Posted January 30, 2017 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
Mr_Treason Posted January 31, 2017 Posted January 31, 2017 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.
Merlchen Posted January 31, 2017 Author Posted January 31, 2017 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. Thank you Sincerely Merle
Merlchen Posted February 2, 2017 Author Posted February 2, 2017 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
thatunknownguy Posted February 2, 2017 Posted February 2, 2017 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.
Mr_Treason Posted February 2, 2017 Posted February 2, 2017 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.
Merlchen Posted February 2, 2017 Author Posted February 2, 2017 Hello, thank you both so much. That makes it alot easier for me and i need not to worry if it is still not so much. ^-^ Sincerely Merke
Merlchen Posted February 3, 2017 Author Posted February 3, 2017 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
seelenoede Posted February 3, 2017 Posted February 3, 2017 I would use the second one. I am not if the first one would even work. Alternatively you can do something like if = { limit = { primary_title = { tier = king } } wealth = 200 }
Merlchen Posted February 3, 2017 Author Posted February 3, 2017 Hello, thank you it works \o/ i used your adjusted version and all fires like it should. ^-^ Thank you very much for all your help, i learned so much from you all. Sincerely Merle
Recommended Posts
Archived
This topic is now archived and is closed to further replies.