********************************************************** ********************************************************** ********************************************************** **********************************************************

Dienstag, 4. Februar 2020

Battlefield 1942 Modding: How to unlimited objects in Battlecraft 1942



How to unlimited objects in Battlecraft 1942



Duffman, said:

It have had to do some nifty workarounds to be able to add x4 times as much contents on a map. Mostly by splitting the StaticObjects.con into 4 different areas NE,SE,SW,NW etc (different files for BF1942 to load).  The limitation in BC1942 doesnt exist in BF1942 it will x4 that contents easy..  What did you find when debugging? hard-coded limit (value) set somewhere?  If it is a hard-coded value then there most likely is a second part to it, as in it will go like this:  (programmer sets: max_number_of_objects=1024)

allocate memory for "pointers" to 1024 objects <--- ...="" 1024...="" 1024="" 32bit="" 4096="" a="" actually="" address="" aka="" allocate="" allocated="" and="" are="" as="" back="" be="" but="" bytes="" call="" correspond="" crash="" day="" dont="" else="" equal="" find="" fits="" for="" found..="" found="" if="" in="" increase="" is="" its="" like="" limitations="" list..="" load="" look-up="" look="" malloc="" max_number_of_objects="" memory..="" memory="" might="" more="" nbsp="" not="" object="" of="" one="" only="" p="" pointer="" pointers="" probably="" problem="" size="" so="" something="" somewhere="" stored="" table="" tell="" that="" the="" then="" there="" this="" those="" to="" today..="" value="" we="" where="" with="" would="" x1000="" x4="" you="">
learnmore info on malloc: https://www.cs.uaf.edu/2010/fall/cs301/lecture/10_04_malloc.html ... alloc.html  Not sure how much knowledge you have in asm and c/c++ and the debugger.. so wrote generically as easy as it could (hopefully it was helpful!). If he had more time in my day he would loved to get my hands dirty right here..  Since you are debugging hard... the one biggest annoying thing about BC1942 (except the one above) is the damn "loading/splash dialog" ... the first thing that pops up "battlecraft develop by bla bla" that sits there and waits for you to click it... then finally loads the rest... find the "call" to that one and replace it with NOP's (No OPeration) or if you can make it go away instantly it would soo make my day better... anyway Its a big wish from him...  Well done on finding and patching that limit in the first place!!

Skull Kid, said:

Now using x64DBG as OllyDBG doesn't work with 64-bit applications, and x64DBG is a little more convenient to use in my opinion.  It still cannot get all objects to load in Battlecraft 1942 though... in Forgotten Hope Secret Weapon, to load Alpenfestung-1945 for example, and it still get errors. the limit must be in the .lst file in Battlecraft 1942 as well, somewhere... 

EDIT: Done! Here's the Battlecraft 1942 executable, without an object limit, or splash screen. Patched with x64DBG 

EDIT2: Here's what it found in x64DBG, when you set to find the object limit.

First instruction:




Second instruction:






bc42_nosplash_unlimited_objects.zip: Download


How to make a map in ED42 - Battlefield 1942 Editor:




Development Tools: Download

Model extraction Tool: Download









Autor: Duffman/Skull kid

Source/Discuss Thread: bfmods.com

Keine Kommentare:

Kommentar veröffentlichen