Welcome to the world of EARTH DEFENSE FORCE 5! If you’re looking to enhance your gaming experience, you’ve come to the right place. This guide will provide you with a list of Mission Commands and everything you need to know about them, in a simple and straightforward manner. But before we begin, make sure to read our guide on “HOW TO MOD EARTH DEFENSE FORCE 5” to ensure you have the necessary prerequisites. Let’s dive in!
Brief summary
CHECK THE PREVIOUS MODDING GUIDE FIRST. This guide will NOT make sense unless you’ve read it (or obtained the knowledge some other way). “How to mod Earth Defense Force 5” is a mandatory prerequisite for knowing what all of this is.
This is mainly a Modder resource to make editing missions easy.
There’s a lot, but this ain’t meant to just be browsed idly- again, it’s a resource.
Whenever a command said Loadabs 50 // X, this is loading the ID of the entity it’s affecting. Replace the 50 with the ID of whatever entity you’re doing something to.
BVM: Entity Spawning
cuscall0 1000 // CreatePlayer(spawnpoint);
Player (Unarmed)
cuscall0 1001 // CreatePlayer2(spawnpoint);
Player (Tutorial Weapons)
cuscall0 1002 // CreatePlayer3(spawnpoint);
Ally
pushstr “メーサー05”
pushstr “app:/object/V504_Begaruta_AI.sgo”
push 1.0f
push 0
cuscall0 1010 // int CreateFriend(spawnpoint, sgo, scale, canRecruit);
store
- First push is ID, second push is HP mod, third is whether it’s recruitable (vehicles can’t be recruited)
Ally Squad
pushstr “小隊01”
push 10.0f
pushstr “app:/Object/AiArmySoldier_RL_Leader.sgo”
pushstr “app:/Object/AiArmySoldier_RL.sgo”
push 10
push 1.0f
push 0
cuscall0 1011 // int CreateFriendSquad(str spawnpoint, float radius, str sgo_leader, str sgo_follower, int count, float hpScale, bool canRecruit);
store
- First push is ID, second is entity spread, third is follower count, fourth is HP mod, fifth is whether it’s recruitable
Ally Group
push 100.0f
pushstr “app:/Object/AiHeavyArmor_SP.sgo”
push 20
push 1.0f
push 0
cuscall0 1012 // void CreateFriendGroup(str spawnpoint, float radius, str sgo, int count, float scale, bool canRecruit);
- First push is entity spread, second is count, third is HP mod, fourth is whether it’s recruitable
Enemy
pushstr “新型”
pushstr “app:/object/Monster501.sgo”
push 1.0f
push 0
cuscall0 2000 // int CreateEnemy(spawnpoint, sgo, scale, active)
store
- First push is ID, second push is HP mod, third is whether it has aggro
Enemy Group
push 5.0f
pushstr “app:/object/GiantAnt02B.sgo”
push 20
push 1.0f
push 0
cuscall0 2003 // void CreateEnemyGroup2(spawnpoint, radius, sgo_name, count, health_scale, has_aggro);
- First push is entity spread, second is count, third is HP mod, fourth is whether it has aggro
Enemy Group that comes from Underground
pushstr “app:/object/GiantAnt02B.sgo”
push 20
push 1.0f
push 1
push 1.0f
cuscall0 2009 // CreateEnemyGroupGround_Area(shapeNode, sgo, count, scale, active
- First push is entity count, second is HP mod, third is whether it has aggro, fourth is how long it takes for all entities to come from underground
Generator Spawning
push 0
pushstr “app:/object/GiantAnt01.sgo”
push 25
push 1.0f
push 0.5f // Delay between enemies spawned
push 20.0f // Time to wait until next wave is spawned
push 0
cuscall0 2100 // SetGenerator(int id, int, str sgo, int amount, float hpScale, float rate, float interval, bool)
- First push is unknown, second is entity count, third is HP mod, fourth is delay between enemies, fourth is time to wait between enemy waves, fifth is aggro(?)
Neutral
pushstr “app:/object/V505_Tank_AI.sgo”
push 1.0f
cuscall0 1020 // int CreatNeutral(spawnpoint, sgo, scale);
- Push is HP mod
Mob (Civilians)
push 1.0f
cuscall0 900 // AddToMobGroup(string sgo, float)
- Push is HP mod
Vehicle
pushstr “app:/object/v504_begaruta_g_mission.sgo”
cuscall0 1021 // int CreateVehicle(spawnpoint, sgo)
Vehicle With HP Mod
pushstr “app:/object/V506_HELI_LOOT.sgo”
push 1.0f
cuscall0 1029 // int CreateVehicle2
- Push is HP mod
Event Object
pushstr “敵01”
pushstr “app:/object/GiantAnt01B.sgo”
cuscall0 1025 // int CreateEventObject(spawnpoint, sgo)
store
- Event objects have no AI
Mortar Strike
push 200.0f
pushstr “app:/object/DemoIndirectFireE50.sgo”
push 1.0f
push 5
push 0.5f
cuscall1 1000
- First push is spread, second is unknown, third is shot count, fourth is delay between shots
Artillery strike on enemy
push 1.0f
pushstr “app:/object/DemoIndirectFireSolidD_EVENT.sgo”
loadabs 70 // airstrike_angle
cuscall0 1141
- First Loadabs is entity to fire at, second is unknown
- First push is fire spread(?)
BVM: Entity Behavior
push 1
cuscall0 3200 // SetObjectAction(int id, int action)
- Push is action ID
Set AI Speed
push 0.25f
cuscall0 3100 // SetAiRouteSpeed(int id, float speedfactor)
Set AI Route
pushstr “新型進行ルート”
cuscall0 3101 // SetAiRoute(int ID, string path)
Activate AI
cuscall0 3022 // start active??(int id)
Activate all AIs on Team
cuscall0 3023
- 0 = players, 1 = aliens, 2 = AI friendlies, 3 = neutral objects, 4 = fleeing civilians, 5 = drivable vehicles, 6 = event objects
Set Chatter
push 0
cuscall0 4006 // SetChatter(int id, bool CanTalk)
- Sets whether a set NPC talks or not
- Push is true/false
Entity Look Direction
pushstr “ドア01”
push 1.0f
push 0
cuscall0 3172 // SetAiObjectDirection_Point(int, wchar_t*, float, bool);
- First push is look accuracy(?), second is unknown
Play Animation
pushstr “npc_ap016_move_add”
cuscall0 4121 // Play animation
Recruit Object
loadabs 51 // 2X
cuscall0 3152 // RecruitObject(int leader, int follower)
- Loadabs 1 recruits Loadabs 2
Activate NIX
cuscall0 1024
loadabs 50 // X
push 1
cuscall0 3040
- First one wakes up the NIX
- Second one makes it able to take damage
Made Ally Recruitable
push 1
cuscall0 3151
- Push is true/false
Ignore Navigation Mesh
push 1
cuscall0 3113
- Entity goes straight to its destination and ignores the “ideal” route
- SERIOUSLY fixes vehicle pathfinding in many maps, but not all. Use with discretion
- Push is true/false
Hold still (no wander)
push 1
cuscall0 3170
- Push is true/false
BVM: Entity Manipulation
cuscall0 3202 // SetObjectDestroy(int id)
Object Max HP Mod
push 2.0f
cuscall0 3025 // MultiplyObjectHealth(int id, float percent)
- 1.0f = 100%
Make Essential
push 1
cuscall0 3026 // SetEssential(int id, bool Essential); only works on humans
- Used on Sarge
- Push is true/false
Delete Entity
cuscall0 3001 // Delete entity
Teleport Entity
pushstr “上官捕食位置”
cuscall0 3029 // Moves an object to a location instantly
Set Entity Team
push 1
cuscall0 3052 // SetObjectTeam(int id, int team)
- 0 = players, 1 = aliens, 2 = AI friendlies, 3 = neutral objects, 4 = fleeing civilians, 5 = drivable vehicles, 6 = event objects
- If making a vehicle an enemy, spawn it as a friend and then use this to make it an enemy. Otherwise, AI breaks.
Set HP
push 50.0f
cuscall0 3019 // set_HP_remain_percent??(int, float)
- 100.0f = 100%
Set REMAINING HP
push 50.0f
cuscall0 3025 // MultiplyObjectHealth(int id, float percent)
- Good for making pre-damaged vehicles
- 100.0f = 100%
Make Entity Invincible (no hit stun)
push 1
cuscall0 3021 // set_no_damge_mode??(bool)
- Push is true/false
No damage when a threshold of HP is crossed
push 50.0f
cuscall0 3020 // SetNoDamageWhenHPRemain(int id, float HPRemain)
- 100.0f = 100%
Gave an Unactivated Nix Weapons
cuscall0 1027 // set_vehicle_ai_active?(int, int)
BVM: Map/World
pushstr “fine”
cuscall0 100 // SetMap(
- Maps & Weather[github.com]
Destroy Map Objects
cuscall0 102 // MapObjectDestroy(shapeNode)
Invincible Map Stuff
cuscall0 110 // MapObjectInvincible(shapeNode); everything in shape is invincible
Restrict Air Strikes & Vehicle Drops, turns on light
cuscall0 5012
- Push is true/false
Turn Off Lights
push 0.0f
call location_864 // FadeMainLight:
- First push seems to control how long the lights fade until they’re out, second is unknown
Turn On Lights
push 0.5f
cuscall0 5015
- First push is unknown, second seems to control how long it takes for them to come back
Reverb Effect
cuscall1 160
- Echo, used in underground missions
- Push is reverb intensity
Rain
push 0.8999999761581421f
push 1.0f
push 4000
push 4.0f
push 1.0f
call location_568 // SceneEffect_Rain:
- Values are hard to say, but the fourth push is rain intensity. I recommend experimenting.
Snow
push 0.800000011920929f
push 10000
push 0.05000000074505806f
call location_485 // SceneEffect_Snow:
- Values are hard to say, but the third push is snow intensity. I recommend experimenting.
Fog
push 250
push 0.019999999552965164f
push 0.6000000238418579f
push 0.0f
push -1.0f
call location_750 // SceneEffect_Fog:
push 15
push 1.0f
push 0.0f
push 0.0f
push 0.0f
push 0.0f
cuscall0 5013
- Values are hard to say. I recommend experimenting.
BVM: Audio
push 0.0f
call location_56 // RadioVoice:
- Audio file names as they correspond to dialogue[github.com]
- Push is delay before the line is said. Good for if you’re spamming RadioVoice’s
- Always check what location RadioVoice is
In-person Voice
loadabs 50 // X
pushstr “AE005_032_E”
pushstr “”
push 1.0f
cuscall0 4102
cuscall0 4101
cuscall0 4002
- Audio file names as they correspond to dialogue[github.com]
- Push is delay before line is said
- First pushstr is audio file, second is animation to play
- If using this repeatedly (IE for a conversation, have all your 4102’s inbetween the 4100 and the 4101
Play Music
cuscall0 300 // PlayBGM(str SongName)
- Music[github.com]
Fade In Music
push 5.0f
cuscall0 302 // FadeInBGM(str SongName, float TimeDelta)
- Music[github.com]
- Push is how long the music fades for until present
Fade Out Music
cuscall0 301 // FadeOutBGM(float TimeDelta)
- Push is how long the music fades for until gone
Play Sound (Is this taking from the Music file?)
cuscall0 4000 // play_sound??(str)
Another Play Sound
cuscall0 350 // PlayPresetSE(str SoundPreset)
- See SEPreset.SGO
BVM: Tools
- Location of MissionClear may vary
Wait
cuscall0 200 // Wait(float)
- Push is time to halt BVM in seconds
Fade out UI
push 2
push 4.0f
cuscall0 50 // FadeUiElement??(int id, int fadeType, float time)
loadabs 61 // fade_control
cuscall0 51 // WaitForUiFade(int id)
loadabs 61 // fade_control
cuscall0 31 // DestroyUiElement(int id)
- First push seems to be the ID of the Ui to fade(?), second is how long it takes to fade
- First box fades the UI, second box halts the BVM until the UI is faded, third box destroys the now-faded UI
Make Text Appear
cuscall0 36
- Pushstr takes from TEXTTABLE_XBOX.EN.TXT_SGO
Make Text Appear (with “OK”)
cuscall0 35
- Pushstr takes from TEXTTABLE_XBOX.EN.TXT_SGO
Player can’t do anything
push 0
cuscall0 1007 // void loc_1401173CB(int, int);
- Unknown float values. Use as-is
- One of these might be a true/false flag
Player is Invincible
cuscall0 3030
- Push is true/false
Player is Neutral (enemies don’t attack)
cuscall0 3031
- Push is true/false
BVM: Event Factors
push 0.0f
push 0
cuscall0 2 // void RegisterEvent(function_name, float, multiple_functions_per_event(?));
- Unknown values, use as-is
Wait
cuscall0 9000 // CreateEventFactorWait(float TimeDelta)
- Push is how long to wait in seconds
Wait 2
cuscall0 9002 // CreateEventFactorWait2(float TimeDelta)
- Push is how long to wait in seconds. Ignores the BVM process
Timer (based on mission start)
push 6.0f
cuscall0 9001 // CreateEventFactorTimer(int, float, TimeDelta)
- Calls a registered event based on a timer since mission start. If the time has already passed, the event will fire immediately.
Team object count
push 105
cuscall0 9110 // CreateEventFactorTeamObjectCount(int team, int count)
- First push is team, second is entity count on said team
- 0 = players, 1 = aliens, 2 = AI friendlies, 3 = neutral objects, 4 = fleeing civilians, 5 = drivable vehicles, 6 = event objects
Generators remaining count
cuscall0 9114 // CreateEventFactorTeamGeneratorObjectCount(int count)
Object is destroyed
cuscall0 9201 // CreateEventFactorObjectDestroy(id)
AI is recruited
cuscall0 9310 // CreateEventFactorAiFollow(int Soldier_ID)
Group reaches X amount of entities
push 1
cuscall0 9116 // CreateEventFactorObjectGroupCount(int, int)
- Unknown values, don’t recommend using
- Theory: First push is team/group ID, second push is number of entities
All enemies destroyed
cuscall0 9100 // CreateEventFactorAllEnemyDestroy(float delay)
- Push is delay in seconds before event happens after parameters are met
When AI finishes path
cuscall0 9300 // CreateEventFactorAiMoveEnd(int ID)
When AI finishes path or dies
cuscall0 9301 // CreateEventFactorAiMoveEndOrDie(int id)
When an enemy is encountered
cuscall0 9120 // CreateEventFactorTeamEncount(int team)
When player enters area
cuscall0 9400 // CreateEventFactorPlayerAreaCheck(string ShapeNode)
When object no longer exists
cuscall0 9202 // CreateEventFactorObjectDelete(id)
When object reaches HP threshhold
push 30.0f
cuscall0 9200 // CreateEventFactorObjectDurability(id, hpPercent)
- 100.0f = 100%
BVM: Miscellaneous
push 1.0f
push 40.0f
cuscall0 801 // Quake(wchar_t*, float, float);
- First push is quake duration in seconds(?), second is quake intensity
Turn light on (crashes upon mission end?)
push 0
cuscall0 3173
- Unknown float values. Use as-is
Halt BVM until UI is finished rendering
cuscall0 52
- ID of UI to wait for. 1 is usually the default UI, but 2 also seems related
And that wraps up our share on EARTH DEFENSE FORCE 5: EDF 5 Mission Commands (ASM format). If you have any additional insights or tips to contribute, don’t hesitate to drop a comment below. For a more in-depth read, you can refer to the original article here by Maybe Birb, who deserves all the credit. Happy gaming!