Jump to content

modding DW Slavery event


joemann

Recommended Posts

I am trying to add something to part of a DWR Slavery event (I hope you don't mind).

 

The idea is to detail the different levels of slave training in the slave training event which now take place in the background, cycling through character modifiers 1, 2 and 3 to end up as complete.

 

If it works I would like to detail each level of training, make it progressively more difficult, maybe require the investment of some gold and increase the value of the slave with each level.

 

I have made a first attempt which seemed to make sense. Validator does not appear to have a problem with it and testing the event with the console commands testevent and event also seems to work. However, it doesn't. The event works normally in the background and the training of the slave is completed as normal. However the narrative event I would like to call does not appear.

 

The code is as follows (most of it is pure DWR):

 

# .410 Slave evaluation check to see if the advance (slave - hidden)
narrative_event = {
    id = RSLSlavery.410
    desc =  RSLSlavery311
    picture = GFX_evt_rsl.trainsex1
    is_triggered_only = yes
    
    option = {
    
        if = {
            limit = {
                has_character_modifier = rsl_slave_pleasure_3
            }
            random_list = {
                80 = {  # Successfully finished training
                    remove_character_modifier = rsl_slave_pleasure_3
                    add_character_modifier = { name = rsl_slave_pleasure_complete duration = -1 }
                    clr_character_flag = rsl_slave_training_in_progress
                    if = {
                        limit = {
                            is_female = yes # Female specific
                        }
                        host = { narrative_event = { id = RSLSlavery.90 }} # We notify the slaver that the training cycle has completed.
                    }
                    if = {
                        limit = {
                            is_female = no # Male specific
                        }
                        host = { narrative_event = { id = RSLSlavery.91 }} # We notify the slaver that the training cycle has completed.
                    }
                }
                20 = {  # Failed to advance in training
                    character_event = { id = RSLSlavery.400 } # We cycle the slave through training again
                }
            }
        }
        if = {
            limit = {
                has_character_modifier = rsl_slave_pleasure_2
            }
            random_list = {
                80 = {  # Successfully finished training
                    remove_character_modifier = rsl_slave_pleasure_2
                    add_character_modifier = { name = rsl_slave_pleasure_3 duration = -1 }
                    character_event = { id = RSLSlavery.400 } # We cycle the slave through training again
                }
                20 = {  # Failed to advance in training
                    character_event = { id = RSLSlavery.400 } # We cycle the slave through training again
                }
            }
        }
        if = {
            limit = {
                has_character_modifier = rsl_slave_pleasure_1
            }
            random_list = {
                80 = {  # Successfully finished training
                    
                    narrative_event = { id = RSLSlavery.31 } # We should get the content of slave_pleasure_1 training but we don't grrr!
                }
                20 = {  # Failed to advance in training
                    character_event = { id = RSLSlavery.400 } # We cycle the slave through training again
                }
            }
        }
    }
}

# Pleasure Slave training level 1 311
narrative_event = {
    id = RSLSlavery.31
    desc = RSLSlavery311
    picture = GFX_evt_rsl.trainsex1

    is_triggered_only = yes

    option = {
        name = rsl_option_further
        character_event = { id = RSLSlavery.312 }
    }
}
# Pleasure Slave training level 1 312
narrative_event = {
    id = RSLSlavery.312
    desc = RSLSlavery312
    picture = GFX_evt_rsl.trainsex2

    is_triggered_only = yes

    option = {
        name = rsl_option_further
        character_event = { id = RSLSlavery.313 }
    }
}
# Pleasure Slave training level 1 313
narrative_event = {
    id = RSLSlavery.313
    desc = RSLSlavery313
    picture = GFX_evt_rsl.trainsex3
    
    is_triggered_only = yes
    
    option = {
            name = rsl_option_further
            FROM = {
                remove_character_modifier = rsl_slave_pleasure_1
                add_character_modifier = { name = rsl_slave_pleasure_2 duration = -1 }                
                character_event = { id = RSLSlavery.400 } # We cycle the slave through training again up for level 2
        }    
    }
}

 

Does anyone see where it goes wrong?

Link to comment

The event is firing, but it's not visible to the player because it's going to the wrong scope:

 narrative_event = { id = RSLSlavery.31 } # We should get the content of slave_pleasure_1 training but we don't grrr!

should be:

host = { narrative_event = { id = RSLSlavery.31 } }

similar to how the first option does it.

Link to comment

It worked! Thanks a lot. I have been spending hours on this without success. At least I  now know what doesn't work :smile:

 

I have difficulty in getting my mind around this scope thing. In this case you use <host> Who is the host and host to what or who?

 

Thx again

Link to comment
On 1/27/2018 at 9:32 AM, joemann said:

It worked! Thanks a lot. I have been spending hours on this without success. At least I  now know what doesn't work :smile:

 

I have difficulty in getting my mind around this scope thing. In this case you use <host> Who is the host and host to what or who?

 

Thx again

Scope is whatever the current game object (character province, title, etc) is. Any commands or whatever you give affect the current scope. "host" changes scope to whoever owns the place where the character is currently staying. Could be the character themself, could be their liege if they're a courtier. If the character is a prisoner, it's whoever it holding them prisoner.

 

https://ck2.paradoxwikis.com/Scopes

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • 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