Ok, do NOT lock health or change the health above the unit maximum or it will crash. I tried to setup a godmode but too many crashes around health. Anyway you can edit the rest there are also scripts to lock food/morale for the army. They may not have infinite health but at least they will fight to the bloody end I believe you also have to set food/wood in the city in order for it to show up/stick to the "Total" amount. Also depedning on you gamespeed it may take a minute or so for the values to populate for each script.
How to use this cheat table?
Install Cheat Engine
Double-click the .CT file in order to open it.
Click the PC icon in Cheat Engine in order to select the game process.
Keep the list.
Activate the trainer options by checking boxes or setting values from 0 to 1