Even counting the quantity of oil required for oil changes, the detrimental effect of idling or running a diesel at less than optimal rpm, the initial cost compared to a stand alone generator? I guess tho you can't really count the initial cost of the tractor as you're not going to buy it solely for generator use.
But, playing devils advocate, you have one less engine to maintain, there's nothing sitting around for months or years at a time not being used.
Mehhh, I'd still go with a stand alone generator. You could buy a good one a far sight cheaper than than the wear and tear on your tractor engine, least ways in my mind

.