[x]Merry Christmas!


Users browsing this thread: 1 Guest(s)
How to Rip Models From Nintendo Nightmare AKA can I rip models in 32000 characters?
#1
DO NOT ATTEMPT TO UTILIZE NINJA RIPPER. IT WILL FAIL.

I have been looking into ripping models from an old 2009 PC game called Nintendo Nightmare. It is fairly obscure, so I doubt very many people have heard about it. The process is not incredibly complicated, but I should probably explain why it needs to be this way. Nintendo Nightmare was made in Game Maker 6.0e (although the current up to date release was recompiled in Game Maker 8). This means all of the models are d3d rather than obj. The d3d format is Game Maker specific so as far as I can tell there is only one d3d to obj exporter period. Game Maker model creator is fairly simple to use and it has a couple useful tools we will need.

Nintendo Nightmare uses individual modular pieces to build its levels. Each one is a separate object making generic d3d interface calls. Furthermore Game Maker does not do multi-texturing, so in order to generate models we have to assemble each object type into its own d3d model exported to a file. These files will then be converted to obj and merged in Blender to create a proper material file. If anyone knows a simple way to automate that process of merging the models and generating a material file I would be grateful as the merging process is incredibly error prone (I keep moving model the pieces by accident in Blender's editor). Because Nintendo Nightmare has back face culling turned off but does not have two-sided level geometry in cases we will be duplicating the geometry and flipping the polygons to generate a proper effect.

The exact steps to follow are listed below.

1. Run the game.

2. In any level press the decimal key.

3. Enter the 1 line version of the script attached below. It will generate a model ripping tool in-game.

4. Press enter to execute the model ripper. A series of d3d models will be generated in your local directory.

5. Open each model in Game Maker Model Creator

6. In the editor click select all.

7. In the editor click convert to triangles.

8. In the editor click copy selection.

9. In the editor click flip faces.

10. In the editor click tools and then OBJ export (you will have to save the d3d model when prompted).

11. Merge all of the models in blender and give them appropriate textures in the UV editor.

Textures will have to be obtained separately through the Nintendo Nightmare source code. Because of unusual differences in Game Maker's rendering engine all textures have to be flipped upside down from the internal code. Furthermore, all models are a mirror image as Game Maker uses a different handed coordinate system.

Note that the model ripper does not currently persist when a new level is loaded so it will have to be re-pasted every time.

The script was generated by me sifting through the source code and putting together the proper corresponding model generation calls. If any error is found in the script please notify me immediately.

Code:
/* A script to take nintendo nightmare levels and
* convert them into d3d models and save them to files.
*/

exporter = instance_create(0,0,obj_stringe);

exporter.text = "
if (keyboard_check_pressed(vk_enter))
{
show_message('saving the model...');

var model;
var count;

model = d3d_model_create();
count = 0;
with (obj_tuotop)
{
    d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_tuotop.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_redtuotop)
{
    d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_redtuotop.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_tri1)
{
    d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_tri1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object10)
{
    d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object10.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_mustache)
{
    d3d_model_floor(model,x,y,depth,x+128,y+128,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_mustache.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_solconseil)
{
    d3d_model_floor(model,x,y,depth,x+256,y+256,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_solconseil.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_volcansol)
{
    d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_volcansol.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object481)
{
    d3d_model_floor(model,x,y,depth,x+16,y+16,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object481.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object402)
{
    d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object402.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_scifi_woodsol)
{
    d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_scifi_woodsol.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_scifi_cimentsol)
{
    d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_scifi_cimentsol.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_scifi_deathstarsol1)
{
    d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathstarsol1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_scifi_deathsol2)
{
    d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathsol2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_scifi_deathstarfloor3)
{
    d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathstarfloor3.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object137)
{
    d3d_model_floor(model,x-128,y-128,depth,x+128,y+128,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object137.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object122)
{
    d3d_model_floor(model,x,y,depth,x+144,y+48,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object122.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_pont)
{
    d3d_model_block(model,x-16,y-8,z,x+16,y+8,z-4,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_pont.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_upperplatform)
{
    d3d_model_block(model,x-16,y-8,z,x+16,y+8,z-4,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_upperplatform.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object68)
{
    d3d_model_floor(model,x,y,depth,x+192,y+192,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object68.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object293)
{
    d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object293.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object172)
{
    d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object172.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object47)
{
    d3d_model_floor(model,x,y,depth,x+256,y+256,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object47.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object563)
{
    d3d_model_floor(model,x,y,depth,x+400,y+315,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object563.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_nuage)
{
    d3d_model_floor(model,x-32,y-32,depth,x+32,y+32,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_nuage.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_nuageright)
{
    d3d_model_floor(model,x-32,y-32,depth,x+32,y+32,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_nuageright.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object11)
{
    d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object11.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object61)
{
    d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object61.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_tri2)
{
    d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_tri2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_tri3)
{
    d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_tri3.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_tuo)
{
    d3d_model_cylinder(model,x-6,y-6,minz,x+6,y+6,z-4,1,1,false,24);
    d3d_model_cylinder(model,x-8,y-8,z-4,x+8,y+8,z,1,1,false,24);
    d3d_model_cylinder(model,x-5.5,y-5.5,minz,x+5.5,y+5.5,z,1,1,false,24);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_tuo.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_redtuo)
{
    d3d_model_cylinder(model,x-6,y-6,minz,x+6,y+6,z-4,1,1,false,24);
    d3d_model_cylinder(model,x-8,y-8,z-4,x+8,y+8,z,1,1,false,24);
    d3d_model_cylinder(model,x-5.5,y-5.5,minz,x+5.5,y+5.5,z,1,1,false,24);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_redtuo.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_mur1)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_mur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_grismur1)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_grismur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_aerovitre1)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_aerovitre1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_murinv1)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_murinv1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_tresgrandmur1)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_tresgrandmur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_grotmur1)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_grotmur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_souterrmur1)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_souterrmur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_deathstarmur1)
{
    d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_deathstarmur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_chatomur1)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_chatomur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_airportmur1)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_airportmur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_airportmur1)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_airportmur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_feupiege)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_feupiege.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_ptimur1)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_ptimur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_portelink)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_portelink.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_steelmur1)
{
    d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_steelmur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_volcanwall)
{
    d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_volcanwall.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_stonemur1)
{
    d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_stonemur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_provolcanwall)
{
    d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_herbemur1)
{
    d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_herbemur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_mur2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_mur2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_grismur2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_grismur2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_aerovitre2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_aerovitre2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_mutinv2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_mutinv2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_tresgrandmur2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_tresgrandmur2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_grotmur2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_grotmur2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_souterrmur2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_souterrmur2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_deathstarmurv)
{
    d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_deathstarmurv.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_chatomur2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_chatomur2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_airportmur2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_airportmur2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_feupiege2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_feupiege2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_portelinkv)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_portelinkv.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_steelmur2)
{
    d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_steelmur2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_volcanwall2)
{
    d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_volcanwall2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_stonemur2)
{
    d3d_model_wall(model,x,y-16,z,x,y+16,minz,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_stonemur2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_provolcanwall2)
{
    d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_barreaudoor)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_barreaudoor.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_explosemur2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_explosemur2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_geantsteelmur)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_geantsteelmur.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_maisons2)
{
    d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_maisons2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_manoirplat)
{
    d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_manoirplat.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_ecranplat)
{
    d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_ecranplat.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_rainbowmur1)
{
    d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_rainbowmur1.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_phoenixmur)
{
    d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_phoenixmur.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_granmur2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_granmur2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_portepiege)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_portepiege.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_tombe)
{
    d3d_model_wall(model,x,y+8,z,x,y-8,z-16,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_tombe.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_arbre)
{
    d3d_model_wall(model,x,y-16,z,x,y+16,z-32,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_arbre.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_scaryarbre)
{
    d3d_model_wall(model,x,y-24,z,x,y+24,z-48,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_scaryarbre.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_caisse)
{
    d3d_model_block(model,x-16,y-16,z,x+16,y+16,z-32,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_caisse.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_gichet)
{
    d3d_model_block(model,x-8,y-8,z,x+8,y+8,minz,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_gichet.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_ciblegrappin)
{
    d3d_model_block(model,x-7,y-7,z,x+7,y+7,minz,1,1);
    d3d_model_block(model,x-8,y-8,z-1,x+8,y+8,minz-1,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_ciblegrappin.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_buisson)
{
    d3d_model_block(model,x-8,y-8,z,x+8,y+8,z-10,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_buisson.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_southhouse)
{
    d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_southhouse.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_exploserocher)
{
    d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_exploserocher.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (mur_deplacehaut)
{
    d3d_model_block(model,x,y,z,x+64,y+64,z-64,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_mur_deplacehaut.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_murdeplacebas)
{
    d3d_model_block(model,x,y,z,x+64,y+64,z-64,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_murdeplacebas.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_bulding)
{
    d3d_model_block(model,x,y,z,x+64,y+64,0,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_bulding.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_rosecarre)
{
    d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_rosecarre.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_enemimuraille)
{
    d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_enemimuraille.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_enemimuraille2)
{
    d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_enemimuraille2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_brikhouse)
{
    d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_brikhouse.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_invisimur)
{
    d3d_model_block(model,x-16,y-16,-999,x+16,y+16,999,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_invisimur.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_rocher)
{
    d3d_model_ellipsoid(model,x-16,y-16,z-200,x+16,y+16,z-32-200,1,1,24);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_rocher.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_cime)
{
   d3d_model_floor(model,x-32,y-32,z,x+32,y+32,z,1,1);
   d3d_model_cylinder(model,x-32,y-32,z,x+32,y+32,0,1,1,false,24);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_cime.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_tronploz)
{
   d3d_model_floor(model,x-7,y-7,z,x+7,y+7,z,1,1);
   d3d_model_cylinder(model,x-7,y-7,z,x+7,y+7,0,1,1,false,24);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_tronploz.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_squashoz)
{
   d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1);
   d3d_model_cylinder(model,x-8,y-8,z,x+8,y+8,0,1,1,false,24);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_squashoz.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_colonnetemple)
{
   d3d_model_floor(model,x-6,y-6,z,x+6,y+6,z,1,1);
   d3d_model_cylinder(model,x-6,y-6,z,x+6,y+6,0,1,1,false,24);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_colonnetemple.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_profonsquashoz)
{
   d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1);
   d3d_model_cylinder(model,x-8,y-8,z,x+8,y+8,0,1,1,false,24);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_profonsquashoz.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_mackopiege)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_mackopiege.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_mackopiege2)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_mackopiege2.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_dracopiege)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_dracopiege.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_volcanwalldiag)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_volcanwalldiag.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_provolcanwall3)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall3.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (obj_mur1diag)
{
    d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_obj_mur1diag.d3d');
}
d3d_model_destroy(model);

model = d3d_model_create();
count = 0;
with (object32)
{
    d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1);
    count += 1;
}
if (count > 0)
{
    d3d_model_save(model,'room_' + string(room) + '_object32.d3d');
}
d3d_model_destroy(model);

show_message('model saved...');
}"

/*below is a one line version for ease in entering*/

exporter = instance_create(0,0,obj_stringe);exporter.text = "if (keyboard_check_pressed(vk_enter)){show_message('saving the model...');var model;var count;model = d3d_model_create();count = 0;with (obj_tuotop){ d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tuotop.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_redtuotop){ d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_redtuotop.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tri1){ d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tri1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object10){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object10.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mustache){ d3d_model_floor(model,x,y,depth,x+128,y+128,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mustache.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_solconseil){ d3d_model_floor(model,x,y,depth,x+256,y+256,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_solconseil.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_volcansol){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_volcansol.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object481){ d3d_model_floor(model,x,y,depth,x+16,y+16,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object481.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object402){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object402.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scifi_woodsol){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scifi_woodsol.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scifi_cimentsol){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scifi_cimentsol.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scifi_deathstarsol1){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathstarsol1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scifi_deathsol2){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathsol2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scifi_deathstarfloor3){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathstarfloor3.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object137){ d3d_model_floor(model,x-128,y-128,depth,x+128,y+128,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object137.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object122){ d3d_model_floor(model,x,y,depth,x+144,y+48,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object122.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_pont){ d3d_model_block(model,x-16,y-8,z,x+16,y+8,z-4,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_pont.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_upperplatform){ d3d_model_block(model,x-16,y-8,z,x+16,y+8,z-4,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_upperplatform.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object68){ d3d_model_floor(model,x,y,depth,x+192,y+192,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object68.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object293){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object293.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object172){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object172.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object47){ d3d_model_floor(model,x,y,depth,x+256,y+256,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object47.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object563){ d3d_model_floor(model,x,y,depth,x+400,y+315,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object563.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_nuage){ d3d_model_floor(model,x-32,y-32,depth,x+32,y+32,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_nuage.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_nuageright){ d3d_model_floor(model,x-32,y-32,depth,x+32,y+32,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_nuageright.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object11){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object11.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object61){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object61.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tri2){ d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tri2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tri3){ d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tri3.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tuo){ d3d_model_cylinder(model,x-6,y-6,minz,x+6,y+6,z-4,1,1,false,24); d3d_model_cylinder(model,x-8,y-8,z-4,x+8,y+8,z,1,1,false,24); d3d_model_cylinder(model,x-5.5,y-5.5,minz,x+5.5,y+5.5,z,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tuo.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_redtuo){ d3d_model_cylinder(model,x-6,y-6,minz,x+6,y+6,z-4,1,1,false,24); d3d_model_cylinder(model,x-8,y-8,z-4,x+8,y+8,z,1,1,false,24); d3d_model_cylinder(model,x-5.5,y-5.5,minz,x+5.5,y+5.5,z,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_redtuo.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_grismur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_grismur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_aerovitre1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_aerovitre1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_murinv1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_murinv1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tresgrandmur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tresgrandmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_grotmur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_grotmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_souterrmur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_souterrmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_deathstarmur1){ d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_deathstarmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_chatomur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_chatomur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_airportmur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_airportmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_airportmur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_airportmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_feupiege){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_feupiege.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_ptimur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_ptimur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_portelink){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_portelink.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_steelmur1){ d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_steelmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_volcanwall){ d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_volcanwall.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_stonemur1){ d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_stonemur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_provolcanwall){ d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_herbemur1){ d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_herbemur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_grismur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_grismur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_aerovitre2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_aerovitre2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mutinv2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mutinv2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tresgrandmur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tresgrandmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_grotmur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_grotmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_souterrmur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_souterrmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_deathstarmurv){ d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_deathstarmurv.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_chatomur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_chatomur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_airportmur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_airportmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_feupiege2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_feupiege2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_portelinkv){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_portelinkv.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_steelmur2){ d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_steelmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_volcanwall2){ d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_volcanwall2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_stonemur2){ d3d_model_wall(model,x,y-16,z,x,y+16,minz,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_stonemur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_provolcanwall2){ d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_barreaudoor){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_barreaudoor.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_explosemur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_explosemur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_geantsteelmur){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_geantsteelmur.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_maisons2){ d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_maisons2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_manoirplat){ d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_manoirplat.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_ecranplat){ d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_ecranplat.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_rainbowmur1){ d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_rainbowmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_phoenixmur){ d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_phoenixmur.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_granmur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_granmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_portepiege){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_portepiege.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tombe){ d3d_model_wall(model,x,y+8,z,x,y-8,z-16,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tombe.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_arbre){ d3d_model_wall(model,x,y-16,z,x,y+16,z-32,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_arbre.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scaryarbre){ d3d_model_wall(model,x,y-24,z,x,y+24,z-48,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scaryarbre.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_caisse){ d3d_model_block(model,x-16,y-16,z,x+16,y+16,z-32,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_caisse.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_gichet){ d3d_model_block(model,x-8,y-8,z,x+8,y+8,minz,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_gichet.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_ciblegrappin){ d3d_model_block(model,x-7,y-7,z,x+7,y+7,minz,1,1); d3d_model_block(model,x-8,y-8,z-1,x+8,y+8,minz-1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_ciblegrappin.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_buisson){ d3d_model_block(model,x-8,y-8,z,x+8,y+8,z-10,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_buisson.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_southhouse){ d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_southhouse.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_exploserocher){ d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_exploserocher.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (mur_deplacehaut){ d3d_model_block(model,x,y,z,x+64,y+64,z-64,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_mur_deplacehaut.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_murdeplacebas){ d3d_model_block(model,x,y,z,x+64,y+64,z-64,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_murdeplacebas.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_bulding){ d3d_model_block(model,x,y,z,x+64,y+64,0,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_bulding.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_rosecarre){ d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_rosecarre.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_enemimuraille){ d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_enemimuraille.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_enemimuraille2){ d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_enemimuraille2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_brikhouse){ d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_brikhouse.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_invisimur){ d3d_model_block(model,x-16,y-16,-999,x+16,y+16,999,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_invisimur.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_rocher){ d3d_model_ellipsoid(model,x-16,y-16,z-200,x+16,y+16,z-32-200,1,1,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_rocher.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_cime){ d3d_model_floor(model,x-32,y-32,z,x+32,y+32,z,1,1); d3d_model_cylinder(model,x-32,y-32,z,x+32,y+32,0,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_cime.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tronploz){ d3d_model_floor(model,x-7,y-7,z,x+7,y+7,z,1,1); d3d_model_cylinder(model,x-7,y-7,z,x+7,y+7,0,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tronploz.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_squashoz){ d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1); d3d_model_cylinder(model,x-8,y-8,z,x+8,y+8,0,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_squashoz.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_colonnetemple){ d3d_model_floor(model,x-6,y-6,z,x+6,y+6,z,1,1); d3d_model_cylinder(model,x-6,y-6,z,x+6,y+6,0,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_colonnetemple.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_profonsquashoz){ d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1); d3d_model_cylinder(model,x-8,y-8,z,x+8,y+8,0,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_profonsquashoz.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mackopiege){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mackopiege.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mackopiege2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mackopiege2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_dracopiege){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_dracopiege.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_volcanwalldiag){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_volcanwalldiag.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_provolcanwall3){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall3.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mur1diag){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}model = d3d_model_create();count = 0;with (object32){d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1);count += 1;}if (count > 0){d3d_model_save(model,'room_' + string(room) + '_object32.d3d');}d3d_model_destroy(model);if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mur1diag.d3d');}d3d_model_destroy(model);show_message('model saved...');}";
Reply
Thanked by: Pingus!
#2
I have determined that my script is missing object32 from it. It's a triangular piece of grass. I will be correcting that briefly. I'm also looking into having the script save a flipped over version of each of the relevant textures to files. That would eliminate the need to go hunt them down.

I also need to get around to adding the generic triangle objects and the "2D" Mario blocks for World Negative 1. They are currently unimplemented in the script but they are used rarely enough that it is acceptable at the moment.

On another note, does anyone know any automated libraries/programs to take a bunch of obj models and give each file its own dedicated texture and merge them into one obj model? There's a LOT of level files and I'm trying to get it all automated as much as possible so that I can hopefully get through them all before the end of this month.
Reply
Thanked by:


Forum Jump: