Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Hornet on July 18, 2005, 06:01:05 am

Title: Adding new initial orders
Post by: Hornet on July 18, 2005, 06:01:05 am
How would i go about adding new initial orders?

I added in the new Sexp's and the goals (I think) but they dont appear anywhere in fred AFAIK. Im not that skilled in fred but im trying to get what im doing to appear in the initial orders menu.

How do I do it?
Title: Adding new initial orders
Post by: karajorma on July 18, 2005, 07:56:02 am
If you're asking where to find them in FRED. You can give intital orders to a ship by selecting it. Opening the ships editor (from the menu, with a rightmouse click or by pressing SHIFT-S) and clicking on the initial orders button.
Title: Adding new initial orders
Post by: Hornet on July 18, 2005, 08:04:10 am
Sadly no, I am not

I am asking how to add more initial orders to that list, custom ones.

I am not *that* bad at fred :)
Title: Adding new initial orders
Post by: Blaise Russel on July 18, 2005, 09:06:44 am
You don't; that sort of thing is the domain of the coders, I think.

I'm not sure what you mean by the SEXPs and the mission goals. SEXPs make events happen and do things. Mission goals, when fulfilled, play a little fanfare, flash up on the screen and affect the debriefing music. They have little to do with initial orders for ships and wings.
Title: Adding new initial orders
Post by: Hornet on July 18, 2005, 09:11:40 am
My friend, I am a coder. This question is directed at other coders, who know the FS2 engine better.
Title: Adding new initial orders
Post by: aldo_14 on July 18, 2005, 09:29:52 am
AFAIK Fred has some divergences from FS code; I think you may have to add in specific hooks to the Fred UI when you add in SEXPs, although I'm not 100% sure.  I believe daveb (Volition coder dude) wrote a tutorial for adding SEXPs when the code was released, I'd imagine that would have the required info.  I'll take a gander & see if I can track it down.
Title: Adding new initial orders
Post by: WMCoolmon on July 18, 2005, 02:50:32 pm
I don't think anyone has tried modifying that section of code, but what I'd do is search for the oddest initial order already coded in and see where it's mentioned in the source.
Title: Adding new initial orders
Post by: Goober5000 on July 18, 2005, 07:30:06 pm
That's what I'd do as well.  Search for AI_DISARM_SHIP (for example; I don't know if that's exactly how they put it) and then search for all #defines that are related to it.  Eventually you'll find all the hooks you need.

There are several things that need updating for that sort of thing: #defines, lists of goals, lists of goal names, links between sexps and ai goals, etc.
Title: Adding new initial orders
Post by: Hornet on July 18, 2005, 08:11:58 pm
I followed the tut in the wp for adding in the sexp, and I had a snoop around adding in new goals, and I think thats all working, but yeah...

ah well, to the searchmobile!