AsteroidIGC.cpp
Is there anyone here that can tell me what everything in asteroidIGC.cpp does, and what it interacts with? I'm looking to toy around with adding more techrocks, but every time I've tried to add 'only' one more, the server crashes at launch (I've only been copying what appear to be artwork names and changing the asteroid 'name' prefix)



Somewhat related, I assume one could change the number of models used for generic rocks? Right now there's only 2 models for all the generic rocks and the repetition is pretty noticeable. A 3rd one would freshen things up. I think there are unused models in the artwork folder, but I've been working on some new models/textures already.
Sorry to deflect your thread slightly Andon. I really wish I could help, but I've only had a week of programming classes so far.
Sorry to deflect your thread slightly Andon. I really wish I could help, but I've only had a week of programming classes so far.
Last edited by Adaven on Sun Jan 18, 2009 7:58 am, edited 1 time in total.
[img]http://www.freeallegiance.org/forums/st ... erator.gif" alt="IPB Image">
<img src="http://adaven6x7.googlepages.com/PKBanner3copy.png[/img]
<img src="http://adaven6x7.googlepages.com/PKBanner3copy.png[/img]
Adaven's would be WAY easier....
Asteroids use bit masks for abilities like build able, mine able and huge also "can have sup", ...tac, ...exp -- the majority of the code in the subject file are bit wise operations on the masks in arrays of asteroid types and definitions. Adding an additional "tech rock" would require messing with most of the functions that deal with "c_aabm" or (Constants) Asteroid Ability Bit Mask...
W/O even getting into all of that, just to have 3 models for generic rocks you have to adjust a pair of arrays and preload the cvh which is where Andon was probably crashing!
in subject file:
static const AsteroidTypeRow asteroidTypes[] =
{
{ "asteroid", "\0a", { 0.0f, 0, 0, 0, 25000, 400, "bgrnd03", "", "meteoricon" } },
{ "asteroid", "\0a", { 0.0f, 0, 0, 0, 25000, 400, "bgrnd05", "", "meteoricon" } },
{ "asteroid", "\0a", { 0.0f, 0, c_aabmBuildable, 0, 10000, 200, "bgrnd03", "", "meteoricon" } },
{ "asteroid", "\0a", { 0.0f, 0, c_aabmBuildable, 0, 10000, 200, "bgrnd05", "", "meteoricon" } },
{ "asteroid", "\0a", { 0.0f, 0, c_aabmBuildable, 0, 10000, 200, "mynewrock", "", "meteoricon" } }
{ "Helium 3", "He", { 1.0f, 1.0f, c_aabmMineHe3, 0, 25000, 100, "bgrnd56", "", "heliumrock" } },
{ "Uranium", "U", { 0.0f, 0, (c_aabmSpecial << 0), 0, 25000, 200, "bgrnd51", "", "hotrock" } },
{ "Silicon", "Si", { 0.0f, 0, (c_aabmSpecial << 1), 0, 25000, 200, "bgrnd52", "", "copperrock" } },
{ "Carbonaceous", "C", { 0.0f, 0, (c_aabmSpecial << 2), 0, 25000, 200, "bgrnd53", "", "carbonrock" } },
};
const int nNumGenericTypes = 2;
needs to be 3!
near bottom in GetRandomType() change
index = nFirstGenericType + randomInt(0, 1);
to
index = nFirstGenericType + randomInt(0, 2);
Lastly in CmissionIGC::Initialize add a:
ZVerify(HitTest::Load("mynewrock"));
you need mynewrockbmp.mdl mynewrock.cvh and mynewrock.mdl in artwork/ folder
Asteroids use bit masks for abilities like build able, mine able and huge also "can have sup", ...tac, ...exp -- the majority of the code in the subject file are bit wise operations on the masks in arrays of asteroid types and definitions. Adding an additional "tech rock" would require messing with most of the functions that deal with "c_aabm" or (Constants) Asteroid Ability Bit Mask...
W/O even getting into all of that, just to have 3 models for generic rocks you have to adjust a pair of arrays and preload the cvh which is where Andon was probably crashing!
in subject file:
static const AsteroidTypeRow asteroidTypes[] =
{
{ "asteroid", "\0a", { 0.0f, 0, 0, 0, 25000, 400, "bgrnd03", "", "meteoricon" } },
{ "asteroid", "\0a", { 0.0f, 0, 0, 0, 25000, 400, "bgrnd05", "", "meteoricon" } },
{ "asteroid", "\0a", { 0.0f, 0, c_aabmBuildable, 0, 10000, 200, "bgrnd03", "", "meteoricon" } },
{ "asteroid", "\0a", { 0.0f, 0, c_aabmBuildable, 0, 10000, 200, "bgrnd05", "", "meteoricon" } },
{ "asteroid", "\0a", { 0.0f, 0, c_aabmBuildable, 0, 10000, 200, "mynewrock", "", "meteoricon" } }
{ "Helium 3", "He", { 1.0f, 1.0f, c_aabmMineHe3, 0, 25000, 100, "bgrnd56", "", "heliumrock" } },
{ "Uranium", "U", { 0.0f, 0, (c_aabmSpecial << 0), 0, 25000, 200, "bgrnd51", "", "hotrock" } },
{ "Silicon", "Si", { 0.0f, 0, (c_aabmSpecial << 1), 0, 25000, 200, "bgrnd52", "", "copperrock" } },
{ "Carbonaceous", "C", { 0.0f, 0, (c_aabmSpecial << 2), 0, 25000, 200, "bgrnd53", "", "carbonrock" } },
};
const int nNumGenericTypes = 2;
needs to be 3!
near bottom in GetRandomType() change
index = nFirstGenericType + randomInt(0, 1);
to
index = nFirstGenericType + randomInt(0, 2);
Lastly in CmissionIGC::Initialize add a:
ZVerify(HitTest::Load("mynewrock"));
you need mynewrockbmp.mdl mynewrock.cvh and mynewrock.mdl in artwork/ folder

These bugs haven't been fixed yet because don't have any developers interested in fixing them up. --Tigereye
Imago's stupid-sensor is supersensitive. --RealPandemonium
The art is managing the flow of the drama to achieve the desired results. --Big_Beta_Tester
joeld wrote:But we’ve been amazed at the level to which some of the Allegiance fans have remained hard-core.