Jump to content

Recommended Posts

I need some scripting help.

In an event, why does this work:

 

Spoiler

option = { #Go to Shock Pose left-side
        name = test_visit.3.b
        scope:actor = { add_stress = minor_stress_impact_loss }
        trigger_event = test_visit.5
    }

but  in the same event, this does not:

Spoiler

option = { #
        name = test_visit.3.a
        scope:actor = { change_variable = { name = arousal_level add = 1 }}
        trigger_event = test_visit.5
        
    }

I checked that scope:actor had the arousal_level variable.

 

In the same order:

 

In a gene_modifier,why does this work:

Spoiler

weight = {
            base = 0
            modifier = {
                add = 100
                has_trait = dick_small_3
            }
        }

but not this;

Spoiler

weight = {
            base = 0
            modifier = {
                add = 100
                var:arousal_level > 2
            }
        }

 

Link to comment

How serious should I take the error_log? I spend half of my time trying to understand what it says and trying to repair "errors" in code which work in practice.

This game is seriously missing a Validator.

 

Compared to CK2 I find the Jommini language hard to understand and the lack of documentation doesn't help.

 

I just spent hours trying to get an event which worked ( and which I corrected following an error message in the error_log which made sense ).

The event works now with a manifest error. I'm completely lost and really frustrated.

Judge for yourself;

 

This works:

Spoiler

test_visit.1000 = {
    hidden = yes
    immediate = {            
                if = {                                                # unwilling
                    limit = {
                        scope_recipient = {            
                                        OR = {
                                            has_character_modifier = menstruating
                                            AND = {
                                                has_trait = chaste
                                                var:current_sex_drive < = 2
                                            }
                                        }    
                                        NOR = {    
                                            has_trait = lustful
                                            var:current_sex_drive value > = 4                                     
                                        }
                        }                        
                    }
                    trigger_event = test_visit.1100
                }
                else_if = {                                            # enthousiastic
                        limit = {
                            scope_recipient = {
                                            OR = {
                                                has_character_modifier = ovulating
                                                AND = {
                                                    has_trait = lustful
                                                    var:current_sex_drive > = 2
                                                }
                                            }    
                                            NOR = {    
                                                has_trait = chaste
                                                var:current_sex_drive value < = 2
                                                has_character_modifier = menstruating
                                            }                                    
                            }
                        }    
                        trigger_event = test_visit.1200
                }
                else = { trigger_event = test_visit.1300 }                # conceding    
    }            
}           

 

and this doesn't:

Spoiler

test_visit.1000 = {
    hidden = yes
    immediate = {            
                if = {                                                # unwilling
                    limit = {
                        scope:recipient = {            
                                        OR = {
                                            has_character_modifier = menstruating
                                            AND = {
                                                has_trait = chaste
                                                var:current_sex_drive < = 2
                                            }
                                        }    
                                        NOR = {    
                                            has_trait = lustful
                                            var:current_sex_drive value > = 4                                     
                                        }
                        }                        
                    }
                    trigger_event = test_visit.1100
                }
                else_if = {                                            # enthousiastic
                        limit = {
                            scope:recipient = {
                                            OR = {
                                                has_character_modifier = ovulating
                                                AND = {
                                                    has_trait = lustful
                                                    var:current_sex_drive > = 2
                                                }
                                            }    
                                            NOR = {    
                                                has_trait = chaste
                                                var:current_sex_drive value < = 2
                                                has_character_modifier = menstruating
                                            }                                    
                            }
                        }    
                        trigger_event = test_visit.1200
                }
                else = { trigger_event = test_visit.1300 }                # conceding    
    }            
}           

Scope_recipient is wrong but it works in practice. scope:recipient is the correct syntax but it breaks the event chain. WTF?

Link to comment

I want to implement virginity in my mod (either as a  an invisible trait or as a variable) seeding it to all in game characters on game startup and on birth.. I need to find a mechanism to remove virginity after intercourse ( of which there seems to be a lot going on behind the screens in this game  ). 

 

The vanilla game has a scripted effect :

 

intercourse_with_character_effect = {
 $INTERCOURSE_CHARACTER$ = { add_gold = 1 }
}

 

which according to a comment in the file should cover " #Effects to run in events when intercourse takes place (pregnancy and SDT chance) " Losing virginity would be one of these effects.

 

My question is does anyone have experience with this effect?

 

I am wondering if the vanilla game uses it as intended since it is only used  4 times in the vanilla game in one event file.

 

What does  the use of capital letters signify?

 

I don't understand the { add_gold = 1 } effect, you would expect pregnancy or STD's

 

Any insights would be appreciated.

Link to comment
23 hours ago, joemann said:

I want to implement virginity in my mod (either as a  an invisible trait or as a variable) seeding it to all in game characters on game startup and on birth.. I need to find a mechanism to remove virginity after intercourse ( of which there seems to be a lot going on behind the screens in this game  ). 

 

The vanilla game has a scripted effect :

 

intercourse_with_character_effect = {
 $INTERCOURSE_CHARACTER$ = { add_gold = 1 }
}

 

which according to a comment in the file should cover " #Effects to run in events when intercourse takes place (pregnancy and SDT chance) " Losing virginity would be one of these effects.

 

My question is does anyone have experience with this effect?

 

I am wondering if the vanilla game uses it as intended since it is only used  4 times in the vanilla game in one event file.

 

What does  the use of capital letters signify?

 

I don't understand the { add_gold = 1 } effect, you would expect pregnancy or STD's

 

Any insights would be appreciated.

I think you might be looking for had_sex_with_effect instead.

Link to comment
  • 2 weeks later...

I am  getting an error log message which I don't understand:

Spoiler

11:55:49][jomini_script_system.cpp:169]: Script system error!
  Error: set_variable effect [ Provided name flag resulted in error flag ]
  Script location: file:  file: events/test_libido_initialization_events.txt line: 29; update_male_libido line: 38
[11:55:49][jomini_effect.cpp:124]: PostValidate of effect 'set_variable' returned false at  file:  file: events/test_libido_initialization_events.txt line: 29; update_male_libido line: 38

It refers to the following script:

Spoiler

# update_male_libido
update_male_libido = {
                scope:receiver = {
                                if = {
                                    limit =  {
                                            is_male = yes    
                                            NOT = {
                                                has_trait = eunuch
                                            }
                                            age > 12
                                            age <= 30
                                            has_male_libido_positives = yes                                                                                                                                        
                                    }                                                                                                          
                                    set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive }            
                                    change_variable = { name = current_sex_drive multiply = 1.5 }                
                                    
                                }
                                if = {
                                        limit =  {    
                                            is_male = yes
                                            NOT = {
                                                has_trait = eunuch
                                            }
                                            age > 12
                                            age <= 30
                                            has_male_libido_negatives = yes
                                    }                                                                  
                                    set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive }            
                                    change_variable = { name = current_sex_drive multiply = 0.6 }
                                }
                                if = {
                                    limit =  {
                                            is_male = yes
                                            NOT = {
                                                has_trait = eunuch
                                            }
                                            age > 12
                                            age <= 30                                                                                                                                    
                                    }                                                                                                                      
                                    set_variable = { value = current_sex_drive value = scope:receiver.var:basic_sex_drive }            
                                    change_variable = { name = current_sex_drive multiply = 1.1 }                
                                    
                                }

                                if = {
                                    limit =  {
                                            is_male = yes
                                            NOT = {
                                                has_trait = eunuch
                                            }
                                            age > 30
                                            age <= 40
                                            has_male_libido_positives = yes
                                    }                                                              
                                    set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive }            
                                    change_variable = { name = current_sex_drive multiply = 1.6 }
                                }    
                                if = {
                                        limit =  {
                                            is_male = yes
                                            NOT = {
                                                has_trait = eunuch
                                            }
                                            age > 30
                                            age <= 40
                                            has_male_libido_negatives = yes
                                    }                                                                  
                                    set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive }            
                                    change_variable = { name = current_sex_drive multiply = 0.7 }
                                }
                                if = {
                                    limit =  {
                                            is_male = yes
                                            NOT = {
                                                has_trait = eunuch
                                            }
                                            age > 30
                                            age <= 40
                                    }                                                              
                                    set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive  }            
                                    change_variable = { name = current_sex_drive multiply = 1.2 }
                                }
                                if = {
                                    limit =  {
                                            is_male = yes
                                            NOT = {
                                            has_trait = eunuch
                                            }
                                            age > 40
                                            age <= 50
                                            has_male_libido_positives = yes
                                    }                                                              
                                    set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive  }            
                                    change_variable = { name = current_sex_drive multiply = 1.1 }
                                }
                                if = {
                                    limit =  {
                                            is_male = yes
                                            NOT = {
                                                has_trait = eunuch
                                            }
                                            age > 40
                                            age <= 50
                                            has_male_libido_negatives = yes
                                    }                                                                  
                                    set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive }            
                                    change_variable = { name = current_sex_drive multiply = 0.6 }
                                }
                                if = {
                                    limit =  {
                                            is_male = yes
                                            NOT = {
                                                has_trait = eunuch
                                            }
                                            age > 40
                                            age <= 50
                                    }                                                                  
                                    set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive }            
                                    change_variable = { name = current_sex_drive multiply = 0.9 }
                                }
                                if = {
                                    limit =  {
                                            is_male = yes
                                            NOT = {
                                                has_trait = eunuch
                                            }
                                            age > 50
                                            age <= 60
                                            has_male_libido_positives = yes
                                    }                                                                  
                                    set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive }            
                                    change_variable = { name = current_sex_drive multiply = 0.6 }
                                }    
                                if = {
                                    limit =  {
                                            is_male = yes
                                            NOT = {
                                                has_trait = eunuch
                                            }
                                            age = 60
                                            has_male_libido_negatives = yes
                                    }                                                                  
                                    set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive }            
                                    change_variable = { name = current_sex_drive multiply = 0.2 }
                                }
                                if = {
                                    limit =  {
                                            is_male = yes
                                            NOT = {
                                                has_trait = eunuch
                                            }
                                            age > 50
                                            age <= 60
                                    }                                                                  
                                    set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive }            
                                    change_variable = { name = current_sex_drive multiply = 0.4 }
                                }
                                if = {
                                    limit = {
                                            NOT = {
                                                is_female = yes    
                                            }
                                            has_trait = eunuch
                                    }        
                                    set_variable = { name = current_sex_drive value = 0 }            
                                }
                                clamp_variable = { name = current_sex_drive max = 10 min = -10 }
                }
}

But only in the first three blocks. In game, only male characters between age 13 - 30 get the Flag error (although the value is correctly reproduced. Males over age 30 get both the flag and the valueI have basically the same code for female characters and there the problem does not occur.

 

Does anyone know what could cause this?

Link to comment

I solved the problem by replacing the line:

 

set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive }  in all three blocks

 

with the same line of the fourth block:

 

 set_variable = { name = current_sex_drive value = scope:receiver.var:basic_sex_drive }

 

I now see what was wrong

 

I need new glasses ?

Link to comment
  • 2 years later...
  • 4 months later...
On 10/20/2019 at 10:36 PM, cniht said:

I just hope we don't take a big step backwards from where CK 2 is when CK 3 hits. 

 

However, that hope is likely not going to come to pass and as others have said we'll need to wait 2  years and 10 dlcs before we get a full game and then we'll eventually get to 50 DLCs and $500 price tag (retail) before we obtain the full planned experience.

Here in Anno Domini 2023 and there was no plan, not even a vague general direction, just a series of vaguely good ideas stitched together by what seems to be an 1800s surgeon coked out of his gourd into something vaguely resembling an actual Grand Strategy Role Playing Game

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