joemann Posted February 19, 2018 Posted February 19, 2018 I am trying to use a scripted trigger as a condition and it does not appear to yield the expected result. I suspect my logic is wrong. the trigger is : is_submissive = { NOR = { trait = stubborn trait = proud trait = willful trait = haughty } OR = { trait = timid trait = humble trait = craven trait = shy } } I believe this to mean: the character should have none of the first four traits and at least one of the second four traits to qualify for the event. Is that correct? I have a second trigger is_dominant with the same traits but the other way round. In the following event I use a character that has only one submissive trait ( and the average tits trait). running the event ten times it results in 9 default events .9200 and one refuse punishments event .902 . The latter should only turn up for characters with a dominant trait. The loves punishment event never turns up even though there is a 90% chance. Is my trigger wrong or is there a problem with the random list? # .230 Disciplining Spouse, Lover or Concubine - player is male, lover is female narrative_event = { id = RSLVisits.230 desc = "RSLVisits230" picture = discipline_spouse_01 title = rsl_disciplining_spouse is_triggered_only = yes # Triggered from .2 immediate = { if = { # She seems to like it limit = { is_submissive = yes NOT = { is_dominant = yes } } random_list = { 10 = { ##accepts punishment event_target:rsl_visit_target = { add_character_modifier = { name = rsl_sore_bottom duration = 30 }} event_target:rsl_visit_target = { add_character_modifier = { name = rsl_correction_accepted duration = 60 }} host = { narrative_event = { id = RSLVisits.9200 }} ## spank bottom } 90 = { ## loves punishment event_target:rsl_visit_target = { add_character_modifier = { name = rsl_sore_bottom duration = 30 }} event_target:rsl_visit_target = { add_character_modifier = { name = rsl_correction_accepted duration = 60 }} event_target:rsl_visit_target = { add_character_modifier = { name = rsl_good_sex duration = 30 }} host = { narrative_event = { id = RSLVisits.9201 }} ## spank bottom make her come add_trait = submissive } } } if = { limit = { is_dominant = yes NOT = { is_submissive = yes } } random_list = { 90 = { ##accepts punishment event_target:rsl_visit_target = { add_character_modifier = { name = rsl_sore_bottom duration = 30 }} event_target:rsl_visit_target = { add_character_modifier = { name = rsl_correction_accepted duration = 60 }} host = { narrative_event = { id = RSLVisits.9200 }} ## spank bottom } 10 = { ## resists punishment event_target:rsl_visit_target = { add_character_modifier = { name = rsl_very_sore_bottom duration = 60 }} event_target:rsl_visit_target = { add_character_modifier = { name = rsl_correction_refused duration = 120 }} host = { narrative_event = { id = RSLVisits.9202 }} ## cane her bottom make her scream } } } if = { limit = { ## if none of the conditions apply we go to default mode is_submissive = no is_dominant = no } event_target:rsl_visit_target = { add_character_modifier = { name = rsl_sore_bottom duration = 30 }} event_target:rsl_visit_target = { add_character_modifier = { name = rsl_correction_accepted duration = 60 }} host = { narrative_event = { id = RSLVisits.9200 }} ## spank bottom } } option = { name = rsl_option1 } }
ngppgn Posted February 19, 2018 Posted February 19, 2018 Well, you are testing wether ROOT (not the event target) is submissive/dominant in your code, so there's that. Probably all the immediate should be wrapped in an event_target:rsl_visit_target scope change. I'd go further and rewrite some of it to be even more concise, like so: has_submissive_traits = { OR = { trait = timid trait = humble trait = craven trait = shy } } has_dominant_traits = { OR = { trait = stubborn trait = proud trait = willful trait = haughty } } #now we can define being submissive and dominant in a more concise way is_submissive = { has_sobmissive_trait = yes has_dominant_trait = no } is_dominant = { has_sobmissive_trait = no has_dominant_trait = yes } and this is how I'd rephrase the immediate immediate = { event_target:rsl_visit_target = { random_list = { 10 = { ## resists punishment trigger = { is_dominant = yes } add_character_modifier = { name = rsl_sore_bottom duration = 60 } add_character_modifier = { name = rsl_correction_refused duration = 120 } host = { narrative_event = { id = RSLVisits.9202 }} ## cane her bottom make her scream } 90 = { ## doesn't resist add_character_modifier = { name = rsl_sore_bottom duration = 30 } add_character_modifier = { name = rsl_correction_accepted duration = 60 } random_list = { 90 = { # love it trigger = { is_submissive = yes } add_character_modifier = { name = rsl_good_sex duration = 30 } add_trait = submissive host = { narrative_event = { id = RSLVisits.9201 }} ## spank bottom make her come } 10 = { # normal reaction host = { narrative_event = { id = RSLVisits.9200 }} ## spank bottom } } } } } }
joemann Posted February 19, 2018 Author Posted February 19, 2018 Wow! Thanks a lot. It certainly makes it a lot more condensed. One question about the random list. Do 10% of all characters resist or 10% of all characters with the dominant trait. What happens to the other 90% ? Will join the non resisting group and get a regular spanking event (or will they be out of the loop ? which is not the purpose). Same thing for the second list. If I am sure I understand the concept I can tweak the numbers to get something that feels right. Thanks again. Help like this is really precious to get a better understanding how to write this stuff.
joemann Posted February 19, 2018 Author Posted February 19, 2018 I implemented this and it works. One remaining problem is that the narrative event .9201 does not fire, neither is the submissive trait added. The character modifier (good sex) just above it is though. Is it a scope question? validator sees nothing wrong.
Abominus Posted February 19, 2018 Posted February 19, 2018 I would suggest to use "NOT = { yourscriptedtrigger = yes }" instead of "yourscriptedtrigger = no"
Recommended Posts
Archived
This topic is now archived and is closed to further replies.