Tips & suggestions needed (I think it's Complicated & HARD)

Grab your favourite IDE and tinker with the innards of game engines

Tips & suggestions needed (I think it's Complicated & HARD)

Postby anubis233 on Sat Jun 19, 2010 4:20 am

Hi, Lopers!

I've been here for researches for a while and I did a lot of researches on other sources. I'm a 100% true noob to any particular part of the procedures of making a mod. Before I was pretty much busy with tons of school work and now I finally have some time to spend for myself.

And before you read the things below, just to let you know that I haven't really start building my mod YET, so everything is still in the sky :roll: And I haven't really been making the related 3D models and animations yet, but let's just assume all those modeling and animating part will be done. I'll probably be updating this thread anytime I felt to insert more ideas or needs for suggestions, since I know this (actually "these" ) are multiple tasks that will and should be done separately but since I know there are always different ways of finishing a task and I really want to make sure that my idea for this particular combination is possible to work out. And, I only know a tiny bit of C++ :oops:

So...uhhhh.....I REALLY want to try making a weapon attachment and accessories system (like those dot sights, scopes, laser sights, and if possible, silencers/suppressors and even grenade launchers and masterkey shotgun)

FIRST, I don't know if there is any possibility to let the code make the attachments attach to both the view model and the world model? (of course, for different weapons, options of attachments would be a bit different, and they should be attached on different coordinates when applying onto different weapons.)

SECOND (well of course) there will be iron sights implementing (or let's say integrating) with it, so here comes another problem. After the player make his choice in the buy menu in the game (I think that's a VGUI problem or something), let's say for the same weapon the M4A1 assault rifle, if you attach different scopes or sights, ironsighting would be different, right? (at least in terms of the coordinate that will be used in the iron sight code, correct me if I'm wrong) And here I believe using the 3D scope in the model directly instead of dynamic scope should be easier for the Source Engine to handle. (Also plz correct me if I'm wrong). SO, is that possible for the Source Engine? (I think technically its like an "if" structure checking what scope you have on what weapon you have, and then there are tons of cases, the code then matches the the right situation and then tells where the coordinate of ironsighting should be in this case, but I wonder if that's gonna take a lot of resources from the computer and make it laggy)

THIRD, attaching grenade launchers and/or masterkey shotguns means that the weapon will have different fire outputs, and of course carrying two different types of ammo. Yes, I know the default SMG has this beautiful feature but I really want to AT LEAST insert some kind of animation in there, so that at least through the view model (and if possible, hopefully also the world view) you can clearly tell that you (the character) are operating the the attached weapon (like you are holding the trigger of the grenade launcher), and also a specific fire animation and a reload animation for that attachment when attached to that specific weapon. And here I think probably I should just make those animations, but how should it exist or done in the code part? I know it already sounds like "two different weapons" (and that's one of my ideas I'm thinking about), but is it possible to force two weapons to be picked up and/or dropped together (yeah, like a "pack")? (with that being said, in the GUI or something on the screen it should display 2 tga pictures instead of only one, just like all other situations when you have two weapons in one category) (And I guess it maybe is pretty hard to really have that much stuff in one single weapon, so maybe I should really make them into "technically" two weapons "packed" together...?)

FOURTH, attaching silencer/suppressors means that the fire sound should also be changed. (Here we assume that the procedure of "adding a silencer" is just done by player choosing the attachments in the buy menu rather than a real animation like the USP pistol and M4A1 in Counter Strike Source) And how should that be done? Using an "if" structure in the code and tell it to use a different fire wav file when the suppressor is "on" (probably a bool type variable)?

Anyway I know it's kinda wordy and sorry for my poor English and also really noob in modding.

Thanks a lot in advance! any suggestions and/or tips will help!

EDIT: This might not help but just in case you need to know, I'm planning to use this on a Source Engine 2007 based multiplayer mod.
anubis233
Dumpling
Dumpling
 
Joined: Fri Jun 18, 2010 7:19 pm

Re: Tips & suggestions needed (I think it's Complicated & HA

Postby zombie@computer on Sat Jun 19, 2010 5:32 pm

before we begin. Can you code a new weapon? If not, theres no point explaining anything here and you should first get that basic stuff working, then come back
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Tips & suggestions needed (I think it's Complicated & HA

Postby Jordash on Sun Jun 20, 2010 6:10 am

http://developer.valvesoftware.com/wiki ... Ironsights this will start you off on ironsights.

the rest of your plan seems doable, but you will need to learn C++ to pull a lot of it off
User avatar
Jordash
Been Here A While
Been Here A While
 
Joined: Mon Sep 21, 2009 10:36 am
Location: Perth, Australia

Re: Tips & suggestions needed (I think it's Complicated & HA

Postby anubis233 on Sun Jun 20, 2010 8:37 pm

Jordash wrote:http://developer.valvesoftware.com/wiki/Adding_Ironsights this will start you off on ironsights.

the rest of your plan seems doable, but you will need to learn C++ to pull a lot of it off


Thanks Jordash! I'm not really the coder in team but instead the producer and the 3D artist, but the coder in the team isn't really good at communicating using English so I decided to come up here and help her ask :D
She's kinda ok with C++ but not really familiar with the Source Engine, especially because there are a lot of things uncommented in the source code, making things a bit confusing sometimes. Personally speaking I had some C++ experience but it was too basic and too far away from being able to take any game dev coding.
Anyway I'll give it a try myself and see what I can dig out of it, thanks!

P.S: I actually saw the Jorg40's code and Z33y's code before I post the thread here but I saw a bunch of people complaining about the fact that they are getting a lot of 'undeclared identifier' error for the Z33y's code, which has more functionality and is a newer solution to ironsighting. Since I just start off based on the HL2DM source code based on the EP2 engine is there a quick way of getting rid of those 'undeclared identifier' errors? (I assume they are because Z33y had something on his own or because the files referenced were for HL2 singleplayer code files...) I'll give it some try probably this week and come back if I have further questions, though I think I already have 33 warnings and no errors after start off compiling using the VS2008. I don't know if that's too much of warnings though....
anubis233
Dumpling
Dumpling
 
Joined: Fri Jun 18, 2010 7:19 pm

Re: Tips & suggestions needed (I think it's Complicated & HA

Postby gladers on Sun Jun 20, 2010 9:03 pm

Ironsights is one of the harder tutorials to follow.


Image
Piccy of rediculour gansta ironsights for a laugh.

This code gets rid of the undeclared RecvProxy_ToggleSights

#if defined( CLIENT_DLL )
void RecvProxy_ToggleSights( const CRecvProxyData *pData, void *pStruct, void *pOut );
#endif

Add it above the BEGIN_NETWORK_TABLE(CBaseCombatWeapon, DT_BaseCombatWeapon) in basecombatweapon_shared.cpp
gladers
Member
Member
 
Joined: Sat Feb 27, 2010 2:53 pm

Re: Tips & suggestions needed (I think it's Complicated & HA

Postby city14 on Sun Jun 20, 2010 9:20 pm

Funnily enough I am trying to do that tutorial right now...

Thanks for that fix, gladers!

I have 3 errors still, which makes me sad, in the CCToggleIronSights void I am getting 3 errors:

Code: Select all
error C2653: 'C_BasePlayer' : is not a class or namespace name
error C3861: 'GetLocalPlayer': identifier not found
error C2039: 'ServerCmd' : is not a member of 'IVEngineServer'


I put it inside basecombatweapon_shared.cpp
coder0xff wrote:I wonder if Gabe ever lies in bed at night, thinking about all the fat jokes, and just cries himself to sleep, wiping his tears away with one-thousand dollar bills.
User avatar
city14
Pheropod
Pheropod
 
Joined: Tue Jun 16, 2009 8:35 pm
Location: Troutdale, Oregon

Re: Tips & suggestions needed (I think it's Complicated & HA

Postby city14 on Sun Jun 20, 2010 9:23 pm

Oh wait, fixed it, I put #ifndef CLIENT_DLL not "if defined( CLIENT_DLL )"

My mistake
coder0xff wrote:I wonder if Gabe ever lies in bed at night, thinking about all the fat jokes, and just cries himself to sleep, wiping his tears away with one-thousand dollar bills.
User avatar
city14
Pheropod
Pheropod
 
Joined: Tue Jun 16, 2009 8:35 pm
Location: Troutdale, Oregon

Re: Tips & suggestions needed (I think it's Complicated & HA

Postby anubis233 on Tue Jul 13, 2010 1:42 pm

Sorry for the long waiting but we finally got things started on schedule,

Thanks guys for the replies! I'm sure it's extremely helpful!
anubis233
Dumpling
Dumpling
 
Joined: Fri Jun 18, 2010 7:19 pm

Re: Tips & suggestions needed (I think it's Complicated & HA

Postby Major Banter on Tue Jul 13, 2010 1:45 pm

In terms of attachments, the man to ask is JLea.

He's leader of Ivan's Secrets, and that uses a multi-scope attachment system.
ImageImageImage
Major Banter
Veteran
Veteran
 
Joined: Tue Apr 01, 2008 10:52 pm
Location: UK

Re: Tips & suggestions needed (I think it's Complicated & HA

Postby JLea on Fri Jul 16, 2010 10:40 am



like this
User avatar
JLea
May Contain Skills
May Contain Skills
 
Joined: Mon Jan 02, 2006 1:19 pm
Location: Melbourne, Australia

Re: Tips & suggestions needed (I think it's Complicated & HA

Postby ErikKiller on Fri Jul 16, 2010 11:04 am

JLea your avatar is FUCKED up.
(Also, nice system)
Image
Image
First rodeo? Use the Source SDK Documentation for reference!
User avatar
ErikKiller
May Contain Skills
May Contain Skills
 
Joined: Sun Sep 09, 2007 4:05 pm
Location: Estonia

Re: Tips & suggestions needed (I think it's Complicated & HA

Postby Guessmyname on Fri Jul 16, 2010 12:53 pm

For the physical side of the attachments (ie models appearing on guns), you should probably use bodygroups. They're sets of submodels you can toggle around in code.
User avatar
Guessmyname
1337 p0st3r
1337 p0st3r
 
Joined: Sun Mar 27, 2005 10:38 pm

Return to Programming

Who is online

Users browsing this forum: No registered users

cron