Some questions from a beginner.

Discuss Certain Aspects of Mapping, Modeling, and Coding.
Post Reply
Insano-Man
Pixel
Posts: 2
Joined: Sun Apr 26, 2009 4:25 am
Location: Avalon, California
Contact:

Some questions from a beginner.

Post by Insano-Man »

First, since I'm new and all, I'll start up with a minor introduction.
I won't lie. I downloaded the mod only a few minutes ago. I've probably come in with my head in the clouds, but I do know how to deal with text editor coding. I've played Garry's Mod for nearly two years now and poked about in its LUA coding. Most of what I've done is copying and pasting code to make things work, but I understand the general concepts of such simple coding and would like to think I'd be able to fit in with OC's coding from what I've seen so far.

Now, here are my questions.
Firstly, I'm trying to make a custom game mode. Quite an undertaking for my first venture, but I wouldn't be here if I didn't have that in mind.
What I'm trying to do is make it so that you can't pick up dropped weapons (Besides those that are critically necessary, of course), as well as certain players having certain weapons. Essentially, I'm just trying to restrict weapons and make it so that there are different classes of players.
I'm doing this primarily for myself and a friend of mine. It doesn't need to be flashy or fancy, just needs to work the way we want it.

Secondly, something a little easier, I'd expect, is that I want to make weapons for these classes. Nothing really new, just trying to get some custom CS weapons in the HL2 campaign. After poking around in the code, I think I won't even need help here, but I'm putting this out there just in case I ever do need help.
Edit: Ok, it doesn't look like it's as simple as the first impression made it seem. I can see no damage values in the weapon script files, so I must be looking in the wrong place. Someone's going to need to point me to the right files.

Third, I want to have the aforementioned custom weapons spawn at particular points. For instance, Class A's pistol spawns at the first time the player gets a pistol. Class B's pistol spawns when you get an SMG. Class A's primary weapon spawns when you get a...well, you get the picture.
I'm assuming that I'm going to need the mapadd program for this, so, thankfully, I've already downloaded it.

So, where do I need to start on the game mode? I'd like to get that out of the way so I can get my weapons and their spawns sorted out.
Last edited by Insano-Man on Sun Apr 26, 2009 8:20 am, edited 1 time in total.
Nevermind me. I just dropped my hammer in here.
shiftey
npc_combinegunship
npc_combinegunship
Posts: 705
Joined: Thu Oct 09, 2008 4:45 pm
Contact:

Post by shiftey »

I'm not sure about anything else, but I believe custom ammunition scripts contain the answer for changing weapon damages.

Thank you for making an intelligent post, btw. It's nice to see somebody with a brain posting here.
Insano-Man
Pixel
Posts: 2
Joined: Sun Apr 26, 2009 4:25 am
Location: Avalon, California
Contact:

Post by Insano-Man »

I've found the readme on making new ammo types, but I've still a few questions...
Would it be at all possible to make it so that existing ammo items give a custom ammo type?

Where do I store custom ammo scripts? Do I make a customammo folder inside the scripts folder or do I just toss them in the scripts folder?

And I'd also like to know what this section means:

Code: Select all

"grains"	"200" // 1 grain = 64.79891 milligrams
I'm thinking it could be the weight, but I've never seen Source weight values listed as milligrams. Plus, non-item ammo having weight is just a little odd to me.

Also, back on the primary topic of weapon scripting, I'm not very familiar with the term "lerp". I'm not really familiar with any coding language, for that matter. I just apply common sense and investigation to get what I need.
The reason I ask is because I'm looking at this section:

Code: Select all

"FireCone1"	"2" // Starting Value ( 0-20 )
"FireConeLerp1"	"1" // Bool
"FireConeLerpto1"	"5" // Value to lerp accuracy too ( 0-20 )
I know what a fire cone is. However, I'm unsure as to what this is.
I'd assume that FireConeLerp1 says whether or not the weapon has different accuracy on the move, where FireConeLerpto1 is that accuracy value. Since I need to get to sleep pretty soon, I thought I'd ask and check back when I wake up.

Thanks for pointing me in the right direction. I had a hunch about ammo damage and you confirmed it.
Nevermind me. I just dropped my hammer in here.
User avatar
Makrontt le nécron
npc_citizen
npc_citizen
Posts: 198
Joined: Wed Aug 27, 2008 2:01 pm
Location: France

Post by Makrontt le nécron »

You need to put the custom ammo in your map mapadd. About the grains I don't really know.
And for this "lerp", it's easy it's the recoil. If FireConeLerp1 is 1, when firing fast, your weapons accuracy will change to the value of FireConeLerpto1.

I agree with shiftey, it's good to see new people who don't spam with 10-words post.
I'm back baby!
Image
Post Reply