PMC WRP Tutorial by Snake Man
Updated 07-13-07 09:29
This tutorial assumes that person has already read through the complete WrpTool PDF manual that can be downloaded from WrpTool homepage and has some experience on OFP island editing. In this tutorial we bybass some obvious OFP wrp editing knowledges which can be found on the WrpTool manual. Please read the manual. Oh and you dont necessary need text editor like editpadpro, notepad will do just fine also hex editor does not need to be ultraedit, any will do.
Use Wilbur to create your island on sizes of 12km, 25km, 51km or 102km. In our experiments wilbur v1.40 becomes too bogged down when trying to create 204km (4096×4096) terrain, so we have to create our example map on 4 x 2048 pieces. Also be noticed that ingame ArmA there are some issues at 102 and 204km sized islands which we have no solution at the moment. The two largest island sizes do work… but can crash at some point because arma.RPT file gets filled with same errors over and over again.
Use WrpTool to load the wilbur export file, use the Empty WRP files if you want 102km or 204km island created since WrpTool wont allow you to create such large islands by default. Texture the whole terrain with lets say for example O\b1.paa texture, do not use any other textures, just this one type for the whole island. Do any necessary elevation editing.
WrpTool cannot read the ArmA ODOL format, so each and every time it discovers these p3d files, it gives “error reading vertexinfo” dialog which is annoying. Also all fancy object features like scale, align to ground and region tool's distance to next object will not work. You can see what OFP objects work in ArmA by looking at this OFP objects in ArmA topic. Make sure you do not use these included features in region tool or it will cause access violations or causes complete halt of WrpTool.
It is recommended that you place the listed objects in OFP format (ie from data3d\ and O\ directorys) and manipulate them in WrpTool and only after all your editing is done you replace them with the ArmA equivalents.
The objects in ArmA are found ingame in the “ca\blabla\” directorys, even though they are physically located in buildings\, plants\, rocks\ etc directorys without the ca\ at the beginnig. So in the recommended \bis\ WrpTool data directory (WrpTool manual, hint hint) you create first directory of “ca” and then you place buildings and rocks etc into this dir causing it to be d:\bis\ca\buildings\, d:\bis\ca\rocks\ etc.
Do not try to add these ArmA objects into objects.ini or objects.xml configuration because as mentioned, WrpTool cannot load new ArmA ODOL format and will give error message.
When your island is ready for ingame, use the Replace Objects feature to replace the old OFP objects with new ArmA objects. First of course you need to add the ArmA objects into object browser so they can be selected for replace objects feature.
There are some objects which dont have OFP equivalent for example like ca\buildings\hotel.p3d and the various iraq/mog looking buildings, these you have to place manually if you need to use them. When you place the ArmA object, WrpTool places it 1000m above the ground level as it cannot read the ArmA ODOL format, if you use align to ground it wont work, if you move the object it still stays 1000m + ground level valued. Its frustrating as you have to manually use object inspector to set the value correctly (we have the WRP utility under work which does this automatically but its not ready yet, sorry).
The new thing in ArmA engine is the rvmat texture stuff, there is huge load of information about this in BI wiki so we are not going to cover it here. Before we gain more knowledge and better tools (by BIS or us heh) we just use simple method of one texture for whole island.
Take the existing rvmat file from sara.pbo for example, or you can go with Solus desert island, PMC WRP Demo islands or Deanosbeanos Afghanistan islands, up to you. But here is list of semi matching green lush and dry desert texture types from sara.pbo
sara\Data\Layers\s_023_011_lco.paa sara\Data\Layers\s_027_013_lco.paa sara\Data\Layers\s_031_020_lco.paa sara\Data\Layers\s_032_021_lco.paa sara\Data\Layers\s_033_015_lco.paa sara\Data\Layers\s_035_015_lco.paa sara\Data\Layers\s_037_014_lco.paa sara\Data\Layers\s_037_015_lco.paa
Desert dry generic:
You must then grab the matching .rvmat file for the selected texture, in this case we simply take the PMC WRP Demo islands 1.rvmat as its simple. Use UnRap.exe to create the CPP file out of the rvmat and open it with text editor. The important parts are the class Stage0 and class Stage1 where you must specify the texture filename, in our example case its stage0: texture = “PMC_wrpdemo\data\layers\s_005_007_lco.paa”; and stage1: texture = “PMC_wrpdemo\data\layers\m_001_004_lco.paa”; the stage2 through stage13 are pointing out to the sara.pbo files, but as you see the stage0 and stage1 need to be the specific texture you use, in this case in our own pbo. You can however just grab any of the example paa textures from sara.pbo and use them, but there are only close matches, not perfect matching texture so it “tiles” properly.
If you edited new rvmat texture file, use eliteness to create the cpp → rvmat change again by loading the CPP, then using Tools → Rapify feature to save it into .rvmat format.
This rvmat business is confusing as heck, so I highly recommend (unless you're a really smart guy unlike me) to just grab the already mentioned existing rvmats and use them, you can in fact use them without even putting the rvmat into your own island pbo, just use it as any other texture from any pbo file.
This texture thing is really difficult to explain and I'm sure will be one of the most difficult to understand, so I will be regularly updating this part to make it more easily to understand.
You need to hex edit the textures into WRP file since WrpTool only loads paa textures. So open up your WRP file in your favourite hex editor (I use ultraedit), search for “.pa” string and replace that with what ever path you have made your rvmat texture. In PMC WRP Demo islands this directory+filename was “PMC_wrpdemo\1.rvmat”. Also its been said that the path+filename must be same length as the original, well what I understand it wont matter as long as its less than 32 characters and you edit the 00's into the WRP if your path+filename was shorter than original.
Island config is updated on ArmA, its very cool that you can add cutscenes, missions and even campaigns into the island addon pbo now. You can create class to place them here, use class CfgMissions and there class Missions for missions, class Campaigns for campaigns and class Cutscenes for island cutscenes. These are optional, but any island released should have menu background cutscene.
Take a look at the sara, saralite or any of the user made island configs for reference, edit only few bits to match if for your island so you dont have to track down too many times if there is an error.
Create island PBO with the Cpbo util, or PboX if you want to use that. I havent found use for the $PBOPREFIX$ yet but have no clue if thats good or bad.
To convert OFP island into ArmA is semi easy, depending how hysterical 1:1 accurate you want to be. WrpTool Development Team is coding util now to do this automatically in few seconds, it works pretty good now but the util is not yet ready for release.
Open up your OFP WRP and save it with WrpTool to create 4WVR format .WRP if its not already in this format. First replace all textures with one texture as explained above (we only have like green vegetation and dry desert to choose from heh). Then use the painstaking Replace Objects feature to do the OFP→ArmA conversion as the above mentioned list suggests. Finally do the hex edit rvmat texture replacement for the one texture you set (in our example O\b1.paa) in WrpTool. Create config for your island and try it ingame.
ArmA loads island ok even if it has objects missing, however if you try to preview/play mission it will crash. It wont crash if you have texture(s) missing. Look for arma.RPT file, its your friend to tell whats causing problems.
If you want to use usermade OFP objects that are not in ArmA, then you need to have these obects as MLOD models in the pbo and otherwise working with ArmA also (I am not sure what is required out of them). Its really a difficult road to go with usermade objects. For example if you just take OFP objects in ODOL format into island (or other) pbo and try to run your island, ArmA will crash. Quick fix would be to convert the p3d to MLOD (ArmA or OFP version), remove any specific configs to these objects (cpp is always tricky and needs work) and then try. Check out more about porting objects in our OFP Port tutorial.
This tutorial is work in progress, you are welcome to ask questions and we'll surely update this tutorial to the best of our knowledge to help you get further. We want to share information, we want you to enjoy creating islands for ArmA.