Author Topic: FH2 Modding Q&A  (Read 143681 times)

Offline Ts4EVER

  • Banner of THeTA0123
  • Developer
  • ******
  • Posts: 7.812
    • View Profile
Re: FH2 Modding Q&A
« Reply #885 on: 22-06-2016, 13:06:42 »
Kits on FH2 maps are usually set outside of the editor by simply writing them into the init.con.
To play an FH2 map you need to pack it using the pack-map.py script you will find in the main fh2 folder. Also look into the info folder and see what is inside the desc file. Compare this to stock fh2 maps to see how it works.

Offline MajorMajor

  • Jr. Member
  • **
  • Posts: 162
    • View Profile
Re: FH2 Modding Q&A
« Reply #886 on: 22-06-2016, 14:06:02 »
Thanks! Packing the map indeed made it appear in game. I copied the team and kits section from The Battle for Sfakia.init and pasted it into my map's .init file. I packed again... and although I can start the map in the local server, as soon as I spawn the game crashes (I'm runing in windowed mode and I'm not seeing any error log). There are no kits in the spawn kit menu, so I guess that's what's wrong. I've been trying to reverse engineer further the init and desc files looking at the Sfakia files, but still no luck, the kits won't show up ingame.

Offline Ts4EVER

  • Banner of THeTA0123
  • Developer
  • ******
  • Posts: 7.812
    • View Profile
Re: FH2 Modding Q&A
« Reply #887 on: 22-06-2016, 17:06:46 »
As I said earlier, you need to pack it with the map packing script.

Offline MajorMajor

  • Jr. Member
  • **
  • Posts: 162
    • View Profile
Re: FH2 Modding Q&A
« Reply #888 on: 22-06-2016, 19:06:21 »
As I said earlier, you need to pack it with the map packing script.

That's what I've been trying to do. I have the map-pack.py in the fh2 folder. I executed the script for the map, and although a client and server .zip files are created, I don't see any mapdata.py file created, which is present in stock maps. When loading the maps ingame, they crash due to having no kits.

I tried executing the python script through the windows console. It's telling me that my map does not need repack.

What am I doing wrong? Sorry if I'm being a pest and I'm missing something obvious.

Offline Ts4EVER

  • Banner of THeTA0123
  • Developer
  • ******
  • Posts: 7.812
    • View Profile
Re: FH2 Modding Q&A
« Reply #889 on: 22-06-2016, 19:06:09 »
Does you map have a tmp.con? if not, add one, then repack.

Offline MajorMajor

  • Jr. Member
  • **
  • Posts: 162
    • View Profile
Re: FH2 Modding Q&A
« Reply #890 on: 22-06-2016, 20:06:36 »
Does you map have a tmp.con? if not, add one, then repack.

Indeed, that was the problem. Thank you.

Offline Ts4EVER

  • Banner of THeTA0123
  • Developer
  • ******
  • Posts: 7.812
    • View Profile
Re: FH2 Modding Q&A
« Reply #891 on: 22-06-2016, 20:06:57 »
The map packing script writes all weapons and vehicles of your map into the tmp.con. This is unique to FH2 because BF2 otherwise loads all assets for every map. As you can imagine, with the amount of tanks and weapons in FH2, this would get out of hand quickly, so this was introduced a while back to cut down on load times.

Offline MajorMajor

  • Jr. Member
  • **
  • Posts: 162
    • View Profile
Re: FH2 Modding Q&A
« Reply #892 on: 23-06-2016, 10:06:52 »
So, I've been learning how to place road splines today, but the tutorial I'm following just creates a basic dirt road. If I wanted to load Anctoville or Goodwood in the editor too look at how sidewalks are done, which files should I unpack? (Btw, sidewalks are objects right? Haven't found them so far, but I've only looked at the France section of the static objects list).

Offline Ts4EVER

  • Banner of THeTA0123
  • Developer
  • ******
  • Posts: 7.812
    • View Profile
Re: FH2 Modding Q&A
« Reply #893 on: 23-06-2016, 12:06:28 »
You should be able to load in different roads:



Sidewalks are objects and a major pain in the ass to place (unless you build a town on a grid like Brest and even then...). You can find them under "Sidewalk" in the France folder.

Offline MajorMajor

  • Jr. Member
  • **
  • Posts: 162
    • View Profile
Re: FH2 Modding Q&A
« Reply #894 on: 25-06-2016, 17:06:06 »
A doubt came up while reading Ferning's tutorial on heightmaps... What is the adequate map "resolution" for a 1x1 km map? If I'm not mistaken, it could be either 512x2 or 1024x1.

BTW: Are Ferning's tutorials still the go to for someone learning mapping? They seemed to be created a long time ago and some of the software mentioned is outdated (like Geocontrol, now called World Creator IIRC).
« Last Edit: 25-06-2016, 17:06:38 by MajorMajor »

Offline Ts4EVER

  • Banner of THeTA0123
  • Developer
  • ******
  • Posts: 7.812
    • View Profile
Re: FH2 Modding Q&A
« Reply #895 on: 25-06-2016, 17:06:00 »
Scale 1 maps are tricky in that they can adversely affect performance. Maps should only be done if they have relatively low view distance (Sfakia or Sammatus) or are rural maps with not that many statics (Arad).

Offline MajorMajor

  • Jr. Member
  • **
  • Posts: 162
    • View Profile
Re: FH2 Modding Q&A
« Reply #896 on: 27-06-2016, 12:06:13 »
Ok, so a question about heightmaps again... I've been following one of the tutorials from the PR website, in which Google Earth and microdem are used in order to get the heightmap. However, is there any way to find the heightmap of the exact place you're looking for other than guessing?

I have downloaded a dem file containing data for most of the Nord Pas de Calais area and after that I've had to narrow down my area by guesswork. However, in the Prokhorovka dev blog Knoffhoff seemed to get a heightmap that 100% matched his topographic map, so I wonder if he (or anyone else who makes scaled or unscaled but true to the real terrain maps) used another tool.

Offline GeoPat

  • Jr. Member
  • **
  • Posts: 501
    • View Profile
Re: FH2 Modding Q&A
« Reply #897 on: 27-06-2016, 17:06:13 »
When you move around the dem with microdem it will show you the GPS coordinates at the bottom I think.  You can then correlate it with google earth.  You may have to change the coordinates format in google earth to match the numbers in microdem.

Offline hitm4k3r

  • Developer
  • ******
  • Posts: 1.123
    • View Profile
Re: FH2 Modding Q&A
« Reply #898 on: 27-06-2016, 18:06:43 »
I think Microdem is not so good when working with DEM data. It crashes quite often and offers less stuff that other apps do better, especialy for the purpose of generating heightmaps from real places. If I may recommend you a much better app:

http://www.hangsim.com/3dem/

3DEM is my desired tool, when it comes to importing real world terrain models. You can enter max and min latitude and longitude, meassure distances quite good with GPS tracking and get rid of the stretching that you get while working with different geodetic reference systems. In the operations tab you should check out F8 (select smaller area), F3 (modify colors) and change projection (to get rid of the distortion). Just make sure that you have the right GeoCoordinates (Degrees or Minutes.Secs) when you want to enter you coords from goodle earth or maps.

I hope this helps  ;)

Offline GeoPat

  • Jr. Member
  • **
  • Posts: 501
    • View Profile
Re: FH2 Modding Q&A
« Reply #899 on: 27-06-2016, 18:06:37 »
The only thing I don't like about using Microdem then BF2HMT is that it comes out all cubic and I have to run the smooth brush over the whole map.  Is there a program that does that smoothing automatically or is manually doing it unavoidable.