The Fake Console and ReadDataFile: how much can you load?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

The Fake Console and ReadDataFile: how much can you load?

Post by commanderawesome »

I'm trying to find out how much (of anything) you can load at once with a single command in-game.

Typing this:

Code: Select all

ReadDataFile("SIDE\\rep.lvl",
                             "rep_inf_ep2_rifleman",
                             "rep_inf_ep2_rocketeer",
                             "rep_inf_ep2_engineer",
                             "rep_inf_ep2_sniper",
                             "rep_inf_ep3_officer",
                             "rep_inf_ep2_jettrooper",
                             "rep_hover_fightertank",
                             "rep_hero_macewindu")
into the code console - on a map with one class per team and nothing else - crashes the game with this error:

Code: Select all

Message Severity: 3
C:\Battlefront2\main\RedEngineFL\Memory\RedMemory.cpp(561)
attempted to allocate from invalid heap -1

Message Severity: 3
C:\Battlefront2\main\RedEngineFL\Memory\RedMemory.cpp(538)
Allocating 50444 bytes failed - no free blocks left in Heap -1 ()
So what's the limit?
DylanRocket
2nd Lieutenant
2nd Lieutenant
Posts: 363
Joined: Sun Sep 02, 2012 2:47 am
Projects :: None
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set
Location: HK Factory
Contact:

Re: The Fake Console and ReadDataFile: how much can you load

Post by DylanRocket »

I don't believe you can load new units through Fake Console. You can load new textures and models however.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: The Fake Console and ReadDataFile: how much can you load

Post by AnthonyBF2 »

I failed to load models from fake console as well. I wanted to make map model/texture reskins in fake console and it crashes with models. Textures only it seems to work. :|
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: The Fake Console and ReadDataFile: how much can you load

Post by commanderawesome »

I've loaded models and units before. The former is how some Skin Changer commands work. But there appears to be an "upper limit" as to how many units I can load at a time, which is what i'm trying to find.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: The Fake Console and ReadDataFile: how much can you load

Post by [RDH]Zerted »

Have you guys tried using ReadDataFileInGame() instead of ReadDataFile()? I was never able to determine the difference between those two functions.
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: The Fake Console and ReadDataFile: how much can you load

Post by commanderawesome »

[RDH]Zerted wrote:Have you guys tried using ReadDataFileInGame() instead of ReadDataFile()? I was never able to determine the difference between those two functions.
No, i've always thought it was redundant since the latter works in-game, but perhaps the former works better. I'll let you know.
Post Reply