What's the easiest way to modify .json files?

Reason I ask is because only about two items fit on the screen at once for editing. If I want to do a mass change, it would take a bit of time to scroll around to add each line. Is there a way to like… export to excel or something?

Could you do a mass find/replace to automatically add it throughout the file?

open it up in notepad++.

Use the find and replace hotkey for your your operating system.

Done.

We don’t have a good JSON editor, other than simply using your standard text editor. But if someone finds or makes a good way to edit 'em, by all means, do share!

In clothing, if a line is absent, does its value default to 0?

For example, instead of having the line “cutting : 0”, will its absence imply that its value is 0?

[quote=“Shoes, post:5, topic:1376”]In clothing, if a line is absent, does its value default to 0?

For example, instead of having the line “cutting : 0”, will its absence imply that its value is 0?[/quote]

No, you need all the lines or you will get an error.

[quote=“drake1storm, post:6, topic:1376”][quote=“Shoes, post:5, topic:1376”]In clothing, if a line is absent, does its value default to 0?

For example, instead of having the line “cutting : 0”, will its absence imply that its value is 0?[/quote]

No, you need all the lines or you will get an error.[/quote]

This actually depends on the value. Any attributes that are “optional” have appropriate defaults, but I don’t think cutting is one of them (item flags for example, however, are)

Basically, if it needs a value, it’s probably required, even if that value would be zero.

But, it does call debugmsg for any required attributes that are missing. If you don’t get any debugmsg spam upon game load, then you should have all the required attributes.

Anyway to make most fields default to a certain something? I feel like that would improve immensely on readability.

Not without changing the item factory code, no.

Although I /did/ have almost all of them have defaults in the original version of that code, that was all lost when someone switched it over to catajson. :stuck_out_tongue:

“Defaults” that emitted error messages :P.

It would be handy, though, to make more things (explicitly) optional; I just don’t want to be in a state where we’re telling modders that certain errors can be safely ignored.