Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Hornet on July 13, 2005, 11:55:33 pm

Title: Get the newbie! GET HIM!
Post by: Hornet on July 13, 2005, 11:55:33 pm
Howdy!

Im the new guy in town. Ill mostly be doing AI changes for the BSG team.

Im currently working on a fleet management system (details bellow)

Anyway, thought id drop in and say Hi, ill be breaking your code today :)

Details on AI stuff:

Okey, after looking at the ai, its a bit of a mess, but I think I can sort through it.

My plan is to have a script-based formation system.

When a mapper makes a level, he/she makes a bunch of ships they want to group together as a fleet. They then create a script file which contains the formation information, including a which ship is the lead ship, a list of ships names and there offset from the lead ship.

Now to actually order a ship into formation, the mapper simply sets the ships order to "join formation". The ship will scan the script files until it finds its name and will then move into position. To break formation, you simply give it new orders.

Once this component is up and running, I plan to go into more detail, including things like an automatic CAP (combat air patrol) around the fleet using a percentage of the total availible fighters in the fleet and rotating between them (to add a bit of reality to it)

Once im done there, Ill move onto whatever the BSG team needs done. Since im working / at uni, that should keep me busy for the time being :)
Title: Get the newbie! GET HIM!
Post by: WMCoolmon on July 14, 2005, 12:15:00 am
:welcome:

Sounds good, TAP will probably like this as well. :D
Title: Get the newbie! GET HIM!
Post by: karajorma on July 14, 2005, 02:26:44 am
Sounds interesting. All this will be done from FRED or will you need table files of some sort to make things work?
Title: Get the newbie! GET HIM!
Post by: Omniscaper on July 14, 2005, 02:37:29 am
Wow, I want that noob energy and enthusiasm back!!!

Hack away Hornet.

"Because its COOL"
Title: Get the newbie! GET HIM!
Post by: WMCoolmon on July 14, 2005, 03:01:00 am
Quote
Originally posted by Omniscaper
Wow, I want that noob energy and enthusiasm back!!!  


Yeah, don't ever get old and cynical like me. :p
Title: Re: Get the newbie! GET HIM!
Post by: Col. Fishguts on July 14, 2005, 03:41:43 am
Quote
Originally posted by Hornet
Hi, ill be breaking your code today :)
 :lol:

Finally someone who's looking at some AI stuff, good.

*coughcoughGunshipAIcough*
Title: Get the newbie! GET HIM!
Post by: karajorma on July 14, 2005, 04:17:57 am
I was wondering who would be the first one to mention that :D
Title: Get the newbie! GET HIM!
Post by: Hornet on July 14, 2005, 06:08:58 am
Omni, sif reply here and not in the team forum.

I need the files before Im going to start work.

Quote
Originally posted by karajorma
Sounds interesting. All this will be done from FRED or will you need table files of some sort to make things work?


Quote
Originally posted by Hornet

When a mapper makes a level, he/she makes a bunch of ships they want to group together as a fleet. They then create a script file [/U]which contains the formation information, including a which ship is the lead ship, a list of ships names and there offset from the lead ship.
 


hehe

read man :P
Title: Get the newbie! GET HIM!
Post by: karajorma on July 14, 2005, 07:21:23 am
It's not that I didn't read it. You've used the term mapper instead of FREDder so it's obvious you don't know the jargon we use around here that well yet. :p I'm sure you'll pick it up quickly but until then it's a little hard to understand what exactly you mean by a script file.

Do you mean a table file or are you proposing using a completely new kind of file just for this feature?

 A table file would be the sensible choice if you wanted to have a number of set standard formation patterns which the FREDder would pick from a list (Something like Homeworld where you can pick V, X, Line or wall). Making a table would mean that the designer could configure his own patterns and simply pick them off of a list in FRED. When making the mission the designer would know for instance that ship 1 was at the center of the V with 2 and 3 flanking it on each side and so on. He'd then arrange the ships on a list in FRED and everything would be done.

Another way to do it would be make it so every formation is defined in FRED as part of the mission. That's a little more clumsy as it means you'd need to do it seperately every time you set up the mission.

What it sounds like you're doing is suggesting a third method where each mission would now need a seperate script file associated with the mission in order to set up the formation. Now maybe you meant what we call a table file but if what you actually meant is this then I don't think it's the best solution.  

As I stated above doing things using a table file would allow you to reuse formations in different missions without needing to edit the file and change the ship names. It also makes more sense for FRED to keep track of which names are being used anyway because that way you can change the name of a ship and everything could be automatically updated. All the the table would supply is the index number for the ship. The mission file supplies the name of the ship that goes in that slot.

Personally I think having a seperate script file to handle the formation is a rather messy way of doing things which is why I'm asking for clarification. I certainly don't want to discourage you though cause I do like the idea :)
Title: Re: Re: Get the newbie! GET HIM!
Post by: DaBrain on July 14, 2005, 07:24:42 am
Quote
Originally posted by Col. Fishguts

Finally someone who's looking at some AI stuff, good.
 


That's exactly my thought. ;)


Good luck. :yes:
Title: Get the newbie! GET HIM!
Post by: Hornet on July 14, 2005, 09:15:52 am
Well I was going to do method number 3, mainly because the idea of the module is for the BSG mod, and in BSG all the ships are in a convoy kinda formation that seems to change lots anyway, and needs the ability to be easily customised (spelling?).

For now im going to stick with it and get the basics working. Once I got the ships moving in formations ill impliment a bunch of set formations or the option to go with standardized ones.

so far I (think) I have got the sexp's and AI goals added, and I think I have the initial order added, however its all just a shell atm as none of it actually does anything, the framework is just there now. I have to actually figure out a bunch of stuff (eg how it references the objects name in the AI code) first.

However it all may be a moot point as I have run into problems that shouldnt even be there. It wont compile cause the OGG **** is giving me crap (even tho I havent touched it and have it setup correctly)
Title: Get the newbie! GET HIM!
Post by: Anaz on July 14, 2005, 12:52:32 pm
I just had a random thought, you could use a formations.tbl to define generic formations. A lead ship would be definied, and a bunch of generic (probably named) positions with their offsets. Then in FRED, you'd have the "ai-join-formation" order that took formation name, and position name.
Title: Get the newbie! GET HIM!
Post by: karajorma on July 14, 2005, 12:58:59 pm
That's pretty much exactly what I was thinking (even down to the name of the table! :D )
Title: Get the newbie! GET HIM!
Post by: Goober5000 on July 14, 2005, 06:08:05 pm
Quote
Originally posted by Anaz
I just had a random thought, you could use a formations.tbl to define generic formations. A lead ship would be definied, and a bunch of generic (probably named) positions with their offsets. Then in FRED, you'd have the "ai-join-formation" order that took formation name, and position name.
That way sounds ideal. :) It's clean, it's easy, and it keeps reverse compatibility. :)