Author Topic: GRAW Map Making for Dummies  (Read 45261 times)

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummis
« Reply #30 on: February 12, 2018, 01:57:08 PM »
Let's have us a Panhard on the map:
 
  <event name="activate_wave03">
   <element type="ActivateVehicle" vehicle_id="panhard1" start_time="1"/>
   <element type="ActivateGroup" group_id="area03" start_time="5.0"/>
   <element type="UnitInArea" area="area03" state="deactivate" start_time="3"/>
  </event>


The event for wave03 duplicates the above code for wave01, except for the "ActivateVehicle" element:
 
   <element type="ActivateVehicle" vehicle_id="panhard1" start_time="1"/>

For a stationary panhard, there's not much to screw up. Make sure the vehicle_id matches the one you want (and if manned with a crew, make sure you follow the instructions to name them as shown earlier in the editor samples).
 
Don't bother putting passengers into a stationary panhard - I think they won't spawn in the APC anyway, or if they do, they'll just stay in back. I usually put a 2 man crew on a stationary panhard, so the gunner is up and the pistol-driver hops out and goes all rambo on you.
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #31 on: February 12, 2018, 01:59:06 PM »
OK, panhards are only cool when they drive up and drop troops. This is how it's done
 
    <event name="activate_wave10">
   <element type="ActivateGroup" group_id="area10" start_time="2.0"/>
   <element type="ActivateVehicle" vehicle_id="panhard0" start_time="1"/>
   <element type="OrderCar" vehicle_id="panhard0" order="move" position="-1337 -1138 1095" start_time="3"/>
   <element type="UnitInArea" area="area10" state="deactivate" start_time="3"/>
  </event>


Note that the event "activate_wave10 doesn't have to contain any ground troops. You could set up a trigger that calls up nothing but a panhard or multiples. Not sure what the limit is, but I have never used more than two panhards at the same time. I recall reading that there's a limit of how many the server can handle simultaneously.
 
The key lines in the above event are
 
   <element type="ActivateVehicle" vehicle_id="panhard0" start_time="1"/>
   <element type="OrderCar" vehicle_id="panhard0" order="move" position="-1337 -1138 1095" start_time="3"/>


The activate element is identical to that of a staitonary panhard that is spawned. The "OrderCar" element is what makes it go.  As usual, make sure the vehicle_id matches the panhard you just activated. The position is what counts. I usually grab that out of the world file from my dummy destination panhards, that I then delete once their coordinates are transferred to the mission script line seen right here.
 
You can also go and fly around on the map and find the place you want to have to move to, hit F12 on the keyboard and use the coordinates from the little box that pops up at the bottom of the screen. I found the method with the placeholder more accurate, although I still see the panhards drive really stupid routes on some maps (Left_behind especially, where they run up against the hillsides...).
 
You can use multiple orders in more than one event for the same vehicle, although with Panhards that usually only works if the events are triggered in short succession. Once the crew gets out of the vehicle, they will never go back to it. Tanks are much better for multiple orders. There are also "waypoint" events, but I never have used them so far.
 
One more word about Panhard crews - wherever they get out of the vehicle, they become very aggressive recon troops who will move towards your fire. I don't think silencers have any impact on them, as they will find you at great distances away from the panhard. I have seen them walk across half a map to come up behind you at times... They make for good surprise squads :arrow:
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #32 on: February 12, 2018, 01:59:37 PM »
The MG activation:
 
    <event name="activate_mg1">
   <element type="ActivateGroup" group_id="area_mg1" start_time="4.0"/>
   <element type="UnitInArea" area="area_mg1" state="deactivate" start_time="6"/>
  </event>


Very much identical to the activation of normal enemy groups. Key here is to have the group_id of the single soldier that is to man the MG match the name of the MG prop in the world file and match the name of the trigger area. That way, they will always spawn together. I think one may be able to spawn MGs with a normal enemy group zone, but there may be some bugs as to which soldier will actually man the unit.
 
Just don't ask and use above code. If you want MGs to be random, we can do that with some more advanced code, or by placing the trigger areas in corners of the map that may not always be walked into.
 
The MG event also deactivates the trigger area just like the other events we have had.
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #33 on: February 12, 2018, 02:00:15 PM »
Well, there you have it. Make a map with 10 waves of enemy AI, grouped into area01 through area10, add in two MGs called area_mg1 and area_mg2 with their respective AI shooter that carries the same group ID, slap one panhard on the map that is called panard1 with a crew of two, sharing group and vehicle_id with it, another panhard called panhard2 with crew and passengers called panhard2 and sharing the panhard2 vehicle ID, then set up the triggers on the map, change the name of the map on top of the code shown here, edit the max number of kills and put this file into your work\yourmapname\script folder as mission.xml and export the whole thing from within the editor as a draft. Go see what happens. You should have a working map if you don't have a typo anywhere.
 
If you don't want to copy paste the code from here, open up sawmill with the bundlereader.exe and extract the mission file called sawmill.xml and you'll have the above file as a starter.
 
If there are script errors, you will have GRAW crashes with a text window popping up showing you in some cryptic language what it didn't like. The most important thing in there is when it mentions "yourmapname.xml" it's talking about your script and there will be a number behind the alleged error - e.g. "group in void 121"
 
that number is the exact line in your mission script. Open it in an editor that can count lines for you and look for that line. In most cases, if you look hard enough, you can tell what you did wrong there.
 
that's about it for a basic script. I'll probably do a few more things about random groups and random events just to wrap this up. I don't really do maps without any random events any longer, as it is actually pretty darn easy to do and it adds a lot of replay-ability to every map while it won't cost much time at all to create those alternate AI groups and mission script lines.
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #34 on: February 12, 2018, 02:01:23 PM »
warning - advanced content - do not attempt on first map :idea:
 
This is the Ghost Behavior map script (cut down to the parts that matter for this post)
 
Code: [Select]

<?xml version="1.0" encoding="ISO-8859-1"?>
<World>
 <!-- World -->
 <load_scene file="/data/levels/custom_levels/ghost_behavior/ghost_behavior.diesel" use_lightset="true" materials="/data/levels/custom_levels/ghost_behavior/materials.xml">
 
  <object name="world_bb" hidden="true"/>
 
  <object name="room01" hidden="true"/>
  <object name="Plane01" hidden="true"/>
 
  <global_ambient color="60 60 40"/>
 
 </load_scene>
 <load_scene file="/data/objects/lens/normal_lens.diesel">
  <object name="normal_lens" hidden="true"/>
 </load_scene>
 <load_scene file="/data/objects/lens/zoom_lens.diesel">
  <object name="zoom_lens" hidden="true"/>
 </load_scene>
 
 <script_data>
 
  <xi:include href="/data/levels/common/common.xml#xpointer(/common/*)"/>
 
  <area_group name="area01" area_name="area01" group="mp_players" interval="0.3" condition="1"/>
  <area_group name="area02" area_name="area02" group="mp_players" interval="0.3" condition="1"/>
  <area_group name="area_mg1" area_name="area_mg1" group="mp_players" interval="0.3" condition="1"/>
  <area_group name="area_mg2" area_name="area_mg2" group="mp_players" interval="0.3" condition="1"/>
 
 
  <user name="wave01" type="once">
   <trigger type="UnitInArea" area="area01"/>
   <event name="activate_wave01"/>
  </user>
 
  <user name="wave02" type="once">
   <trigger type="UnitInArea" area="area02"/>
   <event name="activate_wave02"/>
  </user>
 
  <user name="mg1" type="once">
   <trigger type="UnitInArea" area="area_mg1"/>
  <event name="activate_mg1"/>
  </user>     
 
  <user name="mg2" type="once">
   <trigger type="UnitInArea" area="area_mg2"/>
  <event name="activate_mg2"/>
  </user>     
 
 
 
  <event name="start_game">
   <element type="UnitInArea" area="area01" state="activate" start_time="0.1"/>
   <element type="UnitInArea" area="area02" state="activate" start_time="0.1"/>
   <element type="UnitInArea" area="area_mg1" state="activate" start_time="0.3"/>
   <element type="UnitInArea" area="area_mg2" state="activate" start_time="0.3"/>
   <element type="SetIndestructable" name_id="ramp1" start_time="1.5"/>
   <element type="SetIndestructable" name_id="ramp2" start_time="1.5"/>
   <element type="SetIndestructable" name_id="ramp3" start_time="1.5"/>
  </event>
 
  <event name="activate_wave01">
   <element type="ActivateRandomGroup" group1="area01easy" chance1="45" group2="area01hard" chance2="85" start_time="1"/>
   <element type="UnitInArea" area="area01" state="deactivate" start_time="5"/>
  </event>
 
  <event name="activate_wave02">
   <element type="ActivateRandomGroup" group1="area02easy" chance1="50" group2="area02hard" chance2="90" start_time="1"/>
   <element type="UnitInArea" area="area02" state="deactivate" start_time="5"/>
  </event>
 
  <event name="activate_mg1">
   <element type="ActivateGroup" group_id="area_mg1" start_time="1.0"/>
   <element type="UnitInArea" area="area_mg1" state="deactivate" start_time="1"/>
  </event>
 
  <event name="activate_mg2">
   <element type="TriggerRandomEvent" event1="random_mg2" chance1="33" start_time="1"/>
   <element type="UnitInArea" area="area_mg2" state="deactivate" start_time="1"/>
  </event>
  <event name="random_mg2">
   <element type="ActivateGroup" group_id="area_mg2" start_time="1.0"/>
  </event>
 
 
  <player name="player1" mod_name="OnFoot">
   <spawn unit_name="ghost_player" object="spawn_player1"/>
  </player>
  <player name="player2" mod_name="OnFoot">
   <spawn unit_name="ghost_player" object="spawn_player2"/>
  </player>
  <player name="player3" mod_name="OnFoot">
   <spawn unit_name="ghost_player" object="spawn_player3"/>
  </player>
  <player name="player4" mod_name="OnFoot">
   <spawn unit_name="ghost_player" object="spawn_player4"/>
  </player>
 
 
  <gametype_info name="enemies_to_kill" value="146"/>
 
  <spawn_manager>
   <!--<xi:include href="/data/levels/merge_xml/common_spawn.xml#xpointer(/to_include/spawn/*)"/> -->
  </spawn_manager>
 
 </script_data>
</World>
 

Basically, the above would trigger two waves of AI with a randomizer picking between two groups each, triggers one normal MG and one that is randomized. There are also three objects that are set to indestructible, so you don't blow up those nice ramps that let you walk up on top of a building by throwing GLs on them.
 
Let's have a look at each of these new things in the next few posts
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #35 on: February 12, 2018, 02:02:23 PM »
The first new thing in this script are these three lines in the start_game event:
 
   <element type="SetIndestructable" name_id="ramp1" start_time="1.5"/>
   <element type="SetIndestructable" name_id="ramp2" start_time="1.5"/>
   <element type="SetIndestructable" name_id="ramp3" start_time="1.5"/>


What this does is alter three fences I placed on that map as a ramp, so that you cannot warp them with grenades to a shape that makes them unusable as walking ramps.  The first time I wanted to go up on the building I found those fences in rough shape and could not get up! so I named the fence props in the world.xml file as ramp1, ramp2 and ramp3, and came back to the script to use the code I last used when preparing trucks to be blown up on other maps. In this case there's no C4 at all and the three ramps remain on the map in fine shape no matter what you throw at them.  The same code can be used on vehicles you want to use to block certain routes on maps.
 
Note that if you have a large number of these on a map like I have on Expendable_Assets, there's some noticeable lag at the beginning of a match. Nothing wrong with that, just be aware of it.
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #36 on: February 12, 2018, 02:04:03 PM »
Now for the main new item on this map - ActivateRandomGroup!
 
  <event name="activate_wave01">
   <element type="ActivateRandomGroup" group1="area01easy" chance1="45" group2="area01hard" chance2="85" start_time="1"/>
   <element type="UnitInArea" area="area01" state="deactivate" start_time="5"/>
  </event>


You'll notice that there's not much different here from a normal "ActivateGroup" element. The event name, the area triggers, everything else is identical in the script. What you had to do to make this work while placing AI on the map is create duplicate AI groups with different orders or skill levels for a single spawn zone. In this case for the area01 trigger, I chose two groups, called area01easy and area01hard. There are essentially duplicate enemy groups configured for the spawn and the script will randomly pick from them.
 
The random part is set up with the group1="area01easy" chance1="45" group2="area01hard" chance2="85"  part. The chances are done by allocating a certain number range below 100 for each event. In this case, area01easy has a 45% chance of happening, while the other will happen in 40% of the games played. Why 40% and not 85%? Because these chances are exclusive and you already allocated 0-45 to area01 easy. If number 46 through 85 comes up, you second group will spawn. The remaining 15% that aren't even listed would spawn nothing - those are the "freebie spawns" we all like so much on this map.
 
If you did this group1="area01easy" chance1="50" group2="area01hard" chance2="100"  there would be no freebie spawn, and both easy and hard groups would have an equal chance of happening.  I sometimes edit these values during map testing to see each group predictably, and temporarily set the chacnes to something like this to see the easy group:  group1="area01easy" chance1="99" group2="area01hard" chance2="100"
 
This is all there is to the random spawn of AI groups. You can have up to 4 groups (chance1, chance2, chance3 and chance4 plus leave some percentage for the non-spawn to have a total of 5 possible outcomes for each spawn. I do that on Expendable assets on almost every single spawn, providing 5x5x5x5x5x5x5x5x5x5x5x5x5x5x5x5 possible variations of the map AI. You'll never see the same map twice, although you really only need to know about 70 different AI groups that will happen in 16 zones. :twisted:
 
Start small - do this with 2 groups - it already adds a lot of surprise to the map, and it saves you from an editor going down to 2fps when loading the human layer filled with 400 AI groups.
 
Now, there's a second way to do things randomly, and you'll have to use that one for MGs, Panhards, tanks, helis, but it also works for human AI. See next post with an MG as the example.
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #37 on: February 12, 2018, 02:05:11 PM »
Triggering a random event, rather than spawning a random AI group, is done like in this MG2 random spawn example:
 
 
<event name="activate_mg2">
   <element type="TriggerRandomEvent" event1="random_mg2" chance1="33" start_time="1"/>
   <element type="UnitInArea" area="area_mg2" state="deactivate" start_time="1"/>
  </event>


  <event name="random_mg2">
   <element type="ActivateGroup" group_id="area_mg2" start_time="1.0"/>
  </event>

There are actually two events here. The first one is the one that is triggered by a ghost walking into a map trigger area called "area_mg2" (see full code several posts above to see that stuff) that in turn leads to the "activate_mg2" event. In this case the activation is actually not for certain, but replaced by a random trigger:
 
   <element type="TriggerRandomEvent" event1="random_mg2" chance1="33" start_time="1"/>

This is the most basic way the TriggerRandomEvent code can look - just a single event with a 33% chance, leaving 67% to a non-event scenario. You can have up to 4 events in that line of code. Example:
 
   <element type="TriggerRandomEvent" event1="random_mg2" chance1="33" event2="random_mg3" chance2="50" event3="random_mg4" chance3="65" event4="random_mg2" chance4="90"   start_time="1"/>

Doing it this way, and provided you have set up 4 MGs to be available for random spawn, can have 5 different outcomes. The outcome if a random number below 34 came up would be the event "random_mg2" and that is what is on the original script:
 
  <event name="random_mg2">
   <element type="ActivateGroup" group_id="area_mg2" start_time="1.0"/>
  </event>


 This part is what does the actual activation of the area_mg2 group, which is the MG and the guy shooting it. If you had a setup with 4 mg choices, you'd need the other three events in the script as well.
 
One thing you don't want to do ever is refer to the same group_id in different random triggers - e.g. you don't want area_mg2 to come up in two different random triggers, as I am certain the game will crash when it calls it up the second time.
 
I have used the random trigger to call up the very same panhard or groups of panhards at different start times, or to give them different move orders. So even though I have the same single vehicle on the map, I am choosing randomly between various different orders. Once you get a good feel for this stuff, you can probably come up with other ways to use the TriggerRandomEvent code. One idea would be to make a C4 charge appear for a shortcut on a big map randomly - forcing a check on that location and possible retreat if the area does not allow you to blow up the barrier.
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #38 on: February 12, 2018, 02:05:59 PM »
Now we're pretty much done with the basics. Everything posted here so far will let you take a map, put your AI on it, set your triggers, change a few props, do the script and then export it from the editor. If the map is not too large, you could set the editor to 5 passes and medium quality in the export dialog for the lightmaps and let it crank out a finished map in a few hours. Done. You made a map.
 
There's one catch, though: if you should find a minor error such as a vehicle not moving where you want it to go, or you feel the need to place more or less AI in some areas, you will have to do that 2-4 hour export again. The editor does allow you to un-check the lightmaps box, so you can save a large chunk of that time, but it will still take a while to re-export the AI graph, create a new minimap, etc.
 
It is much MUCH faster to work with the bundler.exe tool. I will next describe how I use the bundler to make changes to a map in seconds, as well as to use the lightmaps that are already in the game from the original single player missions (which are too big for my computer to render better than low quality light maps on)
 
Don't confuse the bundler with the bundlereader.exe app - they do the exact opposite thing!
 
The bundler won't work with the directory structure the editor uses in the custom_levels folder, so you have to create at least one exported map of your work that then can be used as a basis for all future bundler work. I'll post some screen shots and detailed instructions later when I have time to put that together. It was one of the most complicated things to figure out for me, mostly because all the posts I saw were really not written to help a total noob like me in detail. Once I figured it out, it was actually extremely easy to use this tool and I can now do changes such as turn on all the street lights on a map in less than a minute of working in notepad and using the bundler. Also, fixing script errors now really is mostly a matter of finding the error, as once corrected, the bundler lets me put the updated file together in one keystroke.
 
I also use the bundler to get those custom minimaps into my maps - something you cannot do without it. More info on that after we have covered the basics of the bundler, which is an ugly command line tool :???: but with a few tricks you can make it less cumbersome.
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #39 on: February 12, 2018, 02:07:28 PM »
One file that can easily be edited in notepad and wrapped back into the bundle with the bundler is the "description.xml" map. Even though you can do everything that needs to go in there in the editor, I find myself updating this file quite frequently (the date of the release, with each update, for example).
 
I just opened the description.xml from Gobo4 to make sure the map is really called "Gobo4" in game, which is something this file defines. To call it up properly in the server map cycle, I need that name right. So while I was doing that, why not have a look at what you can do here:
 
 
 
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<description>
 <menu name="Gobo4" mode="MPCoop" />
 <level_desc value="" />
 <level>
  <set value="ghetto"/>
  <set_graffiti value="0"/>
  <backdrop_cube value="atlas_mission_spec_editor/backdrop_cube_d"/>
  <mission_time value="day"/>
  <cube value="atlas_mission_specific/mission02_specific/cube"/>
 </level>
 <export>
  <export_name value="Gobo4"/>
  <gametype value="MPCoop"/>
  <lightmaps value="true"/>
  <ai_graph value="true"/>
  <lightmap_resolution value="medium"/>
  <lightmap_num_passes value="3"/>
 </export>
</description>

 
The code shows that the map maker was too lazy to give the level a description. The field <level_desc value="" />  contains the text you see at the map load screen.  I usually put at least some basic map info and the max kills, map date and other info in there.
 
 <menu name="Gobo4" mode="MPCoop" /> 
 
This is where the name of the map you see in the multiplayer menu shows up. The mode is important and more than once have I found my map export as "Domination" or other format. MPCoop is what we need for an OGR map. Double check your files if stuff doesn't look right when you join your map for testing.
 
The rest of the file has to do with the lighting in the game and is best left alone unless you really know what you're doing. This stuff is set in the editor under the Sky Environment menu and on the export screen where you pick day or night.
 
All the stuff in the lower half of the file is editor specific and has nothing to do with the map when you are in it.
 
While we're talking export - if you were to build your own map or modify an existing map enough that you have to render new light maps, try to do it on the medium level. If you run out of memory, don't just go to low quality right away - change the editor's video settings to 800x600 and turn everything in the menu off or to low. Then exit the editor, restart it, load your map and export now - amazingly, you just cleared up a few hundred megs of memory. The best looking maps out there are done in 5 passes at medium. I have never been able to come up with a working "high" quality export. Even my 3GB system with 768MB video card keeps running out or RAM on that level, or it produced goofy results like on sawmill, where the terrain looked like it was some flannel blanket with a nice flower pattern :???:
 
Once you export a map and like the terrain, you won't have to do this again due to the bundler. Only when you change props and static objects that throw shadows will you need to update the light maps. You are not creating textures in that process, but the shadow and light areas. All textures are in the game for all objects we use, so those are already high quality. The thing that gets goofy at the lower qualities is the lighting.
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #40 on: February 12, 2018, 02:12:13 PM »
Ok, in preparation for the stuff on the bundler application - here's a link to the tutorial I used to figure it out:
 
https://www.ghostrecon.net/forums/index.php?showtopic=36760
 
 
The key items I took from the tutorial are to put my project maps in a folder structure down on the c: drive that looks like this:
 
c:\mymap
 
and inside that folder it's the same structure as in the BUNDLE files, not the structure you find in the editor temp files inside the custom levels folder. The easiest way to get your map into that structure is to simply unbundle it to the C: drive and rename what becomes a mymap.bundle folder to just \mymap. In it it's all going to be perfect.
 
the next thing that's important is to know your bundler command line with all the right switches. I saw many incorrect posts about this. Here's what works, given your files are in c:\mymap in the right structure:
 
C:\path_to_your_bundler_exe\bundler -vvb quick-bundle -r C:\MyMap -D mymap.bundle
 
On my system the command is somewhat more complex, as there are space in file names and everything needs to be wrapped in quotes to work. Here's the exact command I used to rebundle the thinning_the_herd map (and because it is such a mess, I keep a text file on my desktop that has this line of code in it. For new maps I edit the name of the map and save it for the next few days of use. I just copy/paste it from the text file into the dos box to do the below):
 

 
 
When things work out alright, you will see a screen like this scroll by:
 

 
The bundler also creates a text log that gets dumped next to the bundle file into c:\ when using the above synax - check in there for any possible errors.
 
 
I also have a screen of the directory structure of the unbundled raw files I keep editing and replacing before rebundling with the above command. In the picture below I am selecting the Left_Behind map minimap tga file to open and edit it in Photoshop:
 

 
 
The structure of the directories in these folders must always be the same
 
The minimap is in the /gui dir, while most of the stuff that needs frequent replacing while debugging a map are the world and script files in
C:\thinning_the_herd\data\levels\custom_levels\thinning_the_herd
 
and
 
C:\thinning_the_herd\data\levels\custom_levels\thinning_the_herd \xml
 
respectively.
 
Knowing this structure is also very important for recycling those light maps from the maps supplied with the game as single player missions, since this is where you exchange your low quality light maps with what you unbundle from the original mission file. You have to replace 3 files usuall to do that - two are in the same directory with the world.xml file and are called ambient_cubes.bin and massunit.bin, plus you may need to replace the texture_scope.xml with the one from the original mission if you have the old yellow-blue object issues. In the above example, that file sits here
 
C:\thinning_the_herd\data\levels\custom_levels\thinning_the_herd\texture_scope.xml
 
Note that I do a lot of editing in the GUI editor to move objects, etc that need updates from the last version. All I do after that is take the latest numbered world_nn.xml from the work directory inside /custom_levels of the game, copy it into the above extracted map structure where the world.xml sits, delete that file, rename the new one to world.xml and bingo, the map can be rebundled.
 
You can always remove map items that way, but when you move them or add them, you will have to do a complete lightmap render job, so make sure your map has everything on it before you render light maps. If you are using maps from the original games, you can always remove stuff. Adding is limited to a very small number of props that don't generate light maps of their own. I could post those props, but that would go off topic here.
« Last Edit: November 10, 2022, 09:44:41 PM by Fishmonger »
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #41 on: February 12, 2018, 02:16:15 PM »
and one more thing about how to reuse existing maps from the game:
 
since you more or less just link to the existing files in the game by replacing the texture scope file with one that came with the map you are reusing, you can delete those temp light maps that were exported when you created the first draft of your map in the game editor. Those files are in
 

C:\THINNING_THE_HERD
   data
      levels
         custom_levels
            thinning_the_herd
               xml
      textures
         custom_levels
            thinning_the_herd
               lightmaps
                  atlas0
                  atlas1
               gui

 
highlighted in yellow.  Or below a screen shot from the Left Behind map, where I deleted those files after updating the texture_scope.xml to point at files existing in the game already:

 

 
These files can stay there, but it makes the final bundle unnecessarily large. Whenever you reuse lightmaps already in the game, the bundles are pretty small files. My big maps are much smaller than medium maps with custom light maps included in these directories.

To understand what is going on here, look inside of the texture_scope.xml the game editor exports and then compare that with the texture_scope.xml you are grabbing from the game level you started out with.

None of this applies when you make your own world - you have to render those light maps and obviously they have to stay in the bundle.


« Last Edit: November 10, 2022, 09:45:06 PM by Fishmonger »
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #42 on: February 12, 2018, 02:18:16 PM »
Quote from: sirgimmi;181080
(
German question about crashes in a given location on the map)
Hallo

 
noch eine Frage, ist es notwendig dass ich eine bestehende Map nehmen muss um eine MP zu erstellen oder kann ich auch mit einer vollkommen leeren Map eine MP erstellen? Ich meine von vorne weg mit dem Aufbau der Map beginnen?
 
Kann es sein dass deswegen immer mein GRAW nach ca 10min oder fast immer am gleichen Ort abstürzt?
 
Danke und Gruss
sirgimmi

you can use a custom made map - the idea of re-using existing maps is to save time on the creation part of the world (that's a whole new tutorial). Also, some of the large mission maps in the game are so detailed and complex that the editor that is in the game cannot render lightmaps for them: out of memory errors, even on a really powerful system. So you use what's there.
 
However, you can make/change maps all you want. Just make sure you can render the light maps at least in low quality 5 passes, better medium quality 5 passes. Otherwise you'll have black pavement areas and all sorts of strange lighting and textures issues.
 
Crashing somewhere on a particular map may have two reasons - bad world file (map) or bad script - how does it crash? If you get a text box with an error message, it's probably the script. If it just gets you a lockup, your have most likely an issue with the world file. Those are a real pain to diagnose...
 
Here a tip if you build your own maps: don't do anything with AI or areas or even AI Graph until you have walked around the entire map by yourself. Render out a map with just start and end zones, spawn dummies, and set up a OGR game just for yourself. Check the map for errors that way as the editor will do a lot more than the game will allow. Once things look good and work well, you can put AI and script to the map using the bundler tool as described above.
 
About panhards not moving: Where's your vehicle AI graph in relation to the panhard? It cannot move unless it spawns on that graph. See tutorial. If it is on the graph, are your order coordinates correct and is that destination reachable via the AI graph (nothing on the route blocking the approach)? And - note that even if Panhards have orders to move to a particular destination, they don't always drive there. They do have some brains and will stop if they encounter enemies and start shooting and unloading passengers way early, sometimes right at spawn.  MG on the panhards does not "react?" Do you see a crew on it? IF there's nobody on the gun, you didn't set up the vehicle/crew properly. Go check the tutorial again - it is very important to have the same VEHICLE ID and GROUP ID for the crew and the passengers and the vehicle.
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #43 on: February 12, 2018, 02:19:44 PM »
Quote from: Jake Speed;181272
News from a time when Jake was still making maps!

Did you know that creating a new map deletes the old auto named one. Anyway I had 1 world file saved in a different directory to compare to the corrupted one and was able to save the 6 hours of work. Thanks for the help Fish
 
Jake Speed

good practice is to have a map name ready when you first hit the "New" button in the editor and get it named the way you want the place to be called in the future right off the bat. That whole My_Level stuff just causes headaches when it gets to finishing the map. There are a number of files that link to each other based on map name and some will actually be renamed to the map name when you export the project (the "mission.xml" script would suddenly be "my_level.xml" and you'd have to change all sorts of links to that in the "dsf" files, which are files you usually do not have to touch.
 
been there done that...
Don't eat food off the sidewalk, no matter how good it looks.

Fishmonger

  • Cantina Regulars
  • Full Member
  • *
  • Posts: 244
  • Karma: 2
  • Mapmaker in training
Re: GRAW Map Making for Dummies
« Reply #44 on: February 12, 2018, 02:21:25 PM »
Quote from: AmEyeBlind;181285
hi there
nice threat, good job.
do u have somekind of list what script cmds work on a dedicated server?
i seen u had problems with the two quaters map becouse of some commands.
would be good to know the no goes. dont want to creat crashing maps. ;)

All I know is that the trigger random event, randomgroup, and the normal group spawns work, that C4 stuff works, and tanks/panhards/heli orders are pretty good. Everything related to objectives beyond reaching zulu doesn't work, and most "compositions" only work on a single round. When dedicated servers are set to more than one round, those things don't trigger on a second run (Danger_Zone by RPGhard is an example - F18 air strike works only once, next round you gotta take out the tank with zeus). However, other things, such as the embassy explosion or gas station blowing up will work and repeatedly in multiple rounds on a dedicated server.
 
Bottom line - stay with the basics and you're gonna do fine on dedicated servers.
Don't eat food off the sidewalk, no matter how good it looks.