Low level Design - abrahamYG/SC2plusSCBW GitHub Wiki

Preface!

It should be noted that this document was originally written before several advancements in the Data Editor were made. This will be rewritten to accomodate several design changes

Timings

Most timings that affect gameplay logic are based where possible on the timings of SCBW. Both games run 16 game frames, or ticks, per second. Most, if not all, timings in SCBW are based on frame data. For example, a marine's weapon cooldown lasts 15 frames. These frames are then converted to game seconds by dividing by 16. Thus, using our example, the marine weapon cooldown will translate into SC2 game seconds as 15/16 = 0.9375 seconds. This gives some advantages in the sense that, since SC2 game logic also runs at such framerate, the timings will align more smoothly into the logic and reduce any potential rounding errors.

Distances

Distances in SCBW can be measured by either pixels or grid cells depending on context. A grid cell is made by a 32x32 pixel square. SC2 uses grid cells as its measurement unit in all scenarios, so when distances are given in pixels, they are divided by 32 to convert to cells. Using the marine weapon range, its value in pixels is 128, which when we divide by 32, gives us a value of 4 cells.

Size classifications

Units in StarCraft: BroodWar had a size classification taken into account for damage reduction. These have been adapted to the StarCraft 2 attribute classification. Here is a small conversion table:

  • Small - Light
  • Medium - No Attribute
  • Large - Armored

Issues with such classification

Weapon base damage should be accounted for medium sized units. This represents a problem that shield damage would always account for medium size rather than base damage on Broodwar. A series of validators and effect switches could be taken into account, but that would probably be more complicated for such little gain. Perhaps a child mod could account for it, while keeping the base mod as strightforward and scalable as possible.

Naming convention

All entities must have a "SCBW" suffixed in the IDs after the entity name. Abilities should have the owning unit id prefixed and the ability name.

Examples:

  • Gateway (Unit)
    • ID: GatewaySCBW
    • Display Name: Gateway
    • Editor Prefix: (SCBW) -
    • Full Name displayed on the Editor: (SCBW) - Gateway
  • Gateway "What" Unit Response (Sound)
    • ID: GatewaySCBW_What
    • Display Name: Gateway_What
    • Editor Prefix: (SCBW) -
    • Full Name displayed on the Editor: (SCBW) - Gateway_What
  • Zealot Portrait (Portrait Model)
    • ID: ZealotSCBWPortrait
    • Display Name: Zealot
    • Editor Prefix: Portrait -
    • Editor Suffix: - (SCBW)
    • Full Name displayed on the Editor: Portrait - Zealot - (SCBW)
  • Zealot Leg Enhancements (Upgrade)
    • ID: ZealotSCBWSpeedUpgrade
    • Display Name: Leg Enhancements
    • Editor Prefix: (SCBW) - Zealot -
    • Full Name displayed on the Editor: (SCBW) - Zealot - Leg Enhancements