Update Shipard Experience

The st_update_shipyard_experience function at 0x004E2144 updates the experience, utilization markups and ship quality levels of all shipyards.

Pending Experiene and Utilization Markup

Pending experience is added to the shipyard's experience and set to 0. The utilization is updated as follows:

capacity = 0
for ship_order in ship_orders:
    capacity += ship_order.capacity

markup_change = (capacity // 2000 + pending_experience // 19600) / 26
utilization_markup = markup_change + utilization_markup * 0.96153843

Unlocking Ship Quality Levels

The shipyard_level_requirements table at 0x00673818 defines the following base experience requirements:

TypeQL 0QL 1QL 2QL 3
Snaikka01003001050
Crayer0100600900
Cog0200400800
Holk3005006001200

A new quality level is unlocked, if the shipyard's experience exceeds 2800 * required_base_experience.

Interval

This scheduled task reschedules itself 0x700 ticks ahead, so it is executed once per week.