editor directly accessable inventory limited to 602 entries of buildings.csv

The editor can only access 602 entries from buildings.csv directly; entries beyond that are ignored.

How can this be changed?

[141 byte] By [wolfman-x] at [2008-2-13]
# 1
Do you have an example file that I could download to test this? Looking into it myself nor Frank could see any reason why this would be case.
MichaelKlucher-MSFT at 2007-9-10 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technolgies: XNA Build...
# 2

If you download my expansion pack and install it on top of your MC2 installation (CD or Source code Version) you can experience it. It is not about that one file buildings.csv. As you know better than I do it needs a different mc2res.dll and objects2.pak and buildings.cvs and all the art, tgl, csv files to back it up with content.

I positioned the inventory in buildings.csv by a priority I selected to enable me to position most inventory directly on a map. Everything in the categories "small stuff" and "destroyable road" as well as "dummy objects" can not be selected directly because it is below the 602 mark in buildings.csv. I only put one item (razor wire fence) as accessable.

In case you want to give it a try:


http://www.wolfman-x.net/missions/wolfman-x.exe

wolfman-x at 2007-9-10 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technolgies: XNA Build...
# 3

I found a solution but I would like to understand why the original entries had been coded like they were.

It works if you change three lines in ...\source\editor\editorinterface.cpp to:

if ( currentBrushID >= IDS_OBJECT_200 && currentBrushID <= IDS_OBJECT_200 + 1200 )

if ( currentBrushID >= IDS_OBJECT_200 && currentBrushID <= 43000 )

if ( specificMessage >= IDS_OBJECT_200 && specificMessage <= 43000 )

Why had the original values (600 and 30800) been selected ?

wolfman-x at 2007-9-10 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technolgies: XNA Build...
# 4
To be honest they were just probablly picked. There may have been a performance reason, but probably not as important for this game on machines now.
MichaelKlucher-MSFT at 2007-9-10 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technolgies: XNA Build...