IsharaMeradin Posted May 14, 2014 Share Posted May 14, 2014 (edited) I'm trying to use LoadCustomContent in the OnPageReset event to show a DDS image as a title page. I doubt there is a problem with the code. I replicated the code that I used on another project where it works. I think the problem is with GIMP's DDS plugin. My previous image has the Imperial/Dragonborn symbol on the left with mod title and author name on the right. The symbol had black sent to transparency and the background is transparent. I had saved it in DXT5 format. File size is 1,342 KB. It works great. My new image is the same thing and saved the same way but it has a file size of 451 KB. When the page is loaded, nothing is shown and it prevents any other mod menus from having their title pages shown whether they be DDS or SWF. Reason I think it is GIMP's DDS plugin is that I recently (like 2 months ago) got a new computer, downloaded and installed all my utilities. Apparently the DDS plugin for GIMP was updated last December so my old setup had the older plugin. Unfortunately, I no longer have access to those files (gone, wiped, kaput). The mcm code (just to rule that out) is as follows: (EDITED to show entire MCM script) Scriptname abimBQ_MCMQuestScript extends SKI_ConfigBase ; SCRIPT VERSION ---------------------------------------------------------------------------------- int function GetVersion() return 1 ; Default version endFunction ; PRIVATE VARIABLES ------------------------------------------------------------------------------- ; OIDs (T:Text B:Toggle S:Slider M:Menu, C:Color, K:Key) int _myTextOID_T int _myToggle_OID_B int _mySliderOID_S int _myMenuOID_M int _myColorOID_C int _myKeyOID_K ; State int OIDBodySlotChoice String[] MeshChoice int BSIndex = 14 int OIDFBSChoice int FBSIndex = 14 int OIDPosition String[] PositionChoice int PositionIndex = 0 int OIDFPosition int FPositionIndex = 0 ; ... ; Internal GlobalVariable Property BoltSlot Auto GlobalVariable Property FBoltSlot Auto FormList Property AllBoltQuivers Auto Quest Property BoltEquipQuest Auto GlobalVariable Property QuiverPosition Auto GlobalVariable Property FQuiverPosition Auto ReferenceAlias[] Property QuiverHolders Auto ; ... ; INITIALIZATION ---------------------------------------------------------------------------------- ; @implements SKI_ConfigBase event OnConfigInit() {Called when this config menu is initialized} PositionChoice = new string[2] PositionChoice[0] = "$PositionChoice0" PositionChoice[1] = "$PositionChoice1" MeshChoice = new string[15] MeshChoice[0] = "$MeshChoice0" MeshChoice[1] = "$MeshChoice1" MeshChoice[2] = "$MeshChoice2" MeshChoice[3] = "$MeshChoice3" MeshChoice[4] = "$MeshChoice4" MeshChoice[5] = "$MeshChoice5" MeshChoice[6] = "$MeshChoice6" MeshChoice[7] = "$MeshChoice7" MeshChoice[8] = "$MeshChoice8" MeshChoice[9] = "$MeshChoice9" MeshChoice[10] = "$MeshChoice10" MeshChoice[11] = "$MeshChoice11" MeshChoice[12] = "$MeshChoice12" MeshChoice[13] = "$MeshChoice13" MeshChoice[14] = "$MeshChoice14" Pages = new string[1] Pages[0] = "$PageOne" If !(BoltEquipQuest.IsRunning()) BoltEquipQuest.Start() EndIf ; ... endEvent ; @implements SKI_QuestBase event OnVersionUpdate(int a_version) {Called when a version update of this script has been detected} ; ... endEvent ; FUNCTIONS ------------------------------------------------------------------------------------------ Function RemoveQuivers() Int QHSize = QuiverHolders.Length Int index = 0 While index < QHSize If QuiverHolders[index] If QuiverHolders[index].GetActorReference() Actor CurrentQH = QuiverHolders[index].GetActorReference() Int Num = CurrentQH.GetItemCount(AllBoltQuivers) If Num >= 1 CurrentQH.RemoveItem(AllBoltQuivers,Num,true) EndIf EndIf EndIf index += 1 EndWhile EndFunction Function GetQuivers() If PositionIndex == 0 QuiverPosition.SetValueInt(0) ElseIf PositionIndex == 1 QuiverPosition.SetValueInt(1) EndIf If BSIndex == 0 BoltSlot.SetValueInt(44) ElseIf BSIndex == 1 BoltSlot.SetValueInt(45) ElseIf BSIndex == 2 BoltSlot.SetValueInt(46) ElseIf BSIndex == 3 BoltSlot.SetValueInt(47) ElseIf BSIndex == 4 BoltSlot.SetValueInt(48) ElseIf BSIndex == 5 BoltSlot.SetValueInt(49) ElseIf BSIndex == 6 BoltSlot.SetValueInt(52) ElseIf BSIndex == 7 BoltSlot.SetValueInt(53) ElseIf BSIndex == 8 BoltSlot.SetValueInt(54) ElseIf BSIndex == 9 BoltSlot.SetValueInt(55) ElseIf BSIndex == 10 BoltSlot.SetValueInt(56) ElseIf BSIndex == 11 BoltSlot.SetValueInt(57) ElseIf BSIndex == 12 BoltSlot.SetValueInt(58) ElseIf BSIndex == 13 BoltSlot.SetValueInt(59) ElseIf BSIndex == 14 BoltSlot.SetValueInt(60) EndIf EndFunction Function GetFollowerQuivers() If FPositionIndex == 0 FQuiverPosition.SetValueInt(0) ElseIf FPositionIndex == 1 FQuiverPosition.SetValueInt(1) EndIf If FBSIndex == 0 FBoltSlot.SetValueInt(44) ElseIf FBSIndex == 1 FBoltSlot.SetValueInt(45) ElseIf FBSIndex == 2 FBoltSlot.SetValueInt(46) ElseIf FBSIndex == 3 FBoltSlot.SetValueInt(47) ElseIf FBSIndex == 4 FBoltSlot.SetValueInt(48) ElseIf FBSIndex == 5 FBoltSlot.SetValueInt(49) ElseIf FBSIndex == 6 FBoltSlot.SetValueInt(52) ElseIf FBSIndex == 7 FBoltSlot.SetValueInt(53) ElseIf FBSIndex == 8 FBoltSlot.SetValueInt(54) ElseIf FBSIndex == 9 FBoltSlot.SetValueInt(55) ElseIf FBSIndex == 10 FBoltSlot.SetValueInt(56) ElseIf FBSIndex == 11 FBoltSlot.SetValueInt(57) ElseIf FBSIndex == 12 FBoltSlot.SetValueInt(58) ElseIf FBSIndex == 13 FBoltSlot.SetValueInt(59) ElseIf FBSIndex == 14 FBoltSlot.SetValueInt(60) EndIf EndFunction ; EVENTS ------------------------------------------------------------------------------------------ ; @implements SKI_ConfigBase event OnPageReset(string a_page) {Called when a new page is selected, including the initial empty page} If a_page == "" ; LoadCustomContent("abim/IMS_Title.dds") ; return ; else ; UnloadCustomContent() EndIf If a_page == "$PageOne" SetCursorFillMode(LEFT_TO_RIGHT) SetCursorPosition(0) AddHeaderOption("$PageOneHeaderZero") AddHeaderOption("$PageOneHeaderOne") OIDBodySlotChoice = AddMenuOption("$PageOneSharedOptionZero",MeshChoice[BSIndex]) OIDFBSChoice = AddMenuOption("$PageOneSharedOptionZero",MeshChoice[FBSIndex]) OIDPosition = AddMenuOption("$PageOneSharedOptionOne",PositionChoice[PositionIndex]) OIDFPosition = AddMenuOption("$PageOneSharedOptionOne",PositionChoice[FPositionIndex]) EndIf ; ... endEvent ; @implements SKI_ConfigBase event OnOptionHighlight(int a_option) {Called when highlighting an option} If a_option == OIDBodySlotChoice SetInfoText("$InfoTextP1HZOZ") ElseIf a_option == OIDFBSChoice SetInfoText("$InfoTextP1H1OZ") ElseIf a_option == OIDPosition SetInfoText("$InfoTextP1HZO1") ElseIf a_option == OIDFPosition SetInfoText("Choice of follower equip position for the bolt quiver. \n DEFAULT: Back") EndIf ; ... endEvent ; @implements SKI_ConfigBase event OnOptionSelect(int a_option) {Called when a non-interactive option has been selected} ; ... endEvent ; @implements SKI_ConfigBase event OnOptionDefault(int a_option) {Called when resetting an option to its default value} If a_option == OIDBodySlotChoice BSIndex = 14 ElseIf a_option == OIDFBSChoice FBSIndex = 14 ElseIf a_option == OIDPosition PositionIndex = 0 ElseIf a_option == OIDFPosition FPositionIndex = 0 EndIf ; ... endEvent ; @implements SKI_ConfigBase event OnOptionSliderOpen(int a_option) {Called when a slider option has been selected} ; ... endEvent ; @implements SKI_ConfigBase event OnOptionSliderAccept(int a_option, float a_value) {Called when a new slider value has been accepted} ; ... endEvent ; @implements SKI_ConfigBase event OnOptionMenuOpen(int a_option) {Called when a menu option has been selected} if (a_option == OIDBodySlotChoice) SetMenuDialogOptions(MeshChoice) SetMenuDialogStartIndex(BSIndex) SetMenuDialogDefaultIndex(60) Elseif (a_option == OIDFBSChoice) SetMenuDialogOptions(MeshChoice) SetMenuDialogStartIndex(FBSIndex) SetMenuDialogDefaultIndex(60) ElseIf a_option == OIDPosition SetMenuDialogOptions(PositionChoice) SetMenuDialogStartIndex(PositionIndex) SetMenuDialogDefaultIndex(0) ElseIf a_option == OIDFPosition SetMenuDialogOptions(PositionChoice) SetMenuDialogStartIndex(FPositionIndex) SetMenuDialogDefaultIndex(0) endIf ; ... endEvent ; @implements SKI_ConfigBase event OnOptionMenuAccept(int a_option, int a_index) {Called when a menu entry has been accepted} if (a_option == OIDBodySlotChoice) BSIndex = a_index SetMenuOptionValue(OIDBodySlotChoice, MeshChoice[BSIndex]) Elseif (a_option == OIDFBSChoice) FBSIndex = a_index SetMenuOptionValue(OIDFBSChoice, MeshChoice[FBSIndex]) ElseIf a_option == OIDPosition PositionIndex = a_index SetMenuOptionValue(OIDPosition, PositionChoice[PositionIndex]) ElseIf a_option == OIDFPosition FPositionIndex = a_index SetMenuOptionValue(OIDFPosition, PositionChoice[FPositionIndex]) endIf ; ... endEvent ; @implements SKI_ConfigBase event OnOptionColorOpen(int a_option) {Called when a color option has been selected} ; ... endEvent ; @implements SKI_ConfigBase event OnOptionColorAccept(int a_option, int a_color) {Called when a new color has been accepted} ; ... endEvent ; @implements SKI_ConfigBase event OnOptionKeyMapChange(int a_option, int a_keyCode, string a_conflictControl, string a_conflictName) {Called when a key has been remapped} ; ... endEvent ; called when menu is closed -- good place to make stuff happen Event OnConfigClose() RemoveQuivers() Utility.Wait(0.1) BoltEquipQuest.Stop() GetQuivers() GetFollowerQuivers() BoltEquipQuest.Start() EndEvent It would appear that the only way to get it working would be to use the older DDS plugin. Unfortunately as far as I can see on the DDS plugin site, the only way to get an older version is to compile it or something. I have no knowledge or experience in doing that. As an alternative I tried using Paint.Net which opens and saves DDS files without the need of a plugin. It too had the same result. Not to mention that I couldn't figure out how to do much in that program. Are there any other FREE alternatives to get a working DDS file? EDIT:Guess I have two problems here.1. the DDS file isn't being made right2. even with the working image loaded or no image loaded it still prevents the other mod pages from showing their title pages and eventually locks up. Papyrus log is spammed with this (5 per index number) [05/14/2014 - 04:23:56PM] Error: Array index 127 is out of range (0-0) stack: [abimBQ_MCMQuest (19020BD1)].abimBQ_MCMQuestScript.ClearOptionBuffers() - "SKI_ConfigBase.psc" Line 886 [abimBQ_MCMQuest (19020BD1)].abimBQ_MCMQuestScript.CloseConfig() - "SKI_ConfigBase.psc" Line 769 [SKI_ConfigManagerInstance (2A000802)].SKI_ConfigManager.OnMenuClose() - "SKI_ConfigManager.psc" Line 122 Edited May 14, 2014 by IsharaMeradin Link to comment Share on other sites More sharing options...
IsharaMeradin Posted May 14, 2014 Author Share Posted May 14, 2014 (edited) The DDS problem turned out to be that it needed to be uncompressed. Thought I had done the earlier image at DXT5 because of its large file size. I guess not. The other issue (the log spam and locking up of other mod menus) only appears if I enter other mod menus without exiting fully back to the game. I suspect it is because I am using OnConfigClose to run functions that set global variables based on the combination of options selected. No idea if that is resolvable or not. EDIT:Found the problem with the MCM script. Any MCM menu that starts a quest will interfere with MCM's clean up if the user goes on to another mod's MCM menu. The user must exit all menus and return to the game fully before going back in and using other mod MCM menus. This was discovered when I received the same type of spam after activating Auto Unequip Ammo's follower addon. I experienced the same behavior with it as with my own mod. Edited May 15, 2014 by IsharaMeradin Link to comment Share on other sites More sharing options...
0varon Posted June 4, 2015 Share Posted June 4, 2015 (edited) DDS file compression and more I've had the same MCM related problems with compressed DDS files through the GIMP plugin andyes, there are working alternatives to get the compressed file to work:1. Compressed DDS e.g. DXT5: GIMP plugin works in most cases if width=height e.g. 512x512 (but doesn't look good in MCM)2. Download 'The Compressionator' a pro developer freeware tool made by AMD. Its by far the best GUI-tool out there: http://developer.amd.com/tools-and-sdks/archive/legacy-cpu-gpu-tools/the-compressonator/ Compressed (e.g. DXT5) DDS files worked with MCM instantly!3. If you want to have a fast look in your DDS files get this free great ultra fast DDS viewer : http://amnoid.de/ddsview/index.html4. Get 'SageThumbs' a free powerful windows shell extension allowing to preview DDS and tons of other image files in your Win folder: http://sourceforge.net/projects/sagethumbs/May you do well! :smile: Edited June 4, 2015 by 0varon Link to comment Share on other sites More sharing options...
Recommended Posts