BVM format - KCreator/Earth-Defence-Force-Documentation GitHub Wiki

Header

The BVM header is as followed:

  • Hex identifier "0x42 0x56 0x4D 0x20", forming the string: 'BVM '.
  • 4-byte unknown, usualy "0x50 (P) 0x0 0x0 0x0"
  • Padding bytes, size 8
  • Unknown Bytes: 0x38, 0x1, 0x15, 0x1, 0x2, 0x0, 0x0, 0x0
  • 4 byte integer defining number of global variables
  • 4 byte integer defining offset to variables
  • 4 byte integer defining number of functions
  • 4 byte integer defining offset to functions
  • Unknown Bytes: 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00
  • 4 byte integer defining Pointer to default values
  • 4 byte integer defining Pointer to functions start
  • 4 byte integer defining Pointer to string table
  • 4 byte integer point to string refering to BVM type (?)

BVM Code

String Table

AUK233 note:

in 4.1:
2C(0x7D4, shape name[Seems to use cylinder], object, amount[use int], scale[use float], aggressive[0 or 1]);
in 5:
2C(0x7D4, point, radius[use float], object, amount[use int], scale[use float], aggressive[0 or 1], delay[use float, 1f = 1s]);
Maybe I need to make a txt to record the parameter I know.

zonbi711 note

メモ書き

GetGameDifficulty 0easy 1normal 2hard 3hdst 4inf CreateFriend Squadがあると部隊 [0] 合流可能かどうか true=可能 false=不可 数値=なにかに従属 [1] 補正値 [2] 隊員の人数 1人ならtrue [あとのほう] 中身の種類 隊員→隊長の順 CreateEnemy SetGenerator0x35? かの者召喚? [0] わからん [1] 補正値 [2?] わからん localVar1 [3] 敵の人数 1人ならtrue RAS[ relIndex + 2 ] = 3 → localVar2に3を入れてるっぽい game->2C(3200, true, greyboss, 0.010000 ) →かの者NPCの補正倍率を定義?NPC定義時はlocalVar1になってる

mp_s(s.) note:

    '1': 'Pop()',
    '2': 'void RegisterEvent(function_name, float, multiple_functions_per_event(?));',
    # '5': 'Initialize_Common??',
    '12': "CheckResourcesLoaded()",
    '13': 'LoadResource(string resource, int)',
    "14": "LoadMapResource(string map, string weather, int)",
    '17': 'loc_140115379(int)',
    '18': 'pops four elements',
    '21': 'int GetDifficulty()',

    '30': 'int CreateUiElement(string Element)',
    '31': 'DestroyUiElement(int id)',
    '39': 'int CreateLytUiElement(sgo)',

    # '44': 'void SoundController::PlayBgm(soundname);',
    # '45': 'FadeOutBGM(timeDelta);',
    # '46': 'FadeInBGM(soundname, timeDelta);',
    '50': 'FadeUiElement??(int id, int fadeType, float time)',
    '51': 'WaitForUiFade(int id)',
    '66': 'VsStartPosition(SpawnPrefix)',
    # '80': 'RecruitObject(int leader, int follower)',
    '95': 'PlaySurroundSE(spawnpoint, SoundPreset)',
    "100": "SetMap(",
    "102": "MapObjectDestroy(shapeNode)",
    "103": "MapObjectDestroy2(shapeNode)",
    "104": "MapObjectDestroy3(shapeNode)",
    "105": "MapObjectDestroy4(shapeNode)",
    "110": "MapObjectInvincible(shapeNode)",
    # "128": "SetObjectAction(int id, int action)",
    # '132': 'AddToMobGroup(string sgo, float)',
    # '134': 'CreateMobPath(routeNode, amount, spawndelay, lifeTime)',
    # '140': 'Factor_AllEnemyDestroy(',
    '200': 'Wait(float)',
    # '209': 'MultiplyObjectHealth(int id, float percent)',
    # '210': 'SetEssential(int id, bool Essential)',
    # '213': 'SetObjectPosition(int, string)',
    # '234': 'SetObjectEnemy(int id)',
    # '235': 'SetObjectNeutral(int id)',
    # '236': '1004, 3052, SetObjectTeam(int id, int team)',
    # '254': 'int CreateTransporter(str, str, str, str, str,float)',
    # '255': 'int CreateTransporter2(str, str, str, str, str,float)',
    # '257': 'int CreateEventObject(spawnpoint, sgo)',
    # '258': 'int CreateEventObject2(spawnpoint, sgo)',
    # '261': 'int CreateVehicle2(spawnpoint, sgo, scale)',
    # '287': 'ObjectNotOnRoute(int id)',
    # '288': 'CreateExplosion(spawnpoint, SizeDuration, quakeScale)',
    # '289': 'CreateQuake(spawnpoint, SizeDuration, quakeScale)',
    '300': 'PlayBGM(str SongName)',
    '301': 'FadeOutBGM(float TimeDelta)',
    '302': 'FadeInBGM(str SongName, float TimeDelta)',
    # '308': 'SetGenerator(int id, int, sgo, int amount,float scale, float rate, float interval, bool)',
    '350': 'PlayPresetSE(str SoundPreset)',
    '351': 'PlaySurroundSe(spawnpoint, SoundPreset);',
    # '356': 'SetAiObjectDirectionPoint(int, str, float, bool)',
    '421': 'LookCameraToArea(sphereShape, time)',

    '800': 'Explosion(wchar_t*, float, float);',
    '801': 'Quake(wchar_t*, float, float);',
    '900': 'AddToMobGroup(string sgo, float)',
    '902': 'CreateMob_Path(str, int, float, float)',

    '1000': 'CreatePlayer(spawnpoint);',
    '1001': 'CreatePlayer2(spawnpoint);  will crash',
    '1002': 'CreatePlayer3(spawnpoint);  will crash',
    '1003': 'int GetPlayerCount(void) ',
    '1004': 'SetObjectTeam(int id, int team)',
    '1005': 'int GetOfflinePlayerClass(int 0);',
    '1006': 'void loc_140117304(int, int, int);',
    '1007': 'void loc_1401173CB(int, int);',
    '1010': 'int CreateFriend(spawnpoint, sgo, scale, canRecruit);',
    '1011': 'int CreateFriendSquad(str spawnpoint, float radius, str sgo_leader, str sgo_follower, int count, float hpScale, bool canRecruit);',
    '1012': 'void CreateFriendGroup(str spawnpoint, float radius, str sgo, int count, float scale, bool canRecruit);',
    '1013': 'void loc_140117538(int, wchar_t*, float, wchar_t*, int, float);',
    '1020': 'int CreatNeutral(spawnpoint, sgo, scale);',
    '1021': 'int CreateVehicle(spawnpoint, sgo)',
    '1022': 'int CreateTransporter(str, str, str, str, str, float)',
    '1023': 'int CreateTransporter2(str, str, str, str, str, float)',
    '1025': 'int CreateEventObject(spawnpoint, sgo)',
    '1026': 'int CreateEventObject2(spawnpoint, sgo)',
    '1027': 'set_vehicle_ai_active?(int, int)',
    '1028': 'set_balam_can_using?(int, int)',
    '1029': 'int CreateVehicle2(str spawnpoint, str sgo, float scale)',
    '1050': 'int loc_1401154BF(int, int);',
    '2000': 'int CreateEnemy(spawnpoint, sgo, scale, active)',
    '2001': 'int CreateEnemy2(spawnpoint, sgo, scale, active)',
    '2002': 'void CreateEnemyGroup(spawnpoint, radius, sgo_name, count, health_scale, has_aggro);',
    '2003': 'void CreateEnemyGroup2(spawnpoint, radius, sgo_name, count, health_scale, has_aggro);',
    '2004': '5:CreateEnemyGroupGround(spawnpoint, radius, sgo, count, scale, active, time) 4.1:CreateFlyingEnemyGroup_Area(shapeNode, sgo, count, scale, active)',
    '2005': 'CreateEnemyGroupGround2(spawnpoint, radius, sgo, count, scale, active, time)',
    '2006': 'CreateFlyingEnemyGroup_Area(shapeNode, sgo, count, scale, active)',
    '2007': 'CreateFlyingEnemyGroup_AreaRoute(shapeNode, routeNode, sgo, count, scale, active)',
    '2008': 'CreateFlyingEnemyGroup_Area2(shapeNode, sgo, count, scale, active)',
    '2009': 'CreateEnemyGroupGround_Area(shapeNode, sgo, count, scale, active)',
    '2010': 'CreateFlyingEnemyGroup_AreaRoute2(ShapeNode, routeNode, sgo, count, hpScale, active)',
    '2011': 'int CreateEnemySpawn(spawnpoint, sgoName, hpScale, active)',
    '2020': 'create_enemy_squad_and_follow??(int id, str, float, str, int, float, int)',
    '2021': 'create_enemy_squad_ground_and_follow??(int id, str, float, str, int, float, int, float)',
    '2022': 'CreateFlyingEnemyGroup_OnRoute(str routeNode, flaot distance, str sgoName, int count, float hpScale, bool active)',
    '2023': 'int CreateEnemy3(string spawnpoint, string sgo_name, float hpScale, bool active)',
    '2030': 'int CreateEnemySquad(spawnpoint, radius, sgo_leader, scale_leader, sgo_follower, count, scale_follower, active)',
    '2100': 'SetGenerator(int id, int, str sgo, int amount, float hpScale, float rate, float interval, bool)',
    '2101': 'set_generator_once??',
    '2200': 'int create_enemy_squad_in_dropboat??(int, str, float, str, int, float, int)',
    '2201': 'dropboat?',
    '2202': 'dropboat_open_door??(int)',
    '2203': 'SetDropBoatAutoCruise(int, str, float)',

    '3019': 'set_HP_remain_percent??(int, float)',
    '3020': 'SetNoDamageWhenHPRemain(int id, float HPRemain)',
    '3021': 'set_no_damge_mode??(bool)',
    '3022': 'start active??(int id)',
    '3025': 'MultiplyObjectHealth(int id, float percent)',
    '3026': 'SetEssential(int id, bool Essential)',
    
    '3050': 'SetObjectEnemy(int id)',
    '3051': 'SetObjectNeutral(int id)',
    '3052': 'SetObjectTeam(int id, int team)',
    '3100': 'SetAiRouteSpeed(int id, float speedfactor)',
    '3101': 'SetAiRoute(int ID, string path)',
    '3102': 'SetAiPath(int ID, string Path)',
    '3103': 'bool ObjectNotOnRoute(int ID)',
    '3152': 'RecruitObject(int leader, int follower)',
    '3172': 'SetAiObjectDirection_Point(int, wchar_t*, float, bool);',

    '3200': 'SetObjectAction(int id, int action)',
    '3202': 'SetObjectDestroy(int id)',
    '3300': 'int deploy_balam??(int, int, int)',
    '3400': 'int set_follower??(int id, int No.)',
    '4000': 'play_sound??(str)',
    '4006': 'SetChatter(int id, bool CanTalk)',
    # '4102': '0x1006: void loc_1401150D8(int, str, str, float)',
    # '4105': '0x1009: void loc_1401151E1(int, int, str, str, float);',
    # '4106': '0x100A: void loc_140115210(int, int, str, str, float, float);',
    # '4107': '0x100B: void loc_14011526B(int, str, str, float, int);',
    # '4108': '0x100C: void loc_1401152A7(int, str, str, float, float, int)',
    # '4110': '0x100E: void loc_14011531C(int, str, str, float, float);',
    # '4120': 'void loc_140115491(int, wchar_t*);',

    # '5013': 'void loc_140116387(int, float, float, float, float, float);',
    # '5014': 'light object??(int, float, float)',
    # float Depth1, 
    # float Depth2, 
    # float EdgeRadius, 
    # float DecalVeritality,
    # float Progress,
    # float DecalRed,
    # float DecalGreen,
    # float DecalBlue,
    # float SpecularRed,
    # float SpecularGreen,
    # float SpecularBlue,
    # float SpecularSize,
    # int ParticleAmount,
    # float ParticleDistance,
    # float ParticleSpeed,
    '5100': 'SetEffectSnow(**)',
    '5101': 'SetEffectRain(**)',
    '5102': 'SetEffectDust(**)',
    '5103': 'SetEffectFog(**)',
    '9000': 'CreateEventFactorWait(float TimeDelta)',
    '9001': 'CreateEventFactorTimer(int, float, TimeDelta)',
    '9002': 'CreateEventFactorWait2(float TimeDelta)',

    # '9044': 'CreateEventFactorAiMoveEnd(int ID)',
    # '9045': 'CreateEventFactorAiMoveEndOrDie(int ID)',

    '9050': "CreateEventFactorCheckFlagTrue(int)",
    '9051': "CreateEventFactorCheckFlagFalse(int)",
    # '9054': 'CreateEventFactorAiFollow(int Soldier)',

    '9100': 'CreateEventFactorAllEnemyDestroy(float delay)',

    "9110": "CreateEventFactorTeamObjectCount(int team, int count)",
    '9111': 'createEventFactor_mothershipShieldCount??',
    "9112": "CreateEventFactorAreaTeamObjectCount(string ShapeNode, int team, int count)",
    "9113": "CreateEventFactorTeamBigObjectCount(int team, int count)",
    "9114": "CreateEventFactorTeamGeneratorObjectCount(int count)",
    '9115': 'CreateEventFactor_TeamObjectCount',
    "9116": "CreateEventFactorObjectGroupCount(int, int)",
    "9117": "CreateEventFactorObjectGroupEncount(int)",
    "9120": "CreateEventFactorTeamEncount(int team)",
    "9121": "CreateEventFactorTeamNotEncount(int team)",
    # "9144": "CreateEventFactorPlayerAreaCheck(string ShapeNode)",

    '9200': 'Create_event_factor_object_hp_remain_percent??(id, hpPercent)',
    '9201': "CreateEventFactorObjectDestroy(id)",
    '9202': "CreateEventFactorObjectDelete(id)",

    '9300': 'CreateEventFactorAiMoveEnd(int ID)',
    '9301': 'CreateEventFactorAiMoveEndOrDie(int id)',
    '9310': 'CreateEventFactorAiFollow(int Soldier)',
    '9400': "CreateEventFactorPlayerAreaCheck(string ShapeNode)",