Fix some weirdness

- give command debugging wrong
- functions defined wrong
- util script minor messups
- durability mech failing to adjust material data