joemann Posted December 12, 2017 Posted December 12, 2017 In a character event I am trying to differentiate between two sets of options depending on different traits. In the event a narrative screen provides three options from which the character can chose. Each option has three sub-screens with text. For one of the options (option 3) I want to have two sets of three different sub screens (set a) and ( set b) which fire depending on whether the characters has trait a or trait b. I have tried duplicating the main option script, each copy (option 3a and option 3b) with its own set of sub-screens with a different narrative, using a different trigger (based on the difference in trait) But although it works for one trait firing option 3a with the correct sub-screens, in the case of the second trait no sub-screens are fired when choosing the option and the chain ends there. The "connection" to option 3a seems to be missing. What I am looking for is that if if option 3a is not available because the character does not have trait a but rather trait b, option 3a is bypassed and option 3b is automatically fired. Has anybody tried something like this with success and if so how? I am new to this so any help is appreciated.
Abominus Posted December 12, 2017 Posted December 12, 2017 Would you be so kind and post your event here?
joemann Posted December 13, 2017 Author Posted December 13, 2017 Of course! # A3 character_event = { id = ksv.43 picture = GFX_evt_ksv.sexanal1 #trigger only is er uit desc = { trigger = { trait = dick_average = yes } text = ksv43desc picture = GFX_evt_ksv.sexanal2 } option = { name = ksvoptionfurther character_event = { id = ksv.431 } } } # A 31 character_event = { id = ksv.431 desc = ksv431desc picture = GFX_evt_ksv.sexanal2 is_triggered_only = yes option = { name = ksvoptionfurther character_event = { id = ksv.432 } } } # A32 character_event = { id = ksv.432 desc = ksv432desc picture = GFX_evt_ksv.sexanal3 is_triggered_only = yes option = { name = ksvoption1 } } # A 33 character_event = { id = ksv.44 desc = ksv.44desc picture = GFX_evt_ksv.sexanal #triggeronly is eruit desc = { trigger = { trait = dick_huge = yes } text = ksv44desc picture = GFX_evt_ksv.sexanal } option = { name = ksvoptionfurther character_event = { id = ksv.441 } } } # A 34 character_event = { id = ksv.441 desc = ksv441desc picture = GFX_evt_ksv.sexanal is_triggered_only = yes option = { name = ksvoptionfurther character_event = { id = ksv.442 } } } # A 35 character_event = { id = ksv.442 desc = ksv442desc picture = GFX_evt_ksv.sexanal3 is_triggered_only = yes option = { name = ksvoption1 } } I'm trying a variation on the KSV mod to get a first experience of modding. I can change text and pictures and am now trying to get different descriptions and pictures based on traits. According to the CK2 modding Wiki it should work with a dynamic blok but I am doing something wrong. The above code seems to ignore the trait conditions and always and only shows the first three bloks A3 , A31 and A32. Your help is appreciated!
Csiga5biga Posted December 13, 2017 Posted December 13, 2017 I don't really understand what do you want to do but maybe it would work like that: character_event = { id = ksv.44 #triggeronly is eruit desc = { trigger = { trait = dick_huge } text = ksv44desc1 picture = GFX_evt_ksv.sexanal1 } desc = { trigger = { NOT = { trait = dick_huge } } text = ksv44desc2 picture = GFX_evt_ksv.sexanal2 } option = { name = ksvoptionfurther character_event = { id = ksv.441 } } } Anyway, if you could explain me what is the problem, I could help more.
joemann Posted December 13, 2017 Author Posted December 13, 2017 Thanks for your answer. I tried it but it still does not do the trick. What I wanted to achieve is that: when a character with the trait dick_average chooses an option he successively gets screens A3, A31 and A32 (each with their own text and pictures) when a character with the trait dick_huge chooses the same option he gets screens A33, A34 and A35. What happens in all the solutions I have used until now is that in both cases whatever the trait screens only screens A3, A31 and A32 show up. However, I have just discovered what the problem is. The KSV mod that I am modding, does not have the traits dick_average and dick_huge. They belong to the Dark World Reborn mod that I have also activated and which runs in parallel. The result is that the character in the main screen has the trait (and I wanted to use it in KSV) but KSV does not recognize it. I tried copying ithe trait to the KSV trait folder, but that does all kind of strange things in game (characters loose their portraits, my character reverts to average dick rather than huge, ...) So I have decided to abandon this line and focus on something a little more easy (I am still wrestling with getting sound activated in my event) Sorry for having wasted your time. But I have learnt a couple of things along the way. Thanks for your trouble!
ngppgn Posted December 14, 2017 Posted December 14, 2017 Inside the event options, you would have had a conditional that said "if trait = X, fire event Y, else if trait = Z fire event W else...
joemann Posted December 14, 2017 Author Posted December 14, 2017 That is one of the things I tried before my first post, but of course it didn't work, because the trait was not recognized. I finally managed to get the Validator tool yesterday, so hopefully I will spot this type of error earlier in the future.
Csiga5biga Posted December 14, 2017 Posted December 14, 2017 I think you should try mod the base game. Mods can be buggy or you can accidently disable them (like you did). I think you can learn the most from viewing files from the base game and other mods. I leave here a sample, you only need to replace and duplicate some of the aspects and it will fit whatever you want. I even put description to the different part. If anything is unclear I can help more. namespace = YOU ### creates a namespace, only needs to be written once character_event = { id = YOU.44 ### event id border = GFX_event_normal_frame_war ### some boarder is_triggered_only = yes desc = { trigger = { trait = humble ### trait1 } text = you44desc1 ### event desc for trait1 picture = GFX_evt_large_army ### picture for trait1 } desc = { trigger = { trait = proud ### trait2 } text = you44desc2 ### event desc for trait1 picture = GFX_evt_bloody_man ### picture for trait1 } desc = { trigger = { NOR = { ### else trait = humble trait = proud } } text = you44desc3 ### event desc for else picture = GFX_evt_whispers ### picture for else } option = { name = ksvoptionfurtherA ### name of the A option if = { limit = { trait = humble } ### this only happens when has trait2 character_event = { id = YOU.441 } ### fires an event add_trait = diligent ### does something for test break = yes ### doesn't check other "if"s } if = { limit = { NOT = { trait = humble } } ### this only happens when doesn't have trait2 character_event = { id = YOU.442 } ### fires an event prestige = 100 ### does something for test } } option = { name = ksvoptionfurtherB ### name of the B option trigger = { trait = proud ### this option only shows up when has trait1 but still can chose optionA } character_event = { id = YOU.443 } ### fires an event remove_trait = proud ### does something for test } }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.