Skip to main content

Make a new world

A new world starts as a copy of tmpla, the editor's flat template, under a name of your own. You edit it on the Map tab like any other world, then pack it: one command builds the files the game needs from your edits, so installing the world is only copying files.

Not yet confirmed in game

An earlier build of testrange, made with the same steps by hand, loaded in game with its walls and soldiers fighting on its navmesh. Nothing made with New map and world pack has been played yet.

Create​

On the Map tab, click New map…, give the world a name, pick a size, and Create.

  • The name is lowercase letters, digits and underscores, starting with a letter.
  • The size is one 64 m sector, or 8 × 8 sectors (512 m). Sizes in between would need every sector renumbered, and that is not done yet.

JackAll writes the world's files into your workspace and opens it. They are real game files, copied from tmpla as the game ships it and renamed:

  • the world's descriptor, managers, map data and sector list;
  • each sector's terrain, textures and sound regions;
  • one spawn point, SpawnPoint_0, standing on the ground in the middle.

The same from the command line:

jackall-cli world new myworld --side 8 --game "C:\Games\Far Cry 2" --out myworld-layer

Edit​

Everything on Move, add and delete objects works here. Every sector takes objects, though none has a sector file yet. New ▸ Archetype… offers the whole archetype set, not only what one world uses. Save writes your edits into the workspace as small files, the way it does in any world.

Pack​

The game needs whole files where the workspace has pieces. world pack builds them:

jackall-cli world pack <workspace> --game "C:\Games\Far Cry 2" --out myworld-packed

For every new world in the layer it writes:

  • each sector's file, every sector of the grid, empty ones too;
  • the entity library, cut from tmpla's full set of 5,735 archetypes, the way the campaign worlds' libraries are: every archetype your objects name, everything those name in turn, and the groups the game asks for by name wherever it is played (the player, weapons and their data, hand-held props, cameras, soldiers, vehicles and a few more);
  • the sector list, with every sector flagged so the game loads its files and its navmesh;
  • the navmesh, over the terrain and every object's collision, with cover points along walls and props;
  • the terrain, if the world has a terrain plan;
  • the vegetation, if the world has a vegetation plan.

Everything else in the layer is copied as it is. Point --out at a new or empty folder.

Terrain​

A new world starts on tmpla's flat ground. A plan, levels\<world>\terrain.xml in the workspace, raises it. world pack shapes the sectors first, so the vegetation and the navmesh stand on the new ground. The plan itself stays out of the packed layer.

<Terrain>
<Ridge FromX="272" FromY="376" ToX="352" ToY="376" Height="1" Width="12" />
</Terrain>

A Ridge lifts the ground by Height metres along the line from (FromX, FromY) to (ToX, ToY), and eases back down to it over half its Width either side, rounded at its ends. Ridges that overlap add up. The game draws distant terrain with fewer points; the ground a ridge raises keeps all of them, so it looks the same from any distance.

Vegetation​

Grass, trees and other scattered meshes are laid out in a plan, levels\<world>\vegetation.xml in the workspace. world pack grows it into each sector it reaches and flags those sectors so the game loads them. The plan itself stays out of the packed layer.

<Vegetation>
<Patch Mesh="graphics\vegetation\savannah\1_grasssavannah_b.xbg" Donor="w1_b_2" Seed="1">
<Area X="192" Y="320" Width="128" Height="64" />
</Patch>
<Patch Mesh="graphics\vegetation\savannah\realtrees\rt_tree_acacia_small.rtx" Donor="w1_b_2" Spacing="14">
<Area X="128" Y="320" Width="64" Height="64" />
<At X="100" Y="350" />
</Patch>
</Vegetation>

A Patch spreads one mesh or tree over its Areas, rectangles in world metres. It places one copy in every square of Spacing metres (default 1.6, as thick as a shipped savannah field), at a random spot in the square, turned at random, on the ground. An At places one copy at exactly that spot. Seed makes another random layout of the same patch. Donor is a shipped level that places the same mesh. Each copy takes the colour, height and light of a random copy there, so a field looks the way the game's own fields do. Packing stops with an error if the donor places none.

A tree is a RealTree, a .rtx file, such as graphics\vegetation\savannah\realtrees\rt_tree_acacia.rtx. Give it a Spacing of its own, about 10 to 15 m for a stand of trees. A tree brings its own collision, and the navmesh is cut around its trunk so soldiers path round it; a bush has no trunk and is not cut out. Packing puts trees in each sector's far landmark file, and grass and other meshes in its near one, as the shipped levels do.

Which mesh you pick decides more than its look:

  • The world has to list it, or the game draws nothing. Every shipped world, and so every new one, lists the same 187 meshes, all the game's scatter grasses, rocks and bushes among them. Packing stops with an error for a mesh the world does not list.
  • Only five meshes hide a crouched player from soldiers: 1_grasssavannah_b, _f, _g, _bold and 2_sorghum, all in graphics\vegetation\savannah\. The multiplayer grasses look the same and hide no one. Packing warns about a mesh that hides no one.

A world with no plan keeps tmpla's bare ground. A plan in a mod that only changes another mod's world is not grown.

Deploy and visit​

Deploy the packed layer like any mod:

jackall-cli mod build --game "C:\Games\Far Cry 2" --layer myworld-packed

Deploy mods on the Mods tab leaves an unpacked new world's pieces out, and says so; the rest of the workspace deploys as usual.

The game has no menu for a new world. Load any save, press ~, and travel to the spawn point:

#GameChangeWorld("myworld", "2054037628277228842")

Change another mod's world​

A mod that changes a world another mod made works like a mod of a campaign world: its edits are pieces, merged onto that mod's packed files when both are deployed. Pack it with the other mod as its base, so it gets the navmesh of the sectors it changes:

jackall-cli world pack <workspace> --base myworld-packed --game "C:\Games\Far Cry 2" --out changes-packed

A sector's navmesh does not merge. If two mods change the same sector, the one deployed later wins, and the other's objects are missing from that sector's navmesh.

Limits​

  • The navmesh drops ground off the terrain that nothing could reach, such as a rooftop or the top of a rock. Place a soldier, an animal or a smart-terrain point on it to keep it.
  • Roads and rivers are copied from tmpla and cannot be edited yet. Terrain and vegetation are planned in files, not on the Map tab. A terrain plan only raises ridges, and casts no baked shadow. A vegetation plan cannot burn: none of it carries the fire data shipped fields do.
  • The files JackAll writes are larger than the game's own, because it does not share repeated values the way the game's tools did. The game reads them all the same.