Issue with Event Modding

For specific technical issues and questions.

Re: Issue with Event Modding

PostPosted by blackninja9939 » Wed Jun 07, 2017 20:14

Mister Sprinkles wrote:appreciate the reply as always blackninja. I don't suppose there's a way around this or anything that can be added to the code to force it occur instantly, eh?

Nope it is just how the command works
Graduate Content Designer on Project Caligula

My amazingly empty Twitter account: @blackninja9939

Posts edited in this colour were done by me for moderation.

My Sub-Mods:
Bloodlines
More Decisions
Colonise Valyiria and Challenge to Duel
More Bookmarks
User avatar
blackninja9939
Moderator
 
Posts: 5688
Joined: Tue Oct 01, 2013 10:50
Location: England

Re: Issue with Event Modding

PostPosted by Mister Sprinkles » Mon Jun 12, 2017 12:55

so my little cheat menu submod project has been chugging along pretty well but I've hit another road block, this time with a targetted decision scoping question/issue.

ultimately what I'm trying to set up is a targetted decision for backing plots. if i click on a character i want to force them to back my current plot. easy peasy. however i only want the option to show up if i have a currently have an active plot (and not against the targetted character) but have been struggling with what to put in the 'potential' section to make this work.

unfortunately i'm not at my computer i've been working from so i can't share out what i have so far but needless to say it isn't working so probably doesn't matter either way.

appreciate any feedback as always!

side note:
while it was never my original intent, as this little personal 'cheat menu submod' grows i've considered sharing it out here once i'm happy with it but don't want to step on the toes of the couple that have inspired it (unsavory's cheaty tools, sketchy cheat meanu...)
Mister Sprinkles
 
Posts: 20
Joined: Thu May 25, 2017 04:16

Re: Issue with Event Modding

PostPosted by blackninja9939 » Mon Jun 12, 2017 16:06

For checking that you have a plot in from_potential do has_plot = yes. However that might not work, if it does not then do an OR = { } containing has_plot = plot_name for every plot.

To make sure the target of the decision is not the target of the plot or a back of the plot do in the potential NOT = { is_plot_target_of = FROM } and in the from_potential do NOT = { any_plot_backer = { character = ROOT } }

I think that should all work
Graduate Content Designer on Project Caligula

My amazingly empty Twitter account: @blackninja9939

Posts edited in this colour were done by me for moderation.

My Sub-Mods:
Bloodlines
More Decisions
Colonise Valyiria and Challenge to Duel
More Bookmarks
User avatar
blackninja9939
Moderator
 
Posts: 5688
Joined: Tue Oct 01, 2013 10:50
Location: England

Re: Issue with Event Modding

PostPosted by Mister Sprinkles » Tue Jun 13, 2017 03:07

only thing that seems to be giving me issues is the NOT = { any_plot_backer = { character = ROOT } } in from_potential. still seems to show up even when the targetted character is already backing the current plot. i've been going through the wikis over and over and the 'any_plot_backer' seems like the scope i would have to use and i can't see a single thing that wouldn't work with what you provided. i've tried a few other variations but i'm afraid they haven't made it past the validator stage.... haha.

for what it's worth this is what i've thrown together so far using what you provided:

Code: Select all
plot_cheat = {
   from_potential = {
      ai = no
      has_character_flag = cheats_enabled
      has_plot = yes
      NOT = {
         any_plot_backer = { character = ROOT }
      }
   }
   potential = {
      ai = yes
      NOT = {
         is_plot_target_of = FROM
      }
   }
   allow = {
      hidden_tooltip = { always = yes }
   }
   effect = {
       back_plot = FROM
   }
   revoke_allowed = {
      always = no
   }
   ai_will_do = {
      factor = 0
   }
}
Mister Sprinkles
 
Posts: 20
Joined: Thu May 25, 2017 04:16

Re: Issue with Event Modding

PostPosted by SinStar87 » Tue Jun 13, 2017 04:00

Try moving it to the potential section and putting it in a from wrapper like
FROM = {
NOT = {
any_plot_backer = { character = ROOT }
}
}
or change it to
NOT = {
any_backed_character = { character = FROM }
}
User avatar
SinStar87
 
Posts: 3130
Joined: Sat Feb 09, 2013 17:24

Re: Issue with Event Modding

PostPosted by Mister Sprinkles » Wed Jun 14, 2017 01:23

no go on the FROM wrapper but the 2nd option worked perfect from what I can tell. don't know how i missed the 'any_backed_character' scope...

Appreciate the help as always!
Mister Sprinkles
 
Posts: 20
Joined: Thu May 25, 2017 04:16

Re: Issue with Event Modding

PostPosted by Mister Sprinkles » Fri Jun 16, 2017 11:13

Follow up question to the earlier plot backing one. So while that all worked perfect I got a little greedy. Basically to avoid making a bunch of targetted decisions, i made one decision to send to a character event. i want that event to show various options as long as they meet the conditions. those options would be to force the character to back my plot if they're not part of it, force to reveal a plot a character has against me, force a character to end their plot against me if known, and force my plot against them to fire if i have a plot against them.

the triggers haven't been an issue, but i can't seem to figure out commands to successfully fire a plot, so not sure if that's not a thing, or to reveal the plot properly.

for firing the plot i've played around with activate_plot without any luck and looking through the event files i'm thinking there isn't necessarily a single command to fire a plot and i may be out of luck t here.

for revealing the plot i've been using reveal_plot and reveal_plot_w_message and the tooltip seems to reflect it does what i want but no message comes up and it still shows 0 known plots in the intrigue tab.

this has been tweaked and changed a dozen times over trying to figure it out but this at least is the last version i had come up with:

Code: Select all
namespace = deus_ex_cheat

###DEUS EX MACHINA (BACK / FORCE / REVEAL / END PLOT)###   

character_event = {
   id = deus_ex_cheat.1
   desc = EVTDESCdeus_ex_cheat.1
   
   is_triggered_only = yes
      
   ###FORCE YOUR PLOT###
   option = {
      name = EVTOPTAdeus_ex_cheat.1
      trigger = {
         has_plot = yes
         FROM = {
            is_plot_target_of = ROOT
         }
      }
      activate_plot = yes
   }
   
   ###FORCE THEIR PLOT###
   option = {
      name = EVTOPTBdeus_ex_cheat.1
      trigger = {
         FROM = {
            has_plot = yes
         }
      }
      FROM = {
         activate_plot = yes
      }
   }
   
   ###BACK PLOT###
   option = {
      name = EVTOPTCdeus_ex_cheat.1
      trigger = {
         has_plot = yes
         FROM = {
            NOT = {
               is_plot_target_of = ROOT
               any_backed_character = { character = ROOT }
            }
         }
      }
      FROM = {
         back_plot = ROOT
      }
   }
   
   ###END PLOT###
   option = {
      name = EVTOPTDdeus_ex_cheat.1
      trigger = {
         is_plot_target_of = FROM
         FROM = {
            plot_is_known_by = ROOT
         }
      }
      FROM = {
         cancel_plot = yes
      }
   }
   
   ###REVEAL PLOT###
   option = {
      name = EVTOPTEdeus_ex_cheat.1
      trigger = {
         is_plot_target_of = FROM
         FROM = {
            NOT = {
               plot_is_known_by = ROOT
            }
         }
      }
      reveal_plot_w_message = yes
   }
      
   ###NEVERMIND###
   option = {
      name = EVTOPTnevermind
      custom_tooltip = { text = CUSTOMTOOLTIPnevermind }
   }
}


i feel bad i keep coming here with these questions but you haven't let me done yet so hoping somebody could take a gander for me?

thanks!
Mister Sprinkles
 
Posts: 20
Joined: Thu May 25, 2017 04:16

Re: Issue with Event Modding

PostPosted by blackninja9939 » Fri Jun 16, 2017 18:23

As you seem to have worked out, the activate plot command actually doesn't do much. The actual results of a plot are all handled via events and not just that command.
If you don't want to go through and manually script every single success for all the plots I would say just ignore that part honestly
Graduate Content Designer on Project Caligula

My amazingly empty Twitter account: @blackninja9939

Posts edited in this colour were done by me for moderation.

My Sub-Mods:
Bloodlines
More Decisions
Colonise Valyiria and Challenge to Duel
More Bookmarks
User avatar
blackninja9939
Moderator
 
Posts: 5688
Joined: Tue Oct 01, 2013 10:50
Location: England

Re: Issue with Event Modding

PostPosted by Mister Sprinkles » Fri Jun 16, 2017 20:14

Appreciate it as always blackninja. That was what I feared with the force plot option. Any suggestions for the reveal plot option?
Mister Sprinkles
 
Posts: 20
Joined: Thu May 25, 2017 04:16

Re: Issue with Event Modding

PostPosted by Mister Sprinkles » Sat Jun 17, 2017 02:29

nevermind, figured this one out myself! missing a from bracket around the reveal. untill next time!
Mister Sprinkles
 
Posts: 20
Joined: Thu May 25, 2017 04:16

Re: Issue with Event Modding

PostPosted by Mister Sprinkles » Sun Jun 18, 2017 21:18

Back again!

This time i'm looking for the best way mechanically speaking to have an event option spawn troops and spawn a new character to lead those troops.

i've got the spawn troops and the new character parts down without much issue but i seem to be hitting a roadblock getting the new character to be the leader of the new troops.

any help is appreciated as always!
Mister Sprinkles
 
Posts: 20
Joined: Thu May 25, 2017 04:16

Re: Issue with Event Modding

PostPosted by blackninja9939 » Sun Jun 18, 2017 21:40

Mister Sprinkles wrote:Back again!

This time i'm looking for the best way mechanically speaking to have an event option spawn troops and spawn a new character to lead those troops.

i've got the spawn troops and the new character parts down without much issue but i seem to be hitting a roadblock getting the new character to be the leader of the new troops.

any help is appreciated as always!

Take a look at our invasion events and mimic them, basically it amounts to spawning the leader first then spawning the troops for them with the owner being your lord and that makes the character lead them.
Graduate Content Designer on Project Caligula

My amazingly empty Twitter account: @blackninja9939

Posts edited in this colour were done by me for moderation.

My Sub-Mods:
Bloodlines
More Decisions
Colonise Valyiria and Challenge to Duel
More Bookmarks
User avatar
blackninja9939
Moderator
 
Posts: 5688
Joined: Tue Oct 01, 2013 10:50
Location: England

Re: Issue with Event Modding

PostPosted by Mister Sprinkles » Mon Jun 19, 2017 01:40

alright i think i figured it out. seems like in addition to spawning the leader and then the troops for them i also had to give the created character the minor title 'title_commander' to get it to work. this then had the kicker that if the player character already set all of the commanders the created character wasn't getting the title and thus wasn't leading the new army.

i was able to get around that by adding:
Code: Select all
random_courtier = {
   limit = {
      has_minor_title = title_commander
   }
   remove_title = title_commander
}


not sure if there's a better option for that... i also noticed that the spawned army doesn't give me options like splitting it or creating a new unit and reorganizing. is this something i'm missing in the spawn unit block?
Mister Sprinkles
 
Posts: 20
Joined: Thu May 25, 2017 04:16

Re: Issue with Event Modding

PostPosted by Mister Sprinkles » Mon Jun 26, 2017 01:36

Still having the issues with assigning the commander to the spawned troops if anyone is willing to chime in on that from my last update.

More recently though I'm running into a new issue. I've decided to set up a couple secret targ decisions for fun role play scenarios based on flimsy rumors. I've got pretty much everything set up and working as far as changing parents and dynasties and that fun stuff from what I can tell but there are 2 factors I am not sure how to deal with.
1. blood feuds. do i have to manually remove the opinion modifiers associated with a blood feud or will a maintenance event take care of it? and if so, how/when does it fire and is it something i can force to fire as part of the decision?
2. bloodlines. same situation as above, say i switch a current lannister to a targaryen they still have the lannister bloodline (and not the targaryen). i assume i can just go in and manually add/remove traits but then i would have to set up bloodlines as a required dependency correct?

As always, any help is appreciated.
Mister Sprinkles
 
Posts: 20
Joined: Thu May 25, 2017 04:16

Previous

Return to Technical Discussion

Who is online

Users browsing this forum: No registered users and 0 guests