Create KAMAZ offroad test map

This commit is contained in:
krustophski 2026-06-18 07:13:15 +03:00
parent b2cf8ded10
commit cb6323c820
45 changed files with 328 additions and 0 deletions

BIN
Content/MrPlow/Maps/Lvl_Kamaz.umap (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,42 @@
import json
from pathlib import Path
import unreal
PROJECT_ROOT = Path(r"C:/Users/post/Documents/mrPlow/mrPlow58")
SOURCE_MAP = "/Game/Variant_OffRoad/Maps/Lvl_Offroad"
DESTINATION_MAP = "/Game/MrPlow/Maps/Lvl_Kamaz"
REPORT_PATH = PROJECT_ROOT / "VehicleExports" / "unreal_create_kamaz_map_report.json"
def create_kamaz_map():
if not unreal.EditorAssetLibrary.does_asset_exist(SOURCE_MAP):
raise RuntimeError(f"Source map not found: {SOURCE_MAP}")
destination_directory = str(Path(DESTINATION_MAP).parent).replace("\\", "/")
unreal.EditorAssetLibrary.make_directory(destination_directory)
if unreal.EditorAssetLibrary.does_asset_exist(DESTINATION_MAP):
unreal.EditorAssetLibrary.delete_asset(DESTINATION_MAP)
level_subsystem = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem)
created = level_subsystem.new_level_from_template(DESTINATION_MAP, SOURCE_MAP)
if not created:
raise RuntimeError(f"Could not create {DESTINATION_MAP} from {SOURCE_MAP}")
saved = level_subsystem.save_current_level()
if not saved:
raise RuntimeError(f"Could not save {DESTINATION_MAP}")
report = {
"sourceMap": SOURCE_MAP,
"destinationMap": DESTINATION_MAP,
"exists": unreal.EditorAssetLibrary.does_asset_exist(DESTINATION_MAP),
"ok": True,
}
REPORT_PATH.write_text(json.dumps(report, indent=2) + "\n", encoding="utf-8")
unreal.log(f"Created KAMAZ map from offroad template: {json.dumps(report)}")
create_kamaz_map()

View file

@ -0,0 +1,46 @@
import json
from pathlib import Path
import unreal
PROJECT_ROOT = Path(r"C:/Users/post/Documents/mrPlow/mrPlow58")
MAP_PATH = "/Game/MrPlow/Maps/Lvl_Kamaz"
REPORT_PATH = PROJECT_ROOT / "VehicleExports" / "unreal_inspect_kamaz_map_report.json"
def inspect_map():
if not unreal.EditorAssetLibrary.does_asset_exist(MAP_PATH):
raise RuntimeError(f"Map does not exist: {MAP_PATH}")
loaded = unreal.EditorLoadingAndSavingUtils.load_map(MAP_PATH)
if not loaded:
raise RuntimeError(f"Could not load map: {MAP_PATH}")
actors = unreal.EditorLevelLibrary.get_all_level_actors()
actor_rows = []
class_counts = {}
for actor in actors:
class_name = actor.get_class().get_name()
class_counts[class_name] = class_counts.get(class_name, 0) + 1
actor_rows.append(
{
"name": actor.get_name(),
"label": actor.get_actor_label(),
"class": class_name,
"path": actor.get_path_name(),
}
)
report = {
"map": MAP_PATH,
"actorCount": len(actors),
"classCounts": dict(sorted(class_counts.items())),
"actors": sorted(actor_rows, key=lambda row: row["label"]),
"ok": len(actors) > 0,
}
REPORT_PATH.write_text(json.dumps(report, indent=2) + "\n", encoding="utf-8")
unreal.log(f"Inspected KAMAZ map: actorCount={len(actors)}")
inspect_map()

View file

@ -0,0 +1,6 @@
{
"sourceMap": "/Game/Variant_OffRoad/Maps/Lvl_Offroad",
"destinationMap": "/Game/MrPlow/Maps/Lvl_Kamaz",
"exists": true,
"ok": true
}

View file

@ -0,0 +1,111 @@
{
"map": "/Game/MrPlow/Maps/Lvl_Kamaz",
"actorCount": 15,
"classCounts": {
"DirectionalLight": 1,
"ExponentialHeightFog": 1,
"Landscape": 1,
"PlayerStart": 4,
"PostProcessVolume": 1,
"RuntimeVirtualTextureVolume": 1,
"SkyAtmosphere": 1,
"SkyLight": 1,
"VolumetricCloud": 1,
"WorldDataLayers": 1,
"WorldPartitionMiniMap": 1,
"WorldPartitionMiniMapVolume": 1
},
"actors": [
{
"name": "DirectionalLight_UAID_A85E45CFE40401D200_1470382761",
"label": "DirectionalLight",
"class": "DirectionalLight",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.DirectionalLight_UAID_A85E45CFE40401D200_1470382761"
},
{
"name": "ExponentialHeightFog_UAID_A85E45CFE40401D200_1470382763",
"label": "ExponentialHeightFog",
"class": "ExponentialHeightFog",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.ExponentialHeightFog_UAID_A85E45CFE40401D200_1470382763"
},
{
"name": "Landscape_UAID_A85E45CFE404FBD100_1221515703",
"label": "Landscape",
"class": "Landscape",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.Landscape_UAID_A85E45CFE404FBD100_1221515703"
},
{
"name": "PlayerStart_UAID_B42E9936F542031C01_1936909269",
"label": "PlayerStart",
"class": "PlayerStart",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.PlayerStart_UAID_B42E9936F542031C01_1936909269"
},
{
"name": "PlayerStart_UAID_F02F74551BF58DD602_1970161295",
"label": "PlayerStart2",
"class": "PlayerStart",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.PlayerStart_UAID_F02F74551BF58DD602_1970161295"
},
{
"name": "PlayerStart_UAID_F02F74551BF58DD602_1970165296",
"label": "PlayerStart3",
"class": "PlayerStart",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.PlayerStart_UAID_F02F74551BF58DD602_1970165296"
},
{
"name": "PlayerStart_UAID_F02F74551BF58DD602_1970167297",
"label": "PlayerStart4",
"class": "PlayerStart",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.PlayerStart_UAID_F02F74551BF58DD602_1970167297"
},
{
"name": "PostProcessVolume_UAID_F4A475FF15A34D6802_1880105873",
"label": "PostProcessVolume",
"class": "PostProcessVolume",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.PostProcessVolume_UAID_F4A475FF15A34D6802_1880105873"
},
{
"name": "RuntimeVirtualTextureVolume_UAID_F4A475FF15A3E16302_1136554640",
"label": "RuntimeVirtualTextureVolume",
"class": "RuntimeVirtualTextureVolume",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.RuntimeVirtualTextureVolume_UAID_F4A475FF15A3E16302_1136554640"
},
{
"name": "SkyAtmosphere_UAID_A85E45CFE40401D200_1470382762",
"label": "SkyAtmosphere",
"class": "SkyAtmosphere",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.SkyAtmosphere_UAID_A85E45CFE40401D200_1470382762"
},
{
"name": "SkyLight_UAID_A85E45CFE40401D200_1470380759",
"label": "SkyLight",
"class": "SkyLight",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.SkyLight_UAID_A85E45CFE40401D200_1470380759"
},
{
"name": "VolumetricCloud_UAID_A85E45CFE40401D200_1470381760",
"label": "VolumetricCloud",
"class": "VolumetricCloud",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.VolumetricCloud_UAID_A85E45CFE40401D200_1470381760"
},
{
"name": "WorldDataLayers",
"label": "WorldDataLayers",
"class": "WorldDataLayers",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.WorldDataLayers"
},
{
"name": "WorldPartitionMiniMap_0",
"label": "WorldPartitionMiniMap0",
"class": "WorldPartitionMiniMap",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.WorldPartitionMiniMap_0"
},
{
"name": "WorldPartitionMiniMapVolume_UAID_F4A475FF15A3416802_2043605759",
"label": "WorldPartitionMiniMapVolume",
"class": "WorldPartitionMiniMapVolume",
"path": "/Game/MrPlow/Maps/Lvl_Kamaz.Lvl_Kamaz:PersistentLevel.WorldPartitionMiniMapVolume_UAID_F4A475FF15A3416802_2043605759"
}
],
"ok": true
}