Linker Split 0 Posted November 2, 2007 I want to import some object that I placed on a old WRP map in visitor3. how to make it with the importobjects script? help pls Share this post Link to post Share on other sites
fasad 1 Posted November 3, 2007 I haven't looked at the V3 scripting engine, but I expect it will not be possible to create such a script without some kind of "export TXT object list from OFP WRP" tool. Given the OFP WRP format is very well known, it should hopefully be an easy tool to create. Know any coders? I've also spent a bit of time trying to get objects from an OFP PEW into a V3 PEW, with no luck. Share this post Link to post Share on other sites
Linker Split 0 Posted November 3, 2007 I haven't looked at the V3 scripting engine, but I expect it will not be possible to create such a script without some kind of "export TXT object list from OFP WRP" tool. Given the OFP WRP format is very well known, it should hopefully be an easy tool to create. Know any coders?I've also spent a bit of time trying to get objects from an OFP PEW into a V3 PEW, with no luck. yeah fasad mee too.. and since i have to make a big city like the Mog, i need to understand how to make the script work... in the readme there's a little expanation, but i don't understand how to create this template file, and where to save it.. .:( Share this post Link to post Share on other sites
Planck 1 Posted November 3, 2007 I think the 'template name' referred to in the script actually means the definition name of the object in your pew. A small example of the result of using the export script to export all objects called fikovnik in the pew definition to a text file looks like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> "fikovnik";9610;3473;0;-66.1876; "fikovnik";9620;3480;0;-46.723; "fikovnik";9627;3520;0;84.0726; "fikovnik";9653;3551;0;-132.798; "fikovnik";9642;3501;0;-22.8095; "fikovnik";9616;3464;0;-163.16; "fikovnik";9627;3511;0;95.7602; So, you are exporting from a .pew file and the ImportObjects script will import the same information from the text file to a .pew file, either the same .pew file or a different one. Presumably if you can obtain such a list from your .wrp file, complete with co-ordinates and height information as above, then it should be possible to import objects from your .wrp files. Remember that the name inside the "" must reflect an object definition that is defined in your .pew file already, so if I had an object defined with the name "fikovnik" in some other .pew file, I could import the above example to it. Planck Share this post Link to post Share on other sites
fasad 1 Posted November 3, 2007 As I read it, it just wants an ascii file in the format : edit: <s>"ObjectModelName";X;Y;Z;orientation;</s> (Planck's post above makes more sense ) If I had time to use V3, I would make a more thorough script to import more details, such as scale and angle, but there is no point without a means of creating a source file. Share this post Link to post Share on other sites
Linker Split 0 Posted November 3, 2007 Ok but... where do i have to write those information planck?? I feel like a n00b... Share this post Link to post Share on other sites
fasad 1 Posted November 3, 2007 The exportObjects.VIS script creates the text file. I guess the two scripts intended use is to copy objects from one V3 project into another, not import V2 objects. Share this post Link to post Share on other sites
Linker Split 0 Posted November 3, 2007 ahhhhhhh... yeah maybe you are right m8! uff... sounds i gotta add everything from scratch again Share this post Link to post Share on other sites
fasad 1 Posted November 3, 2007 Ooooh, I just imported objects from a V2 PEW into a V3 PEW! It's a start The process : In V2, create new project. Create a new object class using name "B koprivy". Place several of them. Save PEW file, close V2. Open V3, open the V2 created PEW. Ignore wussy error messages and lack of any visible objects. Press Ctrl-A (select all) Run exportObjects script, choose to save selected objects. Close the V2 PEW. Open BI Sample Island (which conveniently already has an object class/template "B koprivy") Run importObjects script. Pretty simple! Now my problem is trying to import a WRPtool created WRP into V2 without the damn thing crashing! Share this post Link to post Share on other sites
Linker Split 0 Posted November 3, 2007 Ooooh, I just imported objects from a V2 PEW into a V3 PEW! It's a start The process : In V2, create new project. Create a new object class using name "B koprivy". Place several of them. Save PEW file, close V2. Open V3, open the V2 created PEW. Ignore wussy error messages and lack of any visible objects. Press Ctrl-A (select all) Run exportObjects script, choose to save selected objects. Close the V2 PEW. Open BI Sample Island (which conveniently already has an object class/template "B koprivy") Run importObjects script. Pretty simple! Now my problem is trying to import a WRPtool created WRP into V2 without the damn thing crashing! WOW you are my master fasad!!! yeah now the problem that i was never able to solve is to import a damn WRP in v2! Share this post Link to post Share on other sites
fasad 1 Posted November 3, 2007 Yeah, it's a bitch. I've only ever managed to import an island with one single object, but that was all I needed at the time. It seems that importing completely object free islands (intro) will always fail. The basic process was : Binarize your WRP (not absolutely sure it's needed honestly, but the only islands i've imported have been binarized) Start a equal sized PEW in V2 to the WRP you wish to import. Connect to buldozer. In V2, select file, import world and select you WRP. Ignore wussy error message, Buldozer will crash, V2 still thinks its connected. Disconnect from buldozer. Connect to buldozer. Double click on you map somewhere, buldozer will import the WRP. Wait a while. Pray. Hope. Wish. Sacrifice animals to the gods. Visitor will say "import done". Import abel, cain or eden first, they seem to work everytime for me. Failing all else, this means we could get the OFP islands (including Nogova) into ArmA pretty quickly. WRPs successfully imported into V2 list: abel (binned) cain (binned) eden (binned) nogova (binned) bas_i1 (tonal) (binned) rezina_terrain_dummy (binned) aec island (binned) trinity_island_v2.00 (binned) Failed islands list: intro (desert island) (binned but no objects) novajev (unbinned) OFP-D Afganeveron v1.0 (unbinned) anjou v2 SE (unbinned) new sarugao (unbinned) mapfact noe2 (unbinned) I see a pattern here, and my island is unbinned Share this post Link to post Share on other sites
fasad 1 Posted November 3, 2007 Okay, I've now exported a TXT list of ~70,000 objects on the OFP Cain island. The "template" names in the text file can be easily modified to suit ArmA objects! That's it, we can import objects from binarized OFP islands into V3. While it's not a simple process, it's a lot faster than starting from scratch The V2 PEW you save of your OFP island must have a "template"/class for V3 to be able to load them. For the BI islands, this is easy, just add all p3ds from the data folder into V2's list of nature/artificial objects and that covers all the objects on the island. For custom islands that use a mix of CWC, Res and custom objects, I think we will need to create a complete directory structure for each project (set V2 object etc folders to point to some dummy folder, then place every single p3d used on the island in that folder). Now, I've got no real amount of time to spend on this stuff for a month. Oh, well... Share this post Link to post Share on other sites
fasad 1 Posted November 3, 2007 Nice, I've successfully binarized my island, imported it into v2, then imported almost all of the objects and heightmap from my island into V3. In V3, I have replaced all objects with a single type of rock, this is only a proof of concept. I wish I had spent more time trying to binarize it before I released it, it only took me 10 mins this morning! Binarized using the following method: -Use the 11th release of binarize, not the 14th. -Added ceeb_rezina (the wrp and config), ceeb_gt0 (ground textures), ceeb_signs (signs for rezina) folders into binarize folder. -Added data and data3d folders from CWC into binarize folder. -Ran "bin ceeb_rezina". My island actually used mostly resistance and some community addon objects, but these were not in the binarize folder. It seems binarize needs to find some of the models used on the island, but can get by without all of them. I had been trying with every used addon in the binarize folder with no success. Now only 189020 of the 199191 objects imported into v2, i'm not sure why - possibly the p3d filename length? I know at least 8000 of my missing objects are forest squares, so I'm not too concerned. This seems to be a problem with the V2 import WRP function. To help convert your object list file, check out this thread over at the PMC forums, containing the ArmA equivalent of OFP objects. Rezina in V3: The OFP version : The same location in V3 buldozer (just recognisable): Share this post Link to post Share on other sites
Nicholas Bell 0 Posted February 6, 2008 A question not answered in the discussion - where should the file be in order for the import script to load it? In V3, all I want to do take the objects from one project to another. Export works fine - I created a large .txt file. The import script produces an error saying the script requires the template to be "already in the document". I've placed the txt file in every folder in the new project without result. Obviously I am missing something really basic. Thanks! Share this post Link to post Share on other sites
Planck 1 Posted February 6, 2008 What this means is the object names in your txt file must already be defined in your project Artificial/Nature definitions list. If the txt file contains an object name that is not in your definitions then those particular objects will not be imported. Planck Share this post Link to post Share on other sites
Nicholas Bell 0 Posted February 6, 2008 Thanks. I misunderstood the purpose of the script. I thought it was to eliminate having to add the objects manually - useless to me. Share this post Link to post Share on other sites
fasad 1 Posted February 6, 2008 There is an option to import the object definitions/templates from one pew into another. It's called "Import Templates..." in the project menu. Share this post Link to post Share on other sites
Nicholas Bell 0 Posted February 6, 2008 Thank you, Fasad. That is what I was looking for! Share this post Link to post Share on other sites