Development - mokdevel/ArmaReforger_snippets GitHub Wiki
This is really the minimum to be able to do some development:
- Create a folder 'worlds' in to your mod in WB
- Open world editor
- File->Load world->Arland.ent
- You can choose any world, but for development the smaller, the faster it is to test code. https://reforger.armaplatform.com/workshop/622CD3A9533E4430-ar_flatgrass is a simple one.
- File->New world->Sub scene->Give it a name
Find prefabs and drop them in to your world
- FactionManager_USxUSSR
- GameMode_Plain
Save
Additionally add these. Especially if using PeerTool
- LoadoutManager_USxUSSR
- SpawnPoint_US.et
- SpawnPoint_USSR.et
For AI to function properly
- PerceptionManager.et
- SCR_AIWorld.et - Here you need to add the proper navmeshes. Click on the AIWorld entity in the Object Properties you'll see three NavmeshWorldComponents for the world (examples for Arland).
- In Navmesh Project Soldier, press set class on Navmesh Files Config and select GM_Arland.nmm (ArmaReforger\worlds\GameMaster\Navmeshes\*)
- In Navmesh Project LowRes, press set class on Navmesh Files Config and select LowResArland.nmm (ArmaReforger\worlds\MP\Navmeshes\*)
- Select a prefab
- Duplicate to your project
- Create a script MyEntity.c
class MyEntityClass : GenericEntityClass{} class MyEntity : GenericEntity { <code> }
- Save and compile
- Open your prefab
- Right click on prefab -> edit prefab. This will open the prefab in World Editor
- On the right you will find Object Properties. Right click on the current classname (red cube) and select your new class MyEntity.