[Suggestion] Global format configuration
Let me start off with being very excited for this mod. I like the customizability, and will continue to keep updated on your progress. I do, however, find one aspect of this mod very annoying, which is why I'm creating this issue.
Global Customizability As documented, there are some strings defined by internal id's, more specifically using the "DisplayName" attribute. Since our server uses a specific way to display all the text in Waila, all entries added by your mod are being displayed wrongly. I would like to request a feature with which we can override the display style. For example, add a configuration file in which the display format is displayed as follows and can be edited to reflect global changes:
display {
# Change the default display format of line nodes.
S:"Display Format"="DISPLAYNAME + TAB + ALIGNRIGHT + WHITE + RETURN"
}
This is just an example. Please do not feel inclined to do it this way if you would do it at all. It would make it easier for me (and I'm sure a lot of people too) to easily configure the display format of default entries. Of course, this can also easily be achieved by keeping "DisplayName" empty and adding the formatting to "return", but I just feel like this would be helpful to a lot of people, me included.
I would personally use this in the following way (for another example):
display {
# Change the default display format of line nodes.
S:"Display Format"="YELLOW + DISPLAYNAME + \": \" + WHITE + RETURN"
}
If this could be added I would be grateful. Again, it's just an ease-of-use thing for "lazy" people. If you have any questions, feel free to ask them -- always prepared to answer them. :+1:
Edit: If you're unclear of what I'm trying to ask specifically, I'm asking for a way to customize this:
if (patternMap == ConfigHandler.tooltipPattern) {
tip += "\u00A77" + displayname + ": \u00A7f";
} else {
tip += displayname + "\u00A4\u00A4a\u00A4\u00A4b\u00A7f";
}
JSHandler.java @ line 60
I hope to use OmniOcular substitute for Waila,then i can use it without Waila!
2015-07-26 6:44 GMT+08:00 Nadermane [email protected]:
Let me start off with being very excited for this mod. I like the customizability, and will continue to keep updated on your progress. I do, however, find one aspect of this mod very annoying, which is why I'm creating this issue.
Global Customizability As documented, there are some strings defined by internal id's, more specifically using the "DisplayName" attribute. Since our server uses a specific way to display all the text in Waila, all entries added by your mod are being displayed wrongly. I would like to request a feature with which we can override the display style. For example, add a configuration file in which the display format is displayed as follows and can be edited to reflect global changes:
display {
Change the default display format of line nodes.
S:"Display Format"="DISPLAYNAME + TAB + ALIGNRIGHT + WHITE + RETURN" }
This is just an example. Please do not feel inclined to do it this way if you would do it at all. It would make it easier for me (and I'm sure a lot of people too) to easily configure the display format of default entries. Of course, this can also easily be achieved by keeping "DisplayName" empty and adding the formatting to "return", but I just feel like this would be helpful to a lot of people, me included.
I would personally use this in the following way (for another example):
display {
Change the default display format of line nodes.
S:"Display Format"="DISPLAYNAME + ": " + RETURN" }
If this could be added I would be grateful. Again, it's just an ease-of-use thing for "lazy" people. If you have any questions, feel free to ask them -- always prepared to answer them. [image: :+1:]
— Reply to this email directly or view it on GitHub https://github.com/exzhawk/OmniOcular/issues/32.
@Nadermane I'm considering making a basic.xml(function.xml, default.xml, config.xml or something) to save configurations/common JavaScript functions and make it run like normal xml files(set at server side, apply to all client). Will this fit your situation? Or is a ordinary config/OmniOcular.cfg just better... @Antecer Waila has already support/been supported by many mods. I just don't want to reinvent too many wheels ;)
@exzhawk I'm sorry, I'm having a little bit of a tough time understanding you.
The way I interpret your comment is that you are trying to figure out a structure for your configuration files. If that's the case, here's a folder structure I would personally recommend which kind-of makes sense with your comment:
/config/
/OmniOcular/
*.xml-files for tooltip configuration (for example, "Botania.xml")
OmniOcular.xml
Pay close attention to the indents for my preferred file structure. I wouldn't simply mash all existing *.xml files into one *.xml file. I have a feeling other users may like the ability to split different mods into different *.xml files. So, as you can see in the file structure above, maybe have a general OmniOcular.xml file for all your general settings and configuration, and leave the layout and scripts be in a dedicated folder.
Now, what I don't quite follow about your comment is - and forgive me if I sound rude, I don't intend it to be - what it has to do with the original question. I am asking for a very specific feature, which is the ability to edit the styling of "DisplayName".
If you are asking for feedback on how and where to save it, then I should have already answered that question. If that wasn't your intention at all, please clarify on what you are specifically asking.
If you have anything else to ask me, please do ask. If my way of asking further comment is rude, please excuse me for that as - once again - that was not my intention. :-)
Thank you for taking the time to respond to my issue.
@Nadermane Now I'm thinking about this structure... Because config (display style here) is nothing special, it's just another config file for a mod.
/config/
/OmniOcular/
*.xml-files
OmniOcular.xml
and in OmniOcular.xml
<oo>
<config id="displayname">
"YELLOW + DISPLAYNAME + \": \" + WHITE + RETURN"
</config>
<init>
function commonFunctions(){}
</init>
</oo>
That's why I involved this question -- to make a place for mod irrelevant/global config.
BTW, I'm curious about "a specific way to display all the text in Waila". Could you tell me more about it or show me a picture? Just curious XD
@exzhawk It all makes sense now, thank you.
The structure you provided make a lot of sense and are easy to differentiate. I think it would be great to have it that way, although in this structure where you can have multiple mods, the "Omni" xml file could get confusing, however, I like it.
Also, sure. I can elaborate on the "specific way to display" thing. What I was referring to is the plain style of configurable WAILA entries. Where possible, we use yellow text as the "title" (in your case "DisplayName") followed by a colon and a space, and then the variable in yellow. This is in line with the InGameInfo's way to display information. We like to try and make the different user interfaces look the same. It's kind of an OCD thing. It's just a personal preference, really. It's true that we can't do it everywhere in WAILA (yet), but we sure try to keep it the same everywhere.