Jump to content

CK2 Modding Quick Question Thread


Recommended Posts

16 hours ago, Mr_Treason said:

I'm trying to get a grip on removing some opinion modifiers.  I apply these opinion modifiers through the course of some events, and this event will eventually remove them should the player reach this point.. 

In the option of the event below, the trait is getting assigned, as well as the first opinion, but the subsequent remove_opinion's aren't working.  Any insight?

 

 

I couldn't figure out why it wasn't working, but doing it in a different manner worked.  I wanted to follow up and post in case anyone ran into an issue with it as well...

Quote

option = {
        name = TTContentTorture4000a
            event_target:TT_torture_recipient = { remove_opinion = { who = ROOT modifier = opinion_TT_ttrack_me } }
            event_target:TT_torture_recipient = { remove_opinion = { who = ROOT modifier = opinion_TT_ttwhipped_me } }
            event_target:TT_torture_recipient = { remove_opinion = { who = ROOT modifier = opinion_TT_ttstocks_me } }
    }
 

I just went the opposite route with it and had it fire the remove_opinion from the assailants point of view.  Now all is well with the world.  **Note on the previous version I had tried to use ROOT as my scope but it wouldn't work for my "who".  It seems to this way, so I'm not going to keep asking questions, I'm just moving on.

Link to comment

As a followup.  My initial method was working just fine.  I simply hadn't un-paused, which apparently you have to do for the opinion modifier removals to display.  So we'll chalk that up to ignorance.  I wanted to highlight my mistake though to hopefully prevent others from doing the same.

Link to comment
  • 1 month later...

I've a question. :smile:

 

I see in the wiki, where there is the command to remove_character_modifiers - and the description mentions it's used in removing character modifiers that stack.

 

I looked at the character modifier that is used in the example - and I see no indication that it's stackable.

 

I've searched for clarification on how to make a character modifier stackable - or whether they're stackable by default, and I've not found anything. I'm also curious if by stacking - any bonuses in the modifier would be cumulative with each one added to the stack.

 

Has anyone messed with stacking character modifiers that can answer this please?

Link to comment
On 3/12/2018 at 10:47 AM, dewguru said:

I've a question. :smile:

 

I see in the wiki, where there is the command to remove_character_modifiers - and the description mentions it's used in removing character modifiers that stack.

 

I looked at the character modifier that is used in the example - and I see no indication that it's stackable.

 

I've searched for clarification on how to make a character modifier stackable - or whether they're stackable by default, and I've not found anything. I'm also curious if by stacking - any bonuses in the modifier would be cumulative with each one added to the stack.

 

Has anyone messed with stacking character modifiers that can answer this please?

From what I've seen, positive opinion modifiers don't stack, but negative ones do?  

I'm afraid I don't have enough experience working with them to be of more help than that.

Link to comment

I have made a targeted decision involving three characters. I would like to have all three portraits  in the narrative screen, but I only get the decision taker and the target, not the third party.

 

Is it possible to have all three pic's, and if so how?

Link to comment
On 12/3/2018 at 4:47 PM, dewguru said:

I've a question. :smile:

 

I see in the wiki, where there is the command to remove_character_modifiers - and the description mentions it's used in removing character modifiers that stack.

 

I looked at the character modifier that is used in the example - and I see no indication that it's stackable.

 

I've searched for clarification on how to make a character modifier stackable - or whether they're stackable by default, and I've not found anything. I'm also curious if by stacking - any bonuses in the modifier would be cumulative with each one added to the stack.

 

Has anyone messed with stacking character modifiers that can answer this please?

 

Stacking modifiers are easy. To make a modifier be stacking you just do add_(type)_modifier = { modifier = x duration = y stacking = yes }

And yes, any bonus would stack. So if you have three instances of a modifier adding +2 martial, the character would get +6 martial in total.

Only downside I find in them is that you get the modifier bar crowded, since you get an extra icon for each extra instance of the modifier.

Link to comment
22 hours ago, ngppgn said:

 

Stacking modifiers are easy. To make a modifier be stacking you just do add_(type)_modifier = { modifier = x duration = y stacking = yes }

And yes, any bonus would stack. So if you have three instances of a modifier adding +2 martial, the character would get +6 martial in total.

Only downside I find in them is that you get the modifier bar crowded, since you get an extra icon for each extra instance of the modifier.

Ah, that's not quite what I was hoping for then - in terms of how it's displayed. I was hoping it'd just use one icon, and just track stacks with modifiers.

Link to comment

I have a question about random_list.

 

I thought that the numbers you put in are the percentage chance of the occurrence happening. To give an example:

 

narrative_event = {
    id = RSLS.443
    title = rsl_aggressive
    desc = RSLS443
    picture = share_slave_cane

    is_triggered_only = yes

    option = {
        name = rsl_option_hurt
    FROM = {
        random_list = {
        30 = {    # the experience has let you discover your penchant for cruelty
            add_trait = cruel
            opinion = {
                modifier = rsl_opinion_intimidated  # you fear and admire this guy
                who = FROMFROM
                
                }
            }
        70 = { # although you dont think you are cruel, the experience has struck a cord and you feel frustrated
        add_character_modifier = {
                modifier = rsl_still_wanting_more
                days = 180
                 }
        opinion = {
            modifier = rsl_opinion_something_really_different
            who = FROMFROM
                }
        
            }
        
        }
    }

etc

 

In this case I thought there was a 30% chance of the trait cruel being added and a 70% chance that the character modifier will be applied. In practice the trait is always added. So is my understanding of random_list wrong or am I just coding it wrong ?

 

 

Link to comment
5 hours ago, dewguru said:

Ah, that's not quite what I was hoping for then - in terms of how it's displayed. I was hoping it'd just use one icon, and just track stacks with modifiers.

That can be done also but it takes a wee bit more code.  You make the first instance of the modifier visible and then all additional ones hidden.  Here is the test code I was using to try the concept out to see if it even worked:

	immediate = {
		add_character_modifier = {
			name = nox_in_heat
			duration = -1
			stacking = yes
		}
		add_character_modifier = {
			hidden = yes
			name = nox_in_heat
			duration = -1
			stacking = yes
		}
		add_character_modifier = {
			hidden = yes
			name = nox_in_heat
			duration = -1
			stacking = yes
		}
	}

 

When you hover over the one visible indicator, it only gives you the values for a single instance:

image.thumb.png.16de27b767ecc61115f772f0af56e6db.png

 

 

But when you hover over something that is affected, you see the multiple instances affecting it:

image.thumb.png.8663813cbcc7b76e3ad311943ed59117.png

 

 

Also, when removing modifiers you can remove any number of them or all of them at once:

remove_character_modifier = nox_in_heat	# removes all
remove_character_modifiers = { modifier = nox_in_heat amount = 1 }	# decreases stack by 1

 

Link to comment
4 hours ago, joemann said:

I have a question about random_list.

 

I thought that the numbers you put in are the percentage chance of the occurrence happening. To give an example:

 

narrative_event = {
    id = RSLS.443
    title = rsl_aggressive
    desc = RSLS443
    picture = share_slave_cane

    is_triggered_only = yes

    option = {
        name = rsl_option_hurt
    FROM = {
        random_list = {
        30 = {    # the experience has let you discover your penchant for cruelty
            add_trait = cruel
            opinion = {
                modifier = rsl_opinion_intimidated  # you fear and admire this guy
                who = FROMFROM
                
                }
            }
        70 = { # although you dont think you are cruel, the experience has struck a cord and you feel frustrated
        add_character_modifier = {
                modifier = rsl_still_wanting_more
                days = 180
                 }
        opinion = {
            modifier = rsl_opinion_something_really_different
            who = FROMFROM
                }
        
            }
        
        }
    }

etc

 

In this case I thought there was a 30% chance of the trait cruel being added and a 70% chance that the character modifier will be applied. In practice the trait is always added. So is my understanding of random_list wrong or am I just coding it wrong ?

 

 

Your random_list looks setup correctly and with only two variables totalling 100 like this, it should be 30%/70% chances.  For testing make it more extreme with 1%/99% and try it a few times.  If it continues to fail, then there is probably something somewhere else in your code breaking it.

Link to comment

Thank you for the answer. I got it working! Now I am trying something more ambitious and I have another question involving random_list.

 

I am trying to fire different narrative_events based on the personality of the characters. For this I am using as a basis their character focus (example: scholarship ) but I want to randomize the probable outcome based on personality traits. A character with scholarship would predominantly act in a certain way, but this could change because he posses  certain traits (example cruel ) that push him in a different direction.

I have written this as follows (this is only the first < if > but validator has a problem with my use of random list. Before I start writing up the code for the other nine < if's>. Could somebody please tell me if this can work?

 

narrative_event = {
    id = RSLS.44
    title = rsl_sharing
    desc = RSLS44
    picture = share_slave
    
    is_triggered_only = yes # targetted_decision
    immediate = {

    # FROM = target, FROMFROMFROM = slave , FROMFROM and ROOT = player
    FROMFROMFROM = { save_event_target_as = rsl_slave_target }
    
FROM = {
        if = {
            limit = { has_focus = focus_scholarship
            random_list = {
                40 = {                        # prefer to watch
                modifier = {
                        factor = 2                        
                        FROM = {
                            OR = { trait = humble
                                   trait = shy }
                            }
                        }
                modifier = {
                        factor = -1                        
                        FROM = {
                            OR = { trait = chaste
                                   trait = zealous }
                        }
                
                    }            
                FROM = { narrative_event = { id = RSLS.441 }}
                }
                10 = {                        # Which side would you prefer?
                modifier = {
                        factor = 2
                        FROM = {
                            OR = {    trait = hedonist
                                    trait = gluttonous
                                     trait = lustful
                                     trait = greedy
                                     trait = gregarious
                                    trait = cynical }
                                }
                        }
                modifier = {
                        factor = -1                        
                        FROM = {
                            OR = { trait = chaste
                                   trait = humble
                                   trait = zealous    }
                                
                        }
                }
                FROM = { narrative_event = { id = RSLS.442 }}
                }
                10 = {                        # I want to hear her scream!
                modifier = {
                        factor = 2
                        FROM = {
                            OR = {  trait = wroth
                                   trait = envious
                                   trait = zealous
                                   trait = cruel }
                            }
                    }
                modifier = {
                        factor = -1
                        FROM = {
                            OR = { trait = kind
                                   trait = charitable
                                   trait = temperate }
                            }
    
                        }
                FROM = { narrative_event = { id = RSLS.443 }}
                }
                5 = {                        # leave angry
                modifier = {
                        factor = 2
                        FROM = {
                            OR = {  trait = proud
                                    trait = paranoid
                                    trait = zealous }
                                    
                            }
                    }
                modifier = {
                        factor = -1
                        FROM = {
                            OR = { trait = shy
                                   trait = humble
                                   trait = temperate }
                            }
    
                        }
                FROM = { narrative_event = { id = RSLS.444 }}
                }    
                35 = {                        # no thank you
                FROM = { narrative_event = { id = RSLS.445 }}
                }
                break = yes
            }
                                
        }
    }
                                
        if = {

Link to comment
4 hours ago, joemann said:

Thank you for the answer. I got it working! Now I am trying something more ambitious and I have another question involving random_list.

 

I am trying to fire different narrative_events based on the personality of the characters. For this I am using as a basis their character focus (example: scholarship ) but I want to randomize the probable outcome based on personality traits. A character with scholarship would predominantly act in a certain way, but this could change because he posses  certain traits (example cruel ) that push him in a different direction.

I have written this as follows (this is only the first < if > but validator has a problem with my use of random list. Before I start writing up the code for the other nine < if's>. Could somebody please tell me if this can work?

 

Use "factor = 0" instead of "factor = -1" to stop an option from happening.

Link to comment

Thanks for the input. I made the changes and also took out the break = yes . Validator didn't like them. I had an <else> at the end of my if>'s which I also took out.

 

Tested it in game but only got one targeted character  that fired an event. With  all the other targets the event  did not go off.

 

The target that fired the event was the heir to the throne , all the others were courtiers or simple vassals. I am now wondering if only some in game characters have a focus.

 

I just checked in  the charinfo screen. The characters that fire events are AI controlled = yes, all the others are AI controlled = no . Don't know what that means but I am afraid that the  AI = no characters do not have a focus and then my idea to use focus as a condition won't work. Anybody know more about this?

Link to comment

I have another question (sorry!)

 

Validator is giving me a comment I don't understand. Although my event seems to be running, I do get the feeling the outcomes of the random_list are not right, and maybe it has something to do with the comment (sorry for the length )

 

--- Error 1 of 1 ---
At <mod>\events\RSLShareSlave.txt [narrative_event\immediate\FROMFROMFROM] (Line 20, column 2):
No direct match found for FROMFROMFROM (is the casing correct?). However, other possible matches in scope CharCommand were found.
Left: [ThisChar] Right: [CharCommand] cannot be correct because of left: FROMFROMFROM points to <null>.
However, a Char was expected.
The FROMFROMFROM could not be determined, because the FROMFROM of <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32) could not be determined.
This event , at <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32), must be called from somewhere else, which it is not.
Left: [ThisProv] Right: [ProvCommand] cannot be correct because of left: FROMFROMFROM points to <null>.
However, a Prov was expected.
The FROMFROMFROM could not be determined, because the FROMFROM of <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32) could not be determined.
This event , at <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32), must be called from somewhere else, which it is not.
Left: [ThisTitle] Right: [TitleCommand] cannot be correct because of left: FROMFROMFROM points to <null>.
However, a Title was expected.
The FROMFROMFROM could not be determined, because the FROMFROM of <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32) could not be determined.
This event , at <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32), must be called from somewhere else, which it is not.
Left: [ThisWar] Right: [WarCommand] cannot be correct because of left: FROMFROMFROM points to <null>.
However, a War was expected.
The FROMFROMFROM could not be determined, because the FROMFROM of <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32) could not be determined.
This event , at <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32), must be called from somewhere else, which it is not.
Left: [ThisArtifact] Right: [ArtifactCommand] cannot be correct because of left: FROMFROMFROM points to <null>.
However, a Artifact was expected.
The FROMFROMFROM could not be determined, because the FROMFROM of <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32) could not be determined.
This event , at <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32), must be called from somewhere else, which it is not.
Left: [ThisSociety] Right: [SocietyCommand] cannot be correct because of left: FROMFROMFROM points to <null>.
However, a Society was expected.
The FROMFROMFROM could not be determined, because the FROMFROM of <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32) could not be determined.
This event , at <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\effect\FROM\narrative_event\id] (Line 962, column 32), must be called from somewhere else, which it is not.

 

 

The targetted decision is :

 

rsl_share_slave = {

    filter = sub_realm
    ai_target_filter = self
    third_party_filter = court
    ai_third_party_filter = court
    
    
    potential = {                     # Conditions on the targeted character for the decision to appear
                
                is_marriage_adult = yes
                is_playable = yes

                
                NOR = { trait = incapable
                    trait = slave
                    trait = trained_pleasure_slave
                    trait = broken_in
                    
                    
                    }
            }
    third_party_potential = {
                FROMFROM = {            # Conditions on the third party character to be included in the list
                        is_marriage_adult = yes
                    

                    OR = {
                        trait = slave
                        trait = trained_pleasure_slave
                        trait = broken_in
                    }
                }   
            }        
                
    allow = {
        always = yes
        }
                        
    effect = {
        FROM = { narrative_event = { id = RSLS.44 }}
        
        }
        revoke_allowed = {
                always = no
        }
    ai_will_do = {
        factor = 0.1 # 10% base chance
        }
    }
        
}   

 

The narrative event it triggers starts as follows. The problem I am getting is that although the decision and the events seems to run correctly. It has a preference for one or two outcomes and never turns up the outcome you would expect based on the percentages. It has a strong preference for event 443  but 441 never shows up (even after having increased its weight to 80.

(I changed the factors to 1 and 0 to force the choice but no luck)

 

Could the Validator comment explain this?

 

## Routing determination Shareslave
narrative_event = {
    id = RSLS.44
    title = rsl_sharing
    desc = RSLS44
    picture = share_slave
    
    is_triggered_only = yes # targetted_decision
    immediate = {

    # FROM = target, FROMFROMFROM = slave , FROMFROM and ROOT = player
    FROMFROMFROM = { save_event_target_as = rsl_slave_target }
    
FROM = {
        if = {
            limit = { has_focus = focus_scholarship
                }
            random_list = {
                5 = {                        # prefer to watch: A scholar likes to observe and learn, not a doer , if not observing he is more likely to leave
                modifier = {
                        factor = 1                        
                        FROM = {
                            OR = { trait = humble
                                   trait = shy }
                            }
                        }
                modifier = {
                        factor = 0                        
                        FROM = {
                            OR = { trait = chaste
                                   trait = zealous }
                        }
                
                    }
                
                
                FROM = { narrative_event = { id = RSLS.441 }}
                }
                80 = {                        # Which side would you prefer?
                modifier = {
                        factor = 1
                        FROM = {
                            OR = {    trait = hedonist
                                    trait = gluttonous
                                     trait = lustful
                                     trait = greedy
                                     trait = gregarious
                                    trait = cynical }
                                }
                        }
                modifier = {
                        factor = 1                        
                        FROM = {
                            OR = { trait = chaste
                                   trait = humble
                                   trait = zealous    }
                                
                        }
                }
                FROM = { narrative_event = { id = RSLS.442 }}
                }
                5  = {                        # I want to hear her scream!
                modifier = {
                        factor = 1
                        FROM = {
                            OR = {  trait = wroth
                                   trait = envious
                                   trait = zealous
                                   trait = cruel }
                            }
                    }
                modifier = {
                        factor = 0
                        FROM = {
                            OR = {  trait = kind
                                trait = charitable
                                trait = temperate }
                            }
    
                        }
                FROM = { narrative_event = { id = RSLS.443 }}
                }
                5 = {                        # I leave angry
                modifier = {
                        factor = 2
                        FROM = {
                            OR = {  trait = proud
                                    trait = paranoid
                                    trait = zealous }
                                    
                            }
                    }
                modifier = {
                        factor = 0
                        FROM = {
                            OR = { trait = shy
                                   trait = humble
                                   trait = temperate }
                            }
    
                        }
                FROM = { narrative_event = { id = RSLS.444 }}
                }    
                5 = {                        # no thank you
                modifier = {
                        factor = 1
                        FROM = {
                            OR = {  trait = proud
                                    trait = chaste
                                    trait = slothful
                                    trait = temperate
                                    trait = diligent }
                                    
                            }
                    }
                modifier = {
                        factor = 0
                        FROM = {
                            OR = { trait = lustful
                                   trait = dick_large
                                   trait = dick_huge
                                   trait = dick_horse }
                            }
    
                        }            
                FROM = { narrative_event = { id = RSLS.445 }}
                }
                
            }
                                
        
    }

 

Link to comment

if you put print_scope_effect = yes in your immediate or option blocks, you can see the results in the game.log file and it will verify what scopes are available at that point in the code.  Putting them inside of a scope shows you how they change inside that scope, and so on.  This is an example of what you might see from said command:

[effectimplementation.cpp:18122]: EVENT [769.1.10]:- Printing the current scope -
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- This: Huetlatoani Tezozomoc of the Aztec Empire
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- Root: Bordeaux
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- Prev: Pope Stephanus III
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- PrevPrev: the The Papacy
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- PrevPrevPrev: Bordeaux
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- PrevPrevPrevPrev: Bordeaux
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- From: Bordeaux
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- FromFrom: Bordeaux
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- FromFromFrom: Bordeaux
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- FromFromFromFrom: Bordeaux
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- Event_target:test_target1: 
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- Event_target:test_target2: 
[effectimplementation.cpp:18122]: EVENT [769.1.10]:- Event_target:test_target3: 

 

Link to comment

Thank you for helping I really appreciate your effort. I feel I am making progress in modding thanks to the help I get here, but since I am trying more ambitious things I keep running into new issues.

 

I have added print_scope_effect = yes as follows  ( Is it in the right place? ) :

 

narrative_event = {
    id = RSLS.44
    title = rsl_sharing
    desc = RSLS44
    picture = share_slave
    
    is_triggered_only = yes # targetted_decision
    immediate = {
    print_scope_effect = yes
    # FROM = target, FROMFROMFROM = slave , FROMFROM and ROOT = player
    FROMFROMFROM = { save_event_target_as = rsl_slave_target }
    
FROM = {   #etc, etc

 

But where do I find the game.log file?

 

I don't have one in my mod. The CrusaderKing directory where the mod's are located does have a log directory which contains a game file, but after having added the print_scope command, the game log file does not show anything like the text you show above. Should I look in the console?

 

 

 

Link to comment

Found the solution. Had to enable debugging in my steam launcher. However, the result doesn't really help me understand Validators problem.

 

-----------------------------
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Printing the current scope -
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- This: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Root: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Prev: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- PrevPrev: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- PrevPrevPrev: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- PrevPrevPrevPrev: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- From: Count Eudes of Vexin
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- FromFrom: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- FromFromFrom: Sybille de Normandie
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- FromFromFromFrom: Sybille de Normandie
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Event_target:test_target1:
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Event_target:test_target2:
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Event_target:test_target3:

 

The event chain run's smoothly though and I am getting different results from the random_list so maybe I can ignore Validator on this. It frustrates me that I don't understand what V is getting at :smile:

 

Link to comment
19 minutes ago, joemann said:

Found the solution. Had to enable debugging in my steam launcher. However, the result doesn't really help me understand Validators problem.

 

-----------------------------
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Printing the current scope -
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- This: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Root: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Prev: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- PrevPrev: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- PrevPrevPrev: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- PrevPrevPrevPrev: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- From: Count Eudes of Vexin
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- FromFrom: King Ogier the Chaste
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- FromFromFrom: Sybille de Normandie
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- FromFromFromFrom: Sybille de Normandie
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Event_target:test_target1:
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Event_target:test_target2:
[effectimplementation.cpp:18459]: EVENT [1367.7.4]:- Event_target:test_target3:

 

The event chain run's smoothly though and I am getting different results from the random_list so maybe I can ignore Validator on this. It frustrates me that I don't understand what V is getting at :smile:

 

Be careful doing that.  Some things will appear to work fine if you ignore the validator (and it isn't always right!) but in things like this there is a good chance of unexpected effects or errors happening that you may not be seeing yet.  Remember the obscure problem NDPA had that caused you to get locked into the "become king of Greece" ambition?  Stuff like that can creep in and can be a real pain to troubleshoot.

 

As for what exactly the validator's problem is, I'd need to have the entire mod to figure that one out and that goes a bit beyond the time I can spare right now.  Sorry.

 

40 minutes ago, joemann said:

I have added print_scope_effect = yes as follows  ( Is it in the right place? ) :

 

Yes

 

40 minutes ago, joemann said:

But where do I find the game.log file?

 

EDIT: I noted that you figured this out, but I am leaving my reply for other people who might have the same questions.  In the same parent folder that has the /mod/ folder (where you put all your mods into) will be a /logs/ folder.  In windows it would be ..\Documents\Paradox Interactive\Crusader Kings II\logsNOTE: you may need to adjust your steam settings so that the game starts with enhanced debugging turned on.  Here are the ones I use:

image.png.a4f84a90a2bc67565d5ec3905eba8f28.png

Link to comment
  • 2 weeks later...
On 3/19/2018 at 9:12 AM, joemann said:

Validator is giving me a comment I don't understand. Although my event seems to be running, I do get the feeling the outcomes of the random_list are not right, and maybe it has something to do with the comment (sorry for the length )

 

 It may be that you are not checking if FROMFROMFROM is a valid character. You might want to try checking in your code to make sure it is filled before continuing with it.

place around all the FROMFROMFROM and see if that helps 

 

if = { limit = { FROMFROMFROM = { character = yes } }
}

 

Link to comment

Thank you for your suggestion.

 

If I read Validator correctly the problem starts in the targeted decision so I suppose the solution should be found there.

 

The third party potential block of the decision (which scopes to FROMFROM ) is as follows:

 

On 3/19/2018 at 3:12 PM, joemann said:

 third_party_potential = {
                FROMFROM = {            # Conditions on the third party character to be included in the list
                        is_marriage_adult = yes
                    

                    OR = {
                        trait = slave
                        trait = trained_pleasure_slave
                        trait = broken_in
                    }
                }   
            }  

 

 

 

I suppose this is the place where I should indicate  character = FROMFROM .

 

Could you tell me the correct place and syntax ?

 

 

 

 

Link to comment

Validator also rejects the third_party_potential in the decision. However, I copied the structure from the wiki so I don't understand what the issue is

 

--- Error 1 of 1 ---
At <mod>\decisions\rsl_cc_decisions.txt [targetted_decisions\rsl_share_slave\third_party_potential] (Line 945, column 2):
Invalid node "third_party_potential" in scope DecisionDef (value is: <a complex type>)

 

Link to comment

Just curious - has anyone tried storing an event ID as a variable, and then later try and use it?

 

For example:

 

In one event, I use this.

set_variable = { which = varEvent value = DWEvent.01 }

 

Then later in the event chain, I use this.

narrative_event = { id = varEvent }

 

Anyone try anything like that? If not, I'll probably try a simple test out myself.

 

I'm trying to find a way that I can build a thread of combat events, and then just feed into them, but I'd need to be able to bounce back to the feeder event chain to carry on with the story parts. Right now, I've been basically copying/pasting and updating the combat events, and I realized I'm needlessly bloating and consuming my time.

 

I figure if the above doesn't work, I could try and do it with flags.

Link to comment
2 hours ago, dewguru said:

Just curious - has anyone tried storing an event ID as a variable, and then later try and use it?

 

For example:

 

In one event, I use this.

set_variable = { which = varEvent value = DWEvent.01 }

 

Then later in the event chain, I use this.

narrative_event = { id = varEvent }

 

Anyone try anything like that? If not, I'll probably try a simple test out myself.

 

I'm trying to find a way that I can build a thread of combat events, and then just feed into them, but I'd need to be able to bounce back to the feeder event chain to carry on with the story parts. Right now, I've been basically copying/pasting and updating the combat events, and I realized I'm needlessly bloating and consuming my time.

 

I figure if the above doesn't work, I could try and do it with flags.

Testing says it don't work. Error log says the same. :smile:

 

Guess I'll dabble with the flag idea I have.

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