Page 2 of 5

Re: OLD Players

Posted: Sun Nov 14, 2021 10:36 am
by captainsnarf
Nice :) Looks like ion cannon attached to raptor?

To make it look right, you can derive a new weapon from the iontank cannon, and replace the mesh with something else.

Code: Select all

class MyWeapon extends ONSHoverTank_IonPlasma_Weapon;

defaultproperties
{
    Mesh=Mesh'ONSWeapons-A.PlasmaGun'
    YawBone=PlasmaGunBarrel
    PitchBone=PlasmaGunBarrel    
}
That's the default weapon mesh that the raptor has. It's actually an empty mesh so there is nothing to see. The YawBone and PitchBone names come from the mesh and can be looked up in the unreal editor by opening the Animations browser, finding ONSWeapons-A package and then viewing the mesh for PlasmaGun. There are some checkboxes in the menu to 'show bones' and 'show bone names'. Or you can just look in the code for the raptor and see the bone names are both 'PlasmaGunBarrel'.

Re: OLD Players

Posted: Sun Nov 14, 2021 7:35 pm
by ItsMeAgain
Pooty and Snarf,
Thanks for the info!! I have gotten the Starbolt extracted just for reference from the cache. Learning the code base will just take some time, on what to override and how it all works. The wav file and textures did not get extracted ... just made up some. I do have one question, having trouble assigning the Starbolt texture. Is this done at Level level or in the map binary? I have just created a mutator to override a raptor (ONSAttack..) and replace it with my rebuilt version of the Starbolt, but no matter what i try (#exec, RedSkin, etc), can not get the Starbolt texture, it is always the default raptor, BUT i can add the bomber texture to it and it works fine?

Maybe one day we could have a short show and tell .... you "show" and "tell" me what to do ;) ? I would like to see minimal steps to do some of the basic mods to vehicles AND place them in a map using the factories ..... will be a long time before i could even look at the "Mechs" :)

Thanks,
ima

Re: OLD Players

Posted: Sun Nov 14, 2021 8:32 pm
by captainsnarf
When I look in the Starbolt code I see these in defaultproperties

Code: Select all

defaultproperties
{
     RedSkin=Shader'Starbolt_Tex.Starbolt.ShieldBodyRed'
     BlueSkin=Shader'Starbolt_Tex.Starbolt.ShieldBodyBlue'

Do those not work for you?

Re: OLD Players

Posted: Sun Nov 14, 2021 11:42 pm
by pooty
place them in a map using the factories ....
You don't really need a specific factory unless its a randomizer map then you need ForcedVehicleFactory (all others get replaced).

Just change the vehicle class name. Only downside is the map will pull in/depend on the original factory..which most are stock ones anyway.
99% of the time, on a quickmap edit I just change class name / spawn times.

Re: OLD Players

Posted: Mon Nov 15, 2021 7:33 am
by captainsnarf
All my mods have some kind of mutator in them, just for testing.

assuming your package is 'MyMod' and class is 'MyRaptor':

Code: Select all

class MutMyRaptorInsteadOfRaptor extends Mutator;

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
    local SVehicleFactory factory;
    factory = SVehicleFactory(Other);
    if (factory != None && factory.VehicleClass != None)
    {
        if(factory.VehicleClass.Name == 'ONSAttackCraft')
        {
            SVehicleFactory(Other).VehicleClass = class'MyMod.MyRaptor';
        }
    }
	
    return true;
}

defaultproperties
{
     bAddToServerPackages=True
     FriendlyName="My Raptor"
     Description="replaces regular raptor with MyRaptor"
}
This way I can try it out without needing to edit a level or anything.

Re: OLD Players

Posted: Tue Nov 16, 2021 2:23 am
by ItsMeAgain
Thanks Snarf, that mutator works well. Pooty, i figured out what i was doing wrong. While trying everything, i had left a dummy Starbolt_Tex.utx in my package folder under a folder name ___Textures ... apparently it still copies this over the good utx. It is working now with the skin names you provided. I did not get those names in defaultproperties after batchexport maybe there is an order i have to do to extract these. I have been manually finding copying from cache and renaming then doing a batchexport. I'm sure there may be simpler way.
Ex:
E792F4BB488255FF83AF458391E96C5A-1=StarboltV2Omni.u
EAA426D64A8A0BA731E2B8AA7892FF02-1=Starbolt_Tex.utx

Anyway here is the start of my new flyer :

How do you create a new Shader ? Just in unrealed?

Re: OLD Players

Posted: Tue Nov 16, 2021 8:44 am
by pooty
Did you batch export the textures?
You can either reference the file via main textures directory, or embed it in the .u file. I prefer the former, its IMO easier to find/reuse but more files to manage.
If its in the .u file then there's ucc batchexport vehicle.u Textures tga /directory

You might want to change that texture a bit, it looks pretty similar to the starbolt, just make sure its different enough. People still complain about Flare Raptor (and even the new Wraiths vs. Dragons -- the colors are pretty different but still..)

Re: OLD Players

Posted: Tue Nov 16, 2021 11:27 pm
by captainsnarf
ItsMeAgain wrote: Tue Nov 16, 2021 2:23 am How do you create a new Shader ? Just in unrealed?
Yeah, it's in unrealed.

Open the Texture browser, then do File -> New. Type a new package name for your new texture package, e.g. MyMod_Tex, optional 'group' value (I usually leave blank), and required name field e.g. 'MyShader'. In the properties pane there is MaterialClass dropdown. The default is class'Engine.Shader'. Since you want to create a shader you can leave this as-is and click the new button. This will create a new shader. When you click File -> Save, you'll be given a file save dialog to save the new MyMod_Tex.utx file with your new shader in it.

Shiny materials like starbolt are done by setting up a cubemap in the specular channel.

Re: OLD Players

Posted: Thu Nov 18, 2021 6:08 pm
by ItsMeAgain
Thanks CS,
That is exactly what i needed. Now im investigating how to get rid of the windshield texture override.

Re: OLD Players

Posted: Thu Nov 18, 2021 6:16 pm
by ItsMeAgain
I got it, it was in the animations ... moving on to functionality. Going to attempt a Link Flyer. Seems we are missing this, except for the wraith.