It looks like you're new here. If you want to get involved, click one of these buttons!
AnimationList = NessIdleLeft#NessWalkLeft#NessIdleRight#NessWalkRight#NessIdleUp#NessWalkUp#NessIdleDown#NessWalkDown LinkList = NessILL#NessIL-WL#NessWLL#NessWL-IL#NessIL-IR#NessIL-IU#NessIRL#NessIR-WR#NessWRL#NessWR-IR#NessIR-IL#NessIR-ID#NessIUL#NessIU-WU#NessWUL#NessWU-IU#NessIU-IR#NessIDL#NessID-WD#NessWDL#NessWD-ID#NessID-IL
AnimationList = NessIdleLeft#NessWalkLeft#NessIdleRight#NessWalkRight#NessIdleUp#NessWalkUp#NessIdleDown#NessWalkDown LinkList = NessILL#NessIL-WL#NessWLL#NessWL-IL#NessIL-IR#NessIL-IU# ; Left behaviors NessIRL#NessIR-WR#NessWRL#NessWR-IR#NessIR-IL#NessIR-ID# ; Right behaviors NessIUL#NessIU-WU#NessWUL#NessWU-IU#NessIU-IR# ; Up behaviors NessIDL#NessID-WD#NessWDL#NessWD-ID#NessID-IL ; Down behaviors
There's still a way to input multi-lines values, using "none", but this doesn't support lists, only single values.
So I'm afraid not! I could add a character to manually specify a value isn't finished, like in C, I guess. I need to think more about it though.
If this were possible, there would be a couple more added benefits.
You could add comments at the end of each line for organization.
This would also allow for a config section that inherits from another section to copy and extend the linked list defined in the parent section, rather than merely overwriting it. I found myself wanting to do this once the other day.
I don't know if this aligns with your vision of the config system, but just an idea!
However, this can't really be used for extending a list through inheritance as inheritance is dynamic and simply a reference.
When a value is inherited, there's no local copy of it, it simply references its parent allowing for on-the-fly inheritance changes, no matter how deep the inheritance graph is.
If a local copy were to be made (and extended), that'd mean a few things:
- everytime a parent value is changed, all the children need to be reprocessed. We don't know who the children are so we'd need to store that info and reprocess the whole dependency graph of a node every time a value is changed, added or removed.
- everytime an inheritance dependency is changed, we'd also need to reprocess everything (deleting a section, changing its parent, ...)
Worse: the indexing (ie. the size of the list) can drastically change and become invalid if a parent's list size change at runtime.
As for the comments at the end of the line, I can allow them after the escape character.
As for your specific case, can you tell me in which case you needed to extend a list by inheritance, if you don't mind?
When I need a dynamic list, in some case (like a list of objects) I'd go with a property tag instead and build the list at runtime. An other option is too have a list of list or even patching list elements programmatically when loading your game for example.
I don't have any ideas though. Sorry.
I get around it simply by putting my cursor to the line below and using the left arrow once.
The way we declare animations is the most annoying piece of config one has to write and I couldn't come with a better way to define them in config. Any suggestion?
AnimationListLeft = #IdleLeft#WalkLeft#JumpLeft#SwimLeft
AnimationListRight = #IdleRight#WalkRight#JumpRight#SwimRight
AnimationList = #AnimationListLeft#AnimationListRight
Just a rough thought, but something along those lines.
I think if a list that includes a line ends with a #, then it is unambiguously not finished, therefore the next line can be safely assumed to be a continuation. Very similar to the use of quotation marks for multi-line strings.
This would require an edit to the config file parser, but it should be reasonably straightforward.
What do you think?
MyList = Blah#Blah2#"none"
work for that?
I really like this suggestion.
List1 = Item1 # "none" # apple contains 3 strings: Item1, "none", apple.
List2 = Item1 # # apple contains 3 strings: Item1, <empty_string>, apple.
Something like: List = Item1 # Item2 ##
If you sync the SVN, lists can now span multiple lines and line ending comments are allowed.
Here's the small description I added at the beginning of the template files:
Let me know if this works for you or if you encounter weird issues: after all, orx's config parser is a bit complex and I wouldn't be too surprised if I broke something!
This will really help for those complex lists.
And blank lines seem not to terminate the list either, so you can split your list into groups.
And I totally forgot to mention the trimming of white spaces, which also include CR, LF and tab.