Forum Thread
  Posts  
Learning to mod once you know C++ (Forums : Coding & Scripting : Learning to mod once you know C++) Locked
Thread Options
May 30 2005 Anchor

Even if someone knows c++, how do they learn what does what in a certain game SDK? Do they just learn the cvars and console commands? How do modders know what does what?

For example, if someone is a programmer and knows C++, how does he mod a game like Half Life 2? How does he know what certain commands will modify what?

I still don't know if i'm making sense....

May 30 2005 Anchor

Mainly by intuition. Nothing special.

May 30 2005 Anchor

I doubt it. That's saying that if I know c++, then by nature I can just modify a gun so that it shoots toilets or something really crazy.

May 30 2005 Anchor

You have to look at the code and try to understand what it does first. Then apply changes or write new code.

--

/ ZaphodiLe

May 30 2005 Anchor

obviously. im asking how they know what to change or make?

TheBladeRoden
TheBladeRoden Dark Cry Lead Developer
May 30 2005 Anchor

The magic of guesswork

--

BANNED - kthxbye. (Cheapalert)

May 30 2005 Anchor

are you guy's even coders? if what you guys are saying is true, then that means that every mod that has ever been created has been made by guessing....

Mauvebib
Mauvebib Swallow My Pride
May 30 2005 Anchor

It's pretty simple really. Once you know c++, you study the code. You'll get an idea of what does what from function name, parameters etc, and since you know the language you'll be able to work through it and see what it does. Then you try to make some small modifications to it, one by one, just to get the hang of it. The more you do this the more you get to know your way around the code, and you'll find yourself able to make the modifications you desire.

The most important thing is to be able to understand the existing code and what it does. Once you've got that far you'll be able to change it how you like.

--

Defeat in Detail 2 - Standalone RTS Game
Planetquake.com
Moddb.com

May 30 2005 Anchor

I dont know C++, but im assuming its OOP. So all the parts of the code would be logicly written(I would Hope). Say if your adding a gun, you would find a part of the code which seems to apply to a weapon from the game, due to names and things like damage properties, velocity and that stuff. Cahnge it a bit and test run it. If it has changes the weapon then you know you have it. Trial and error till you understand what the code does. At leastt hats how I learned lingo and action script, lot of changing code and testing it.

--

User Posted Image

Mauvebib
Mauvebib Swallow My Pride
May 30 2005 Anchor

yep, that's how it's done. You don't leap straight in to trying to program a big mod, you mess about to get to know your way around the code.

--

Defeat in Detail 2 - Standalone RTS Game
Planetquake.com
Moddb.com

usernamee
usernamee untitled
May 31 2005 Anchor

Chunky.The.Tree wrote: I doubt it. That's saying that if I know c++, then by nature I can just modify a gun so that it shoots toilets or something really crazy.


Hah... actually that was one of the first things I did when I got my hands on the Source SDK. Instead of pellets the shot gun spawned a tire on every shot. Never got to launching it out... and then I just lost interest.

Bu uh, yah. It really is just looking at the code, trying to figure out how certain things work. And then there are tutorials to read.

a_llama
a_llama Teh moddb llama
Jun 2 2005 Anchor

Modifying a gun so it fires toilets isn't a hard thing to do :P

A good idea is to think about the simplest feature that you want to implement (making a simple weapon modification is a good example). The peice of code you need change should be easy enough to find, just use your brain :p. Have a look at the code and pick out the key parts that apply to you. If for example you wanted the shotgun to fire explosive shells, you could look at the code of an explosive weapon to get an idea of how it's done.

ImTheDarkcyde
ImTheDarkcyde ¯\(º_o)/¯
Jun 2 2005 Anchor
lhavelund
lhavelund Ninjas! Ninjas I tells ya!
Jun 4 2005 Anchor

Personally I don't code (nor know C++ or any other languages 'cept basic HTML ;)), nor do I have the wish to learn it, but I hereby refer you to The Battlegrounds, as they it is an Open-Source mod for Half-Life 1.
Furthermore, the mod has 'evolved' the HL engine with advanced particle systems and much more.
Go ahead, try it.. And good luck on learning to code a mod!

--

User Posted Image

Jun 4 2005 Anchor

Can you explain more about it being open-source? I don't really understand what someone means when they say that...

Mauvebib
Mauvebib Swallow My Pride
Jun 4 2005 Anchor

Open-Source means the source code is released along with the mod, so you can check the code yourself and see how it's done, and make your own modified versions of it.

Open Source - The Source is Open

--

Defeat in Detail 2 - Standalone RTS Game
Planetquake.com
Moddb.com

Jun 4 2005 Anchor

thanks

Jun 4 2005 Anchor

you usually have to release your own code too, just fyi.

Jun 4 2005 Anchor

duckedtapedemon wrote: you usually have to release your own code too, just fyi.

what do you mean?

ImTheDarkcyde
ImTheDarkcyde ¯\(º_o)/¯
Jun 4 2005 Anchor

it means that when you steal (not really 'steal' but take) some open source code and modify it, it is common practice to release your modifications to the code in an open source format as well

Mauvebib
Mauvebib Swallow My Pride
Jun 4 2005 Anchor

some Open Source licences such as the GPL insist that any modifications you make are also mode open source under the GPL. Basically it means you can do anything with it, but you have to let people use your final code for whatever they want too.

--

Defeat in Detail 2 - Standalone RTS Game
Planetquake.com
Moddb.com

Jun 4 2005 Anchor

oh. that kinda sucks. what about something like zdoom? i dont know any of these rules :S

Mauvebib
Mauvebib Swallow My Pride
Jun 4 2005 Anchor

It doesn't suck, it's the ethos of Open Source programming. In return for being allowed to use other people's code, you must let other people use yours. It's very fair. The Quake and Quake 2 engines for example are both released under the GPL.

--

Defeat in Detail 2 - Standalone RTS Game
Planetquake.com
Moddb.com

Jun 4 2005 Anchor

I never said it wasnt fair. Doesnt matter. Thanks for the answers everyone....

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.