def _serializeSubIds(subIds):
    """
    Serialize a set of unit subIds, without regard for the playerId.
    """

    val = 0
    for i in subIds:
        val |= (1 << i)
    return "{:x}".format(val)