Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: r0nin on July 25, 2002, 10:57:26 pm

Title: Would the sourec code project be interested...?
Post by: r0nin on July 25, 2002, 10:57:26 pm
I'm presently one of the coders for the Robotech FS2 Mod, and I've done quite a bit of modification for them.  I haven't checked with them yet, but I am curious as to whether the open source project might want some of our code.  Some of the innovations here might work out well for us (once again, I haven't asked the other fellas yet), so a unified set of Executables might help us as much as you guys.

So far, I have coded in several functions that allow one ship object to be replaced with any other ship on the ships.tbl.  These functions change the ship model, reset the physics, and maintain the former weapons, hitpoint, and ammunition stauts of the original ship.

As well, I have coded in new sexps to transform ships and new key commands to tranform from mode to mode as well as cycle through all available modes.  In addition, I've made some AI changes (so that AI ships will transform if capable under certain circumstances) and other small fixes/features.

Of course, I have coded in all of the necessary checks (can it transform? etc.) and settings to make the new system work.  As it now stands, my code is optimized for our mod's use (I have modified basic functions and flags for our Mod), but I can change it so that it is more "generic," especially with some guidance as to what the community would be interested in.

In any case, I just wanted to feel you guys out about whether you would be interested in ship transformation/replacement functions for the open source project, so that I could pass it by the guys in the Robotech Mod if you were.  Let me know...
Title: Would the sourec code project be interested...?
Post by: LAM3O on July 25, 2002, 11:24:30 pm
Wow that's incredible
Title: Would the sourec code project be interested...?
Post by: Inquisitor on July 25, 2002, 11:59:39 pm
Lemme think about that...
Title: Would the sourec code project be interested...?
Post by: Inquisitor on July 25, 2002, 11:59:49 pm
DUH, yes :)
Title: Would the sourec code project be interested...?
Post by: Bobboau on July 26, 2002, 01:08:44 am
ya the only way we are going to get the best we can is by working together you makeing youre changes with us can only be a good thing for both of us
Title: Would the sourec code project be interested...?
Post by: Nico on July 26, 2002, 02:20:10 am
Of course we can share that, what would be the point otherwise, R0nin? :) I already mentioned that anyway in a few previous posts.
Title: Would the sourec code project be interested...?
Post by: IceFire on July 26, 2002, 09:39:39 am
Hey, awesome.  I think that would be useful in a couple of ways for TBP ships.

Thunderbolt atmospheric mode (thats more for kicks mind you), Vorlon ships, and a few other places.
Title: Would the sourec code project be interested...?
Post by: Zeronet on July 26, 2002, 09:46:26 am
might make cloaks possible too.
Title: Would the sourec code project be interested...?
Post by: aldo_14 on July 26, 2002, 05:35:32 pm
Landing gear............... :D

Or the X-wings S-foils into attack mode(?) for the Star wars mod.....or morphing ships :D
Title: Would the sourec code project be interested...?
Post by: LAM3O on July 26, 2002, 06:03:56 pm
I bet you could make some great damage effects with this.
Title: OK, logistics...
Post by: r0nin on July 27, 2002, 12:09:58 am
OK, the next question arises then.  Because the Robotech mod uses a completely custom set of ships, the order of ships in the ships.tbl can be changed however we want.  This is not the case for many mods.

As I have it now, ship transformation is possible based on the order of ships in the ships.tbl (ie. ship0 can transform into ship1 and back, and ship2 into ship3, etc.).  For greater flexibility, it would seem that another method of determining what transforms into what is necessary, rather than just hardcoding in the relationships.

I have tried adding on an additional section in the ships.tbl after the end to list which ships can transform/change into which others.  The reading and parsing routines seem to work fine, but I have so far been unable to add more items to definition of the ship object in the ship.h:

typedef struct ship {
   int   objnum;
   int   ai_index;
   int   ship_info_index;
   int   modelnum;
   etc...
               int            num_modes;
                char*       alt_mode_name;

} ship;

This leads to major errors.  Likewise, attempts to create a new array also lead to errors on compilation.  Until I figure out a way to create a new object/array for this information, I'm not sure how I can make the transformation table based instead of hardcoded...

Any ideas or advice would be greatly appreciated!
Title: Would the sourec code project be interested...?
Post by: Bobboau on July 27, 2002, 12:57:43 am
how are you building the exe, what button are you pushing
Title: Would the sourec code project be interested...?
Post by: r0nin on July 27, 2002, 12:39:43 pm
I'll generally "Build" the final exe (MS VC++ 6.0 Standard w/SPs).  I've tried Rebuilding All of the intermediate files, as well.  For some reason, the code won't let me define my own (independant) objects.  Maybe I am coding them wrong, or something.  Has anyone managed to add to the ship, ship_obj, or other structs that correspond to ships?  How did you do it?
Title: Would the sourec code project be interested...?
Post by: Bobboau on July 28, 2002, 12:06:18 am
I was having problems becase I was compiling the new files then rebuilding the selected project, if I made any changes to a header file it usualy resulted in crashes, then I started building (right click on the project and selecting the top option, build), it seems to work now
Title: Would the sourec code project be interested...?
Post by: r0nin on July 28, 2002, 12:19:53 am
So you've added or changed structs?  Example, please!
Title: Would the sourec code project be interested...?
Post by: Bobboau on July 28, 2002, 12:42:54 am
like I've added an SSM_index to weapon_info, tile_factor and  translation to beam_weapon_section_info, I've added beam loop sound a nameplate index to the ship object (though I have yet to get these to work, it doesn't crash, I think I'm just not doing it right)