Jump to content

[LE] Adding conditions to Menu Buttons (not getting desired result)


bientje

Recommended Posts

Hi,

 

I'm trying to add a condition that needs to be checked before a specific Menu Button (option/choice) inside a Message object is being displayed. Until this condition is met, I don't want the option in the menu to be displayed. The entire menu is working as intended, except for the extra condition part. The specific condition I wanted to add was something in the lines of

Subject GetStageDone Quest 100 >= 1.0 AND

The AND is there to make the condition work in tandem with a condition that IS working, namely Player GetLocation xxx == 1

 

When I add my new condition to one of the buttons, the menu keeps working as intended, except if I test through console with setstage xxx 100 the option never shows up.

 

What am I messing up??

 

Thanks in advance for your help, I'm just trying to learn some basic stuff :smile: If I'm being unclear please let me know, English is not my native tongue.

Link to comment
Share on other sites

Hi,

 

Thanks for responding. Love your mods! Use many of them myself.

 

I just cannot get it to work. I put the below conditions, and I use console to setstage BYOHFalkreath to 110, but the button just won't pop up. (I'm not in map location BYOHouse1Location of course)

 

EDIT: I'm testing by immediately setting SetStage to 110 (I also tried first setting 100, then 110). Could it be I'm bugging myself out by not completeing the quest through gameplay?

 

ss.jpg

Link to comment
Share on other sites

I just saw my own mistake! It was all a result of a typo. Apparently when I added the condition in CK I accidentally changed the value of the second condition to == 1. So stupid.... it should be == 0 like it was originally, a.k.a. NOT showing up in the location, instead of ONLY showing up. My god, wasted 2 hours of my life because of this.

 

Wil get back with results and edit this post.

 

Thanks for replying IsharaMeradin! I was testing on a new game every time (COC-ing from the Main Menu)

Link to comment
Share on other sites

Just an update that the condition works perfectly now and is neatly unlocking the Menu Button when I want it. Thank you for the motivation.

 

Side-story: when I was testing my new condition (after discovering I accidentaly changed a 0 into 1 on for a condition I didn't mean to) I encountered another very stupid thing. Because the quest I was using for testing purposes is the BYOHHouseFalkreath quest, and queststage 100 gives the player the deed to the house, this queststage completion also removes all gold from the player (because the deed to the house costs 5000 gold). So, after using setstage 100 I didn't have any gold in my inventory (which I didn't notice!), but the object I'm interacting with needs gold for it to be able to open the menu. Because I was testing with a HUGE load order, everytime I COC-ed from the main menu it loaded a s#*! ton of mods, resulting in me not seeing the message in the top left of the screen that is related to the mod I'm testing. The message that says 'You don't have enough gold in your inventory'. Because I didn't notice this message, I actually thought the new condition still didn't work and broke the entire mod, not opening the menu at all.... It was only after my 5th test-try that I, by luck, let enough time pass for me to notice the message.... meaning basically I wasted another 40 minutes because of this unforeseen side effect of using setstage BYOHHouseFalkreath 100.

 

There's a lesson in there somewhere, probably about testing with vanilla load order or something :p

Link to comment
Share on other sites

Testing with a full load order is a good idea but save that for after most of the kinks have been ironed out by testing on as minimal load order as possible. A mod manager with profile management (that retains file changes across profiles) can help with this.

 

Also, using Debug.Trace statements and checking the papyrus log (when turned on) can be helpful as well. Debug.MessageBox statements can be useful too as they'll pop up a box that needs to be closed before the game continues.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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