Several little modding annoyances

Got problems with your models? Struggling with textures? Get help with your custom assets.

Several little modding annoyances

Postby Gambini on Fri May 20, 2011 3:40 am

Hi to all. I´ve been working on a mod since... forever. And I have came to the point where all those little things I left pass because i didn´t know how to solve must be either solved or scraped. Here´s a little list of things I wasn´t smart enough to solve by my own, or didn´t find the proper tutorial to learn to do them:

I have a scene where the player has to drive a crane from a static point. It is the kind of crane that goes back and forth through a sort of railway in the roof of a warehouse. Well, the crane displacement can be achieved using a tracktrain but the problem is that the traincontrols must be placed above the tracktrain brush or it wont work.

What would be required to make a traincontrols that works outside the tracktrain? I don´t want a complex I/O system that doesn´t allow precise control. The puzzle requires the player to move the crane freely (Like in SIN episodes: Emergence). Is there any vehicle script i could use? Should I put my hands in the game´s code? Is there any coder down to do that if he likes the project?

About tracktrains, a simpler thing: I´d like to have that HUD thingy that would show the train´s accelerator/brake lever position. Is it enough for this thing showing up if I put the vmt/vtf files in the right folder? Where?

Another thing even harder I presume: I want a strider to walk around a very complex building. It is possible to use node_paths or other entities to tell the NPC where it should put its foot? I mean, 1st right foot, 1st left foot, 2nd right foot and etc.

The last thing: I´d like my player to pick up things but hold them at the leftmost bottom side of the screen (instead of the center) so he still can hold the pistol (but not reload it until he drops the object).

These are all complex stuff and I don´t even know where to start. I could use some help either by somebody showing me the way or giving me templates from other mods that i could tinker around until getting the desired result.

I will be thankfull for any help and will give credit when the mod gets released.
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Several little modding annoyances

Postby crazycarl on Fri May 20, 2011 6:01 am

For the crane I'd use a game_ui entity. You can capture the player's keypresses and do what you want with your train. However I didn't think the func_traincontrols actually needs to be near the train.

To put something on the screen try env_screenoverlay.

Striders are more like flying NPCs and their feet just land wherever they land. So the only way to control the legs would be with a scripted_sequence.

To hold something while using a weapon, you'd have to code it in.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: Several little modding annoyances

Postby Jordash on Fri May 20, 2011 7:56 am

Does the crane need to move in two or four directions? Eitherway, as carl said, the game_ui entity would be the more precise, you could have lever system like in forget about freeman in HL1, but that can be clumsy.

The holding thing will be hard, you'll definitely need code. Is it one object or is it meant to work for all objects picked up? and remember the SMG uses two hands the whole time. If you have any model hacking experience you could even make it a portal style potatos pickup and the player could reload that way.
User avatar
Jordash
Been Here A While
Been Here A While
 
Joined: Mon Sep 21, 2009 10:36 am
Location: Perth, Australia

Re: Several little modding annoyances

Postby Gambini on Sat May 21, 2011 3:17 am

First of all thanks for your answers. So this game_ui entity will make the player able to control the tracktrain when he´s activating it? That would make the lever hud unnecesary since i can make a lever model that is moved along the tracktrain, so it looks like the player is operating it. Is there any map/mod where this thing is put in practice? the documentation in the VDC seems quite scant.

And about holding props, i understand that would require to modify the game´s code. In that case, i´m fine if i can merely make these carried objects be at a different screen position. Does that make things easier?
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Several little modding annoyances

Postby Jordash on Sat May 21, 2011 4:24 am

those CSS maps with vehicles use game_ui, have a look at one of those.
User avatar
Jordash
Been Here A While
Been Here A While
 
Joined: Mon Sep 21, 2009 10:36 am
Location: Perth, Australia

Re: Several little modding annoyances

Postby crazycarl on Sat May 21, 2011 10:02 pm

The HL2 level where you use the crane to pick up your jeep also uses game_ui.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: Several little modding annoyances

Postby Gambini on Sun May 22, 2011 2:20 pm

Great, because i dont own CSS. Still there´s something that bugs me: that crane has a script in the vehicles folder. Whatever, im gonna look into it!
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Several little modding annoyances

Postby Jordash on Mon May 23, 2011 2:28 am

Not official CSS maps, custom ones.

Something like this http://www.gamebanana.com/maps/75587
User avatar
Jordash
Been Here A While
Been Here A While
 
Joined: Mon Sep 21, 2009 10:36 am
Location: Perth, Australia

Re: Several little modding annoyances

Postby Gambini on Tue May 24, 2011 12:15 am

Thanks! Downloaded, decompiled and looking into it already! I could not find the crane map in hl2, I don´t recall where it was. There´s a map where a woman puts your buggy on the road but she´s driving the crane.

The game_ui being used in that buses-from-hell map uses a very complex I/O system that i´ll need a while to figure out. In the meanwhile here´s another thing: How are named and where are located the vmt/vmf files to replace my weapon icons in the game? I put a few new weapons but when i select them the game still shows the original weapons icon.
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Several little modding annoyances

Postby Jordash on Tue May 24, 2011 3:00 am

That is done in the weapon_#####.txt files. Usually it is a character from the halflife2 font, which is outlines of guns. if you want it to be a vmt have something like this:

Code: Select all
      "weapon"
      {
         "file"      "VGUI\hud\weapons\357"
         "x"         "0"
         "y"         "0"
         "width"      "240"
         "height"   "64"
      }
      "weapon_s"
      {
         "file"      "VGUI\hud\weapons\357_s"
         "x"         "0"
         "y"         "0"
         "width"      "240"
         "height"   "64"
      }
User avatar
Jordash
Been Here A While
Been Here A While
 
Joined: Mon Sep 21, 2009 10:36 am
Location: Perth, Australia

Re: Several little modding annoyances

Postby Gambini on Sun May 29, 2011 7:29 pm

Thanks Jordash. I found the font file but I´m not ready to edit it yet, i thought it was an easier change.

Now i have three new problems. Drawbacks aside the mod is shaping up very well.

1- I have an outdoor map with quite a lot of displacement brushes but for some strange reason medium sized static models refuse to cast any shadows on them. Big things like buildings or trees cast a regular shadow but, for example, light poles do not.
I know these models have a proper collision mesh because i made them. I read somewhere that large displacements are bound to casue troubles with lightmaps. So I remade the whole terrain out of displacement brushes with an average size of 256x256. The problem persists. Tried with different lightmap scales too. And yes the models are set to cast shadows.

2- Sometimes before I´m off to bed, I leave the compter doing a super compile of my maps (since that´s likely going to take an hour or two). I use these parameters in the vrad line: -both -staticproplighting -staticproppolys -textureshadows -final. However when I wake up lying in the floor with the mouth dry and smelling like a horse, and check the map in-game, seems like the -textureshadow command line is not doing its work propertly. Isn´t it supposed to cast shadows using the alpha channel of translucent textures instead of the brush? The problem happens either with models or brushes. For example the trees cast a dense shadow of the big square where the little branches with leaves are. Do I have to add any parameter in the vmt of these materials? or what?

3- The easier one (I presume). I made an overhead crane controlled by a game_ui, following your suggestions. I want a hook hanging from it. But all the phys_xx entities seem to be made for static hanging points. I put a move_rope child of the hook and another child of the crane. I linked them and tried with phys_constraint, phys_ballsocket, phys_lenghtconstraint and phys_constraintsytem. No one of them seemed to understand what i want. The wire from where the hook is tied should not change its lenght, but the hook should swing accorindg the crane´s movement.

Any help will be appreciated.
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Several little modding annoyances

Postby Jordash on Mon May 30, 2011 12:44 am

1. Have a look at the lightmap scale on the displacements, it's true that big disaplcements can't handle small light maps, and change automatically, you may have accidentally copied this texture parameter to the new displacements.

2. texture shadows ONLY work on static props, plus any you include must be listed in lights.rad like so:
Code: Select all
forcetextureshadow models/props_c17/fence01a.mdl


Texture shadows have no effect on brushes.

3. length constraint seems to be what you want, move rope is only the effect so doesn't really do anything. sourcesdk_content\hl2\mapsrc\sdk_phys_lengthconstraint.vmf is the example map, maybe you should have a look
User avatar
Jordash
Been Here A While
Been Here A While
 
Joined: Mon Sep 21, 2009 10:36 am
Location: Perth, Australia

Re: Several little modding annoyances

Postby Gambini on Mon May 30, 2011 1:58 am

Thanks for your help, i really appreciate it. :)

1. The lightmaps are fine. It´s globaly set to 16 on all displacements, have tried with 8 too in the ones where the shadows should be more focused, but no luck.

2. Right! I dont understand how i forgot that! when i went to open the lights.rad file I saw my own models being listed there (so it was me or me who did it :P ) I updated the list with the current problematic models, hope that is it.

3. That´s correct but the constraint is fix to a static origin point. And what i want is to parent this entity to the crane, which is moving.
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Several little modding annoyances

Postby crazycarl on Mon May 30, 2011 11:56 pm

You can constrain any two things together with a length constraint, even if they move. One or both have to be physics entities for it to work, though.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: Several little modding annoyances

Postby Gambini on Tue May 31, 2011 12:09 am

I know but what phys_ controller should be used? The best i could do was with a lenghtconstraint i think, but the hook was shaking crazy all the time even with a constraintsystemmanager.
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users