Jump to content

Is It Possible To Create A Bulletproof "glass" Box.


davros

Recommended Posts

Oh, learned folks, I have a fantastic idea that I want to put into play in my new map, (the sin-bin), but to do it justice, I want/need to have a seethrough box that people spawn into. They will spawn in/out of here and can see out into the game, but can not shoot through the glass walls.

Can anyone help me out?

Perhaps Wolfsong could help with this one? You about wolfie?

Dav.

Link to comment
Share on other sites

Thanks for the quick reply Wolfie. Great to know it's possible, and even easy...Now I just need to work out what you've said actually means and then how to do it!

I am a script modder not a map maker...but perhaps it's time to learn...

Any hints appreciated as I think it'll be a fun mod.

Ok, I have found this tutorial from GRAW (1) that talks about and will gve it a go...

"...welcome to the step by step tutorial on how to get a lightmapped static prop into GRAW to make your maps just a tiny bit sweeter!"

GRAW Map Editor Tutorial

Dav

Link to comment
Share on other sites

Just make a unit with a transparent material. Nothing is destructible by default, so even if you use a glass shader/texture from another unit it won't work like glass, just look like it. No lightmap stuff needed either btw.

And special interaction is setup in the bodies, which you actually don't want. :P So should be simple.

Link to comment
Share on other sites

Thanks Wolfsong,

I spent a number of hours yesterday trying to understand this brave new world of props. Can not say i was very successful, but I am getting there.

Before I invest a ton of time of making a new model in 3DSMax, I though I'd convert an existing prop to be bulletproof. I chose the "mover_col_plane_10x3m". This is an invisible rectangle 10x3m prop that's used to block off areas. People can not move through it, but it can be shot through.

So, I just want to ...

1) change it so that it can not be shot through.

2) create a "clone of this prop., say called "dav_mover_col_plane_10x3m"

From my reading I understand I should just need to change the model file, "mover_col_plane_10x3m_merge.xml"...

<?xml version="1.0" encoding="iso-8859-1"?>
<dynamic_object xmlns:xi="x">

<object name="gfx_mover_col" collision_type="none" hidden="true"/>

<body name="mover_col_sphere_2m" tag="concrete" template="mover" editable="true" remove_ray_type="body" add_ray_type="editor graph">
<object name="root_point"/>
<object name="mover_col" collision_type="box" hidden="true" material="iron"/>
<!--<object name="gfx_mover_col" collision_type="none" hidden="false" material="iron"/>-->
</body>

</dynamic_object>

[/code]

[/size]

[b]But...what do I change?[/b] Can you pls. post an example of what I change in the is XML to make it stop bullets (and still remain see through).

Thanks,

Dav.

Link to comment
Share on other sites

Hi Tinker, so if I give a wall that texture, it'll be invisible?

Next question, where is "the texture that the "mover_col_plane_10x3m" uses." specified?

I can not find it in the .xml's for mover_col_plane_10x3m.

the 4 files this prop uses are...

u_helpers.xml

	<xdefine name="mover_col_plane_10x3m( name, model, type )">
<unit type="$type" name="$name" slot="20">
<model file="\props\helpers\mover_col_obj\$model.xml"/>
<script_class name="base" class="Base"/>
<script_class name="editor_only" class="EditorOnly"/>
<stats block="base_data">
<var name="render_lock_unit" value="false"/>
</stats>
<stats block="editor_only_data">
<var name="show_object" value="gfx_mover_col"/>
</stats>
<xi:include href="/data/units/mass.xml#xpointer(/mass/mass_object_small/*)"/>
</unit>
</xdefine>
@mover_col_plane_10x3m( mover_col_plane_10x3m, mover_col_plane_10x3m, prop )[/code] [/size] [b]materials.xml[/b] [size=1]
[code]<materials>

<material name="dummy" src="bump" decal_material="concrete">
<diffuse_texture file="dummy_df"/>
<bump_normal_texture file="dummy_bm"/>
</material>

</materials>
mover_col_plane_10x3m.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<dynamic_object xmlns:xi="x">

<diesel file="/data/objects/props/helpers/mover_col_obj/mover_col_plane_10x3m.diesel" orientation_object="root_point" materials="/data/objects/props/helpers/mover_col_obj/materials.xml"/>

<xi:include href="/data/objects/props/helpers/mover_col_obj/mover_col_plane_10x3m_merge.xml#xpointer(/dynamic_object/*)"/>

</dynamic_object>

[/code] [/size] [b]mover_col_plane_10x3m_merge.xml[/b] [size=1]
[code]<?xml version="1.0" encoding="iso-8859-1"?>
<dynamic_object xmlns:xi="x">

<object name="gfx_mover_col" collision_type="none" hidden="true"/>

<body name="mover_col_sphere_2m" tag="concrete" template="mover" editable="true" remove_ray_type="body" add_ray_type="editor graph">
<object name="root_point"/>
<object name="mover_col" collision_type="box" hidden="true" material="iron"/>
<!--<object name="gfx_mover_col" collision_type="none" hidden="false" material="iron"/>-->
</body>

</dynamic_object>

Can you be more specific on what to change?

Sorry, but I am very new to this part of modding.

Ideally, I want...

1) the people in the box to be able to see out

2) not be able to shoot out

3) the AI not be able to see/detect people in the box...ie. a solid wall so they do not start shooting up at the people in the box - it'll be up 300m up in the air above the map.

Dav.

Link to comment
Share on other sites

Hey I`m just guessing here. 0:)

graw2\data\objects\props\special\materials.xml

Seems to use the following textures for all invisible objects.

<diffuse_texture file="dummy_df"/>

<bump_normal_texture file="dummy_bm"/>

Textures found: data\textures\atlas_props\special

3) the AI not be able to see/detect people in the box...ie. a solid wall so they do not start shooting up at the people in the box - it'll be up 300m up in the air above the map.

Not possible unless you have increased the draw distance from 150M?

*Edit*

Cannot just swap and change these things using a custom level i think?

Looks like you need to get a wall, and all it`s relevant files needed. Rename the lot with a unique name, then make sure the materials.xml directs to the 1 above. Should be able to paste in the xml found in the props/special folder.

Link to comment
Share on other sites

Did you get this working? <_<

Had a little try earlier, and all seems to be fine.

Before: http://www.ghostrecon.net/fileman/users/tinker/obs_02.JPG

After: http://www.ghostrecon.net/fileman/users/tinker/obs_01.JPG

I used a random wall I saw in the editor static list 2. Named obs_wall_5m_low_green

Then created a folder setup in the local folder as follows:

\objects\city\props\cen_obstacle_walls

In there I placed: obstacle_wall_5m_low_green.XML

In that xml file I changed: materials="/data/objects/city/props/cen_obstacle_walls/materials_green.xml"/>

To:

materials="/data/objects/city/props/cen_obstacle_walls/materials_new.xml"/>

And included a xml file that I copy pasted from: \data\textures\atlas_props\special and renamed it from materials.xml to materials_new.xml

Sounds long winded, sry about that. But only took 10 minutes to get it working. Invisible object you cannot shoot through. just need to add more and move / rotate them, to build your room.

If you want your own unique object..

Add units folder, inside we have a city folder, in here we have u_props.xml Find the correct block and I changed it to:

<xdefine name="obs_wall_5m_low_new( name, model, type )">

Now it is the editor:

http://www.ghostrecon.net/fileman/users/tinker/obs_03.jpg

Note I just edited the original block to test this showed up in the editor`s, static layer list, I assume you just copy paste the block and create your own from it.

:thumbsup:

*Edit*

I do not think that I have set this up 100% correct, but, it is working just like we want it to.

Here are the files: LINK

Hopefully someone can see them and maybe post any alternatives / corrections.

Link to comment
Share on other sites

Hi Tinker...thanks soo much for persisting with this...I had almost given up...but with your help will now push on.

I just must be wired wrong! I'll download your example and clear a few hours and dedicate myself to understanding how it all hangs together.

thanks again for taking the time to give me a working example...it's so much easier for me to understand that way.

Dav

Link to comment
Share on other sites

OK, I think I might have it thanks to Tinker...we'll see.

Interestingly, it looks like it's the materials.xml that defines if it is see though or not. I wonder if the AI will be able to see me thorough it...I hope not...if so, I'll need a wall that seethrough from one side and not from the other!

Tinker, as you suggested there were a couple of items that needed updating in your files so here is the updated ones for reference...LINK

Getting closer...darn...got to go out now...just when I was making progress!

Dav

Link to comment
Share on other sites

Hi Tinker, it all works fine with the 5m low wall ...but it's a bit thin, so I though it should be a simple thing to do the same for the 15m wall...ARGHHH!!

I have tried for hours to get this to work with the 15m wall, and while it looks and functions ok in the editor (using the L and F8 to test with the soldier), it shows up as a black wall in the game! I do not know what I am doing wrong...

Would you (or anyone?) be able to take a look? LINK

Dav.

Link to comment
Share on other sites

You will have this issue with any "large" objects unfortunately. To fix it you will need to figure out recalculating the map again I guess. With a new map I thik you just add some light dummies around the object, then a ctrl+Backspace to calculate. But not sure if this is the same for a map with an existing light source? <_<

You may find this not possible. No idea how to solve this error.

>RELATED ERROR<

Otherwise just keep adding more small walls, and line them all up correct to build a bigger box.

Maybe a request for 1 of the GRAW2 map builders ? Should be a simple job to make you an invisible room.

Link to comment
Share on other sites

Ahhh, let me make sure I understand this. Your suggesting it's related to the lightmap for the object? And more specifically, that the game is ok with not haveing to generate a lightmap for "small" objects, however it will be a problem with "large" objects?

I'll have a go at generating a lightmap for the new transparent object (place it in the editor and then press Ctrl+Backspace...and then go to sleep!). I wonder if it's something in the script that's pointing to the lightmap...I note in the one that works it has

I note that in the object making tutorial it talks about the lightmap tag in the prop .xml file (in this case "obstacle_wall_15m_merge_invis.xml") and says the following...

"<lightmap>

<object name="gfx_wall" width="64" height="64"/>

</lightmap>

In here we specify which objects in the diesel file that will be lightmapped and the size of the lightmap that its generated. Look in other props xmls to see what sizes they are to get a hoohumm about good sizes!"

So, at the moment I have the following lines...

<lightmap>

<object name="obs_wall_15m_invis" height="16" width="32"/>

</lightmap>

I'll change this to be the name of the object in the diesel file, and generate a light map (.tga by pressing Ctrl-Backspace in the editor) and see what happens. (might even just do it on a "blank" map with just this prop so it's quicker).

<lightmap>

<object name="obs_wall_15m" height="16" width="32"/>

</lightmap>

I'll just have to create it from blocks as a temp. measure while I work though it - (infact I've already tested with this and it worked perfectly....)

Ultimately though, yes, I'd like to have this as a "custom" prop. created in 3dsMax. I'll get there eventually.

Wolfie, may need your help again!

Any mappers want to make my invisible box in the sky?

Dav

Link to comment
Share on other sites

Ahhh, let me make sure I understand this. Your suggesting it's related to the lightmap for the object? And more specifically, that the game is ok with not haveing to generate a lightmap for "small" objects, however it will be a problem with "large" objects?

That is what it states in the editor tutorial, lighting section. Also I had this issue with the park map, all small objects I added where fine in game but the large items where all black.

Link to comment
Share on other sites

Thanks Tinker will check it out. Fow now I have just used the approach you suggested with the low5m wall that's working.

Just for completeness incase anyone is following this thread...I've posted a small video showing what it looks like (or rather doesn't as it's invisible) here.

Dav

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...