Where are units made?

For code related discussions and questions
Post Reply
jh0242
Rookie
Rookie
Posts: 18
Joined: 18 Apr 2013, 15:41

Where are units made?

Post by jh0242 »

I am going to be creating a new dynamic difficulty for the game and I need to know where all units are made, such as when you make a unit from the factory or a cyborg from the cyborg factory. It would be even more helpful if someone could tell me exactly where these are made when the player clicks to create the unit (what cpp file and any other file) and all files associated with holding the stats used for creation of these units. Thank you ahead of time for your input.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Where are units made?

Post by aubergine »

"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
jh0242
Rookie
Rookie
Posts: 18
Joined: 18 Apr 2013, 15:41

Re: Where are units made?

Post by jh0242 »

I was asking more along the lines of which file in the source folder. Which file creates an instance of a cyborg/tank/etc.?
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: Where are units made?

Post by vexed »

That is spread out over many files, covering lots of code, so there is no simple way to say line X in file Y is what your looking for.

You need to narrow down what you want greatly.
Trying to do dynamic difficulty ? What exactly do you mean by this, just the units get more hitpoints, or stronger weapons, or what ?
If you want to play with the AI, then check out the javascript stuff and make your own AI.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
jh0242
Rookie
Rookie
Posts: 18
Joined: 18 Apr 2013, 15:41

Re: Where are units made?

Post by jh0242 »

I understand that there are many classes(.cpp, .h) using many files (.slo, .vlo, .ini, etc.), but I am trying to figure out where the instance of even just one of the cyborgs or tanks are made. cpp is object oriented programming, so it would make sense, to me, that an cyborg would be made with a class that holds a general instance of that unit and upon declaration, the specific variables would be assigned based on the parameters and their corresponding files. So I am asking which .cpp file/s, classes, and .h file/s create an instance of these units. It would make sense to me that the creation of a unit (object) is held in one .cpp file and its corresponding .h file for declarations. If I am mistaken, then maybe you could explain to me how the general structure is set up. "Teach a man to fish..." The dynamic difficulty that I intend to implement will modify the ai's damage/accuracy, along with future generation units, to match that of the player's. This will be evaluated using an algorithm after collecting data over specific time intervals of play time. The point is to use the existing ai and modify it to match the player's skill level. More in depth adjustment strategies can be made using this mod, but for now I want to set up the structure of it, connecting to the actual game code at only one point (not certain at which point yet). I do intend on making my own files and scripts eventually. Any information is greatly appreciated and taking the time to explain things that I may have misconceptions about is even more so appreciated. my email is [email protected] if you would like converse that way.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Where are units made?

Post by cybersphinx »

jh0242 wrote:cpp is object oriented programming
Warzone started out as C though, most of our .cpp files still contain the old C code.
We want information... information... information.
Post Reply