OBSE Plugin - MenuQue thread #2

Post » Mon May 10, 2010 4:51 pm

Yea, only one. But a single function would be easier to use then a complicated workaround. ;)
User avatar
Spooky Angel
 
Posts: 3500
Joined: Thu Aug 10, 2006 5:41 pm

Post » Mon May 10, 2010 7:29 pm

Maybe in the next version. :D which I hope comes out soon...... as I need InsertXMLTemplate to work. :D I have an XP machine.
User avatar
Rhysa Hughes
 
Posts: 3438
Joined: Thu Nov 23, 2006 3:00 pm

Post » Mon May 10, 2010 7:05 pm

When using the "ShowGenericMenu" function, can you input the full path of the XML file if you don't want to use the "Data\Menus\Generic\" filepath?
User avatar
Dominic Vaughan
 
Posts: 3531
Joined: Mon May 14, 2007 1:47 pm

Post » Mon May 10, 2010 8:53 am

Is it possible to add a parameter (bool) to ShowGenericMenu, which specifies if other open menus are hidden.
User avatar
Daramis McGee
 
Posts: 3378
Joined: Mon Sep 03, 2007 10:47 am

Post » Mon May 10, 2010 11:47 pm

Is is possible to get a Debug-Mode?
One that tell's you if the trait/child you were trying to set/get a value doesn't exist?
I tend to forget slight changes during C&P and this would help me narrow the problem down. :)

Debug mode...no not really. Although I suppose I could add a function to toggle it for the specific mod (like how SetDebugMode works) with regards to the UI functions.

Just tried using Scroll Tile Systems. Another awsome thing working exactly as required. :wub:
Anyway, I find this information is a bit misleading:

I first though it'd add/reduce the old value, but it becomes some positive/negative value when scrolling. Perfectly for adding it to the current <_position> trait. :)
Still, not what the description says.
I agree the info is somewhat misleading but due to how things work internally it is a better description on what a Scroll system does as a whole.

5th post in a row. I'm feeling kind of lonely here. :ahhh:
Anyway, I wondered if it's possible to get any information about which TextEdit is currently open if the Menu has more than one?
Hehe, sorry, working hard. As for your request, I added such a function right after your request for better control over TextEdit systems. Doesn't have a 'use-last-if-none' but that is trivial to add.

Maybe in the next version. :D which I hope comes out soon...... as I need InsertXMLTemplate to work. :D I have an XP machine.
I hope so too, it's been way to long since I actually modded for Oblivion (with the CS that is).

When using the "ShowGenericMenu" function, can you input the full path of the XML file if you don't want to use the "Data\Menus\Generic\" filepath?
No, the path must always be relative to "Data\Menus\Generic", this was done on purpose to avoid possible issues with trying to open a different kind of menu. Is there a specific menu you would like to be able to open through script?

Is it possible to add a parameter (bool) to ShowGenericMenu, which specifies if other open menus are hidden.
Hmmmm, maybe. Well sure, adding such a parameter is possible, actually making it work is maybe. :P Will need to see how simple it is to hide a menu without messing up the normal flow of things.
User avatar
Laura Elizabeth
 
Posts: 3454
Joined: Wed Oct 11, 2006 7:34 pm

Post » Mon May 10, 2010 11:41 pm

Cool, thanks. :)
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Mon May 10, 2010 10:08 am

Thanks for the update. :D
User avatar
Taylor Thompson
 
Posts: 3350
Joined: Fri Nov 16, 2007 5:19 am

Post » Mon May 10, 2010 9:49 am

No, the path must always be relative to "Data\Menus\Generic", this was done on purpose to avoid possible issues with trying to open a different kind of menu. Is there a specific menu you would like to be able to open through script?


No, the menu I want to open is actually located in "Data/Menus/Generic", but I was just curious.

Are you going to add the functionality of allowing MenuQue to be able to retrieve information from BSA's?
User avatar
LijLuva
 
Posts: 3347
Joined: Wed Sep 20, 2006 1:59 am

Post » Tue May 11, 2010 12:11 am

Got a graphical error when using ShowGenericMenu.

http://i1216.photobucket.com/albums/dd367/mlonnemann/ScreenShot2.jpg
User avatar
Alexandra walker
 
Posts: 3441
Joined: Wed Sep 13, 2006 2:50 am

Post » Mon May 10, 2010 1:09 pm

Disregard my last post. The error was because I was using the wrong size icon for the menu. I corrected it.
User avatar
Add Me
 
Posts: 3486
Joined: Thu Jul 05, 2007 8:21 am

Post » Mon May 10, 2010 11:33 am

Any news on an update here? :D
User avatar
Izzy Coleman
 
Posts: 3336
Joined: Tue Jun 20, 2006 3:34 am

Post » Mon May 10, 2010 12:40 pm

News.....um tomorrow probably.
User avatar
Bellismydesi
 
Posts: 3360
Joined: Sun Jun 18, 2006 7:25 am

Post » Mon May 10, 2010 6:04 pm

kyoma, let me ask you something:

I inserted an XML with the function in your plugin. But, I had to script it to only load once, or else there were side effects. Problem is, it seems Oblivion doesn't fully render the XML contents when I do that. There is an .dds file that is part of the XML. It does not get fully loaded, it's just a black box, but when the game loads, it shows up faded and transparent. Do you know of a way I can correct that?
User avatar
carley moss
 
Posts: 3331
Joined: Tue Jun 20, 2006 5:05 pm

Post » Mon May 10, 2010 8:57 pm

Please post the XML code and script (snippet), maybe something else is going on.
User avatar
Robert Jr
 
Posts: 3447
Joined: Fri Nov 23, 2007 7:49 pm

Post » Mon May 10, 2010 10:54 pm

Please post the XML code and script (snippet), maybe something else is going on.


Here's the XML:
	 105 	 &true; 	  	  	 1060 	 800 	 255 				 Menus\TimeKeeper\Time_Keeper_Background.dds 		 300 		 100 		 1 		 0 		 0 		 255 				 3 		 		 ¢er; 		 114 		 114 		 114  		 3 		 			
2
2
0 0 255


Here's the script:
ScriptName MalonnSystemTimeScriptstring_var svDayoftheWeek string_var svMonthstring_var svHumanHoursstring_var svHumanMinutesstring_var svAMPMarray_var aHumanHoursarray_var aHumanMinutesarray_var aDaysarray_var aMonthsarray_var avTimefloat fQuestDelayTimefloat fDayoftheMonthfloat fSecondsPassedfloat fMinutesPassedfloat fTotalHoursPassedfloat fTotalMinutesPassedfloat fPIntervalfloat fRTIntervalfloat fTimerfloat fPopUpTimershort sPopUpshort sTriggerPopupshort sRealTimeResetshort sPUTimerResetshort sEqualTimersshort sShowTimeshort sDisablePopUp Begin GameMode		If GetGameLoaded == 1		RunBatchScript "Data\INI\Oblivion Real World Time.ini"		Set sDisablePopUp to 0		Set sRealTimeReset to 1		Set sEqualTimers to 0		Set fSecondsPassed to 0		If sShowTime == 1			InsertXML "TimeKeeper\Time Keeper.xml" 1004			Set sDisablePopUp to 1		EndIf	EndIf		Set fQuestDelayTime to 0.001	Set fSecondsPassed to fSecondsPassed + GetSecondsPassed		Let aDays := ar_List "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday"	Let aMonths := ar_List "December", "January" "February", "March", "April", "May", "June", "July", "August", "September", "October", "November"	Let aHumanHours := ar_Construct Map	Let aHumanHours[0] := "12"	Let aHumanHours[1] := "1"	Let aHumanHours[2] := "2"	Let aHumanHours[3] := "3"	Let aHumanHours[4] := "4"	Let aHumanHours[5] := "5"	Let aHumanHours[6] := "6"	Let aHumanHours[7] := "7"	Let aHumanHours[8] := "8"	Let aHumanHours[9] := "9"	Let aHumanHours[10] := "10"	Let aHumanHours[11] := "11"	Let aHumanHours[12] := "12"	Let aHumanHours[13] := "1"	Let aHumanHours[14] := "2"	Let aHumanHours[15] := "3"	Let aHumanHours[16] := "4"	Let aHumanHours[17] := "5"	Let aHumanHours[18] := "6"	Let aHumanHours[19] := "7"	Let aHumanHours[20] := "8"	Let aHumanHours[21] := "9"	Let aHumanHours[22] := "10"	Let aHumanHours[23] :=  "11"	Let aHumanMinutes := ar_Construct Map	Let aHumanMinutes[0] := "00"	Let aHumanMinutes[1] := "01"	Let aHumanMinutes[2] := "02"	Let aHumanMinutes[3] := "03"	Let aHumanMinutes[4] := "04"	Let aHumanMinutes[5] := "05"	Let aHumanMinutes[6] := "06"	Let aHumanMinutes[7] := "07"	Let aHumanMinutes[8] := "08"	Let aHumanMinutes[9] := "09"	Let aHumanMinutes[10] := "10"	Let aHumanMinutes[11] := "11"	Let aHumanMinutes[12] := "12"	Let aHumanMinutes[13] := "13"	Let aHumanMinutes[14] := "14"	Let aHumanMinutes[15] := "15"	Let aHumanMinutes[16] := "16"	Let aHumanMinutes[17] := "17"	Let aHumanMinutes[18] := "18"	Let aHumanMinutes[19] := "19"	Let aHumanMinutes[20] := "20"	Let aHumanMinutes[21] := "21"	Let aHumanMinutes[22] := "22"	Let aHumanMinutes[23] := "23"	Let aHumanMinutes[24] := "24"	Let aHumanMinutes[25] := "25"	Let aHumanMinutes[26] := "26"	Let aHumanMinutes[27] := "27"	Let aHumanMinutes[28] := "28"	Let aHumanMinutes[29] := "29"	Let aHumanMinutes[30] := "30"	Let aHumanMinutes[31] := "31"	Let aHumanMinutes[32] := "32"	Let aHumanMinutes[33] := "33"	Let aHumanMinutes[34] := "34"	Let aHumanMinutes[35] := "35"	Let aHumanMinutes[36] := "36"	Let aHumanMinutes[37] := "37"	Let aHumanMinutes[38] := "38"	Let aHumanMinutes[39] := "39"	Let aHumanMinutes[40] := "40"	Let aHumanMinutes[41] := "41"	Let aHumanMinutes[42] := "42"	Let aHumanMinutes[43] := "43"	Let aHumanMinutes[44] := "44"	Let aHumanMinutes[45] := "45"	Let aHumanMinutes[46] := "46"	Let aHumanMinutes[47] := "47"	Let aHumanMinutes[48] := "48"	Let aHumanMinutes[49] := "49"	Let aHumanMinutes[50] := "50"	Let aHumanMinutes[51] := "51"	Let aHumanMinutes[52] := "52"	Let aHumanMinutes[53] := "53"	Let aHumanMinutes[54] := "54"	Let aHumanMinutes[55] := "55"	Let aHumanMinutes[56] := "56"	Let aHumanMinutes[57] := "57"	Let aHumanMinutes[58] := "58"	Let aHumanMinutes[59] := "59"		Let avTime := GetUserTime	Let svMonth := aMonths[avTime["Month"]]	Let svDayoftheWeek := aDays[avTime["DayofWeek"]]	Let svHumanHours := aHumanHours[avTime["Hour"]] 	Let svHumanMinutes := aHumanMinutes[avTime["Minute"]]	Let fDayoftheMonth := avTime["Day"]		If Eval avTime["Hour"] > 11		Let svAMPM := "P.M."	Else		Let svAMPM := "A.M."	EndIf		If fPInterval == fRTInterval		If sEqualTimers == 0			Set fTimer to fTimer - 2			Set sEqualTimers to 1		EndIf	EndIf		If fTimer > (60 * fRTInterval)		Set sRealTimeReset to 0	Else		Set fTimer to fTimer + GetSecondsPassed	EndIf		If sDisablePopUp == 0		If sRealTimeReset == 0			MessageBoxEX "          Current Date and Time          %r        %z, %z %.0f %z:%z %z", svDayoftheWeek, svMonth, fDayoftheMonth, svHumanHours, svHumanMinutes, svAMPM			Set sRealTimeReset to 1			set fTimer to 0		EndIf	EndIf		SetMenuStringValue "TimeKeeper\Time_Keeper_Text\string|%z %z:%z %z" svDayoftheWeek svHumanHours svHumanMinutes svAMPM 1004				If Player.IsInCombat == 1		Set sTriggerPopup to 0	Else 		Set sTriggerPopup to 1	EndIf		If sPopUp  == 1		If fPopUpTimer > (60 * fPInterval)			If sTriggerPopup == 1				If fSecondsPassed > (60 * fPInterval) && fSecondsPassed < 3600					Set fTotalMinutesPassed to fSecondsPassed / 60					Set fTotalMinutesPassed to Floor fTotalMinutesPassed					MessageBoxEX "You have been playing for about %.0f minutes.", fTotalMinutesPassed					Set sPUTimerReset to 1					Set fTotalMinutesPassed to 0				ElseIf fSecondsPassed > 3600					Set fTotalHoursPassed to fSecondsPassed / 3600					Set fTotalHoursPassed to Floor fTotalHoursPassed					MessageBoxEx "You have been playing for about %.0f Hour(s)", fTotalHoursPassed					Set sPUTimerReset to 1					Set fTotalHoursPassed to 0				EndIf			EndIf		Else			Set fPopUpTimer to fPopUpTimer + GetSecondsPassed		EndIf	EndIf		If sPUTimerReset == 1		Set fPopUpTimer to 0		Set sPUTimerReset to 0	EndIf	End


Thanks, kyoma.
User avatar
Auguste Bartholdi
 
Posts: 3521
Joined: Tue Jun 13, 2006 11:20 am

Post » Mon May 10, 2010 5:00 pm

Here's the XML:
....
Thanks, kyoma.
Cool thanks, will take a look. Although a screenshot or the texture being used would help. I'm having a bit of trouble trying to get a picture of the problem. :/

Anyways, an XML element would only need to be inserted once per instance of the menu. In the case of HUDMainMenu this is once per session (restarted that is). Ofcourse a small check to see if it already exists or not using GetMenuHasTrait does wonders. It can't even hurt much running it each frame (in the rare occassion the user typed "reload HUDMainMenu" in the console). :)
if GetMenuTrait "TimeKeeper\depth" == 0;needs to be insertedendif

User avatar
Rhi Edwards
 
Posts: 3453
Joined: Fri Jul 28, 2006 1:42 am

Post » Mon May 10, 2010 9:36 pm

Cool thanks, will take a look. Although a screenshot or the texture being used would help. I'm having a bit of trouble trying to get a picture of the problem. :/


http://i1216.photobucket.com/albums/dd367/mlonnemann/ScreenShot2.jpg is a screenshot of what I'm talking about. See how it is faded and has a spot that is darker than the rest? It's like the XML isn't loading the texture completely. It should be completely black. The alpha is set to be completely opaque. I'm going to add the option to control the alpha later, but I want to get this squared away first.
User avatar
Portions
 
Posts: 3499
Joined: Thu Jun 14, 2007 1:47 am

Post » Mon May 10, 2010 1:17 pm

I can't run "InsertXML" every frame because it causes the numbers being displayed to get overwritten. Lets say it's 1:00 PM, when 1:01 PM happens, the 0 from 1:00 is still displayed. The 1 from 1:01 overwrites the 0, so it's jumbled and you can't really tell what time it is. So, the XML can only be inserted once per game load. The only way I know how to do that is add to an GetGameLoaded block, or use a temp variable that is set only once per session.

I tried the example you gave, and the texture displayed correctly, but the time did not.

EDIT:

No, I'm sorry. That script snippet displays the time correctly. I forgot to insert the menu type. But the texture is still faded and wonky as shown in the screenshot.
User avatar
Mandy Muir
 
Posts: 3307
Joined: Wed Jan 24, 2007 4:38 pm

Post » Tue May 11, 2010 2:57 am

Hi kyoma
How have you compile OBSE plugging?

I try since some day but it's always a fail.
Firstly i have Visual 2010 and OBSE plugging project don't were made with older version. I must make a conversion and i lost some file link
Secondly every time i have this error : No file found OBSE_plugin.dll

Where i can find this library?
User avatar
Robert
 
Posts: 3394
Joined: Sun Sep 02, 2007 5:58 am

Post » Mon May 10, 2010 10:29 pm

I can't run "InsertXML" every frame because it causes the numbers being displayed to get overwritten. Lets say it's 1:00 PM, when 1:01 PM happens, the 0 from 1:00 is still displayed. The 1 from 1:01 overwrites the 0, so it's jumbled and you can't really tell what time it is. So, the XML can only be inserted once per game load. The only way I know how to do that is add to an GetGameLoaded block, or use a temp variable that is set only once per session.
When you call InsertXML it does not care if the element may already exist, it simply adds another instance of it with the same name. I suspect this is the reason inserting it multiple times appeared to fix your texture problem. When multiple semi-transparent images overlap they become less transparent as they stack on top of one another.

I tried the example you gave, and the texture displayed correctly, but the time did not.

EDIT:

No, I'm sorry. That script snippet displays the time correctly. I forgot to insert the menu type. But the texture is still faded and wonky as shown in the screenshot.
Ah yes, I forgot the menutype in my code. Without it the condition would always be false and thus insert stuff each time. Not really what I intended ofcourse. :P And as mentioned above the reason the texture appeared correctly was because many instances of the element (and it's semi-transparent box) overlapped.

Anyways, about the texture, there are a few things that might be causing it. All of which have more to do with the actual texture than with any XML code, like alpha channel, compression and/or mipmaps. It would really help if you could upload the exact file somewhere, if I experience the same problem with the exact same texture then we know where the problem lies.

From looking at the screenshot it appears as if there are two black boxes, a larger, semi-transparent one and a smaller fully filled one. Yet your XML code only contains a single image element so the game must indeed not be loading the texture as you expect. This can either be a bug (for which I have no idea what it might be) or simply a mixup with the texture being in the wrong format or something.

-kyoma
User avatar
Nathan Hunter
 
Posts: 3464
Joined: Sun Apr 29, 2007 9:58 am

Post » Mon May 10, 2010 6:06 pm

When you call InsertXML it does not care if the element may already exist, it simply adds another instance of it with the same name. I suspect this is the reason inserting it multiple times appeared to fix your texture problem. When multiple semi-transparent images overlap they become less transparent as they stack on top of one another.


Okay. But do you have any idea how to fix the transparent texture problem when you call the function to insert the xml only once?
User avatar
bonita mathews
 
Posts: 3405
Joined: Sun Aug 06, 2006 5:04 am

Post » Mon May 10, 2010 11:44 pm

Okay. But do you have any idea how to fix the transparent texture problem when you call the function to insert the xml only once?
First try adding your XML code directly to the HUDMainMenu, just to rule out (or confirm) any particular issue with MenuQue.
User avatar
Alessandra Botham
 
Posts: 3440
Joined: Mon Nov 13, 2006 6:27 pm

Post » Tue May 11, 2010 12:14 am

First try adding your XML code directly to the HUDMainMenu, just to rule out (or confirm) any particular issue with MenuQue.


Okay. Just to clarify, you mean via an XML file insertion? Modify the main HUD XML, right?
User avatar
TRIsha FEnnesse
 
Posts: 3369
Joined: Sun Feb 04, 2007 5:59 am

Post » Mon May 10, 2010 12:55 pm

No, I think kyoma was suggesting that you just copy your XML into HUD main menu as a test. Basically replicate what insert XML would do without using that command.
User avatar
tiffany Royal
 
Posts: 3340
Joined: Mon Dec 25, 2006 1:48 pm

Post » Tue May 11, 2010 12:37 am

Okay. Just to clarify, you mean via an XML file insertion? Modify the main HUD XML, right?

No, I think kyoma was suggesting that you just copy your XML into HUD main menu as a test. Basically replicate what insert XML would do without using that command.

^this.
User avatar
Ebony Lawson
 
Posts: 3504
Joined: Fri Feb 16, 2007 11:00 am

PreviousNext

Return to IV - Oblivion