[Relz] OBSE Plugin - MenuQue

Post » Mon May 02, 2011 8:27 pm

Hi, just stumbled upon this, but i should let you know that MenuQue clashes with OBJA (the plugin that allows you to read japanese in game). Since i use many japanese mods, that is kinda essential for me. But i also want to use HudBars, and since that needs MenuQue, i am stuck. Can you see if you can fix that soon? Thank you in advance!
Do you have a link to it? Oh and it clashes how, by crashing?

EDIT: How does it work exactly, does it allow the display of japanese characters/fonts (which I presume the normal english version of Oblivion can't)?
User avatar
Ashley Campos
 
Posts: 3415
Joined: Fri Sep 22, 2006 9:03 pm

Post » Mon May 02, 2011 6:52 pm

Some interesting news, I was planning on making a small update to MenuQue and then release the new MiniMap today. Both because it's my birthday and because 1/11/'11 is sooo much better than 1/1/'11 :P (are you reading this, shadeMe?). But due to unforseen yet good developements (see below) I won't be able to make that deadline. Sorry.

Now as for these developements, over the past few weeks I've been busy decoding all of the menu related stuff in Oblivion, the hardcoded things in particular. Like having a scrollbar scroll according to the mousewheel or being able to drag an element around without requiring alot of excess scripting to fake it. And I am pleased to report that I found a way to replicate these things for pretty much any (custom) element should the modder choose to do so. All the work will be done by MenuQue so no additional scripting is needed.

The things on the list are:
  • Scrollbar - will move back and forth when you use the mouse wheel(s). Technically you could do something totally different, the only real behaviour is that a specific trait is decreased and increased when you use the mouse wheel.
  • Dragging - dragging an element around, can be either horizontal, vertical or even both (within a predefined rectangular window).
  • TextEdit - while this is much simpeler compared to OBSE's TextInput it is also more flexible with where and how things are displayed. It will behave pretty much like the existing textedit components for menus such as alchemy or enchantment.
All of these things can be achieved by simply giving the intended element an trait with a specific string-constant. Some will support additional options which can be configured through traits. Something like this
	 &DragRect;  <!-- marks the element as one that can be dragged around -->	.....
And that's the news for now. I hope to round things up sooner rather than later but I need to tidy things up too.

-kyoma
User avatar
Ebony Lawson
 
Posts: 3504
Joined: Fri Feb 16, 2007 11:00 am

Post » Tue May 03, 2011 4:05 am

Some interesting news, I was planning on making a small update to MenuQue and then release the new MiniMap today. Both because it's my birthday and because 1/11/'11 is sooo much better than 1/1/'11 :P (are you reading this, shadeMe?).
A little late, but happy birthday :cake:

The things on the list are:
  • Scrollbar - will move back and forth when you use the mouse wheel(s). Technically you could do something totally different, the only real behaviour is that a specific trait is decreased and increased when you use the mouse wheel.
  • Dragging - dragging an element around, can be either horizontal, vertical or even both (within a predefined rectangular window).
  • TextEdit - while this is much simpeler compared to OBSE's TextInput it is also more flexible with where and how things are displayed. It will behave pretty much like the existing textedit components for menus such as alchemy or enchantment.

This sounds really amazing. I imagine I will just have to implement the dragging functionality to HUD Status Bars (though making the new positions stick will be quite a job). But when I think about it, maybe it will not work for the HUD where you have no mouse icon?.

Also, an update to Darnified UI, which adds mouse wheel scrolling to the major menus (Barter, Inventory, Quest, Spell, etc.) would be great, can I request such a mod from you :)

Btw, would it be possible to turn the draggable feature on/off - possibly by changing the trait with SetMenuFloatValue?


Anyway, great work as always. MenuQue is the second backbone (together with OBSE) to many of my mods (as you of course know) :foodndrink:
User avatar
Tina Tupou
 
Posts: 3487
Joined: Fri Mar 09, 2007 4:37 pm

Post » Tue May 03, 2011 4:47 am

Do you have a link to it? Oh and it clashes how, by crashing?

EDIT: How does it work exactly, does it allow the display of japanese characters/fonts (which I presume the normal english version of Oblivion can't)?


You can find the latest version of the plugin here:

http://jpmod.oblivion.z49.org/?%C6%FC%CB%DC%B8%EC%B2%BD%A5%D1%A5%C3%A5%C1

under the Beta heading, the v16 version.

or if you prefer a direct link to the Download: http://www.4shared.com/file/120321501/b49f07f8/TES4JaPatch016_beta3.html

The file needed from there is the obja_12416.dll which is an OBSE plugin and enables the use of windows fonts (that is True Type) so that japanese characters (and russian and chinese) can be depicted in game (at least that is my understanding how it works). I am not a programmer, i have no idea HOW it does that actually. It works fine on all versions of OBSE, however when i put in MenuQue (no matter the version) i get an immediate crash to desktop before even the loading screen with the message that the obja_dll is at fault.

EDIT: I should say that all logs (the obja log as well as the OBSE log) show that OBJA was loaded and injected correctly and with no errors.

Technically it is used by the japanese modder community as a translation tool (thats why there are OBJA_Loader.exe and such in the archive too), but for us american/european users the dll doubles as a way to display asian characters correctly. It even works well with the Darn/DarkDarn UI. Using the OBJA_config, you can even specify your own fonts so that it looks very close to the originals... As i said before i use a lot of japanese mods and as such it is indispensable to me.

I assume that your text handling function in MenuQue somehow clashes with what OBJA does (from your readme, that is the only thing that i can see could have an influence in both dlls). But again i have no idea and so it is my hope you can find a workaround, as i certainly would love to use both.

Oh and a happy birthday to you :) Thanks for your good work!
Cheers,
Emm
User avatar
Shelby McDonald
 
Posts: 3497
Joined: Sat Jan 13, 2007 2:29 pm

Post » Tue May 03, 2011 2:43 am

Happy birthday!

This just keeps getting better! Sounds like you have some good additions in the works. (Gentle reminder re:Win2000!)
User avatar
Jeff Turner
 
Posts: 3458
Joined: Tue Sep 04, 2007 5:35 pm

Post » Mon May 02, 2011 7:17 pm

...
Cool, thanks. Taking a look now. From the looks of things there's not much I can do to actually fix the conflict, merely avoid it by adding the option to disable the extra font stuff. Unless ofcourse there's a source code somewhere. I tried looking on the site (pretty doable with GoogleTranslate, thank deity) but I couldn't find much. Tomorrow I'll dig around some more.

Symon69: Yes good news about that, I finally got around to make a dual setup so in the future I'll be able to compile any release with VS2008 (and thus it should work with Win2000).
User avatar
sam smith
 
Posts: 3386
Joined: Sun Aug 05, 2007 3:55 am

Post » Tue May 03, 2011 4:53 am

Yeah, i guess disabling the extra font stuff would work, since i don't think many mods use that so far, do they? Would it be possible if you put that up as a temporary fix, so i can test it out?
I have no idea how much work that would be, and i thank you for even considering it.

I mean i know not every one needs the japanese fonts, but since i also use several mods by The Nice One (like the sleeping and hunger mods) HudBars are a great help. I'd hate to have to choose...
User avatar
Greg Cavaliere
 
Posts: 3514
Joined: Thu Nov 01, 2007 6:31 am

Post » Mon May 02, 2011 7:34 pm

I mean i know not every one needs the japanese fonts, but since i also use several mods by The Nice One (like the sleeping and hunger mods) HudBars are a great help. I'd hate to have to choose...
Problem is that MenuQue's font stuff was made for HUD Status Bars. But I guess status bars without text would still work...
User avatar
Klaire
 
Posts: 3405
Joined: Wed Sep 27, 2006 7:56 am

Post » Tue May 03, 2011 6:24 am

TheNiceOne, oh i see, wouldn't the status bars also work with default fonts? That is just removing the option to add custom fonts to the bars? Or is that a function that goes hand in hand...

I used the old status bar mod from kuertee before, but you recently pulled your support for that so i changed over to the Hud Status Bars (and also because it looked nicer). Thats also the reason why i got Menu Que in the first place. Since updating though i had no opportunity to play, so i only recently stumbled upon this incompatibility. My problem is that now so many mods use status bars that i can't really go back. I did not foresee any problems of this type. Anything with esps i can solve myself, but dlls are way over my head.

As is now, when i start without MenuQue i get a message that i need at least version 5 of it instaleld to get Hud Status Bars at all.
User avatar
Angela Woods
 
Posts: 3336
Joined: Fri Feb 09, 2007 2:15 pm

Post » Tue May 03, 2011 1:26 am

@Kyoma

Sorry, did not want to double post, but since there is no activity here for a while now, i have one request:

Could you please make a v7j (for japanese edition ;) of Menu Que without the extra Font support, so it will be compatible with OBJA?

I think that would help TheNiceOne greatly as well...
User avatar
Dorian Cozens
 
Posts: 3398
Joined: Sat May 26, 2007 9:47 am

Post » Tue May 03, 2011 3:05 am

I'm using MenuQue to read the strings.xml file and it's working great. I'm worried about replacing the user's strings.xml file though. Is it possible for me to define my own global menu with MenuQue? I'd like to create something like ObXP_strings.xml so that I don't overwrite the user's strings file.

Edit: The issue is that I need to read the contents into scripts, not just other menus. I could define any xml file and just include it in a menu, but I also need access to these strings in scripts.
User avatar
Lizzie
 
Posts: 3476
Joined: Sun Nov 19, 2006 5:51 am

Post » Tue May 03, 2011 8:44 am

In that case I'll let you in on a little secret, next version will finally have....*drums*.....X-Skills! Since I already made the transition from Oblivion-scripting to C++ many obstacles have already been cleared. Things I wouldn't have been able to do properly by simple scripting. Short list:
  • GetAllXSkills
  • CreateXSkill
  • DeleteXSkill
  • SetXSkillData
  • GetXSkillData
  • GetXSkillValues
Most of it is basically done but I wanted to test it some more before I released it. And I still need to make a decision on how to handle possible xskills as 'major' or 'class (x)skill'.

-kyoma


Any update on this? *wants to know how long it's possible to use X-Skills as an excuse*
Oh, by the way: could you please provide a command to hide a real skill completely?
I know it's possible to change all the stuff, but it would make things easier to just hide the skill completely and show every x-skill all the time instead of fiddling around which x-skill should be hidden (because it's already the real skill) atm.
User avatar
Paul Rice
 
Posts: 3430
Joined: Thu Jun 14, 2007 11:51 am

Post » Tue May 03, 2011 7:27 am

Sorry, did not want to double post, but since there is no activity here for a while now, i have one request:
Could you please make a v7j (for japanese edition ;) of Menu Que without the extra Font support, so it will be compatible with OBJA?
I think that would help TheNiceOne greatly as well...
Yes I've already implemented an ini option to disable the extra fonts.

I'm using MenuQue to read the strings.xml file and it's working great. I'm worried about replacing the user's strings.xml file though. Is it possible for me to define my own global menu with MenuQue? I'd like to create something like ObXP_strings.xml so that I don't overwrite the user's strings file.

Edit: The issue is that I need to read the contents into scripts, not just other menus. I could define any xml file and just include it in a menu, but I also need access to these strings in scripts.
Resolved through PM (I think :P).

Any update on this? *wants to know how long it's possible to use X-Skills as an excuse*
Oh, by the way: could you please provide a command to hide a real skill completely?
I know it's possible to change all the stuff, but it would make things easier to just hide the skill completely and show every x-skill all the time instead of fiddling around which x-skill should be hidden (because it's already the real skill) atm.
Hmm yes that would actually be much much easier than implemention some sort of swapping function/feature. Consider it added. As for updates, well most of the X-Skills stuff is done, only a little bit of serialization remains. Ofcourse there are alot of other new features that I'm implementing but I'm gonna force myself to make a todo list and stop adding new things to it. :blush:
User avatar
Veronica Flores
 
Posts: 3308
Joined: Mon Sep 11, 2006 5:26 pm

Post » Mon May 02, 2011 8:38 pm

I've been trying to figure out how to use your plugin to create a custom GUI for Advanced Magecraft.. I've figured most of it out, however a few things are giving me issues

I'm having trouble getting buttons to register properly using GetGenericButtonPressed, and I'm having trouble getting an icon displaying...

Here is the .xml in question, and the code for the menu... (The icon is this.., and the buttons, you should see..)

Just kinda let me know if you see anything wrong here..

Spoiler


	 &GenericMenu; 	 &no_click_past; 	 &true; 	 0.25 					 &true; 		 50 		 &true; 											
2
2
Disenchant Menu 3 117 59 33 255 &true;
2
5
3 64 64 5 1 1 3 220 2 1 117 59 33 255 11
2
5 Disenchant 22
2
5 Cancel


scn guiDisenchantshort Buttonref Itemstring_var IconPathstring_var ItemNameBegin Function { Item }	if (aaaMenuQST.SubMenu == 1)		ShowGenericMenu "Disenchant.xml"					  			Let IconPath := GetTexturePath Item		Let ItemName := GetName Item				SetMenuStringValue "user0|%z" IconPath 1011		SetMenuStringValue "user1|%z" ItemName 1011		Set aaaMenuQST.SubMenu to 2	elseif (aaaMenuQST.SubMenu == 2)		Set Button to GetGenericButtonPressed		; Disenchant Button		if (Button == 11)			Call aaaDisenchant Item			sv_Destruct IconPath ItemName			Call aaaReleaseHotkey			Set aaaMenuQST.SubMenu to 0		endif		; Exit Button		if (Button == 22)			Message "Disenchant Canceled!"			sv_Destruct IconPath ItemName			Call aaaReleaseHotkey			Set aaaMenuQST.SubMenu to 0		endif	endifEnd


User avatar
trisha punch
 
Posts: 3410
Joined: Thu Jul 13, 2006 5:38 am

Post » Mon May 02, 2011 10:41 pm

I've been trying to figure out how to use your plugin to create a custom GUI for Advanced Magecraft.. I've figured most of it out, however a few things are giving me issues

I'm having trouble getting buttons to register properly using GetGenericButtonPressed, and I'm having trouble getting an icon displaying...

Here is the .xml in question, and the code for the menu... (The icon is this.., and the buttons, you should see..)

Just kinda let me know if you see anything wrong here..
For the icon not displaying, try giving the and traits an initial (string) value in the xml (any sort of text will do the trick). The game gets confused when it comes across a trait that doesn't have an initial value (during the menu's construction). Most of the time it is simply skipped or removed.

As for GetGenericButtonPressed, what exactly does it return? Due to the implementation it should be called once before you open up a generic menu so try placing a GetGenericButtonPressed just before you call ShowGenericMenu.
User avatar
Dan Scott
 
Posts: 3373
Joined: Sun Nov 11, 2007 3:45 am

Post » Mon May 02, 2011 6:19 pm

Cool, thanks. :)
User avatar
Ezekiel Macallister
 
Posts: 3493
Joined: Fri Jun 22, 2007 12:08 pm

Post » Tue May 03, 2011 5:55 am

I made the changes you suggested, and it fixed the buttons not registering properly. :)

Adding a default icon, did make the icon appear(so my xml is good.), but it still won't take the value from GetTexturePath properly.. I don't know what the problem is, whether GetTexturePath isn't working correctly, or if I'm storing\retrieving it improperly, or what... ?

Anyways, thanks for the help, and for working on this, it's pretty awesome stuff. :)
User avatar
Laura Ellaby
 
Posts: 3355
Joined: Sun Jul 02, 2006 9:59 am

Post » Mon May 02, 2011 9:35 pm

Not sure why GetTexturePath might not work properly, try adding a PrintC line to double check the return value.
User avatar
Amysaurusrex
 
Posts: 3432
Joined: Wed Aug 09, 2006 2:45 pm

Post » Tue May 03, 2011 8:20 am

Not sure why GetTexturePath might not work properly, try adding a PrintC line to double check the return value.


I cls'd the console window, ran it a few times to be sure, nothing ever popped up..

Edit: No luck, still can't get it working, I think GetTexturePath is broken, or something.. (The OBSE thread is locked, so I can't really report it, etc,.. :()
User avatar
le GraiN
 
Posts: 3436
Joined: Thu Mar 22, 2007 6:48 pm

Post » Tue May 03, 2011 2:17 am

Just wanted to mirror a request\suggestion I made over at the Nexus, in case you don't read your endorsemants..

I was wondering if it would be possible to make a string literal character, or function, etc,..

Basically, I want to be able to do this..

string_var tmpLet tmp := StringLiteral "XML Code..." ; Basically, it will look for the first " and the last " and parse everything else into a string, keeping any special formatting..ShowGenericMenu "MyMenu"InsertXML tmp 1011 ; I may be confusing InsertXML with InsertXMLTemplate, one said it takes XML strings or file paths, unless I misunderstood what you meant.. ?


Then I could create prefabs inside my code, eliminating the need for creating actual .xml prefab resources, and requiring them to be installed properly, etc,.

This may be a stupid idea, or not possible, I don't really know, but it sounds good on paper. :P

--

As far as usage goes, I was thinking, I could put token items into the strings, and use string replace where needed to modify the prefab strings..

ie,..

		 		path_token	

User avatar
JeSsy ArEllano
 
Posts: 3369
Joined: Fri Oct 20, 2006 10:51 am

Post » Tue May 03, 2011 1:47 am

I wish you had your comments unlocked at the Nexus...

Anyways, I'm having some trouble, I"m trying to implement a quantity prompt, everything went well till it came time to get the current value of the slider..

I know that the horizontal scroll thing uses "user7" to store that value, but I can't seem to access it.. I've tried making my own "user" values and using copy src, I've tried GetMenuFloatValue, and even your own mq version of GetMenuFloatValue, etc,.. Nothing is working..

My hierarchy should be this.. form_background\quantity_scroll\user7 | but, that isn't working.. (GetMenuFloatValue)

Worse, is that I tried using PrintTileInfo, and it refuses to work, keeps telling me component not found, so I can't even begin to figure out what's going on..

(Here is the xml, I've tried accessing it using almost every name here, nothing..)

Spoiler

	 &GenericMenu; 	 &no_click_past; 	 &true; 	 0.25 	Title	Icon Path	Item Name	0			 &true; 		 50 		 &true; 		0		0			 			Menus\AdvancedMagecraft\SimpleMenu.dds						512				320		-1											
2
2
1 3
2
2 255 255 255 255
<!-- Item -------------------------------------------------> Menus\AdvancedMagecraft\Frame.dds 3 460 64 26 68 80 4 64 64 26 68 1 4 110 70 117 59 33 255 380 <!-- Item Value ------------------------------------------------------> Menus\Inventory\inv_icon_small_value.dds 4 32 32 5 5 1 4 10 117 59 33 255 <!-- Quantity Prompt ---------------------------------------------------------> <!-- SCROLL ============================================================================--> 4 <!-- ID for marker/slider --> <!-- 10 --> 350
2
35 5 1 &false; &true; &true; 1 Menus\dialog\dialog_selection_full.dds 255 1 120 64 60 21 3 &true; &true; 1 dialog\dialog_selection_cut.dds 104 64 100 0 <!-- NUMBER DISPLAY =====================================================================--> ¢er; 117 59 33 255
2
20 4
<!-- Buttons ----------------------------------------------------------------> 11 10 10 Yes 1 22 10 10 No 1


User avatar
Sarah Knight
 
Posts: 3416
Joined: Mon Jun 19, 2006 5:02 am

Post » Tue May 03, 2011 4:15 am

Just wanted to mirror a request\suggestion I made over at the Nexus, in case you don't read your endorsemants..
Hehe...yea (or should I say no) I don't really read (or check) things at TESNexus. I really should, shouldn't I.

I was wondering if it would be possible to make a string literal character, or function, etc,..

Basically, I want to be able to do this..

Then I could create prefabs inside my code, eliminating the need for creating actual .xml prefab resources, and requiring them to be installed properly, etc,.

This may be a stupid idea, or not possible, I don't really know, but it sounds good on paper. :P
From what you are describing it should be possible with the existing functions. The thing with InsertXML is that it takes an XML filepath (anything that ends with .xml) and paste its content after a custom placeholder file. Or if the string does not end with .xml it simply pastes the entire string after the placeholder file. Regardless of what or how the placeholder file is constructed the process remains the same.

Keep in mind that InsertXML takes a formatString so it uses OBSE's format specifier. Including the nice %q for using/adding quotation marks within a string. Atleast I take it that that was the special formatting you were talking about.

As far as usage goes, I was thinking, I could put token items into the strings, and use string replace where needed to modify the prefab strings..
ie,..
	 		path_token	

Such a thing is already possible, atleast in a central-access kinda way. You could structure it like this:
<!-- assuming this isn't the top-level element of your 'item' --> BLA  <!-- doesn't even have to be a userX trait, anything starting with a underscore would work too -->	  
Then you could change through script with easy access. In this example it the benefits aren't really that great but when you're working with lots of nested elements having a central place from which you config any 'variable traits' is very handy. But this wouldn't work for 'token-pasting' in the element name itself. Not entirely sure why that would be nessecary though, could you elaborate?

EDIT: On second though, you probably already knew that so perhaps I'm misunderstanding the question. :P


I wish you had your comments unlocked at the Nexus...
Maybe, although it would probably mean more posts and comments that simply get ignored due to forgetfullness. :(

Anyways, I'm having some trouble, I"m trying to implement a quantity prompt, everything went well till it came time to get the current value of the slider..

I know that the horizontal scroll thing uses "user7" to store that value, but I can't seem to access it.. I've tried making my own "user" values and using copy src, I've tried GetMenuFloatValue, and even your own mq version of GetMenuFloatValue, etc,.. Nothing is working..

My hierarchy should be this.. form_background\quantity_scroll\user7 | but, that isn't working.. (GetMenuFloatValue)

Worse, is that I tried using PrintTileInfo, and it refuses to work, keeps telling me component not found, so I can't even begin to figure out what's going on..

(Here is the xml, I've tried accessing it using almost every name here, nothing..)
Are you using 1011 as the menuType for GetMenuFloatValue (and the other functions that accept one)? Because there is a problem with using those functions without a specific menuType if the mouse is being held over an element that cannot be targeted (either a &false; or missing trait). This is due to the difference in accessing the appropriate menu when relying on the 'active menumode'.

-kyoma
User avatar
Peter lopez
 
Posts: 3383
Joined: Mon Sep 10, 2007 5:55 pm

Post » Mon May 02, 2011 10:44 pm

From what you are describing it should be possible with the existing functions. The thing with InsertXML is that it takes an XML filepath (anything that ends with .xml) and paste its content after a custom placeholder file. Or if the string does not end with .xml it simply pastes the entire string after the placeholder file. Regardless of what or how the placeholder file is constructed the process remains the same.

Keep in mind that InsertXML takes a formatString so it uses OBSE's format specifier. Including the nice %q for using/adding quotation marks within a string. Atleast I take it that that was the special formatting you were talking about.


I'm aware of %q, but there are a lot of xml formatters, are you sure a string can take all of them? (Even if it can, string literals are much easier to work with..)

For the next part, I think you did misunderstand me, I'm talking about using the factory method to create XML files on the fly.

(Pseudo Code In Use..)
scn CreateImageElementstring_var namestring_var pathstring_var ElementBegin Function { name, path }   Let Element := "                         path_token             "    Element.Replace(name_token, name)    Element.Replace(path_token, path}   SetFunctionValue ElementEnd


Then, I could insert that string, with InsertXML, thus being able to generate my XML files completely from code.. (That's why I want string literals, doing that any other way would get confusing, because some elements are very complex..)

Honestly, it might be more trouble than it's worth, and I"m not sure what the performance would be, though they could be created in a DoOnce, and stored in a string_var somewhere, so they don't need to be created over, and over,.. I don't know, it was just a passing thought, and it sounded good at the time..

Are you using 1011 as the menuType for GetMenuFloatValue (and the other functions that accept one)? Because there is a problem with using those functions without a specific menuType if the mouse is being held over an element that cannot be targeted (either a &false; or missing trait). This is due to the difference in accessing the appropriate menu when relying on the 'active menumode'.


Yes, I used that menutype. (Edit: I tried sticking some tags in, that did allow me to view it via PrintActiveTileInfo, but I'm still not able to get at quantity_scroll\user7 uising GetMenuFloatValue yet.. Does each tier in the hierarchy need tags, I'm obviously missing something, I"m going to go look at a vanilla XML to see if I can't figure it out..)
User avatar
Kim Kay
 
Posts: 3427
Joined: Fri Oct 13, 2006 10:45 am

Post » Mon May 02, 2011 11:18 pm

I'm aware of %q, but there are a lot of xml formatters, are you sure a string can take all of them? (Even if it can, string literals are much easier to work with..)

For the next part, I think you did misunderstand me, I'm talking about using the factory method to create XML files on the fly.
....
Then, I could insert that string, with InsertXML, thus being able to generate my XML files completely from code.. (That's why I want string literals, doing that any other way would get confusing, because some elements are very complex..)

Honestly, it might be more trouble than it's worth, and I"m not sure what the performance would be, though they could be created in a DoOnce, and stored in a string_var somewhere, so they don't need to be created over, and over,.. I don't know, it was just a passing thought, and it sounded good at the time..
Hmmm, it sounds more like something for OBSE. The only real character that cannot be used directly inside a string is the quotation mark. Apart from that it's just another string. :shrug:

EDIT: Alternatively you could build the string using two single quotation marks and then before using it replace all '' (2x single) with " (1x double) marks.

And a secret if you're interested
Spoiler

At the moment there is actually a TileVar feature in MenuQue. Where you'd get a pointer to a tile (well just an integer ofcourse) which can then be used by G/SetMenuActiveValue directly. For now only InsertXMLTemplate returns a TileVar (or rather, it is the only function to obtain a TileVar).

So you can create elements, with dynamic names, that can be accessed later on. The templates themselves would be defined in the XML so no need for external files or tricky string literals. The trick lies with InsertXMLTemplate, which has this syntax (I think the docs are wrong though)
(returnID) InsertXMLTemplate "targetElement|templateName|newName" menuType


I'm not really sure what would be the best way to explain this so I'll simply post the code I use for the next MiniMap version (with MapMarkers).
This is a snippet from the script:
	let sRoot := "_minimap\_minimap_world\_minimap_world_icons"	let iMyID := InsertXMLTemplate "%z|_minimap_world_template|_marker_%g", sRoot, iMyIndex, 1004	;the returned ID is stored in an array for future use and I do a little more initialization of the element	...	mqSetMenuActiveFloatValue "_x", 1004, fPosX, iMyID	mqSetMenuActiveFloatValue "_y", 1004, fPosY, iMyID	mqSetMenuActiveFloatValue "_type", 1004, iMyType, iMyID	...the ID remains valid as long as the menu the element belongs to stays open

And this is a snippet from the XML (all in the same file)
															...										....	
For what it's worth, I'm beginning to write a little tutorial on how to use all these functions together with ShowGenericMenu as a whole. Hopefully with better examples. To be honest I didn't even wanna reveal this hidden feature until I had documented it cause it may sound logical in my head, I know it may not be logical in other people's heads. :P


-kyoma
User avatar
Dark Mogul
 
Posts: 3438
Joined: Tue Feb 20, 2007 11:51 am

Post » Mon May 02, 2011 7:02 pm

Well, I'll go over that after I get some sleep, try a few things out, see what I can do with it.. (Way too tired for all that right now..)

user7 is still being stubborn, I'm about to just stick the horizontal_scroll template(ie, it's contents..) directly into my XML file, then I can access the value like that.. (In the same way user7 is being assigned....)

See here..

prefabs\horizontal_scroll.xml<!-- rect name="horizontal_scroll" -->	  


I should be able to do the same, and avoid the issue altogether, because I have no problem accessing my local user values... :)

(Edit: I was hoping to figure out where I was going wrong, and do it properly, but if I can't solve an issue, I'll go around it, I got a mod to build,.. Templates are just abstraction layers anyways, so it really doesn't matter I guess, they just exist to make the XML's a bit more easy to work with, and read, etc,.)

Btw, I wrote down that thing, so if you want, ya can delete that, if you know what I mean.. :)
User avatar
Susan
 
Posts: 3536
Joined: Sun Jun 25, 2006 2:46 am

PreviousNext

Return to IV - Oblivion