V
Vvallaria
Guest
Hi friendo's,
Currently writing a mod to go out and have a walk with your dog and a Spouse, Consort or Lover {SCL}. As you can have multiple SCL's I'm trying to randomly scope out 1 character between the 3 options, so you don't end up with having your spouses and/or consorts and lovers going for a dog walk together (that has to be akward at some point right?)
I use the following code for the scope and that gives me two main problems right now. I'm 99% sure it has to do with the random_list parameter but I have no idea how to work around that or if it's the correct one to use in this situation.
Problem 1: If I fire the event multiple times I will sometimes get a blank scope. I assign a character_flag in the option that stays on the scoped character so it excludes them from being scoped if the event fires again.
problem 2: The save_event_target_as will have a 1/3 chance of beeing applied to the scoped character.
immediate = {
random_list = {
33 = {
random_spouse = {
limit = {
NOT = { has_character_flag = dog_walk }
}
save_event_target_as = dog_walking
}
}
33 = {
random_lover = {
limit = {
NOT = { has_character_flag = dog_walk }
}
save_event_target_as = dog_walking
}
}
33 = {
random_consort = {
limit = {
NOT = { has_character_flag = dog_walk }
}
save_event_target_as = dog_walking
}
}
}
}
So pretty clear random is the culprit here.
I have no expierence in coding and still learning the mountain of options and parameters you can apply to where and to whom and to what and to... you get the gist. I use the wiki and mods for help otherwise.
Any help, tips and tricks are very much welcomed and thank you in advance. If you need more info or something isn't clear please let me know. Also if my grammar isn't correct you can tell me but atleast be willing to explain what I'm doing wrong. You can find me on the ck2 discord server if the list is to long to post here
Thank you and kind regards,
Vallaria
Currently writing a mod to go out and have a walk with your dog and a Spouse, Consort or Lover {SCL}. As you can have multiple SCL's I'm trying to randomly scope out 1 character between the 3 options, so you don't end up with having your spouses and/or consorts and lovers going for a dog walk together (that has to be akward at some point right?)
I use the following code for the scope and that gives me two main problems right now. I'm 99% sure it has to do with the random_list parameter but I have no idea how to work around that or if it's the correct one to use in this situation.
Problem 1: If I fire the event multiple times I will sometimes get a blank scope. I assign a character_flag in the option that stays on the scoped character so it excludes them from being scoped if the event fires again.
problem 2: The save_event_target_as will have a 1/3 chance of beeing applied to the scoped character.
immediate = {
random_list = {
33 = {
random_spouse = {
limit = {
NOT = { has_character_flag = dog_walk }
}
save_event_target_as = dog_walking
}
}
33 = {
random_lover = {
limit = {
NOT = { has_character_flag = dog_walk }
}
save_event_target_as = dog_walking
}
}
33 = {
random_consort = {
limit = {
NOT = { has_character_flag = dog_walk }
}
save_event_target_as = dog_walking
}
}
}
}
So pretty clear random is the culprit here.
I have no expierence in coding and still learning the mountain of options and parameters you can apply to where and to whom and to what and to... you get the gist. I use the wiki and mods for help otherwise.
Any help, tips and tricks are very much welcomed and thank you in advance. If you need more info or something isn't clear please let me know. Also if my grammar isn't correct you can tell me but atleast be willing to explain what I'm doing wrong. You can find me on the ck2 discord server if the list is to long to post here
Thank you and kind regards,
Vallaria