AsteroidIGC.cpp

Questions / Announcements area for beta tests of Allegiance's future updates.
Post Reply
Andon
Posts: 5453
Joined: Sun Jun 03, 2007 8:29 pm
Location: Maryland, USA
Contact:

Post by Andon »

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)
Image
ImageImage
Adaven
Posts: 1959
Joined: Sat Oct 25, 2003 7:00 am
Location: Greater Ozarks

Post by Adaven »

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.
Last edited by Adaven on Sun Jan 18, 2009 7:58 am, edited 1 time in total.
Andon
Posts: 5453
Joined: Sun Jun 03, 2007 8:29 pm
Location: Maryland, USA
Contact:

Post by Andon »

Hrm... That would be a better use for this section of code. It requries the same knowledge, but it can be done.
Image
ImageImage
Imago
Posts: 1440
Joined: Tue Sep 23, 2003 7:00 am
Location: Minneapolis, MN
Contact:

Post by Imago »

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 :cool:
Image

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.
Post Reply