Hey,
i started this tutorial long ago, but due other time consuming activities and the complexness of the topic it only progressed slowly. So i decided to post it piece by piece.
Introductive Words
Everyone of us knows those little wood fences and stonewalls of the campaign battle maps. Long time we weren't able to use those on custom battle maps, which i want to change, since i can see some good uses of them.
My workflow and Scripts i share with you, are heavily based on 3ds Max and i'm aware that not everyone has acess to it, since it's quite expensive. However you can use any tool which allows the usage of Splines/ Lines/Curves but be aware that i can't help you then and you have to create your own scripts.
Content
I Programms and Tools you'll need
II Preparations
1) Farm_Manager
2) 3ds Max Basic Setup
a) Implementing the scripts
b) Creating the Map layout
III Placing a fence in 3ds Max
IV Exporting a fence from 3ds Max
V Implementing it in in the Farm Templates and Field Manager
VI Credits
Programs and tools you'll need
- Notepad++ and/or XML Notepad
- Husserls and Taw's ESF Total Editor
- 3ds Max (You can use any other software which supports spline modelling, but be aware that this means that you'll have to write a) your own tools to get the coordinates or b) copy everything by hand... and believe me, you don't want to this ^^)
- Primergy's poorly written Scripts and the Example-farm_manager and Farm Template Tiles (included in the attached zip)
Preperations - Farm Manager
Ok first some introductive words to the files you'll have to edit.
One of them is the Farm_manager file which can be found in the map folder. It's used to load the farm_template_tile file and also defines, which walls are showing up, aswell which models are used. During the Process you will use my example_farm_manager, convert it to an esf and then replace the one in your map with the newly created one.
You'll have to use my example_farm_manager.xml or you can extract it yourself with Husserls Tool from the map Algeria or Star_fort (which are the only ones which are using walls). But well... it's easier to use mine .
Extract the folder from the Zip and place it in in the XML Folder of Husserls Total ESF Editor.
Open it with XML Notepad and take a look on the areas i marked in the following image.
Attachment 184052
- Is the Size of the Map which get's covered by the template_tile. Leave this field as it is.
- Here you can see several paths, where only few are important. The first path loads the Farm_template_tile from the path you specifed. The one which are made unreadable are unimportant since those textures don't show up anyway. The other entrys are only then important i you are using new fence which got referenced in the warscape_rigid_lod table . If you replaced the vanilla wood fence and hedge, you can leave this alone.
- With those entrys you could move the farm_template on your map around, but with the entries given by me, it will be placed in the middle (which is what you want, i assume)
After those entrys there a lot of farm_ and wall_instances where i don't really now what they are doing. The coordinates there are unimportant (no visible effect) but deleting will cause the game to crash.
Important are the dozens entrys wallxyz entries. Or better, those are important in NTW, so that wall you created shows up.
It seams that in ETW you only have to reference the walls in a field (later explained) and not in the farm_manager. I assume the code for the "wall instances" is broken in ETW.
Preperations - Install the Scripts for 3ds Max
- Download the Zip file and extract it.
- You will find folders named XML and Scripts. Copy the Content of the scripts folder and paste it to your 3ds Max Script folder (yourpath/3dsmax [Version]/Scripts).
- Start 3ds Max, open the Customize UI -> Toolbars and create a new one.
- Look in the scroll menue on the left for my Tools under Primergy's Warscape Map Tools and drag and drop all four of them to your new Toolbar.
- Save the new UI.
Attachment 184053Attachment 184054
What are the Scripts doing?
- File Stream - Creates the information needed to export the spline
- Export Spline - Exports the Spline to your Macroscripts Folder
- Stonewall - Subdivides a spline with two knots (which is the format stonewalls do need)
- Woodfence - Subdivides a spline by (length/2) = number of knots.
Units Setup
Choose the "Generic Units" not metric ones, or yards.
Create the "Map"
Now you have to create the "Map" you will need as reference. Create a plane the same way you can see in the attached image. The Maps in NTW/ETW are max. 2048*2048 Units large, so lets use this value, so the coordinates will be right.
Attachment 184383
After that you can go to the Material Editor, load the colourmap, layout map, whatever so you know where the fences will be placed and assign it to the plane.
First Part done, more will follow