player.flags[BF_BERSERK] = true
And the resistances are 0 + no DR
The bonuses attached to the berserk "affect" have all been separated in order to allow for maximum customization. BF_BERSERK only doubles melee damage, which is the only flag-worthy piece: if you want the resistances and speed bonuses, you'll have to include them explicity. For example:
player.res_melee = max(player.res_melee + 60, 95)
player.speed = player.speed * 1.5
player.flags[BF_MODEXPERT] = true
Can't mod U items.
This still depends on the unique item itself. BF_MODEXPERT essentially bypasses IF_UNIQUE for the purposes of modding items, but it's still going to limit the player to items that can be modified at all, which (for unique base-game items) are Railgun, BFG10K, and Cybernetic Armor.
Hope this explains things! If you have modding-specific queries, don't hesitate to direct them to
this thread, where I hope to eventually compile a FAQ for modder-wannabes.