Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Опубликовано:

Hello.

 

Most of you who are interested in MW2 SP mapping, have probably already seen my entity map tool, a mod used for spawning entities in-game with a single button press.

Here's an updated version, along with Apadayo's .d3dbsp editor, an useful tool for extracting and editing saved entities.

 

 

Tutorial:

 

First of all, you'll have to bind the "looking" keys if you haven't already. (Those can be set in options > controls. "Look up" and "look down" can be found under the "look" section, while "move right" and "move left" can be found in the movement section)

 

After you've done that, start any map of your choice with the mod, and follow the instructions on the screen. If you don't see the HUD, then you probably haven't loaded/installed the mod correctly. Try restarting the map and seeing if that helps.

 

When you've placed your entities, either restart the map, disconnect, or close the game. The entities you've made should now be saved in your games_mp.log. (If you're for some reason not loading this as a mod, then the games_mp.log is in the M2demo folder)

 

Open up Apadayo's .d3dbsp editor. (If you already have a .d3dbsp.ents file, then and press File > open and select your .d3dbsp.ents file to load it)

Now, press "import entities from gamelog", which should be under "Actions", and select your games_mp.log. You should now see the entities you've made, and the eventual entities you may already have in your .d3dbsp file.

 

Now you're done! Press file > save and save your file.

 

Available developers console commands:

mapping_tool_enabled - Turn the mod on/off

mapping_ufo_mode - Ufo mode, 0 is the spectate version you're all familiar with, 1 is Lost4468's noclip.

mapping_bombBrushModel - The brushmodel of the bomb.

mapping_flag_radius - The trigger radius of the flags you're going to spawn.

mapping_model - The model name of the script_model you can spawn using this mod.

mapping_rushTool - Set to 1 to unlock entities for my new unofficial rush gametype instead of "normal" entities.

 

Credits:

Apadayo for the .d3dbsp editor.

Me (Rendflex) - For making the mod.

Lost4468 for the noclip mode.

 

Virus scan:

Virus total: 0/42

  • Ответы 51
  • Просмотры 12,9k
  • Created
  • Последний ответ

Top Posters In This Topic

Featured Replies

Опубликовано:

Nice to see you officially released this!

Thank you for your tool, I hope that you'll enhance the model manipulator feature in the future.

To Apadayo. You sould update the d3dbsp.ents editor with some new cool features like: select multiple entities,hide/delete selected,remove entities in box, and make a readme for the tool

Опубликовано:

The binding isn't working, I got one to work.

 

Press 'J' to select an entity to work.

 

Press 'Unbound' (The problem, it should be H) to scroll through the entity cycle.

 

Why isn't that bind working?

 

EDIT: I got it. :)

 

EDIT 2: Is there a list of models out there?

Опубликовано:

I think this has a small amount of all the models in game..

Killstreak Models

"vehicle_b2_bomber" 
"vehicle_av8b_harrier_jet_mp"
"vehicle_av8b_harrier_jet_opfor_mp"
"vehicle_mig29_desert"
"tag_origin"
"projectile_cbu97_clusterbomb"
"c130_zoomrig"
"vehicle_uav_static_mp"
"vehicle_little_bird_minigun_right"
"sentry_minigun"
"weapon_minigun"
"vehicle_m1a1_abrams_d_static"
"vehicle_ac130_coop"
"com_plasticcase_friendly"
"com_plasticcase_enemy"
"vehicle_little_bird_armed"
"vehicle_ac130_low_mp"

Some of these models need to precached so add the following code to init()

precacheModel("Model Name Here");

Developer Models

"test_sphere_silver"


Models by Map


Afghan

"furniture_blowupdoll01", //Sex Doll";
"machinery_oxygen_tank01", //Oxygen Tank orange";
"foliage_pacific_bushtree02_animated", //Big bush";
"foliage_cod5_tree_jungle_02_animated", //Tree";
"machinery_oxygen_tank02", //Oxygen Tank green";
"com_barrel_russian_fuel_dirt", //Fuel barrel";
"com_locker_double", //Locker";
"foliage_pacific_bushtree02_halfsize_animated", //Small desert bush";
"com_plasticcase_black_big_us_dirt", //Ammo crate";
"foliage_pacific_bushtree01_halfsize_animated", //Small green bush";
"vehicle_uaz_open_destructible", //Military vehicle open";
"vehicle_hummer_destructible", //Hummer";
"foliage_cod5_tree_pine05_large_animated", //Tree 2";
"utility_transformer_ratnest01", //Transformer";
"utility_water_collector", //Water collector";


Derail

"com_roofvent2_animated", //Roof ventilator";
"com_filecabinetblackclosed", //File cabinet";
"com_tv1_testpattern", //TV";
"usa_gas_station_trash_bin_02", //Trash bin";
"prop_photocopier_destructible_02", //Photocopier";
"machinery_oxygen_tank01", //Oxygen tank orange";
"com_trashbin01", //Trash bin 2";
"vehicle_pickup_destructible_mp", //Pickup";
"furniture_gaspump01_damaged", //Gas pump";
"vehicle_uaz_winter_destructible", //Winter vehicle";
"com_propane_tank02", //Big propane tank";
"crashed_satellite", //Crashed satellite";
"vehicle_bm21_cover_destructible", //Military truck";


Estate
"machinery_generator", //Small generator";
"vehicle_pickup_destructible_mp", //White pickup";
"vehicle_coupe_white_destructible", //Small white car";
"vehicle_suburban_destructible_dull", //Big black car";
"vehicle_luxurysedan_2008_destructible", //Small black car";
"com_electrical_transformer_large_dam", //Large electrical transformer";
"machinery_oxygen_tank01", //Oxygen tank orange";
"com_filecabinetblackclosed", //File cabinet";
"ma_flatscreen_tv_on_wallmount_02", //Flatscreen TV";


Favela

"utility_transformer_small01", //Small Transformer";
"vehicle_small_hatch_white_destructible_mp", //Small white car";
"vehicle_small_hatch_blue_destructible_mp", //Small blue car";
"vehicle_pickup_destructible_mp", //White pickup";
"utility_water_collector", //Water collector";
"com_tv2", //TV";
"machinery_oxygen_tank01", //Oxygen tank orange";
"machinery_oxygen_tank02", //Oxygen tank green";
"utility_transformer_ratnest01", //Transformer";
"foliage_tree_palm_bushy_3", //Palm tree";
"com_firehydrant", //Fire hydrant";
"com_newspaperbox_red", //Red newspaperbox";
"com_newspaperbox_blue", //Blue newspaperbox";
"com_trashbin01", //Green trash bin";
"com_trashbin02", //Black trash bin";


Highrise

"ma_flatscreen_tv_wallmount_01", //Flatscreen TV";
"com_trashbin02", //Black trash bin";
"com_filecabinetblackclosed", //File cabinet";
"prop_photocopier_destructible_02", //Photocopier";
"machinery_oxygen_tank01", //Oxygen tank orange";
"machinery_oxygen_tank02", //Oxygen tank green";
"com_electrical_transformer_large_dam", //Large electrical transformer";
"com_roofvent2_animated", //Roof ventilator";
"com_propane_tank02", //Large propane tank";
"highrise_fencetarp_04", //Large green fence";
"highrise_fencetarp_05", //Small orange fence";
"com_barrel_benzin", //Benzin barrel";


Invasion

"com_trashbin01", //Green trash bin";
"com_trashbin02", //Black trash bin";
"com_firehydrant", //Fire hydrant";
"com_newspaperbox_blue", //Blue newspaper box";
"com_newspaperbox_red", //Red newspaper box";
"furniture_gaspump01_damaged", //Gas pump";
"vehicle_80s_wagon1_red_destructible_mp", //Red car";
"vehicle_hummer_destructible", //Hummer";
"vehicle_taxi_yellow_destructible", //Taxi";
"vehicle_uaz_open_destructible", //Military vehicle open";
"utility_transformer_small01", //Transformer";
"foliage_tree_palm_tall_1", //Palm tree tall";
"foliage_tree_palm_bushy_1", //Palm tree bushy";


Karachi

"prop_photocopier_destructible_02", //Photocopier";
"com_filecabinetblackclosed", //File cabinet";
"com_firehydrant", //Fire hydrant";
"com_newspaperbox_red", //Red newspaper box";
"com_newspaperbox_blue", //Blue newspaper box";
"com_tv1", //TV";
"vehicle_moving_truck_destructible", //Truck";
"chicken_black_white", //Chicken black-white";


Quarry

"foliage_pacific_bushtree02_animated", //Small bush";
"foliage_tree_oak_1_animated2", //Big bush";
"foliage_cod5_tree_jungle_02_animated", //Tree";
"com_filecabinetblackclosed", //File cabinet";
"machinery_generator", //Small generator";
"machinery_oxygen_tank01", //Oxygen tank orange";
"machinery_oxygen_tank02", //Oxygen tank green";
"utility_transformer_small01", //Small transformer";
"com_locker_double", //Locker";
"com_barrel_russian_fuel_dirt", //Fuel barrel";
"com_tv1", //TV";
"vehicle_van_green_destructible", //Green van";
"vehicle_van_white_destructible", //White van";
"vehicle_pickup_destructible_mp", //White pickup";
"vehicle_small_hatch_turq_destructible_mp", //Small white car";
"vehicle_uaz_open_destructible", //Military vehicle";
"vehicle_moving_truck_destructible", //White truck";
"usa_gas_station_trash_bin_02", //Trash bin";
"prop_photocopier_destructible_02", //Photocopier";

Rundown

"com_tv1", //TV";
"com_tv2", //TV 2";
"com_trashbin01", //Green trash bin";
"com_trashbin02", //Black trash bin";
"com_trashcan_metal_closed", //Metal trash bin";
"vehicle_small_hatch_white_destructible_mp", //White car";
"vehicle_small_hatch_blue_destructible_mp", //Blue car";
"vehicle_uaz_open_destructible", //Russian military vehicle";
"vehicle_bm21_mobile_bed_destructible", //Military truck";
"machinery_oxygen_tank01", //Oxygen tank orange";
"machinery_oxygen_tank02", //Oxygen tank green";
"com_firehydrant", //Fire hydrant";
"foliage_tree_palm_bushy_1", //Palm tree";
"foliage_pacific_fern01_animated", //Small bush";
"utility_transformer_small01", //Small transformer";
"utility_water_collector", //Water collector";
"utility_transformer_ratnest01", //Transformer";
"chicken_black_white", //Chicken black-white";
"chicken_white", //Chicken white";


Scrapyard

"foliage_tree_oak_1_animated2", //Tree";
"machinery_oxygen_tank01", //Oxygen tank orange";
"com_filecabinetblackclosed", //File cabinet";
"machinery_oxygen_tank02", //Oxygen tank green";
"com_electrical_transformer_large_dam", //Large transformer";
"vehicle_moving_truck_destructible", //Truck";
"foliage_pacific_bushtree02_animated", //Bush";
"vehicle_pickup_destructible_mp", //Pickup";
"com_trashbin02", //Trash bin";
"vehicle_bm21_mobile_bed_destructible", //Military truck";
"foliage_cod5_tree_jungle_02_animated", //Tree 2";
"com_firehydrant", //Fire hydrant";
"machinery_generator", //Generator";


Skidrow

"com_trashbin01", //Green trash bin";
"com_trashbin02", //Black trash bin";
"com_firehydrant", //Fire hydrant";
"com_newspaperbox_red", //Red newspaper box";
"com_newspaperbox_blue", //Blue newspaper box";
"vehicle_uaz_open_destructible", //Military vehicle open";
"vehicle_van_white_destructible", //White car";
"vehicle_bm21_cover_destructible", //Military truck";
"com_filecabinetblackclosed", //File cabinet";


Subbase

"machinery_oxygen_tank01", //Oxygen tank orange";
"machinery_oxygen_tank02", //Oxygen tank green";
"com_trashcan_metal_closed", //Metal trash bin";
"com_tv1", //TV";
"com_filecabinetblackclosed", //File cabinet";
"com_locker_double", //Locker";
"vehicle_uaz_winter_destructible", //Military vehicle";


Terminal

"com_tv1", //TV";
"com_barrel_benzin", //Benzin barrel";
"foliage_pacific_fern01_animated", //Small Bush";
"ma_flatscreen_tv_wallmount_02", //Flatscreen TV";
"com_roofvent2_animated", //Roof ventilator";
"ma_flatscreen_tv_on_wallmount_02_static", //Flatscreen TV On";
"vehicle_policecar_lapd_destructible", //Police car";
"com_vending_can_new2_lit", //Vending machine";
"usa_gas_station_trash_bin_01", //Trash bin";
"foliage_cod5_tree_pine05_large_animated", //Tree";
"com_filecabinetblackclosed", //File cabinet";
"com_plasticcase_black_big_us_dirt", //Ammo crate";



Underpass

"foliage_pacific_bushtree01_halfsize_animated", //Small green bush";
"utility_water_collector", //Water collector";
"com_propane_tank02", //Large propane tank";
"foliage_pacific_bushtree01_animated", //Big green bush";
"vehicle_van_slate_destructible", //Blue van";
"com_locker_double", //Locker";
"machinery_oxygen_tank01", //Oxygen tank orange";
"prop_photocopier_destructible_02", //Photocopier";
"usa_gas_station_trash_bin_02", //Trash bin";
"machinery_oxygen_tank02", //Oxygen tank green";
"com_filecabinetblackclosed", //File cabinet";
"vehicle_pickup_destructible_mp", //White pickup";
"foliage_cod5_tree_jungle_02_animated", //Tall tree";
"foliage_tree_oak_1_animated2", //Tree";
"foliage_pacific_palms08_animated", //Small green bush 2";
"chicken_black_white", //Chicken black-white";
"utility_transformer_ratnest01", //Transformer";
"utility_transformer_small01", //Small transformer";

  • 2 weeks later...
Опубликовано:

sry but i think i'm to stupid for this :lol:

 

how can i load a singleplayer map which is not already in 4D1?

i know i can load maps with /devmap or /map... (gulag, burgertown ... works)

and the singleplayer maps are the .ff files in the same folder as the mp maps

but how can i load the singleplayer maps without any errors?

Опубликовано:

This Code?

 

LevelDependency _dependencies[] =
{
       { "oilrig", "mp_subbase" },
       { "invasion", "mp_invasion" },
       { "gulag", "mp_subbase" },
       { "contingency", "mp_subbase" },
       { "so_ghillies", "mp_brecourt" },
       { "roadkill", "mp_rust" }, // actually Rust is vs. TF 141 and not vs. Army Rangers, but meh.
       { "favela", "mp_favela" }, // originally said 'takedown', don't know who the fsck came up with this
       { "iw4_credits", "mp_rust" },
       { "trainer", "mp_rust" },
       { "dc_whitehouse", "mp_rust" },
       { "mp_rust", 0 },

 

if i want new maps i have to add the name to this file and a mp map, copile the dll and it should work right?

Опубликовано:
This Code?

 

LevelDependency _dependencies[] =
{
       { "oilrig", "mp_subbase" },
       { "invasion", "mp_invasion" },
       { "gulag", "mp_subbase" },
       { "contingency", "mp_subbase" },
       { "so_ghillies", "mp_brecourt" },
       { "roadkill", "mp_rust" }, // actually Rust is vs. TF 141 and not vs. Army Rangers, but meh.
       { "favela", "mp_favela" }, // originally said 'takedown', don't know who the fsck came up with this
       { "iw4_credits", "mp_rust" },
       { "trainer", "mp_rust" },
       { "dc_whitehouse", "mp_rust" },
       { "mp_rust", 0 },

 

if i want new maps i have to add the name to this file and a mp map, copile the dll and it should work right?

and make the required gsc's and arena file.

Опубликовано:
This Code?

 

LevelDependency _dependencies[] =
{
       { "oilrig", "mp_subbase" },
       { "invasion", "mp_invasion" },
       { "gulag", "mp_subbase" },
       { "contingency", "mp_subbase" },
       { "so_ghillies", "mp_brecourt" },
       { "roadkill", "mp_rust" }, // actually Rust is vs. TF 141 and not vs. Army Rangers, but meh.
       { "favela", "mp_favela" }, // originally said 'takedown', don't know who the fsck came up with this
       { "iw4_credits", "mp_rust" },
       { "trainer", "mp_rust" },
       { "dc_whitehouse", "mp_rust" },
       { "mp_rust", 0 },

 

if i want new maps i have to add the name to this file and a mp map, copile the dll and it should work right?

and make the required gsc's and arena file.

And even then it might not work, because IW.

  • 3 weeks later...
Опубликовано:

I kind of extended map loading on IW4M source..

 

PatchMW2SPMaps.cpp

// ==========================================================
// IW4M project
// 
// Component: clientdll
// Sub-component: steam_api
// Purpose: singleplayer level loading code (reallocation, 
//          address changes, other patches, ...)
//
// Initial author: NTAuthority
// Started: 2011-05-25
// ==========================================================

#include "StdInc.h"
#include 

// entity dumping, needs to be split?
struct MapEnts
{
  const char* name;
  const char* entitystring;
};

void DumpMapEntities(MapEnts* entities)
{
  char filename[255];

  CreateDirectoryA("raw/maps", NULL);
  CreateDirectoryA("raw/maps/mp", NULL);

  _snprintf(filename, sizeof(filename), "raw/%s.ents", entities->name);

  FILE* file = fopen(filename, "w");
  if (file)
  {
     fwrite(entities->entitystring, 1, strlen(entities->entitystring), file);
     fclose(file);
  }
}

static char mapEntities[1024 * 1024];

void LoadMapEntities(MapEnts* entry)
{
  char* buffer;
  char filename[255];
  _snprintf(filename, sizeof(filename), "%s.ents", entry->name);

  // why the weird casts?
  if (FS_ReadFile((const char*)(&filename), (char**)&buffer) >= 0)
  {
     strcpy(mapEntities, buffer);
     entry->entitystring = mapEntities;

     FS_FreeFile(buffer);
  }
}

// more code
static DWORD gameWorldSP;
static DWORD gameWorldMP;

// defined in Load.cpp
void* ReallocateAssetPool(assetType_t type, unsigned int newSize);

// TODO: load these dynamically
struct LevelDependency
{
  const char* level;
  const char* dependency;
};

LevelDependency _dependencies[] = 
{
  { "oilrig", "mp_subbase" },
  { "invasion", "mp_invasion" },
  { "gulag", "mp_subbase" },
  { "contingency", "mp_subbase" },
  { "so_ghillies", "mp_brecourt" },
  { "roadkill", "mp_rust" }, // actually Rust is vs. TF 141 and not vs. Army Rangers, but meh.
  { "favela", "mp_favela" }, // originally said 'takedown', don't know who the fsck came up with this
  { "iw4_credits", "mp_rust" },
  { "trainer", "mp_rust" },
  { "dc_whitehouse", "mp_rust" },

  //addition level support added by yolarrydabomb and tested. all player models works.

{ "boneyard", "mp_rust" }, 
{ "ending", "mp_rust" },	
{ "estate", "mp_estate" },  
{ "arcadia", "mp_nightshift" },
{ "airport", "mp_nightshift" },
{ "so_bridge", "mp_checkpoint" }, 
{ "dcemp", "mp_nightshift" },
{ "dcburning", "mp_nightshift" },
{ "cliffhanger", "mp_subbase" },
{ "co_hunted", "mp_brecourt" }, 
{ "favela_escape", "mp_favela" },
{ "af_caves", "mp_rust" },
{ "af_chase", "mp_rust" }, // never know maybe someone will figure out a boat. lol
{ "mp_rust", 0 },
  { 0, 0 }
};

// called during Com_LoadLevelZone, replaces the DB_LoadXAssets call
CallHook mapZoneLoadHook;
DWORD mapZoneLoadHookLoc = 0x42C2AF;

// Com_Sprintf call in Com_GetBspFilename
CallHook getBSPNameHook;
DWORD getBSPNameHookLoc = 0x4C5979;

static char levelDependencyName[64];
static char levelAssetName[64];

bool AssetRestrict_RestrictFromMaps(assetType_t type, const char* name, const char* zone)
{
  if (!_stricmp(zone, levelDependencyName))
  {
     // don't load other maps
     if (type == ASSET_TYPE_GAME_MAP_MP || type == ASSET_TYPE_COL_MAP_MP || type == ASSET_TYPE_GFX_MAP || type == ASSET_TYPE_MAP_ENTS || type == ASSET_TYPE_COM_MAP || type == ASSET_TYPE_FX_MAP)
     {
        return true;
     }

     // also don't load localize/fx
     if (type == ASSET_TYPE_LOCALIZE/* || type == ASSET_TYPE_FX*/) // we need to link 'fx' assets as otherwise we
                                                     // crash at Mark_FxEffectDefAsset...
                                                    // guess rule #1 needs to be expanded:
                                                    // so rule #2 becomes 'don't touch fastfiles through code
                                                    // if you do not understand the code'.
                                                    // rule #1 still stands: 'don't touch fastfiles'
     {
        return true;
     }
  }

  if (type == ASSET_TYPE_WEAPON)
  {
     //if (!stricmp(zone, levelAssetName))
     //{
        //OutputDebugString(name);
        //OutputDebugString("\n");

        if (strstr(name, "_mp") == 0 && strstr(name, "m40a3") == 0 && strstr(name, "winchester1200") == 0 && strstr(name, "colt45") == 0 && strstr(name, "g36c_reflex") == 0 && strstr(name, "m14ebr") == 0 && strstr(name, "skorpion") == 0 && strstr(name, "m60e4") == 0 && strstr(name, "dragunov") == 0 && strstr(name, "remington700") == 0 && strstr(name, "freerunner") == 0 && strstr(name, "ice_peaks") == 0 && strstr(name, "ending_knife") == 0)
        {
           return true;
        }
     //}
  }

  return false;
}

void MapZoneLoadHookFunc(XZoneInfo* data, int count, int unknown)
{
  XZoneInfo newData[3];

  // flag us as loading level assets so we don't load weapons
  strcpy(levelAssetName, data[0].name);
  levelDependencyName[0] = '\0';

  // load the base XAsset
  DB_LoadXAssets(data, count, unknown);

  // add level dependencies
  count = 0;

  for (LevelDependency* dependency = _dependencies; dependency->level; dependency++)
  {
     if (!_stricmp(dependency->level, data[0].name))
     {
        newData[count].name = dependency->dependency;
        newData[count].type1 = data[0].type1;
        newData[count].type2 = data[0].type2;

        count++;
        break;
     }
  }

  // load level dependencies
  if (count > 0)
  {
     if (newData[0].name)
     {
        strcpy(levelDependencyName, newData[0].name);
        DB_LoadXAssets(newData, count, unknown);
     }
  }
#if PRE_RELEASE_DEMO
  /*else
  {
     Com_Error(2, "Unsupported level: %s", data[0].name);
  }*/
#endif

  // check for being MP/SP, and change data accordingly
  if (_strnicmp("mp_", data[0].name, 3))
  {
     // SP
     *(DWORD*)0x4D90B7 = gameWorldSP + 52;      // some game data structure
  }
  else
  {
     // MP
     *(DWORD*)0x4D90B7 = gameWorldMP + 4;      // some game data structure
  }
}

void GetBSPNameHookFunc(char* buffer, size_t size, const char* format, const char* mapname)
{
  if (_strnicmp("mp_", mapname, 3))
  {
     format = "maps/%s.d3dbsp";
  }

  _snprintf(buffer, size, format, mapname);
}

void AssetRestrict_PreLoadFromMaps(assetType_t type, void* entry, const char* zone)
{
  if (type == ASSET_TYPE_MAP_ENTS)
  {
     if (GAME_FLAG(GAME_FLAG_DUMPDATA))
     {
        DumpMapEntities((MapEnts*)entry);
     }

     LoadMapEntities((MapEnts*)entry);
  }
}

CallHook ignoreEntityHook;
DWORD ignoreEntityHookLoc = 0x5FBD6E;

bool IgnoreEntityHookFunc(const char* entity); // TODO: move here from Load
void ReallocXAssetEntries();
void PatchMW2_Uncoupling();

void PatchMW2_SPMaps()
{
  // reallocate asset pools
  ReallocateAssetPool(ASSET_TYPE_IMAGE, 7168);
  ReallocateAssetPool(ASSET_TYPE_LOADED_SOUND, 2700);
  ReallocateAssetPool(ASSET_TYPE_FX, 1200);
  ReallocateAssetPool(ASSET_TYPE_LOCALIZE, 14000);
  ReallocateAssetPool(ASSET_TYPE_XANIM, 8192);
  ReallocateAssetPool(ASSET_TYPE_XMODEL, 3072);
  ReallocateAssetPool(ASSET_TYPE_PHYSPRESET, 128);

  // get and store GameWorld*p data
  gameWorldSP = (DWORD)ReallocateAssetPool(ASSET_TYPE_GAME_MAP_SP, 1);
  gameWorldMP = (*(DWORD*)0x4D90B7) - 4;

  // allow loading of IWffu (unsigned) files
  *(BYTE*)0x4158D9 = 0xEB; // main function
  *(WORD*)0x4A1D97 = 0x9090; // DB_AuthLoad_InflateInit

  // ignore 'node_' entities
  //ignoreEntityHook.initialize((PBYTE)ignoreEntityHookLoc);
  //ignoreEntityHook.installHook((void(*)())IgnoreEntityHookFunc, false);

  // asset zone loading
  mapZoneLoadHook.initialize(mapZoneLoadHookLoc, MapZoneLoadHookFunc);
  mapZoneLoadHook.installHook();

  // BSP name
  getBSPNameHook.initialize(getBSPNameHookLoc, GetBSPNameHookFunc);
  getBSPNameHook.installHook();

  // hunk size (was 300 MiB)
  *(DWORD*)0x64A029 = 0x1C200000; // 450 MiB
  *(DWORD*)0x64A057 = 0x1C200000;

  // XAsset entries
  ReallocXAssetEntries();

  // uncouple
  PatchMW2_Uncoupling();
}

typedef struct  
{
  char unknown[16];
} xAssetEntry_t;

static xAssetEntry_t xEntries[789312];

void ReallocXAssetEntries()
{
  int newsize = 516 * 2048;
  //newEnts = malloc(newsize);

  // get (obfuscated) memory locations
  unsigned int origMin = 0x134CAD8;
  unsigned int origMax = 0x134CAE8;

  unsigned int difference = (unsigned int)xEntries - origMin;

  // scan the .text memory
  char* scanMin = (char*)0x401000;
  char* scanMax = (char*)0x6D7000;
  char* current = scanMin;

  for (; current < scanMax; current += 1) {
     unsigned int* intCur = (unsigned int*)current;

     // if the address points to something within our range of interest
     if (*intCur == origMin || *intCur == origMax) {
        // patch it
        *intCur += difference;
     }
  }

  *(DWORD*)0x5BAEB0 = 789312;
}

 

basemaps.arena in /m2demo/mp/

{
map			"mp_invasion"
longname	"MPUI_INVASION"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_INVASION"
   mapimage    "preview_mp_invasion"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "us_army"
   axischar    "opforce_composite"
   environment	"urban"
}

{
map			"mp_highrise"
longname	"MPUI_HIGHRISE"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_HIGHRISE"
   mapimage    "preview_mp_highrise"
mapoverlay  "compass_overlay_map_blank"
allieschar  "us_army"
   axischar    "opforce_airborne"
   environment	"urban"
}

{
map			"mp_checkpoint"
longname	"MPUI_CHECKPOINT"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_checkpoint"
   mapimage    "preview_mp_checkpoint"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "seals_udt"
   axischar    "opforce_composite"
   environment	"urban"
}

{
map			"mp_nightshift"
longname	"MPUI_RAID"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_nightshift"
   mapimage    "preview_mp_nightshift"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "us_army"
   axischar    "opforce_airborne"
   environment	"urban"
}

{
map			"mp_favela"
longname	"MPUI_FAVELA"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_favela"
   mapimage    "preview_mp_favela"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_desert"
   axischar    "militia"
   environment	"urban"
}

{
map			"mp_quarry"
longname	"MPUI_QUARRY"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_quarry"
   mapimage    "preview_mp_quarry"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_desert"
   axischar    "militia"
   environment	"desert"
}

{
map			"mp_brecourt"
longname	"MPUI_WASTELAND"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_BRECOURT"
   mapimage    "preview_mp_brecourt"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_forest"
   axischar    "opforce_airborne"
   environment	"forest"
}

{
map			"mp_derail"
longname	"MPUI_DERAIL"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_DERAIL"
   mapimage    "preview_mp_derail"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_arctic"
   axischar    "opforce_arctic"
   environment	"arctic"
}

{
map			"mp_subbase"
longname	"MPUI_SUBBASE"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_SUBBASE"
   mapimage    "preview_mp_subbase"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "seals_udt"
   axischar    "opforce_arctic"
   environment	"urban"
}

{
map			"mp_underpass"
longname	"MPUI_UNDERPASS"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_UNDERPASS"
   mapimage    "preview_mp_underpass"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_forest"
   axischar    "militia"
   environment	"forest"
}

{
map			"mp_estate"
longname	"MPUI_ESTATE"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_ESTATE"
   mapimage    "preview_mp_estate"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_forest"
   axischar    "opforce_airborne"
   environment	"forest"
}

{
map			"mp_rundown"
longname	"MPUI_RUNDOWN"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_RUNDOWN"
   mapimage    "preview_mp_rundown"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_desert"
   axischar    "militia"
   environment	"desert"
}

{
map			"mp_boneyard"
longname	"MPUI_BONEYARD"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_BONEYARD"
   mapimage    "preview_mp_boneyard"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_desert"
   axischar    "opforce_composite"
   environment	"desert"
}

{
map			"mp_afghan"
longname	"MPUI_AFGHAN"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_AFGHAN"
   mapimage    "preview_mp_afghan"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_desert"
   axischar    "opforce_composite"
   environment	"desert"
}

{
map			"mp_terminal"
longname	"MPUI_TERMINAL"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_TERMINAL"
   mapimage    "preview_mp_terminal"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "us_army"
   axischar    "opforce_airborne"
   environment	"urban"
}

{
map			"mp_rust"
longname	"MPUI_RUST"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth dd oneflag gtnw"
   description "MPUI_DESC_MAP_RUST"
   mapimage    "preview_mp_rust"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_desert"
   axischar    "opforce_composite"
   environment	"desert"
}

{
map			"mp_storm"
longname	"PATCH_STORM"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth"
   description "PATCH_DESC_MAP_STORM"
   mapimage    "preview_mp_storm"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_desert"
   axischar    "opforce_airborne"
   environment	"urban"
}

{
map			"mp_compact"
longname	"PATCH_COMPACT"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth"
   description "PATCH_DESC_MAP_COMPACT"
   mapimage    "preview_mp_compact"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_arctic"
   axischar    "opforce_arctic"
   environment	"urban"
}

{
map			"mp_complex"
longname	"PATCH_COMPLEX"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth"
   description "PATCH_DESC_MAP_COMPLEX"
   mapimage    "preview_mp_complex"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "us_army"
   axischar    "opforce_airborne"
   environment	"urban"
}

{
map			"mp_crash"
longname	"MPUI_CRASH"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth"
   description "MPUI_DESC_MAP_CRASH"
   mapimage    "preview_mp_crash"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_desert"
   axischar    "opforce_composite"
   environment	"urban"
}

{
map			"mp_overgrown"
longname	"MPUI_OVERGROWN"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth"
   description "MPUI_DESC_MAP_OVERGROWN"
   mapimage    "preview_mp_overgrown"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_forest"
   axischar    "opforce_airborne"
   environment	"forest"
}


{
map			"mp_abandon"
longname	"PATCH_ABANDON"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth"
   description "PATCH_DESC_MAP_ABANDON"
   mapimage    "preview_mp_abandon"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_desert"
   axischar    "militia"
   environment	"urban"
}

{
map			"mp_fuel2"
longname	"PATCH_FUEL2"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth"
   description "PATCH_DESC_MAP_FUEL2"
   mapimage    "preview_mp_fuel2"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "us_army"
   axischar    "opforce_composite"
   environment	"desert"
}

{
map			"mp_trailerpark"
longname	"PATCH_TRAILERPARK"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth"
   description "PATCH_DESC_MAP_TRAILERPARK"
   mapimage    "preview_mp_trailerpark"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "us_army"
   axischar    "opforce_composite"
   environment	"urban"
}

{
map			"mp_vacant"
longname	"PATCH_VACANT"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth"
   description "PATCH_DESC_MAP_VACANT"
   mapimage    "preview_mp_vacant"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "us_army"
   axischar    "opforce_airborne"
   environment	"urban"
}

{
map			"mp_strike"
longname	"PATCH_STRIKE"
gametype	"dm war sab sab2 dom sd sd2 hc thc ctf koth"
   description "PATCH_DESC_MAP_STRIKE"
   mapimage    "preview_mp_strike"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "us_army"
   axischar    "opforce_composite"
   environment	"desert"
}

{
map			"oilrig"
longname	"MPUI_OILRIG"
gametype	"dm war dom ctf sd dd"
   description "MPUI_OILRIG"
   mapimage    "preview_mp_oilrig"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "seals_udt"
   axischar    "opforce_arctic"
   environment	"urban"
}

{
map			"gulag"
longname	"MPUI_GULAG"
gametype	"dm war dom ctf"
   description "MPUI_DESC_MAP_GULAG"
   mapimage    "preview_mp_gulag"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "seals_udt"
   axischar    "opforce_arctic"
   environment	"urban"
}

{
map			"invasion"
longname	"Burger Town"
gametype	"dm war dom ctf"
   description ""
   mapimage    "preview_invasion"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "us_army"
   axischar    "opforce_composite"
   environment	"urban"
}

{
map			"iw4_credits"
longname	"IW4 Test Map"
gametype	"dm war dom ctf sd"
   description ""
   mapimage    "preview_iw4_credits"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_desert"
   axischar    "opforce_composite"
   environment	"desert"
}

{
map			"so_ghillies"
longname	"Pripyat"
gametype	"dm war"
   description ""
   mapimage    "preview_so_ghillies"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "socom_141_forest"
   axischar    "opforce_airborne"
   environment	"forest"
}

{
map			"contingency"
longname	"Contingency"
gametype	"dm war"
   description ""
   mapimage    "preview_mp_contingency"
mapoverlay  "compass_overlay_map_blank"
   allieschar  "seals_udt"
   axischar    "opforce_arctic"
   environment	"urban"
}

 

Now create some entitys :D you should be set.

 

The only 3 maps I did not get to load is af_caves, dc_whitehouse and af_chase

Опубликовано:
Not sure if you fixed this or not:
you'll have to change all the * to " (this is also done by ctrl + h)

 

I'm pretty sure you can fix that by using \" inside the GSC script, also, nice job with the boat.

yes it is fixed. just look at the source....

  • 2 weeks later...
Опубликовано:
  • Автор
The Entity tool doesn't seem to work anymore...

 

Is there a new way to get it to work?

 

The newest revision doesn't load the "custom" .GSC's for some reason. Threading the "init" thread in maptool.gsc from any other normal .GSC (for example, _rank.gsc or _load.gsc) should do it.

thread scripts\maptool::init();

 

I'll post an update when I'm not lazy :P

Опубликовано:
The Entity tool doesn't seem to work anymore...

 

Is there a new way to get it to work?

 

The newest revision doesn't load the "custom" .GSC's for some reason. Threading the "init" thread in maptool.gsc from any other normal .GSC (for example, _rank.gsc or _load.gsc) should do it.

thread scripts\maptool::init();

 

I'll post an update when I'm not lazy :P

that bug already got fixed in 104

Опубликовано:
Yeah, mine crashed once, then the rest of the time the mod never worked and the game just ran normally.

 

I've got a map that I am working on, I need to have this tool up and running ASAP.

just use an older revision to work on it? ._.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Account

Navigation

Поиск

Поиск

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.