kevL / TccScripts

4 stars 0 forks source link

Armor Level 4 Divine spells should use Earth essences (for armor) not… #15

Closed vandervecken closed 6 years ago

vandervecken commented 6 years ago

… Air essences (for weapons)

Resolves https://github.com/kevL/TccScripts/issues/4

I also took the liberty of making some of our text files encode in UTF-8 and Unix line endings. Notepad++ is grand, I'm doing this all on a Windows machine!

kevL commented 6 years ago

i merely browsed, but the changes to Crafting.2da look good.

I am however suspicious about exactly why switching to Unix-style line endings and encoding to UTF-8 results in git/github thinking that they are now binary files ...

ps. I would go into another long discourse about line-endings and git, but ug.

if you read through about a dozen threads on StackOverflow it'll give ya the gist of it ... https://www.google.ca/search?&q=stackoverflow+git+line+endings

and, uh, I gotta say this, we're using Windows machines, the line endings should be Windows-style. Git by default ought change the line endings of textfiles that are pushed to Unix-style, and Git ought change those line endings back to Windows-style when pulled back to the local machine.

keyword: "ought" (the actual behavior can be set in git-configs locally, as well as .autoconfig or whatever it is for the public repo). Note that there are configurations that would require all collaborators to agree on and set their local machines to use identically. That's basically why i rely on Git defaults ...

vandervecken commented 6 years ago

Ok, so first off, you have it backwards unfortunately. These files were encoded in something that wasn't UTF-8 before. That's why they appeared as binaries. I made a text change to one of them and discovered that Git wouldn't give me diffs. Did some reading around and I think it was because of a lack of UTF-8 encoding, so I have moved them to UTF-8 so that they are no longer binaries. Unfortunately that means the diff in this commit is still binary, because the from-file is binary.

As for line endings. I am happy to reset to Windows style line endings if you wish for text files. I agree git defaults are best.

kevL commented 6 years ago

UTF-8 is great.

It's the ambiguity of line-endings that bother me. I suppose Git is going to store files with line endings however it does. I suggest however that in the Zip on the Vault, that textfiles use Windows-style EOLs since Nwn2 is basically a Windows only game.

here's the core of what bothers me -- Git should store textfiles exactly as they are commited. In fact it should store every file exactly as commited.

vandervecken commented 6 years ago

"Git should store textfiles exactly as they are commited." but if it does that, every time I checkout and save a file in a different OS from the last guy, I generate a diff on every damn line.

vandervecken commented 6 years ago

Anyway I switched bact to Windows line ends, so we should be good to go.

kevL commented 6 years ago

ok well toss it in and see what happens :^)

kevL commented 6 years ago

but if it does that, every time I checkout and save a file in a different OS from the last guy, I generate a diff on every damn line.

that's what git config (should be) for ... imo.