Jump to content

CK2 Modding Quick Question Thread


Recommended Posts

Are modders considering using 'practical_age' for events?  Always found it annoying that a lot of events stop firing for Immortal characters (who appears 20 something) because of age.   Using 'Practical_Age' over just the normal 'Age' trigger for events max age, seem to be a fix for that.   Reading up on practical_age trigger, it says that if a character isn't immortal, the trigger defaults to current age.

Link to comment
8 hours ago, Merdred44 said:

Are modders considering using 'practical_age' for events?  Always found it annoying that a lot of events stop firing for Immortal characters (who appears 20 something) because of age.   Using 'Practical_Age' over just the normal 'Age' trigger for events max age, seem to be a fix for that.   Reading up on practical_age trigger, it says that if a character isn't immortal, the trigger defaults to current age.

The only time I have used age in an event trigger I excluded immortals from the event entirely and wrote a separate event just for immortals without any age restrictions attached, though it was mostly to give immortals double of the effect I was giving. Using practical_age would probably be simpler but I didn't know about it at the time because that update added a lot of new ways to do different things. Chances are it will not get used much unless the wiki is updated to show it and examples on specific ways it works or mod authors wont know they can use it. Or specifically how to.

Link to comment

I am trying to implement and improve the impact_evaluation scripted_effect (see posts above) and have run into a problem I can't solve.

 

impact_evaluation = {
          
                if = {
                    limit = {
                            check_variable = { which = size_differential which = anus_size }  # checks that ROOT's dick_size is greater than FROM's anus_size
                            
                            }
                            subtract_variable = { which = size_differential which = anus_size }
                            
                        
                 # calculate FROM's new size
                        if = {
                            limit = {
        
                            is_variable_equal = { which = size_differential value = 5 }
                            }
                                    random_list = {
            
        
                                    5 = { change_variable = { which = anus_size value = 3 }
                                            set_character_flag = anus_size_increase_3
                                            set_character_flag = sodomized
                                            add_character_modifier = { name = rsl_very_sore_bottom duration = 90 }
                                        }
                                    35 = { change_variable = { which = anus_size value = 4 }
                                            set_character_flag = anus_size_increase_4   
                                            set_character_flag = sodomized
                                            add_character_modifier = { name = rsl_incontinent duration = 90 }
                                            add_character_modifier = { name = rsl_very_sore_bottom duration = 120 }
                                        }
                                            
                                    45 = { change_variable = { which = anus_size value = 5 }
                                            set_character_flag = anus_size_increase_5  
                                            add_trait = wounded
                                            set_character_flag = sodomized
                                            add_character_modifier = { name = rsl_incontinent duration = 90 }
                                            add_character_modifier = { name = rsl_very_sore_bottom duration = 180 }
                                        }
                                    15 = { change_variable = { which = anus_size value = 6 }
                                            set_character_flag = anus_size_increase_6    
                                            add_trait = wounded
                                            set_character_flag = sodomized
                                            add_character_modifier = { name = rsl_incontinent duration = 120 }
                                            add_character_modifier = { name = rsl_very_sore_bottom duration = 180 }
                                        }    
                                }
                        }      

 

I have introduced the effect in the option block of an event:

 

option = {
        trigger = {
            event_target:is_rape_victim = { character = yes } #
        }
        name = rsl_option_further
        event_target:is_rape_victim = {
                            anal_impact_evaluation = yes
                            add_anus = yes
                            add_trait = rape_trauma        # mark the victim as raped
            opinion = {
                modifier = rsl_opinion_sexual_disgust
                who = event_target:is_rapist
            }
            
        }
        event_target:is_rapist = {     # calling the character event, you're the scope
            add_trait = rapist
            add_trait = proud
            
        }
        narrative_event = { id = RSLW.8021 }
    }

 

In game, when I choose the option the tool tip correctly displays the random list and corresponding effects but it does not execute them . When I click on the option the only trait the character does receive is rape trauma. I conclude that the event itself works and that the scope is correct but there seems to be a problem with the scripted effects most likely  in impact_evaluation but maybe also in add_anus.

 

add_anus = {
    
    if = {
        limit = { # gigantic
            check_variable = { which = anus_size value = 7 }
        }
        add_trait = gigantic_anus
        set_character_flag = anus
    }
    else_if = {
        limit = { # enormous
            check_variable = { which = anus_size value = 6 }
        }
        add_trait = enormous_anus
        set_character_flag = anus
    }
    else_if = {
        limit = { # huge
            check_variable = { which = anus_size value = 5 }
        }
        add_trait = huge_anus
        set_character_flag = anus
    }
    else_if = {
        limit = { # big
            check_variable = { which = anus_size value = 4 }
        }
        add_trait = big_anus
        set_character_flag = anus
    }
    else_if = {
        limit = { # average
            check_variable = { which = anus_size value = 3 }
        }
        add_trait = regular_anus
        set_character_flag = anus
    }
    else_if = {
        limit = { # small
            check_variable = { which = anus_size value = 2 }
        }
        add_trait = small_anus
        set_character_flag = anus
    }
    else = {
        limit = { # tiny
            check_variable = { which = anus_size value = 1 }
        
        add_trait = tiny_anus
        set_character_flag = anus
    }
}

 

Validator has a problem with the limit in else,

--- Error 1 of 1 ---
At <mod>\common\scripted_effects\rsl_scripted_effects.txt [add_anus\else\limit] (Line 2180, column 3):
Invalid node "limit" in scope CharCommand (value is: <a complex type>)
* called from <mod>\events\RSLWar.txt [narrative_event\option\event_target:is_rape_victim\add_anus] (Line 778, column ?

 

but I copied this from Ala's mod (where it works fine ) and taking the limit out does not make a difference.

 

What am I doing wrong?

 

PS

 

Sorry for the length of this post. I still haven't figured out how to "hide" my code.

Link to comment
18 hours ago, joemann said:

I am trying to implement and improve the impact_evaluation scripted_effect (see posts above) and have run into a problem I can't solve.

Spoiler

 


impact_evaluation = {
          
                if = {
                    limit = {
                            check_variable = { which = size_differential which = anus_size }  # checks that ROOT's dick_size is greater than FROM's anus_size
                            
                            }
                            subtract_variable = { which = size_differential which = anus_size }
                            
                        
                 # calculate FROM's new size
                        if = {
                            limit = {
        
                            is_variable_equal = { which = size_differential value = 5 }
                            }
                                    random_list = {
            
        
                                    5 = { change_variable = { which = anus_size value = 3 }
                                            set_character_flag = anus_size_increase_3
                                            set_character_flag = sodomized
                                            add_character_modifier = { name = rsl_very_sore_bottom duration = 90 }
                                        }
                                    35 = { change_variable = { which = anus_size value = 4 }
                                            set_character_flag = anus_size_increase_4   
                                            set_character_flag = sodomized
                                            add_character_modifier = { name = rsl_incontinent duration = 90 }
                                            add_character_modifier = { name = rsl_very_sore_bottom duration = 120 }
                                        }
                                            
                                    45 = { change_variable = { which = anus_size value = 5 }
                                            set_character_flag = anus_size_increase_5  
                                            add_trait = wounded
                                            set_character_flag = sodomized
                                            add_character_modifier = { name = rsl_incontinent duration = 90 }
                                            add_character_modifier = { name = rsl_very_sore_bottom duration = 180 }
                                        }
                                    15 = { change_variable = { which = anus_size value = 6 }
                                            set_character_flag = anus_size_increase_6    
                                            add_trait = wounded
                                            set_character_flag = sodomized
                                            add_character_modifier = { name = rsl_incontinent duration = 120 }
                                            add_character_modifier = { name = rsl_very_sore_bottom duration = 180 }
                                        }    
                                }
                        }      

 

I have introduced the effect in the option block of an event:

 

option = {
        trigger = {
            event_target:is_rape_victim = { character = yes } #
        }
        name = rsl_option_further
        event_target:is_rape_victim = {
                            anal_impact_evaluation = yes
                            add_anus = yes
                            add_trait = rape_trauma        # mark the victim as raped
            opinion = {
                modifier = rsl_opinion_sexual_disgust
                who = event_target:is_rapist
            }
            
        }
        event_target:is_rapist = {     # calling the character event, you're the scope
            add_trait = rapist
            add_trait = proud
            
        }
        narrative_event = { id = RSLW.8021 }
    }

 

In game, when I choose the option the tool tip correctly displays the random list and corresponding effects but it does not execute them . When I click on the option the only trait the character does receive is rape trauma. I conclude that the event itself works and that the scope is correct but there seems to be a problem with the scripted effects most likely  in impact_evaluation but maybe also in add_anus.

 

add_anus = {
    
    if = {
        limit = { # gigantic
            check_variable = { which = anus_size value = 7 }
        }
        add_trait = gigantic_anus
        set_character_flag = anus
    }
    else_if = {
        limit = { # enormous
            check_variable = { which = anus_size value = 6 }
        }
        add_trait = enormous_anus
        set_character_flag = anus
    }
    else_if = {
        limit = { # huge
            check_variable = { which = anus_size value = 5 }
        }
        add_trait = huge_anus
        set_character_flag = anus
    }
    else_if = {
        limit = { # big
            check_variable = { which = anus_size value = 4 }
        }
        add_trait = big_anus
        set_character_flag = anus
    }
    else_if = {
        limit = { # average
            check_variable = { which = anus_size value = 3 }
        }
        add_trait = regular_anus
        set_character_flag = anus
    }
    else_if = {
        limit = { # small
            check_variable = { which = anus_size value = 2 }
        }
        add_trait = small_anus
        set_character_flag = anus
    }
    else = {
        limit = { # tiny
            check_variable = { which = anus_size value = 1 }
        
        add_trait = tiny_anus
        set_character_flag = anus
    }
}

 

Validator has a problem with the limit in else,

--- Error 1 of 1 ---
At \common\scripted_effects\rsl_scripted_effects.txt [add_anus\else\limit] (Line 2180, column 3):
Invalid node "limit" in scope CharCommand (value is: )
* called from \events\RSLWar.txt [narrative_event\option\event_target:is_rape_victim\add_anus] (Line 778, column ?

 

but I copied this from Ala's mod (where it works fine ) and taking the limit out does not make a difference.

 

What am I doing wrong?

 

PS

 

Sorry for the length of this post. I still haven't figured out how to "hide" my code.

 

 

To put things into a spoiler just use the black button that looks like an eye in between the emoji button and the bulleted button. Either highlight everything and then push it or push it then type/paste into the box that shows up

 

As for your troubles idk, if I had to guess I would say the problem is in the first if = { }. I know that you can compare variables that way but the way I understand it it's meant to be used to compare a global variable with a normal variable. Instead, you are using it to compare two different types of variables on two different people...without scoping to the second person. I just don't think it can work that way.  

 

The limit in the else block at the bottom wont break anything, just never deleted it so if the person didn't have a variable of at least 1 then nothing would happen. The original scripting I copied from before altering Tiny was in an else_if block and the else block had micro trait in it. So if they didn't have a variable at all it would assign the micro trait, which I do not use even though I included it in the mod since everybody else does.

 

Sorry I can't be more helpful then that, between a long hot day in a kitchen and a half a zantac I am pretty fuzzy right now ?

Link to comment

Thanks Alaratt and Abominus!

 

I don't think the first <if >is the problem. Nox developed it and it worked in game in a simpler form and event. I am not sure that it is comparing on two different people. The way I read it  it is comparing a differential between two different people (which has already been computed in the event) with an attribute of one person. This is recognized by the machine, at least according to the tool tip. The problem started after I added the character modifiers and traits in the scripted_effect.

I was hoping the problem was something simple and obvious, like not putting brackets in the right place or forgetting an immediate, stuff  that only I miss ?

Anyhow, I know how to use the spoiler now so thanks!

 

I'll look at the ALoHa code now.

Link to comment

you can compare two variables on two people with the syntax 'check_variable = { which = 'a' which '~' 'b' which = c }' where 'a' is the name of thw first variable, '~' is = or < or > or... and 'c' is the other scope.

 

(Note: maybe I am misremembering and '~' can only be '=')

Link to comment

According to the wiki

 

  • Custom tooltips: simplifies some complex or hard to read effects, by replacing the tooltip content with a custom localized text.
custom_tooltip = { text = runestone_carved }


 

Spoiler

 

I have added a custom_tool tip to my event

 

narrative_event = {
    id = RSLTest.250
    desc = "RSLVisits250"
    picture = visit_male_female_bottom
    
    is_triggered_only = yes # by targeted_ decision

    immediate = {    
        ROOT = {
            save_event_target_as = dick_person
            set_variable = { which = size_differential  which = dick_size }
        }
        FROM = {
            save_event_target_as = anus_person
            set_variable = { which = size_differential  value = 0 }
            change_variable = { which = size_differential which = event_target:dick_person }
        }
        log = "testing RSL code..."
        print_scope_effect = yes
    }
    option = {
        name = rsl_option_hurt
        custom_tooltip = { text = rsl_evaluate_impact }
        event_target:anus_person = {
            impact_evaluation = yes
            update_anus = yes
        }
    }
}

 

 

The custom_tooltip correctly appears when hovering over the option bar, however, the original tooltip isn't replaced but remains visible. What am I doing wrong?

Link to comment
1 hour ago, joemann said:

According to the wiki

 

  • Custom tooltips: simplifies some complex or hard to read effects, by replacing the tooltip content with a custom localized text.

custom_tooltip = { text = runestone_carved }


 

  Hide contents

 

I have added a custom_tool tip to my event

 

narrative_event = {
    id = RSLTest.250
    desc = "RSLVisits250"
    picture = visit_male_female_bottom
    
    is_triggered_only = yes # by targeted_ decision

    immediate = {    
        ROOT = {
            save_event_target_as = dick_person
            set_variable = { which = size_differential  which = dick_size }
        }
        FROM = {
            save_event_target_as = anus_person
            set_variable = { which = size_differential  value = 0 }
            change_variable = { which = size_differential which = event_target:dick_person }
        }
        log = "testing RSL code..."
        print_scope_effect = yes
    }
    option = {
        name = rsl_option_hurt
        custom_tooltip = { text = rsl_evaluate_impact }
        event_target:anus_person = {
            impact_evaluation = yes
            update_anus = yes
        }
    }
}

 

 

The custom_tooltip correctly appears when hovering over the option bar, however, the original tooltip isn't replaced but remains visible. What am I doing wrong?

You need to put the effects you want to hide inside the custom tooltip, as in custom_tooltip = { text = xyz <put effects to be hidden here> }

Link to comment

Whereby I suppose xyz = the text of the  new tool tip, i.e. the text I want to see, and < effects to be hidden > = the name of the scripted_triggers,  in my case impact_evaluation and update_anus ?

 

So this would read custom_tooltip = { text = rsl_eveluate_impact  <impact_evaluation> < update_anus> } ?

 

 

 

 

Link to comment

Tried this:

option = {
        name = rsl_option_hurt
        custom_tooltip = {
                        text = rsl_evaluate_impact
                        hidden_tooltip = { event_target:anus_person = {
                                                    impact_evaluation = yes
                                                    update_anus = yes }
                                        }
                    }    
        event_target:anus_person = {
            impact_evaluation = yes
            update_anus = yes
        }
    }

 

I can still read both the new tooltip (evaluate_impact) and the hidden ones.

Link to comment

Here is how I would do it.

 

option = {
        name = rsl_option_hurt
        custom_tooltip = {
                 text = rsl_evaluate_impact
                 hidden_tooltip = {

                           event_target:anus_person = {
                                    impact_evaluation = yes
                                    update_anus = yes

                           }

                   }

         }

}

 

Having it twice the way you do is why you still see impact_evaluation and update_anus.

Link to comment

Thanks Ala! It worked. As always obvious once you know ?

 

By the way, I got my scripted effect working. There was a bracket in the wrong place but it took me a couple of days to find it.

 

I have another question: is it possible to repeat a scripted effect cumulatively in the same event, and if yes how?

 

As an example, I would like to apply your scripted effect "anus_grows" as follows:


 

Spoiler

 

narrative_event = {
    id = RSLVisits.1321
    desc = "RSLVisits1321"
    picture = visit_male_female_bottom
    title = rsl_spending_time
    
    is_triggered_only = yes # Triggered from .132
    immediate = {    
        ROOT = {
            save_event_target_as = dick_person
            set_variable = { which = size_differential  which = dick_size }
        }
        event_target:rsl_visit_target = {
        
            set_variable = { which = size_differential  value = 0 }
            change_variable = { which = size_differential which = event_target:dick_person }
        }
        
    }

    option = {
        name = rsl_rough
        custom_tooltip = {
                        text = rsl_evaluate_impact
                        hidden_tooltip = {
                                        event_target:rsl_visit_target = {
                                                                anal_impact_evaluation = yes
                                                                update_anus = yes
                                                    }            
                                        }
            }    
                        
        
    }
    option = {
        name = rsl_prepare_her_1
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }        
        
        narrative_event = { id = RSLVisits.1323 }
    }
    option = {
        name = rsl_prepare_her_2
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }                        
        narrative_event = { id = RSLVisits.1323 }    
    }
    option = {
        name = rsl_prepare_her_3
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }                                                
        narrative_event = { id = RSLVisits.1323 }    
    }
}

 

The idea being that in the second option the anus should grow two sizes and in the third option three sizes.


 

Spoiler

 

I also enclose the scripted effect!

anus_grows = {
    if = {
        limit = {
            trait = enormous_anus
        }
        add_trait = gigantic_anus
        set_variable = { which = anus_size value = 7 }
    }
    if = {
        limit = {
            trait = huge_anus
        }
        add_trait = enormous_anus
        set_variable = { which = anus_size value = 6 }
    }
    if = {
        limit = {
            trait = big_anus
        }
        add_trait = huge_anus
        set_variable = { which = anus_size value = 5 }
    }
    if = {
        limit = {
            trait = regular_anus
        }
        add_trait = big_anus
        set_variable = { which = anus_size value = 4 }
    }
    if = {
        limit = {
            trait = small_anus
        }
        add_trait = regular_anus
        set_variable = { which = anus_size value = 3 }
    }
    if = {
        limit = {
            trait = tiny_anus
        }
        add_trait = small_anus
        set_variable = { which = anus_size value = 2 }
    }
}

 


 

 

Link to comment
1 hour ago, joemann said:

 

I have another question: is it possible to repeat a scripted effect cumulatively in the same event, and if yes how?

 

The idea being that in the second option the anus should grow two sizes and in the third option three sizes.

 

 

I have never tried it like that but it would probably work.

 

Personally I would use change_variable then use update_anus.


 

Spoiler

 


narrative_event = {
    id = RSLVisits.1321
    desc = "RSLVisits1321"
    picture = visit_male_female_bottom
    title = rsl_spending_time
    
    is_triggered_only = yes # Triggered from .132
    immediate = {    
        ROOT = {
            save_event_target_as = dick_person
            set_variable = { which = size_differential  which = dick_size }
        }
        event_target:rsl_visit_target = {
        
            set_variable = { which = size_differential  value = 0 }
            change_variable = { which = size_differential which = event_target:dick_person }
        }
        
    }

    option = {
        name = rsl_rough
        custom_tooltip = {
                        text = rsl_evaluate_impact
                        hidden_tooltip = {
                                        event_target:rsl_visit_target = {
                                                                anal_impact_evaluation = yes
                                                                update_anus = yes
                                                    }            
                                        }
            }    
                        
        
    }
    option = {
        name = rsl_prepare_her_1
        event_target:rsl_visit_target = {
                                        change_variable = { which = anus_size value = 1

                                        update_anus = yes
                                }        
        
        narrative_event = { id = RSLVisits.1323 }
    }
    option = {
        name = rsl_prepare_her_2
        event_target:rsl_visit_target = {
                                       change_variable = { which = anus_size value = 2

                                       update_anus = yes
                                }                 
        narrative_event = { id = RSLVisits.1323 }    
    }
    option = {
        name = rsl_prepare_her_3
        event_target:rsl_visit_target = {
                                      change_variable = { which = anus_size value = 3

                                      update_anus = yes
                                }                                        
        narrative_event = { id = RSLVisits.1323 }    
    }
}

 

 

Link to comment
2 hours ago, joemann said:

As an example, I would like to apply your scripted effect "anus_grows" as follows:


 

  Reveal hidden contents

 

narrative_event = {
    id = RSLVisits.1321
    desc = "RSLVisits1321"
    picture = visit_male_female_bottom
    title = rsl_spending_time
    
    is_triggered_only = yes # Triggered from .132
    immediate = {    
        ROOT = {
            save_event_target_as = dick_person
            set_variable = { which = size_differential  which = dick_size }
        }
        event_target:rsl_visit_target = {
        
            set_variable = { which = size_differential  value = 0 }
            change_variable = { which = size_differential which = event_target:dick_person }
        }
        
    }

    option = {
        name = rsl_rough
        custom_tooltip = {
                        text = rsl_evaluate_impact
                        hidden_tooltip = {
                                        event_target:rsl_visit_target = {
                                                                anal_impact_evaluation = yes
                                                                update_anus = yes
                                                    }            
                                        }
            }    
                        
        
    }
    option = {
        name = rsl_prepare_her_1
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }        
        
        narrative_event = { id = RSLVisits.1323 }
    }
    option = {
        name = rsl_prepare_her_2
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }                        
        narrative_event = { id = RSLVisits.1323 }    
    }
    option = {
        name = rsl_prepare_her_3
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }
        event_target:rsl_visit_target = {
                                        anus_grows = yes
                                }                                                
        narrative_event = { id = RSLVisits.1323 }    
    }
}

 

 

 

You do not need to repear the target 4 times, simply call the scripted effect 4 times:
 

       event_target:rsl_visit_target = {
                                        anus_grows = yes
                                        anus_grows = yes
                                        anus_grows = yes
                                        anus_grows = yes
                                }                                

 

You could also set a variable something like "TimeToGrowth" and have the scripted effect use it. But that makes using your scripted effect a bit more complicated. So unless you plan on calling it 10 or more times in a row, I believe this solution is a bit simpler.

 

 

 

Link to comment

Alaratt and Colemann thanks for your help.

 

Here is another quick question. Because I am using the Alabody mod, I have the different body traits showing in game. I thought it would be nice to replace the female body trait with a pregnant_body trait during pregnancy. This works fine with an on_pregnancy on_action event. However, I tried to switch back to the normal body_shape using an on_birth or on_post_birth (what is the difference?) on action event, and here I run into a problem. I think it is a scope problem because the   ROOT in these on_action events is the baby.

I have tried to use <mother> as the scope (I have seen this in other mods)  but the wiki states that this scope refers to the characters mother whereas I want to address the baby's mother. Would FROM work?

 

Spoiler

#    Female Body Shape @ on_pregnancy
character_event = {
    id = RSLB.125
    is_triggered_only = yes  #by on_action
    hide_window = yes
    trigger = {
        
        is_female = yes
        is_pregnant = yes
        NOT = {
            has_character_flag = has_pregnant_body_shape
        }
    }
    immediate = {
        
            add_trait = pregnant_body
            set_character_flag = has_pregnant_body_shape
            clear_character_flag = shape
            set_variable = { which = shape_size which = ROOT }
            export_to_variable = ( which = number_of_pregnancies value = num_of_children who = ROOT }
        }
    }
    
#    Female Body Shape @ on_post_birth
character_event = {
    id = RSLB.126        ROOT is baby
    is_triggered_only = yes  #by on_action
    hide_window = yes
    trigger = {
            mother = {
                    is_female = yes
                    has_character_flag = has_pregnant_body_shape
        }
    }
     immediate = {
                mother = {
                    remove_trait = pregnant_body
                    shape_impact_evaluation = yes
                    add_f_shape = yes
                    clr_character_flag = has_pregnant_body_shape
                    set_character_flag = shape
                }    
        }
}

The variables are there because I am working on a scripted_effect which could change the previous body shape after pregnancy depending on different criteria, but first I have to get the on_birth event working.

 

All help is welcome!

Link to comment

If you use variables do the  rules for numeric operators apply?

 

Example:  check_variable = { number_of_pregnancies value = 1 }

 

Does "value  = 1" mean equal to 1 or greater or equal to 1 ?

 

I would like it to mean greater or equal to one but the use of > is not accepted by Validator

 

value = 0 gets me

 

--- Error 1 of 1 ---
Parse Failure
Path: <mod>\common\scripted_effects\rsl_ scripted effects1.txt
Approximate location: Line 231, column 51
Error: Token "=" at line 231, column 51 is part of a list and thus must be a literal.

 

I am using this in a limit block, it is not part of a list

 

Link to comment
On ‎8‎/‎2‎/‎2018 at 5:20 AM, joemann said:

I have tried to use <mother> as the scope (I have seen this in other mods)  but the wiki states that this scope refers to the characters mother whereas I want to address the baby's mother. Would FROM work?

I tried something like that once and had problems figuring it out myself. Maybe if you have a second event launch for ROOT after the on-action event it will scope to the correct mother....maybe.

 

I think ETOS uses a yearly pulse to detect if no longer pregnant but has lactating breasts then they are removed. Probably more accurate that way anyway since lactation should last for at least a few months after birth anyway since the point is to feed the baby. Body size for women after giving birth does kind of work the same way, takes time for the weight to go away, if it ever does.

 

On ‎8‎/‎3‎/‎2018 at 12:02 PM, joemann said:

Does "value  = 1" mean equal to 1 or greater or equal to 1 ?

It will return true if the value is greater or equal to 1

Link to comment

Thanks, also I have another question that was propably asked sometime somewhere but I couldnt find anything...

Is it possible to restrict opinion modifier from traits or artifacts to a certain people? For example lets say that I make an artifact that gives sex_appeal_opinion = 20 but I want it to only apply to females of my dynasty, could it be done in any way?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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