Make a red version of the Guardian Seeker's head light model

Started by VGames, September 20, 2015, 07:35:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

VGames

Could somebody please do me a favor and make a red version of the guardian seeker's headlight LWO model? I don't have a way to do it myself. I tried editing the model file with a text editor but really messed it up. If somebody could do this I'd be very greatful.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

bkt

Why not just create a new material that's red and apply that to the model?

VGames

Like I said I tried opening up the LWO model with a text editor like I do with the MD5 meshes but changing anything in it corrupts it. Do u know of a way to make changes in the file without damaging it?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

MrC

I'm with bkt on this one, do you know the name of the default material that LWO uses? If so you can probably use a skin file to change the material or edit the default material directly.

VGames

I know what material it is but how would I get the model to use the new material file or the new skin without editing the lwo model? I don't want to change the original model used by the seeker, I want to make a new one to be used by somebody else.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

MrC

This is a good place to start:
https://www.iddevnet.com/doom3/skins.php

"Skins allow you to quickly and easily remap textures on a model. Since the textures on a model are defined in the actual model file, using a skin is the only way to dynamically change a model texture."

VGames

I know how skins work. I've made a bunch of them for custom hell map variants for most of the monsters. What I'm asking is how do u make the model for the light called in the monsters def file use a different skin? Look at the guardian seekers def file and notice where the model for the light is called. How do u make the light model use a different skin in the def? Or is this done through the guardian seekers script file where the light model defined in the def is called upon to be created?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

motorsep


Phrozo

You can set  a skin through script with 'setSkin'. Pass it the name of the skin you want.

motorsep

Quote from: Phrozo on September 22, 2015, 12:34:15 PM
You can set  a skin through script with 'setSkin'. Pass it the name of the skin you want.

You still need to know material name to replace the original one.

Phrozo

Indeed.

Here is an example for the rocket launcher:

/*
=================================
weapon_rocketlauncher::UpdateSkin
=================================
*/
void weapon_rocketlauncher::UpdateSkin() {
string skinname;
float ammoClip;

if ( isInvisible() ) {
skinname = skin_invisible;
} else {
ammoClip = ammoInClip();
if ( ammoClip > 5 ) {
// can happen in MP - weapon Raising with slightly out-of-sync ammoClip
ammoClip = 5;
}
if ( ammoClip < 0 ) {
ammoClip = 0;
}
skinname = "skins/models/weapons/" + ammoClip + "rox.skin";
}
setSkin( skinname );
}

oneofthe8devilz

Quote from: motorsep on September 22, 2015, 01:09:02 PM
You still need to know material name to replace the original one.

The material shader name can still be read out of the binary ".lwo" file with every common text editor.
I got six little friends and they all run faster than you ;)


Check out our mods at
moddb or the SPS Homepage

Phrozo

Here...

From the seekers init script function:

// light beam
sys.setSpawnArg( "name", getName() + "_lightbeam" );
    sys.setSpawnArg( "model", getKey( "model_lightbeam" ) ); // <- this is defined in the def file
sys.setSpawnArg( "noclipmodel", "1" );
classname = getKey( "def_light2" );
light_beam = sys.spawn( "func_static" );
light_beam.bindToJoint( self, "head", true );
light_beam.setOrigin( '0 0 30' );
light_beam.setAngles( '0 0 -90' );


From the seekers def:
"model_lightbeam" "models/monsters/gseeker/gseeker_flare_on_orig.lwo"

From 'models/monsters/gseeker/gseeker_flare_on_orig.lwo', the materials used are:

models/items/flashlight/flare      // headlight
models/mapobjects/dropship/dbeam1  // beam part


And here is a skin you can use:
skin red_guardian_seeker_light_flare {
    // change this to -> that
models/items/flashlight/flare textures/common/nodraw  // replace with material you want
models/mapobjects/dropship/dbeam1   textures/common/nodraw // replace with material you want
}


Lastly, somewhere in script you need to have this:
light_beam.setSkin( "red_guardian_seeker_light_flare.skin" );

You'll have to figure out the rest.

motorsep

Quote from: oneofthe8devilz on September 22, 2015, 01:56:58 PM
The material shader name can still be read out of the binary ".lwo" file with every common text editor.

I am not the one not willing to look into it....  ::)

Phrozo

To be fair the text editor method didn't work for me but blender showed the references, but yea...