Creating duplicate env_steam entity Created 16 years ago2007-07-17 11:58:56 UTC by The Mad Carrot The Mad Carrot

Created 16 years ago2007-07-17 11:58:56 UTC by The Mad Carrot The Mad Carrot

Posted 16 years ago2007-07-17 11:58:56 UTC Post #229318
I need to duplicate the env_steam entity. The env_steam entity lacks the option of specifying a custom material. Its default material (particle/particle_smokegrenade and sprites/heatwave) are both hard coded in its source file (c_steamjet.cpp).
Screenshot: http://www.themightyatom.nl/screenshots/env_steam_materials.png

The only way to force an env_steam entity to use a different material, is to actually replace that material (particle_smokegrenade) with your own. Thats how i got a different exhaust flame for my SRB's (Thread).

The problem is that many more things in Source use that same material, like:
  • the smoke plume from RPG rockets
  • the smoke that appears when you shoot at walls
  • the smoke that appears when you launch an SMG grenade
  • and of course other env_steam entities for normal smoke
All these now have the flame material. Pain in the butt.

Now i would like to duplicate the env_steam entity, and rename it env_exhaustflame or something, just for the exhaust flame, while the original env_steam entity code stays unchanged, and i can use that for just normal smoke or jet streams.

However, creating a duplicate of this entitie is very hard for me. I lack C++, the project doesn't open in Visual C++ and compiling in Visual Studio 2005 always results in errors, even with no changes to the code.

So is there anyone out there, capable of creating a new entity (env_srb_exhaust) based off the original env_steam entity, with only one change: a different hard coded material (sts_121/exhaust_flame)?
Screenshot: http://www.themightyatom.nl/screenshots/env_steam_new_mat.png

I know this sounds tough, yet its very simple:
  • A duplicate of the env_steam entity.
  • Different entity name for use in the fgd (env_exhaust_flame)
  • Different hard coded material (sts_121/exhaust_flame)
So this:
http://www.themightyatom.nl/screenshots/env_steam_materials.png
becomes this:
http://www.themightyatom.nl/screenshots/env_steam_new_mat.png

Bah. If only Valve could add the option for the env_steam properties to specify a custom material, rather than just stick with its hard coded material, things would be so much easier. But noo...... :/

My whole Space Shuttle launch in Source mod depends on it!
The Mad Carrot The Mad CarrotMad Carrot
Posted 16 years ago2007-07-17 17:17:08 UTC Post #229366
I'd definately help if this was for HL1. Source coding's still out of my league. :(
Daubster DaubsterVault Dweller
Posted 16 years ago2007-07-17 17:18:07 UTC Post #229367
:(

So i guess its:
STS-121 Launch: delayed. :(
The Mad Carrot The Mad CarrotMad Carrot
Posted 16 years ago2007-07-18 06:51:27 UTC Post #229417
Houston we have a problem. :nervous:
Habboi HabboiSticky White Love Glue
Posted 16 years ago2007-07-18 06:57:21 UTC Post #229419
ZING!

Muzzymoo, there must be some other way to do it?
Madcow MadcowSpy zappin my udder
Posted 16 years ago2007-07-18 07:10:49 UTC Post #229421
I too wish Valve added the ability to change the material. Fortunately for us Ep2 uses a newer particle system so i'm hoping making custom flames and whatnot will become loads easier. Unfortunately for you, the SDK probably won't be updated to include it until about a year after Ep2 is released. Judging from the Ep1 SDK update anyway.
Strider StriderTuned to a dead channel.
Posted 16 years ago2007-07-18 07:15:07 UTC Post #229422
Well actually:
Mike Durand (guy in charge of SDK) said this in Valve coders list:

Hint about release:

Quote:
The post-Ep2 SDK will be released much sooner than the the post-Ep1 SDK was. I can't be more specific than that at this point, but it will be one of my top priorities once Ep2 goes gold.

New tools:

Quote:
The SDK release after Ep2 ships will contain updates to existing tools as well as some new tools that have made our lives easier. We have noticed that other studios have made some very nice tools and we will continue to improve ours. We'll talk more about the new tools and enhancements to existing ones when the post-Ep2 SDK ships.
So maybe if you wait for the update you can achieve this Mr Muzzle.
Habboi HabboiSticky White Love Glue
Posted 16 years ago2007-07-18 07:16:17 UTC Post #229423
Well that sure is good news.
Strider StriderTuned to a dead channel.
Posted 16 years ago2007-07-18 07:45:52 UTC Post #229425
Nice! But it doesn't say it'll include a updated env_steam entity with the choose a custom material property. I hope it does, though.
The Mad Carrot The Mad CarrotMad Carrot
Posted 16 years ago2007-07-18 07:49:35 UTC Post #229426
I believe someone at Valve did say that they wanted to give users a greater range of flexibility with the particle engine, so here's hoping!
Strider StriderTuned to a dead channel.
Posted 16 years ago2007-07-18 07:51:54 UTC Post #229427
^^
The Mad Carrot The Mad CarrotMad Carrot
Posted 16 years ago2007-07-18 07:55:45 UTC Post #229429
they did release the source code compatible with VS2005...are you using that one? i have VS2003 so i'll give it a shot! (note i havent touched the HL2 source code....do i just duplicate it and hit compile?)
Penguinboy PenguinboyHaha, I died again!
Posted 16 years ago2007-07-18 07:59:51 UTC Post #229430
they did release the source code compatible with VS2005...are you using that one?
I think so. Filename was something like vs2005_everything.sln. Still, even with no single changes made to the code, the compile fails and gives me errors.
Im using Visual Studio 2005 Team Edition, btw, not Express...
do i just duplicate it and hit compile?
Duplicating and compiling it straight away would'nt work, because there are duplicate functions (CSteamjet). It should be renamed. I don't know. C++ = crap.

But if you can get it to work, then awsome! You'll deserve credits. :)
The Mad Carrot The Mad CarrotMad Carrot
Posted 16 years ago2007-07-18 08:06:57 UTC Post #229433
alright, i havent installed VS03 since my last format but i will in the next few days :>
Penguinboy PenguinboyHaha, I died again!
Posted 16 years ago2007-07-18 08:09:41 UTC Post #229435
Actually, the sooner the better.
The Mad Carrot The Mad CarrotMad Carrot
Posted 16 years ago2007-07-18 08:52:18 UTC Post #229445
alright, i have it open. where am i looking?

edit: i have no idea what i'm doing D:

more edit: now i'm going to bed.
Penguinboy PenguinboyHaha, I died again!
Posted 16 years ago2007-07-18 10:40:04 UTC Post #229453
Search for the env_steam entity.

Source files are:

steamjet.cpp
steamjet.h
c_steamjet.cpp <-- this the file with the hardcoded materials.
The Mad Carrot The Mad CarrotMad Carrot
Posted 16 years ago2007-07-18 20:36:09 UTC Post #229516
you're gunna have to step me through this.
do i copy all those files and rename them? and change the materials......?
you mentioned renaming functions too...
you have the source files too, just open them up in notepad++ and see what needs to be changed. even better, make the changes and upload them ;)
i can import them into the project.

(my C++ skills are severly lacking)
Penguinboy PenguinboyHaha, I died again!
Posted 16 years ago2007-07-20 10:23:16 UTC Post #229660
Hmm, what about this:

Add in an option to browse for a custom material for env_steam entity itself, not its copy. Just take a look at a similar entity that does have the option for specifing a material/texture and copy that code to the env_steam code. That way you don't have to copy the entire env_steam code and changes all its variables and names. Would that be easier?
The Mad Carrot The Mad CarrotMad Carrot
You must be logged in to post a response.