Page 1 of 1
Where are units made?
Posted: 22 Apr 2013, 18:52
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.
Re: Where are units made?
Posted: 23 Apr 2013, 03:41
by aubergine
Re: Where are units made?
Posted: 29 Apr 2013, 02:44
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.?
Re: Where are units made?
Posted: 30 Apr 2013, 04:17
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.
Re: Where are units made?
Posted: 01 May 2013, 20:09
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.
Re: Where are units made?
Posted: 01 May 2013, 21:15
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.