Jump to content

Need help from experienced coder to code an example


luffyboy

Recommended Posts

Posted

Hi,

I am trying to trigger an create an event that when triggered will check if character A has either trait A (lets call it big tits) while whether character B has either trait B (small tits preference trait) or trait C (big tits preference trait)


What i need help is for someone to show me (best through an example script) how to define using scopes so that i can do something like

if = {

   Char A = has trait A
   Char B = has trait B

   Trigger effect/opinion_modifier 1)

elseif = {
   char A = has trait A
   Char B = trait C
   trigger effect/opinion_modifer 2)


Ideally i would like to know how to set char A as root/main character for the event and Character B as the target (which in this case if you can show me how to use any_consort/lover to account for all the possible romancesex relationships that would be a bonus)

Much appreciated for the help if you can provide it!

Posted

If that's how you want to give opinion modifiers for fitting the preference, it's a really bad idea, since the performance hit will be massive. Also it would require an every_character list, which doesn't exist I think. Even if it existed, it's simply not worth it, the game won't be playable.

 

It could be possible to implement for everyone inside a realm, but the performance hit is still likely to be quite massive, unless size preference is only for a few characters. 

 

I don't see a good way to implement an opinion bonus for all big tit lovers towards well-endowed women. But it's possible to incorporate it into your own and vanilla interactions/schemes. For example you could create an interaction "Flirt" where these opinion modifiers could be applied based on traits. Or maybe an event where a king notices his big-titted vassal or vice versa.

Posted

the minimum i am hoping to do is to create an event that triggers yearly alongside the arousal cause stress event in carn,

What this event will do is check the player's character preferences against the dick/tits traits of their current partners. If there are more spouse/concubines/lovers with dick/tit traits that match the player's preference the player gets a stress reduce % buff modifier for the year,

 

otherwise if there are more spouse/concubine/lovers with dick/tits that dont match the player's preference, the player gets a stress gain % debuff modifier for the year.

Posted
3 minutes ago, luffyboy said:

the minimum i am hoping to do is to create an event that triggers yearly alongside the arousal cause stress event in carn,

What this event will do is check the player's character preferences against the dick/tits traits of their current partners. If there are more spouse/concubines/lovers with dick/tit traits that match the player's preference the player gets a stress reduce % buff modifier for the year,

 

otherwise if there are more spouse/concubine/lovers with dick/tits that dont match the player's preference, the player gets a stress gain % debuff modifier for the year.

This is possible. You need to create your own on_action file where you add some on_action (look into the yearly on actions file and choose one that suits, probably yearly random playable on action will do). In this on_action you trigger your own on_action, say boob_size_check_on_action. In this on_action you write trigger "has boob size preference", so that it only computes for character with size preference. It will then fire an event, and in this event you can count the numbers of girls with big boobs and small boobs using every_spouse and every_concubine (by setting a local variable and increasing it by one for every girl with certain breast size). Then you will trigger the effect that you want depending on the variables. Look into the game files too see how variables work.

Posted
1 hour ago, hamimobe said:

This is possible. You need to create your own on_action file where you add some on_action (look into the yearly on actions file and choose one that suits, probably yearly random playable on action will do). In this on_action you trigger your own on_action, say boob_size_check_on_action. In this on_action you write trigger "has boob size preference", so that it only computes for character with size preference. It will then fire an event, and in this event you can count the numbers of girls with big boobs and small boobs using every_spouse and every_concubine (by setting a local variable and increasing it by one for every girl with certain breast size). Then you will trigger the effect that you want depending on the variables. Look into the game files too see how variables work.

sigh you dont understand

i know how to do that.

I dont know how to do scopes well and i was hoping someone can do a simple script that i can build up from there

All i need is someone to help me define character A as the main character in question and character B as the spouse with perhaps a condition to check if they have a trait (just pick 1 randomly like chaste or something)

i can build up the script from there

Posted
29 minutes ago, luffyboy said:

sigh you dont understand

i know how to do that.

I dont know how to do scopes well and i was hoping someone can do a simple script that i can build up from there

All i need is someone to help me define character A as the main character in question and character B as the spouse with perhaps a condition to check if they have a trait (just pick 1 randomly like chaste or something)

i can build up the script from there

The character that the event is called on is root. Then in the immediate block you write random_spouse = { save_scope_as = spouse }. Voila, you have scope for spouse. You can put limit into the random_spouse block to select the one with the trait you need.

 

Just check the game files for examples and check out ck3 wiki for effects and triggers.

Posted
12 hours ago, hamimobe said:

The character that the event is called on is root. Then in the immediate block you write random_spouse = { save_scope_as = spouse }. Voila, you have scope for spouse. You can put limit into the random_spouse block to select the one with the trait you need.

 

Just check the game files for examples and check out ck3 wiki for effects and triggers.


Thanks ill try that. i actually have been going through the game files to find good simple examples but they are often laden with other conditions and triggers that it makes it hard to follow which part does what some times.

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...