This is a simple tool to generate vBF2 style and BF2142 style info images for your customized levels. There's no modding tool category so I just choose SinglePlayer Map.
vBF2 style & BF2142 style info map generator V1.1 by worldlife(worldlife123)
This is a simple tool to generate vBF2 style and BF2142 style info images for your customized levels. The source code is visible and you're free to use and modify it. I've also created a repository on github(Github.com), so feel free to report an issue/create a pull request if you find some bug/made some changes.
CHANGELOG
V1.1
1. Added support for bf2142 levels, including supplyLine and Titan mode.
2. Fixed issues when controlpoint images overlaps with each other.(Thanks Dnamro for his experiments!)
3. Added 'ObjectTemplate.showOnMinimap' support. ControlPoints with 'ObjectTemplate.showOnMinimap 0' do not show in the generated info image.
DEPENDENCIES
Python 2.7.13 (https://www.python.org/downloads/release/python-2713/)
Pillow (https://github.com/python-pillow/Pillow)
INSTALL
1. Install [python 2.7.13](https://www.python.org/downloads/release/python-2713/) first. After installing python, you can run install_pillow.bat to install pillow via pip.
2. Create a new folder "infomap" into your mod's python folder, and copy everything into this folder. Note that this tool is not loaded in game, so after infomap generation you can delete the folder.
USAGE
Run generateInfomaps.py with python.exe, or use run.bat. It will list all maps in your mod. Type a map name to generate info map for it, or Type "all" to generate for all maps.
For BF2142, run generateInfomaps_2142.py with python.exe, or use run_2142.bat.
Requirement for levels: The levels must be unzipped(that's to say, can be loaded in BF2Editor).The info ,Hud and Gamemodes folder must be present, as well as Init.con and Heightdata.con.
CUSTOMIZE
1.Add a team to generate infomap flags.
I've included all vBF2 and xpack teams in this tool. If you have custom team in the map, do the following:
(1)In maps\flags, create a folder whose name is your custom team name.
(2)Create a miniMap_CP.tga in this folder with your team's flag. A .psd template(created in Adobe Photoshop CS6) is provided inside maps\flags. You can use this as a reference.
(3)Run the tool.
For BF2142, look into maps\flags_2142.
2.Use a custom cover to the infomap(such as a grid or your logo).
In maps\areas, modify or replace a cover.dds. This image would be pasted on top of the generated info maps.
For BF2142, look into maps\areas_2142.
3.Use custom combat area.
Similar to 2. Just modify or replace CombatArea.dds in maps\areas.
CREDITS
NVIDIA - for nvdxt.exe
fire&bf2tech;.org - for conParser.py
Dnamro - for testing this tool
LOCALIZATION
readme - English&Chinese
Average
9.99 votes submitted.
Very cool.
for BF2142 one please
It should work for bf2142 conquest maps. Just replace the flags and combatarea textures with bf2142 ones.
Nice one,using this tool instead of making it by hand will save me a lot of time for my mod, thanks :D
Give this man a medal
Great tool! Thanks for this. :)
原来是world哥
你是?
Awesome!!! Currently it will not work as is with BF2142, but I found a work around. It gets an error message that the menumaps in the info file are not multiples of 4, which is correct -- the 2142 menumaps are a sideways rectangle not a square like in BF2. However if you delete all the menumaps out of the map's info folder, it will create new menumaps for the three different standard sizes, 16, 32 and 64. I created PAC and EU folders and just copied over minimap_CP.tga from the other flag folders for testing. If someone creates the custom ones for 2142 please post. The new menumap graphics can be used as is for 2142 or modified it to match the standard BF2142 dimensions with Gimp or Photoshop.
I also found that I had to re-run the python installer and do an update to set the option to include Python in the path or PIP would not install the Pillow graphic library.
Thanks again.
Not bad!
can any1 help me pls, im trying to tweak the right files for BF2142 View distance enhancement. Sgt_Prof, i heard u are the BF2142 wiz? could i ask you perhaps for assistance on this? i have all 2142 mods, 1080p solved, v1.5 only, but poor view distance.
You might want to post in Sgtprof's profile rather than in this submission which is not his. Pretty good chance he's not going to see your comment.
Having a lot of fun playing around with this great tool. Here is what I came up with for BF2142:
he BF2142 flags have to be resized to 72 x 72 to work. Here are the resized versions to play around with BF2142:
Drive.google.com
The tool parses the map's info folder for the map size and teams, as well as the game mode folder and will create an menumap for each gamemode to include the 48 mode used in BF2412. Basically, whatever is there will be used.
Now 2142 maps use a little different format which should not be too difficult to get the tool to accomodate:
2142 use a yellow out of bounds instead of the red used by BF2. The out of bounds overlay can be replaced.
2142 does not have the mini-map that shows the relation of the combat area to the entire map. I don't think it would be too hard to disable it in the code.
2142 has Titan and other different game modes which use different icons. It is possible to replace any of the icons, but not just for specific modes. For instance, to do Titan menumap with titans you would have to replace the CPs with titans for the Eu and PAC flags and then run the problem. Save the titan menumap. Change back to PAC and EU flags and then re-run the tool to create the other modes. If you wanted locks instead of the no capture icons, those can also be replaced.
Now, if your combat area is too small, it won't even show up. That might be a way to create a space menumap and use a grid overlay instead of the combat area overlay.
If you the creator is interested in making the tool BF2142 friendly, some things that would be really useful for a future update:
- Be able to disable the mini-window
- Be able to choose a yellow non-combat area overlay instead of the red
- Option to make backups of the existing menumaps if they already exist and to overwrite the existing ones.
- Have an option to use the BF2142 menumap size (478 x 341) px
- It would be interesting to see if this could be extended to use specific icons for specific modes (I.E. the titan icons for GPM_TI mode).
- Also BF2142 standard menumaps don't show the CP, just have a flag at the CP, but that could be adjusted in the flag files.
It would also be useful to have an option to use a grid overlay over the whole map instead of non-combat overlay for water or space maps.
Thanks for your advice! I'll consider making a alt version for BF2142. As for the overlay, add anything you want to add as overlay in maps\areas\cover.dds.
10 point absolutely!
虽说我不做地图(#滑稽)
I am having a lot of fun playing around with this tool. I created flag icons for the P4F BF2 mod. Just resized the existing ones to 72x72 and convert from DDS to TGA.
Here are some examples:
Classic-battlefield-modding.wikia.com
Then I made some custom CPs for First Strike mod for BF2142. Now those were a little trickier. I made my own template 72 x 72 and then copied into in the Hexagonal CP icons for Rebels, Imperial and Neutral. I used Gimp to do this. Check out the results:
Firststrikemod.wikia.com
I figured out how to edit the python code to set switches to disable the mini-window and the out of bounds shaded area.
Here is the updated python code file:
Drive.google.com
To re-enable change settings to "YES" in the code at the top.
# set to "YES" to display out of bounds
USE_OOB = "NO"
# set to "YES" to enable mini-map
USE_MINIMAP = "NO"
Updated tool for bf2142 and a few fixes.
Guys, can you create video instruction for using this program?
Be sure to add a \tmp subfolder to your infomap folder.
If it does not exist, it will throw an error message at the end of processing that it could not delete the files in the \tmp folder. In that case, it's not a big deal.
However, if the map's HUD\minimap\ingameMap.dds is not in the expected format, the tool will try to convert it using the \tmp folder. If the tmp folder does not exist, the infomap generator tool will not be able to continue. For some strange reason, dice used other formats than dds but renamed them to dds. The BF2 game engine can handle it but the Python Pillow graphic library can not handle true DDS files, so they all have to be converted to a useable format that the tools supports and then converted back.
All that being said, if you run into issues, using standard teams, be sure to create the \python\infomap\tmp folder.
With Python v 2.7 no longer being supported, you may run into issues trying to run the package manager (PIP) to install the graphic libray required (PILLOW). Here is a link to a installer for Pillow that supports Python 2.7 that is easier to use than messing around with PIP anyway:
Python.org
With Python v 2.7 no longer being supported, it was hard for me to figure out how to install. In newer versions of Python it doesn't work.
Despite having so much trouble to install this (yet i don't know any python) thanks to Dnamro i managed to install it somehow.
Here's my impression with it:
I must say it's really great! With my custom and yet the most closest DICE infomap looking bars (based on TNE's) It's looking much more like vanilla map's infomaps. Here is some example(s):
Gulf Of Oman recreated menumap: Images2.imgbox.com
My custom map (i haven't released it yet): Images2.imgbox.com
I had to add the vignette effect to the bars DDS manually. It would be great if it was seperated with bars. When it automatically cuts it seems kinda bad. I would love to set the transparency of it as well. EDIT: I realised there's something called "cover" i modified that and now it works just like i wanted.
It's still kinda problematic, in such maps when it's too resized it blurs the entire section such as this one (Operation_Amos): Images2.imgbox.com EDIT: Maybe that's because original minimap is too small
Sometimes it fails to do for 64 combat areas sometimes here's an example from the map CP_Abadan: Images2.imgbox.com
EDIT: This problem often happens in 64 GameModes. EDIT2: I think this problem is related to gamemode but still don't know.