You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the library seems to interpret all escape sequences (starting with backslash) inside strings, in the kv3 text reader.
This might not be desired all the time, since it appears that some, if not all games (at least on Source 2) seem to not care about these, and interpret backslashes as a literal character. Even Source2Viewer outputs with this assumption, which causes inconsistency when trying to read a decompiled file directly outputted by that tool.
My suggestion would be to add an optional parameter to kv3.read() to change this behavior.
The text was updated successfully, but these errors were encountered:
I just compiled a CS2 scripts/game_asset_tags.vdata file with the sbox resourcecompiler.exe, and it escaped the characters. Can you show an example where it doesn't?
Sorry for a pretty late answer on that, as I was a bit busy.
I haven't verified exactly which compilers do what, I may have jumped to a wrong conclusion here assuming a behavior.
However what I verified is that for CS:GO/CS2's bot behavior trees backspaces seem to be treated literally i.e. they don't cause any issues in nodes where I can type a custom name that includes a backslash (a one that would definitely be an invalid sequence, if treated literally).
The main driving force for me opening this issue was the inconsistency with other tools though (as I don't know if this is standardized somewhre at this point or not). Good example is Source 2 Viewer/Decompiler, where the output assumes that characters are not escaped, and this does cause issues when reading back the outputted file directly. It is very apparent in vents_c files where backslashes appear pretty often and cause invalid sequences issues when using this library to read.
Now I don't know if the problem lies in S2V and if the behavior here should be changed, because as I mentionted I don't think there's really a standard, so that's why I'm thinking that having a toggle would be a good idea for now. But that's just my idea, if you know better solutions then I would be glad for anything!
Currently the library seems to interpret all escape sequences (starting with backslash) inside strings, in the kv3 text reader.
This might not be desired all the time, since it appears that some, if not all games (at least on Source 2) seem to not care about these, and interpret backslashes as a literal character. Even Source2Viewer outputs with this assumption, which causes inconsistency when trying to read a decompiled file directly outputted by that tool.
My suggestion would be to add an optional parameter to
kv3.read()
to change this behavior.The text was updated successfully, but these errors were encountered: