Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: mobcdmoc3 on May 21, 2012, 09:41:19 pm

Title: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on May 21, 2012, 09:41:19 pm
Alright, so with the dawn of Summer coming by, I've finally got time to actually start trying to make a campaign.

So far, I've cracked open a few missions and reverse-engineered what I could. I've got most of the models and waypoints set up and whatnot, but I've yet to get the mechanics working.

- I've got a convoy of transports different ship types flying in formation that have been assigned to follow some waypoints into a node, but I'm not sure if the way I'm working them will get them to depart in the desired manner. They're in a wing, and each ship has been assigned an individual waypoint to maintain the formation they're in.

So I go to the wing editor and get try to set up their departure conditions.

OP are-waypoints-done-delay
    Lambda
    Waypoint 3 --> Is there any way for me to get something like 'when this wing has completed their waypoints then depart?'
    0 -> Not exactly sure what this means - Delay time(seconds) until they actually depart?

- Is there any way to reset the camera position to the default new mission position? I seem to have gotten it at some obscure angle without being able to put myself back  :banghead:

- And lastly - I was taking a look at Singh's preexisting backgrounds and found one that I like, but I haven't been able to figure out how to input them without doing it all manually. I took a look at a couple more and imported them from a .fs2 file, but that seems to be the only way I can put in nebulas.

Any help would be appreciated.  :D
Title: Re: mobcdmoc3's FRED Questions
Post by: mjn.mixael on May 21, 2012, 09:48:51 pm
1: Ships in wings automatically fly in formation, IIRC. They will also all keep their formation if you order the wing to follow a waypoint. So what you need is only one waypoint and order the wing to follow that. Use ai-waypoints-once. Then create an event like your are-waytpoints-done-delay for the whole wing. That should get them all to warp out.

Also, the 'Delay' in most SEXPs is like this. In the waypoints example it will check if the waypoint is done, and then how long it's been since. So if you set the delay to 2 seconds, then the SEXP will return true 2 seconds after the waypoints are completed.

2: Not sure, but once you familiarize yourself with FRED camera controls, you should find it easy to get back to the normal position. A & Z zoom in and out. + & - pan up and down. I think it's 1 & 3 that pan left and right and 7 & 8 roll the camera. Then the numpad arrows (8,4,6,2) look around.

3: to get new backgrounds available, you need to put them in data/effects and then create the proper entries in the stars.tbl. Search the Wiki for how to do that.
Title: Re: mobcdmoc3's FRED Questions
Post by: Trivial Psychic on May 21, 2012, 10:08:05 pm
Regarding ships in a wing following waypoints, remember that the closer they get to the end, they often bunch up as they all try to aim for it.  I often have the waypoint placed some distance away from where I want them to jump out, and then use a distance from waypoint check in the departure cues as opposed to are-waypoints-done-delay.  It also prevents them from slowing as they reach the end of the waypoints.
Title: Re: mobcdmoc3's FRED Questions
Post by: bigchunk1 on May 22, 2012, 04:00:35 am
Mjn answered most of these, but just for clarification...

- I've got a convoy of transports different ship types flying in formation that have been assigned to follow some waypoints into a node, but I'm not sure if the way I'm working them will get them to depart in the desired manner. They're in a wing, and each ship has been assigned an individual waypoint to maintain the formation they're in.

Unless your convoy is made up of fighters and bombers, I would advise not assigning them to a wing. The AI for fighters works well with wings, since fighter AI was designed for wings, but transports are clunky and probably will crash into eachother while undergoing wing formation. Especially if you are using different ship types in the same wing.  

I suggest a seperate waypoint path and seperate waypoint orders for each transport in your convoy. It might be a little bit more work in FRED but it looks a lot cleaner in the game.

You seem to be uncomfortable with getting around in FRED. This should help you place those waypoint paths in the right locations. Open FRED, go to the bar at the top, select help -> help topics -> then look at the menu to the left and select toolbar. You will see an explaination of all the basic FRED camera and ship placement commands. Not specifically the lock axis buttons. You can use these buttons to ensure you place waypoints so that your convoy ships will be runing parallel to one another. Another useful command is to right click a ship and select 'position and orientation' from the drop down menu.

So I go to the wing editor and get try to set up their departure conditions.

OP are-waypoints-done-delay
    Lambda
    Waypoint 3 --> Is there any way for me to get something like 'when this wing has completed their waypoints then depart?'
    0 -> Not exactly sure what this means - Delay time(seconds) until they actually depart?

You're in the right place if you want the entire wing to depart after a specific waypoint order. However, I suggest disbanding the wing (select all ships and press Ctrl + D) and assigning each ship to its own waypoint path.

You're on the right track to do this, but for individual ships use the ships editor. (In general ensure wing orders never overlap ship orders try to use one or the other) After placing a ship and a waypoint path select the ship. Go into the ships editor and click the 'initial orders' tab and select 'Waypoints Once' as one order, then select the waypoint you want the ship to go to on the right. The waypoint path can be a single waypoint, in which case the ship will steer directly to that point. If the path has more than one waypoint, the ship will fly to the points on that path 1 ... 2... and so on in that order.

Now once you have done that go to the ship's departure event. are-waypoints-done checks if the ship you specified has completed a waypoint order on the path you specified. Delay (seconds) is the time since that ship has completed that order. A delay of 0 is good if you want that ship to depart right as it completes moving through its waypoint path.

You should be able to select entire waypoint paths in the third line of your departure sexp. Are all of your waypoints linked up in a path?

- Is there any way to reset the camera position to the default new mission position? I seem to have gotten it at some obscure angle without being able to put myself back  :banghead:

Alt Z is your crutch (used to be mine): use the number pad (4,8,2,6) to point the camera where you need, select the group of ships and press Alt Z.  You really want to understand camera controlls to save time and  :banghead: More info about it is in help topics.

Edit: Consider also going to 'speed' at the top of the Fred menu and setting a faster rotation and movement speed for your FRED camera. Makes things much smoother.
Edit2: Also, as a suggestion, go to 'view' and check show ship models. Uncheck show ship outlines. This makes FRED run faster in some cases, especially with missions that have lots of ships.

- And lastly - I was taking a look at Singh's preexisting backgrounds and found one that I like, but I haven't been able to figure out how to input them without doing it all manually. I took a look at a couple more and imported them from a .fs2 file, but that seems to be the only way I can put in nebulas.

I don't entirely understand what you mean by this. FRED requires the background artwork to be in a specific location in your freespace2 folder in order for FRED to be able to see it in the backgrounds editor. You might want to make a mod folder, or just add files to your freespace2 folder. Let me know if you want to make a mod folder because that's a whole lot of explaining right there.

Sorry if I overexplained things or anything of that sort, it's quite late and i'm mad.
Title: Re: mobcdmoc3's FRED Questions
Post by: General Battuta on May 22, 2012, 07:16:36 am
- And lastly - I was taking a look at Singh's preexisting backgrounds and found one that I like, but I haven't been able to figure out how to input them without doing it all manually. I took a look at a couple more and imported them from a .fs2 file, but that seems to be the only way I can put in nebulas.

Everybody else thinks you're trying to add new background bitmaps to the game, but IIIIIIIIIIIIIIIIIIIIIIII understand that you're trying to set up one of Singh's backgrounds from the wiki, which use pre-existing MVP assets.

All you have to do is open up your .fs2 file for the mission in notepad, navigate to the Background section, and replace it with the background section provided on the wiki for the one you're after. Make sure the mission saves as an .fs2, not a .txt.
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on May 22, 2012, 09:10:13 am
You should be able to use the import background options in FRED actually. No need for notepad.
Title: Re: mobcdmoc3's FRED Questions
Post by: General Battuta on May 22, 2012, 09:19:00 am
You should be able to use the import background options in FRED actually. No need for notepad.

Won't work if you don't already have an .fs2 file with the background set up, right?

e: but maybe Singh provides those
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on May 23, 2012, 01:22:17 pm
Thanks for the help, I'm finally getting somewhere now.  :D Waypoints should be functional, and I can actually manipulate the camera now.

Everybody else thinks you're trying to add new background bitmaps to the game, but IIIIIIIIIIIIIIIIIIIIIIII understand that you're trying to set up one of Singh's backgrounds from the wiki, which use pre-existing MVP assets.

All you have to do is open up your .fs2 file for the mission in notepad, navigate to the Background section, and replace it with the background section provided on the wiki for the one you're after. Make sure the mission saves as an .fs2, not a .txt.

That was spot on, so kudos to you.

---------------------------------------------------

Anybody up for round 2 of questions?
Title: Re: mobcdmoc3's FRED Questions
Post by: bigchunk1 on May 23, 2012, 01:37:36 pm
Go ahead.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on May 23, 2012, 08:27:14 pm
- I'm not sure whether or not I did this tree correctly - The objective is to send a message list either after A or B is within 2600 meters of the waypoint

Convoy Halfway to Node
    OP when
        OP or
            OP <
                OP distance
                    A
                    Waypoint path 1:1
                 2600
                OP distance
                    B
                    Waypoint path 1:1
             OP true
         OP send-message-list
               
Title: Re: mobcdmoc3's FRED Questions
Post by: Shivan Hunter on May 23, 2012, 08:44:37 pm
I have no idea how that tree is supposed to work since some of the entries don't line up correctly, but this is what you need:

(http://i.imgur.com/Zu3XL.png)

(where GTF ulysses 0 and 1 are your two ships and <new message> is your message)

(for more than two ships you might want to use arguments to shorten the SEXP but that's a bit complicated)
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on May 24, 2012, 04:47:26 pm
@Shivan Hunter - Thanks, looks like mine was wrong after all.

Everything *looks* like it should work now, but I have yet to find a way to test it. The campaign editor instructions that came with the original FRED don't seem to work, so I can't really test it... Could someone tell me how to get it going?
Title: Re: mobcdmoc3's FRED Questions
Post by: General Battuta on May 24, 2012, 05:31:19 pm
Just run the single mission from the tech room.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on May 24, 2012, 05:48:34 pm
That's the thing. I can't figure out where to put it :blah: Do I also have to move the mission with the .BAK file?
Title: Re: mobcdmoc3's FRED Questions
Post by: General Battuta on May 24, 2012, 05:58:15 pm
No, just the fs2 file. It can go you in /yourmod/data/missions. Make sure you have your mod selected when you launch the game.
Title: Re: mobcdmoc3's FRED Questions
Post by: Legate Damar on May 24, 2012, 07:21:41 pm
You can also just put it in the Freespace 2 folder/data/missions if you don't have a mod
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on May 24, 2012, 11:10:32 pm
You can also just put it in the Freespace 2 folder/data/missions if you don't have a mod

I tried that before, and it ended up causing FSO to complain.

Anyways, I'm almost there - General Battuta's instructions worked and I can see the mission in the techroom, but it crashes when I try to load it. The crashdump goes as follows:

M01.fs2(line 20:
Error: Required token = [#Command Briefing] or [#Briefing], found [+Fog Near Mult: 1.000000] .

ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_12r_INF.exe! <no symbol>
fs2_open_3_6_12r_INF.exe! <no symbol>
fs2_open_3_6_12r_INF.exe! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
fs2_open_3_6_12r_INF.exe! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>
<no module>! <no symbol>

To my understanding, something is wrong with the command briefing and/or briefing, but I have no idea what. Everything *looks* like it should work.  :sigh:

EDIT: Nevermind, I was running 3.6.12 when I had built the mission for 3.6.14.

However, upon entering the mission, it found the backgrounds missing. After popping FRED open again, I found that it the background had disappeared altogether. Opening the file in notepad revealed that the background was still there, but it apparently wasn't being picked up. I referenced another mission and copied it over to see if it would do anything, and it didn't have any effect. Tried importing a background from a preexisting mission - Got the suns to appear, but not any of the nebulas.
Title: Re: mobcdmoc3's FRED Questions
Post by: bigchunk1 on May 25, 2012, 02:25:51 am
The mod you are runing the mission matters in this case. I am guessing the nebulas your background references belong to mediavps_3.6.12. You don't select a mod which references those nebulas and FSO will pretend they don't exist.

Are you selecting mediavps_3.6.12 as your mod?
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on May 25, 2012, 08:37:57 pm
No, but upon switching the mod to mediavps_3.6.12 and switching the build to 3.6.14RC2, my backgrounds and stuff reappeared, and I was able to test it.

Unfortunately, almost all of the ships decide to do whatever they please when it comes to waypoints. They'll switch positions or even bunch up around one ship and try to follow that to a waypoint.

In an effort to remedy this problem, I had assigned every ship a waypoint, one at their initial starting position, and one at the end, but this failed to make any difference.

Their initial orders direct them to their respective waypoints, yet they insist on doing another ship's waypoints. I checked the wing's initial orders, and they're all at 'none.'

There also appears to be a wing that keeps spawning upon mission start, despite having this in the arrival box. I'm not sure if I'm doing something wrong, or if this thing is just messing with me.

[attachment deleted by a ninja]
Title: Re: mobcdmoc3's FRED Questions
Post by: bigchunk1 on May 26, 2012, 11:08:02 pm
Can you copy your entire .fs2 file in notepad and paste it by using www.pastebin.com, submit it, and link it here? I am curious what you are doing.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on May 26, 2012, 11:34:04 pm
http://pastebin.com/1rTphnXR

There you go. Hopefully someone figures out what's wrong, because my shotgun approach isn't working. (Not that I was expecting it to work anyways.  :nono:)
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on May 27, 2012, 12:13:39 am
Your transports are still in a wing. Wings are designed to follow fighter/bomber AI. Putting a transport in a wing is going to cause all kinds of strange behaviour.

Disband that wing and then deal with the fallout from all the ships changing name and everything should be peachy.
Title: Re: mobcdmoc3's FRED Questions
Post by: bigchunk1 on May 27, 2012, 01:07:55 pm
My advice is still one waypoint path per transport.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on May 28, 2012, 12:04:50 am
My advice is still one waypoint path per transport.

I did that as part of my attempt to shotgun the problem down, and I intend on keeping it. Thanks for bringing that up  :yes:

Your transports are still in a wing. Wings are designed to follow fighter/bomber AI. Putting a transport in a wing is going to cause all kinds of strange behaviour.

Disband that wing and then deal with the fallout from all the ships changing name and everything should be peachy.

I'll get on that - Thanks for likely saving me from another couple hours of useless raging.  :D
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on May 31, 2012, 11:27:00 pm
After about a week of perseverance and rage, the first mission to my campaign is finally complete! While away, I've also (almost) completed a second mission, but I'm just *one* step away from being able to do so.

Problem - For whatever reason, I can't get this Shivan Comm Node to get scanned. I set its cargo, went to the misc window and established it as scannable, but when I test the mission, it refuses to allow me to do so. According to the mission, it's not scannable at all. I can get cargo containers to scan, but not this thing.

I've looked at a couple other missions, and I haven't found any mistake I've made that's immediately apparent. Have I made a completely inept mistake (again)? :sigh:
Title: Re: mobcdmoc3's FRED Questions
Post by: mjn.mixael on June 01, 2012, 01:51:51 am
Uncheck Cargo Known? You didn't mention it, so I thought I would start with the easy stuff.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on June 02, 2012, 02:37:39 am
Nope, I don't have that box checked. Aside from this, I've got my entire second mission functional.  ;)
Title: Re: mobcdmoc3's FRED Questions
Post by: FelixJim on June 02, 2012, 10:56:05 am
The "knossos" flag in ships.tbl is causing it, as far as I can see. Removing it seems to work anyway; I couldn't tell you why this is the case though.

EDIT: I can't remember if you could ever scan the comm nodes in "Into the Lion's Den"; I thought you could, but I can't seem to be able to on 3.6.12 or 3.6.14 RC 6 (although the mission designer did go to the trouble of setting one of them as Scannable... but he also left a few "Event Names" as well, so that doesn't prove anything.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on June 02, 2012, 01:06:27 pm
Hmm... Since I don't know how to modify tables, I think I'll just improvise a way around it.

Next problem/question - For some reason all my ship models are in black and white while I'm FREDing and while I'm testing my missions. Any idea why? It's not exactly a showstopper, but it's just a bit annoying.
Title: Re: mobcdmoc3's FRED Questions
Post by: FelixJim on June 02, 2012, 02:14:22 pm
I feel hesitant about doing this, because I don't know what the repercussions will be of wantonly removing the "knossos" flag, but you're welcome to at least try this:

Code: [Select]
#Ship Classes

$Name:                          Shivan Comm Node
+nocreate
$Flags:                         (  "dont collide invisible" "cargo"  )

#End

This should go in a text file xxx-shp.tbm in mymod\data\tables

Brief testing seems to show it working, at least with respect to scanning. To reiterate though - I don't know what else the flag actually does and is being removed.

EDIT: Thought it ought to have a ship class of some sort.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on June 03, 2012, 04:28:12 pm
Hmm... I think I'm going to leave the tables alone until I really need to do some tweaking.

Can anybody provide an answer as to why all the ship models are in black and white? I tried switching over my stuff to another computer, and the problem seemed to have fixed itself, but it'd be preferable to get it working on my primary.

EDIT: Nvm I'm stupid, I fixed the problem.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on June 12, 2012, 12:33:08 pm
Alright, I'm getting close being ready for a 6-mission demo release. :D Expect to see it within the month (as long as I don't run into any showstoppers like I just did)

The problem now, is that I can't get this freighter to undock with its cargo container. It follows its waypoints, then comes to a stop. As it stops, an undock order triggers, but the cargo continues to remain docked to the freighter, and then the freighter jumps out with it still attached.

I have tried...
- Using sexps to order an undock
- Using the initial orders boxes to set up the cues
- Adding a delay between the point at which the freighter is supposed to undock, and the point where it's supposed to follow another set of waypoints, then jump out. (5 seconds)

I'm out of ideas. I really just don't know why it doesn't want to undock. :nono:
Title: Re: mobcdmoc3's FRED Questions
Post by: The_Force on June 12, 2012, 12:56:14 pm
Stupid question but what are you giving the undock order to the ship or the cargo.
Title: Re: mobcdmoc3's FRED Questions
Post by: Axem on June 12, 2012, 01:48:26 pm
Keep in mind that undocking is a whole procedure in itself. You should use a has-undocked-delay sexp to make sure that the whole thing was completed. If undocking isn't complete, technically its still attached.

But if that takes too long for your mission or it still doesn't work, try the cargo-jettison-delay sexp, it'll release anything docked right away, no questions asked.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on June 18, 2012, 12:05:28 pm
Alright, late reply, but thanks, fourth mission is now off the ground. ;)

Out of curiosity, why can you use TAC-1 containers when there's no GTFr Chronos to carry it around? :wtf:
Title: Re: mobcdmoc3's FRED Questions
Post by: Nohiki on June 18, 2012, 11:36:53 pm
Because the retail creators said so, and SCP/Upgrade doesn't mess retail :) Also the Amazon adv. should be able to carry it, no? Then you just change the name and displayed class of the ship in FRED and you have a chrnos :)
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on June 23, 2012, 12:50:02 am
Alright, I ran into another problem - Chained Directives - I seem to be able to get them to work some of the time, but not all the time. Can someone give me a method that will always work? It would seem that my reverse-engineering of other missions was limited in effectiveness in this respect.
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on June 23, 2012, 03:25:31 am
How the hell are you going wrong with them?
Title: Re: mobcdmoc3's FRED Questions
Post by: Legate Damar on June 23, 2012, 04:16:28 am
I will admit I have often had problems with chained events as well.
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on June 23, 2012, 04:18:45 am
Unless you're using repeats, I fail to see the problem. There isn't a huge difference between a chain and a is-event-true-delay except for repeating events.
Title: Re: mobcdmoc3's FRED Questions
Post by: Aginor on June 23, 2012, 09:59:29 am
The most important thing is that you don't interrupt the chain. The chained event has to be exactly below the one it is supposed to be chained to.

And because you mentioned it karajorma: Do chained events work when the first one is repeated? I couldn't make that happen, but I might need it in the future. Is there a tutorial on how to do that?

Also I think FRED (at least in my version) may have a bug that causes a strange behaviour: When you move chained events (instead of creating them on the right position in the list via "insert event") it may happen that they don't trigger. I couldn't reproduce it though so I might be wrong.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on June 24, 2012, 12:04:38 am
Well, I took another look at what I did, and I re-did them in a few times over trying to replicate the formula I was referencing, and after a while, I finally got it to work. Turns out I really just had to be really thorough with what I put in the sexps.
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on June 24, 2012, 02:52:53 am
And because you mentioned it karajorma: Do chained events work when the first one is repeated? I couldn't make that happen, but I might need it in the future. Is there a tutorial on how to do that?

I recently fixed a bug in the way chained events work but it has turned out to be a hidden feature created by :v: which next to no one was aware of.

So since my fix was partially rolled back the only answer I can give you is that I honestly have no idea.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on June 30, 2012, 11:28:35 pm
I'm this || close to being done with a six mission demo, but one - ONE more problem lies in my way. Everything else (I think) works, except this... :sigh:

So I have a wingman given an order via sexps. The problem is that the player still somehow retains the ability to give it orders, thus making it possible to break the mission.

In the ai-chase sexp, I have the priority set as 99, yet the wingman still bends to the player's will. The event that leads to the ai-chase triggers just fine, as I can see the order appearing in the wingman's target box. Further inspection reveals that FRED says to put a value between 0-89 in there.

However, when I applied an ai priority of 99 using a different sexp with the same priority value restrictions, the player could NOT order the wingman.

I've thought of a few ways to fix the problem, but the solutions don't really appeal to me.
- Sabotage player's communications subsystem
- Have player temporarily controlled by ai (Not sure if that also disables comms functions)
- Pray people don't try to order their wingmen in this period of time

Is there something I'm missing? Is what I'm doing supposed to be possible?
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on July 01, 2012, 12:26:51 am
I bumped priorities up to 200 years ago. Looks like I didn't remember to update the documentation for the SEXPs, but they all should accept anything up to 200.

I'll update the docs next chance I get but for now just ignore what it says about the number having to be between 0-89.
Title: Re: mobcdmoc3's FRED Questions
Post by: Aginor on July 01, 2012, 06:21:52 am
I may have a solution for that problem of yours, modcdmoc3:

Create an event that is triggered everytime both of the following conditions are met:
- the event that gives the order which should not be overridden is true
- The player orders this wingman to do something

If that happens you throw the player's command away and give the order again.
So if the player orders the ship to do something else the ship will throw that order away one frame later and give your order again.

You could also disable the player commands completely for that wing. But that would suck I guess.

And before I forget it:
@experts:
Why is it so important that all wingmen in a wing take the same orders from a player? It is because of the wing orders or something?
Also it seems that there isn't a possibility to remove the player orders from a ship during a mission via SEXP. That would be really cool since it would not only solve modcdmoc3's problem but it would also allow such things as
player is unimportant --> all higher ranking pilots die --> player takes command and has to order everyone around.
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on July 01, 2012, 09:12:42 am
I added a SEXP to do that about two months ago. :D

The solution you have is pretty excessive. What I wrote should work. Not to mention that repeatedly cancelling orders can actually result in very poor wingman performance.
Title: Re: mobcdmoc3's FRED Questions
Post by: Aginor on July 01, 2012, 09:31:02 am
I added a SEXP to do that about two months ago. :D

The solution you have is pretty excessive. What I wrote should work. Not to mention that repeatedly cancelling orders can actually result in very poor wingman performance.

Right. One more reason for the player to leave his wingman alone :D
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on July 01, 2012, 10:04:55 am
Yeah but the problem is that the wingman will acknowledge the order, but then go on and do whatever the hell he's been told to do by his orders. Which can be bad in the case of ai-chase but abysmal in the case of ai-disarm (where the wingman might decided to loop back to the start of the bombing run he was already on).
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on July 04, 2012, 10:32:45 am
Well, I thought I was done. The VP file and the campaign file are ready, I've ran through everything multiple times squishing bugs - BUT - when I try to play the campaign using the campaign file, I end up with no weapons.

Immediately what came to mind was that I forgot to enable the weapons in the campaign file editor.

But I didn't. I checked it, and all the weapons I wanted to be enabled were checked off. Then I thought that I might have missed something in the mission file itself - Nope. All weapons and ships with their respective values were there. I even followed the instructions on the wiki and something is still going wrong :blah:
Title: Re: mobcdmoc3's FRED Questions
Post by: The_Force on July 04, 2012, 10:36:42 am
Please create and post a debug log http://www.hard-light.net/forums/index.php/topic,56279.0.html (http://www.hard-light.net/forums/index.php/topic,56279.0.html)
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on July 04, 2012, 12:48:44 pm
Debug log attached.

[attachment deleted by a ninja]
Title: Re: mobcdmoc3's FRED Questions
Post by: The_Force on July 04, 2012, 12:58:03 pm
Well I can't see any problems in the log so you'll have to wait until someone more experienced than me comes along, sorry.
Title: Re: mobcdmoc3's FRED Questions
Post by: mjn.mixael on July 04, 2012, 01:03:16 pm
You may need to create a new pilot. Try that and restart the campaign.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on July 04, 2012, 02:38:52 pm
Huh. Creating a new profile seemed to have done the trick. Not sure why it worked, but thanks. :D
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on July 05, 2012, 04:47:41 am
Try a new pilot.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on July 05, 2012, 04:56:13 pm
By new profile, I meant pilot, sorry.
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on July 05, 2012, 07:10:06 pm
Nah, my bad. I didn't notice the second page. I was answering your last post on the previous one, before mjn.mixael answered you.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on July 08, 2012, 01:12:24 am
A strange problem appeared. Upon testing a mission after a few complaints were reported...

Spoiler:
I discovered that a Sathanas managed to survive the detonation of three meson bombs right behind it with a special explosion that was supposed to do 10000000 damage. It gets constantly stuck above 15% hull integrity, staying as high as 40% on some test runs.

The Sathanas is not guardianed, and it doesn't seem to matter what I do. I've already tried...

- Increasing inner blast radius
- Increasing damage output of the Meson Bombs
- Changing the armor of the Sathanas

In an attempt to work around this problem, I have tried...

- Sabotage-hull - When hull is between 30 and 40, kill 30 hitpoints, when hull is between 20 and 30, kill 20 hitpoints -> Seems to have no effect

Any ideas? I spent three hours trying to kill this bug, and I'm stumped. This bug just doesn't want to die already.  :mad:
Title: Re: mobcdmoc3's FRED Questions
Post by: niffiwan on July 08, 2012, 01:15:05 am
Have you tried setting the "HUGE" and/or SUPERCAP flags?
http://www.hard-light.net/wiki/index.php/Weapons.tbl#.22Huge.22

(not that I'm 100% sure about this given that I don't know if Meson bombs count as normal weapons...)
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on July 08, 2012, 01:54:41 am
I'm not seeing any flags like those in the Meson Bomb table.

Should the sabotage-hull sexp have been a good workaround?
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on July 16, 2012, 10:51:54 am
Alright, I'm back with moar questions.

After sitting down and forcing myself to learn how to use variables, I came across a dilemma I'm not sure how to fix. So the idea is that I have the player jump out to another theatre of operations, which leads to another mission. I want the player and his/her wingman's ship/weapons to be copied over to the next mission.

Naturally, I pop open the event editor and add variables, five for each ship, being the ship, primary bank 1, primary bank 2, secondary bank 1 and 2. (Not using bombers, so no need for a bank 3 secondary)

Now the problem is modifying the variables to suit my needs. The only method I have to modify variables seems to be one event per variable, but with so many possible weapons to choose from, this could end up taking a really long time. Is there a way to work around this?

I thought of a few ways to dodge this, though I'm not exactly sure if they'd work...

- Lock down the player's loadout using the scramble fighters flag in the mission specs box :nono:

- Severely restrict number of weapons that the player can utilize and hope people don't complain :doubt:

- Use a red-alert sexp, despite being told on the wiki that this sexp doesn't work and/or is evil
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on July 16, 2012, 10:57:35 am
*Ahem (http://www.hard-light.net/wiki/index.php/Improved_Team_Loadout)*
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on July 16, 2012, 11:40:55 am
I *think* I understand what I need to do, but I don't have an alternate ship class editor window that looks like the one as shown in that page.

I do have to do something with alternate ship classes, right? :nervous:
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on July 16, 2012, 06:01:44 pm
Nope, just use the weapons side of it. You'll need up to two variables per weapon. A string variable to hold the name and another numeric one to hold the number of them (for missiles and ballistic primaries).

If you set up Alpha 1 and 2 to have no weapons and then use your string variables as the Available Weapons Pool From Variable and then use the numeric variable in the Set Number from Variable you should find that on the loadout screen the game will automatically distribute the remaining weapons between Alpha 1 and Alpha 2.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on August 07, 2012, 11:49:38 pm
Alright, I'm back. I couldn't find any missions using the above variable technique to save mission data and whatnot, so I ended up messing around with the red alert mission stuffs because the variable stuffs ended up causing unhealthy amounts of confusion.
 
I can get friendly wings and whatnot to get their statuses to carry over, but when I try to do the same for a warship, it doesn't work. I used to have it where one warship would copy over, but not another, but then I did something and can't figure out how to get it back. In the time I did have with that version though, I was not able to determine why I was able to get this ship's status to carry over, but not another.

In the first mission, I tick off the 'Red Alert Carry Status' box, and in the following mission, check off the 'Red Alert Mission' box, but it doesn't seem to always work. The warships that do work though, work consistently. The ships in the first mission that are supposed to carry over, do not jump out. (Not sure if that means anything here)

I named the ships to match the ship they're supposed to copy over and copied their loadouts and whatnot. No results. Can anyone shed some light on this? Or better yet tell me how to get it to work 100% of the time?

(Before someone berates me using Red Alert stuff - BP seems to get it to work just fine, so why can't I?)
Title: Re: mobcdmoc3's FRED Questions
Post by: MatthTheGeek on August 08, 2012, 01:30:00 am
It's not about getting red alerts to work, it's about the fact they can and will utterly corrupt your pilot file and that of people playing your campaign. That BP used them is irrelevant : there have been just as many bug reports regarding red alerts in BP as in any other campaign using red alerts.

Red alerts have been a buggy mess since retail. DON'T use them.

If you want example of missions saving ship data, look at any checkpointed mission in WiH. The technique used to make checkpoints in-mission is going to work just fine to keep data between two missions, since it uses campaign variables. Or use the checkpoint script that has been hanging around somewhere. IIRC the BtA demo uses it, so that's a good place to look at too.
Title: Re: mobcdmoc3's FRED Questions
Post by: mjn.mixael on August 08, 2012, 01:40:30 am
Yeah, the BtA demo uses it. That script was actually written to replace Red Alerts.. we just recommissioned it as a checkpoint script. We'll also be using it for Red Alerts unless the Red Alert code gets fixed before we finish those missions.
Title: Re: mobcdmoc3's FRED Questions
Post by: jg18 on August 08, 2012, 01:44:58 am
Just wondering, will red alerts be automagically fixed in trunk when the new pilot code is merged in, or will it require code fixes elsewhere as well?
Title: Re: mobcdmoc3's FRED Questions
Post by: niffiwan on August 08, 2012, 02:36:21 am
From my memories of looking through the Antipodes 8 thread, there have been a number of red alert bugs in the new pilot code.  I'm not sure if all of them have been fixed.
Title: Re: mobcdmoc3's FRED Questions
Post by: CommanderDJ on August 08, 2012, 04:14:06 am
The pilot code might have helped somewhat, but the truth is that the Red Alert system simply needs a revamp.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on August 08, 2012, 12:06:35 pm
Alright - Found out what I need to do set up the variables after looking at WiH's checkpointed missions. I'm almost there - Just can't see the variables showing up in the second mission events editor that I need them for. Set up a campaign file - Nothing.

Also... I poked around a little and... Wtf is/does the AI class' BALLS OF STEELE' for/do? :nervous:
Title: Re: mobcdmoc3's FRED Questions
Post by: Droid803 on August 08, 2012, 01:53:09 pm
BALLS OF STEELE is a cheating AI class that has like doubled fire rates and whatnot XD
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on August 08, 2012, 09:50:19 pm
0_o' Was it ever used? I don't ever recall seeing any ships firing at insane rates when I played.

Annnnnd - Nobody knows what I need to do to get the variables to work?
Title: Re: mobcdmoc3's FRED Questions
Post by: niffiwan on August 08, 2012, 10:01:13 pm
0_o' Was it ever used? I don't ever recall seeing any ships firing at insane rates when I played.

The Price of War (I think that's the name) - some of the GTVA Corvettes have BoS AI (probably the ones duking it out with the Akula)

And sorry - can't help with the variables stuff  :(
Title: Re: mobcdmoc3's FRED Questions
Post by: Cyborg17 on August 08, 2012, 10:21:37 pm
I'm not 100% sure since I've never done it, but I think you just need to add the variables to the other mission, as well.  I don't think it happens automatically. (would be convenient if it did though)
Title: Re: mobcdmoc3's FRED Questions
Post by: mjn.mixael on August 09, 2012, 05:37:29 am
Yes. Separate missions and the campaign editor are not smart enough to know what variables you added to missions. (How would you do this anyway? Like, how do you tell it to grab the variables from one set of missions and the load path but not another?)

You need to create the variables in all the missions/campaign editor when you need them. Then, when you are playing the campaign/missions, FSO will figure it out as long as the variables are Player Persistent or Campaign Persistent.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on September 09, 2012, 02:08:42 pm
Yes. Separate missions and the campaign editor are not smart enough to know what variables you added to missions. (How would you do this anyway? Like, how do you tell it to grab the variables from one set of missions and the load path but not another?)

You need to create the variables in all the missions/campaign editor when you need them. Then, when you are playing the campaign/missions, FSO will figure it out as long as the variables are Player Persistent or Campaign Persistent.

That worked, thanks! :p

-----------------------------------

Over the past couple days I've been messing around with the cutscene SEXPs, but to no avail. I just can't seem to get them to work. I can get some general functions to work, but anything that involves moving the camera or tracking a target, it completely messes up on me. Here's what I've done that causes it to break...

- I can set its position and get it to face a position where a few fighters are supposed to jump in no problem

- However, when I try to get the camera to track the ship coming out of subspace which is in view of the camera using the following

when
- has-arrived-delay
- set-camera target
-- Xi 1

The camera shoots to some arbitrary location in space, and then starts spinning around facing random parts in space, completely ignoring what I've told it to do. Can anyone shed any light on what I'm doing wrong? It's really wearing away at my patience :nono:

I've already made sure that no other SEXPs are interfering, so I'm fairly sure this one is causing problems. If someone really wants to poke around in it, I'll happily hand it over.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on September 19, 2012, 09:48:31 am
Double posting for another question... :nervous:

I seem to have run into a problem in which the AI simply doesn't respond to the 'play-dead' order. I ask them to play dead with a priority of 200%, and they decide that it's still ok to go shoot stuff. This problem seems to be only relevant to the fighters/bombers - Anything bigger than that responds to them just fine.

I've got a guess that this might have something to do with them being EMP'd, but I can't imagine a reason why this would cause them to act the way they should. To my understanding, EMP doesn't mess with orders - It just sends them gunning off against a new target. Could this be possibly overriding my order?

I tried turning all their AI to 'none' via SEXPs, but even then they didn't respond. Anyone know what I'm doing wrong based upon what I've provided? :doubt:
Title: Re: mobcdmoc3's FRED Questions
Post by: General Battuta on September 19, 2012, 09:54:27 am
Disable the EMP, see if you still have the problem. I'm pretty sure it's the EMP.
Title: Re: mobcdmoc3's FRED Questions
Post by: niffiwan on September 19, 2012, 04:26:59 pm
I think there's a fix for the EMP+play dead issue (http://scp.indiegames.us/mantis/view.php?id=2192) in 3.6.14RC8 & trunk - what version are you using?
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on September 19, 2012, 04:41:33 pm
Disable the EMP, see if you still have the problem. I'm pretty sure it's the EMP.

I'll check that out tonight, see if that works.

I think there's a fix for the EMP+play dead issue (http://scp.indiegames.us/mantis/view.php?id=2192) in 3.6.14RC8 & trunk - what version are you using?

Currently using 3.6.14RC2. I'll also check if this works.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on December 26, 2012, 12:47:59 am
Self-necro + double post :nervous:

So I have a cruiser that arrives with a transport docked to it. The problem is, when it arrives, the transport 'floats' behind the cruiser (slowly catching up), and then eventually reads as undocked well before it's supposed to. I suppose that the problem lies within the fact that they arrive while attached to each other. Is there a workaround that I can utilize?
Title: Re: mobcdmoc3's FRED Questions
Post by: Droid803 on December 26, 2012, 04:30:23 pm
One of their arrival cues should be false. Should work, like how any cargo comes in docked to a freighter...
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on December 26, 2012, 06:45:52 pm
The transport's arrival cue is false, as set by FRED whenever I have something docked. :blah: I verified, and the problem still persists.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on January 16, 2013, 09:40:25 pm
I did eventually figure out what was wrong with that problem from before. :p

This time, I'm trying to use this thing - http://www.hard-light.net/wiki/index.php/Gas_Refinery

Everything works until I try to get a pair of Zephyrus miners to dock with it. The one that goes for the top dock will dock no problem, but the one on the bottom dock point will collide continuously with an invisible barrier right next to the refinery. In an attempt to remedy the problem, tried using "don't-collide-invisibe" SEXP when the miners got close and trying to set the refineries as immobile. Neither of those worked.

I also saw a "add/remove from collision group" SEXP, but I couldn't find any documentation on the wiki - I have no idea how to use it, or if it will help in this case.

The miner attempting to dock will eventually succeed, after pushing the refinery's invisible barrier for several minutes. So it's not broken, but it's... Not working how I was hoping it would. Are there any solutions that don't involve messing with the model? I tried poking around in Blue Planet's dreamscape to see the ships were made without collisions, but I couldn't find anything after looking in the events.
Title: Re: mobcdmoc3's FRED Questions
Post by: General Battuta on January 16, 2013, 09:42:13 pm
The no-collision in the BP dreamscape is achieved by constantly setting the ship to its own coordinates with set-object-position. This breaks collision detection on the ship.

What you should do is use the collision group SEXP to add both the docker and dockee to the same group (try 1).
Title: Re: mobcdmoc3's FRED Questions
Post by: Droid803 on January 17, 2013, 12:47:13 am
The no-collision in the BP dreamscape is achieved by constantly setting the ship to its own coordinates with set-object-position. This breaks collision detection on the ship.
Doesn't that break collision detection on everything? AFAIK it did.
Title: Re: mobcdmoc3's FRED Questions
Post by: Legate Damar on January 17, 2013, 01:11:29 am
You mean every object in the mission at once?
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on January 17, 2013, 05:09:39 pm
Bottom of the line in this situation though - What Battuta said worked. :D Much thanks.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on March 08, 2013, 11:13:36 am
I return again, with yet another question. :nervous:

This time, I'm trying to get the player to enter the fighterbay of a destroyer only after a certain event is satisfied. At first, I thought the setup might fall under something like this.

Event Name
-when
--and
---is-event-true-delay
----Some Event
----0
---<=
----distance-ship-subsystem
-----Alpha 1
-----Some ship
-----fighterbay
----100
--Do something

I'm afraid that if the player gets within range of the fighterbay before this event is supposed to trigger, then exits the zone before the 'Some event' returns true, the second 'Some event' returns true, the entire expression will return true, which is not the intention.

So I thought about using and-in-sequence, but thought that this might break as well.  If and-in-sequence returns false if even one of the events returns true out of order, then if the player gets in range of the fighterbay before the specified event returns true, then this event won't ever return true, thereby breaking it again.

I'm not sure if if I'm misinterpreting what these SEXPs do, or whether or not I should be looking for something else altogether.
Title: Re: mobcdmoc3's FRED Questions
Post by: mjn.mixael on March 08, 2013, 11:19:05 am
You could do a chained event. An event to check if the trigger event comes true. Then chain the distance check under a new event.

Or use every-time.
Title: Re: mobcdmoc3's FRED Questions
Post by: General Battuta on March 08, 2013, 11:25:45 am
I don't think you need to worry, though. Unless I'm gravely mistaken, 'distance-ship-subsystem' doesn't have any 'memory' the way is-event-true-delay does. You have to be near that subsystem RIGHT NOW for it to return true. It won't become true and stay true.
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on March 08, 2013, 01:53:26 pm
It does have a memory, just not as strong as is-event-true. In this case it should work.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on March 17, 2013, 11:20:11 am
Aaaand... It works :D Thanks for dispelling this uncertainty.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on March 26, 2013, 12:01:39 am
Wasn't expecting to be back so soon with another problem...

It seems that FRED doesn't like it when I try to remove all of the suns to create a pitch-black environment. It instead, plants one by itself at some arbitrary location after I save the mission.

This is what I want to have - http://www.mediafire.com/view/?1d5vthwwffuw3q8

This is what I get after I save, and what appears in-mission - http://www.mediafire.com/view/?un9947nff9oo9kn

Are there any workarounds? I checked the wiki for the background documentation, and found nothing on this matter. A forum-search also turned up nothing (except for some ancient threads from 2001 with all the pictures dead).

Edit - Posted two identical links on accident.
Title: Re: mobcdmoc3's FRED Questions
Post by: MatthTheGeek on March 26, 2013, 01:42:21 am
Create a sun with a black bitmap and a lighting of 0 0 0  ?
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on March 26, 2013, 11:51:27 am
Alright, I made a .tbm with the following code, and FRED didn't complain about it.

Code: [Select]
#end

$Sun: BlackBMP (128 x 128 black bitmap)
$Sunglow: Sunglow01 (I removed this at first, and then put it in)
$SunRGBI: 0.0 0.0 0.0 0.0 (Changed these to 0.01 to see if it would make a difference)
$NoGlare:
#end

But, to no avail. Perhaps I've done something wrong?
Title: Re: mobcdmoc3's FRED Questions
Post by: General Battuta on March 26, 2013, 01:43:28 pm
Can't you just SEXP remove the sun at mission start?
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on March 26, 2013, 05:17:40 pm
Can't you just SEXP remove the sun at mission start?

I didn't think of that. Worked like a charm. :p

Now, I've ended up with a crash. I think I've isolated the problem to this SEXP.

Code: [Select]
when
-and
--or
---<=
----get-secondary-ammo
-----Squad 1 - 1
-----0
----5
---<=
----get-secondary-ammo
-----Squad 1 - 2
-----0
----5
---<=
----get-secondary-ammo
-----Squad 1 - 3
-----0
----5
--has-arrived-delay
---10
---Squad 1 -

The idea is for this SEXP to trigger after these ships have fired. I added the 'has-arrived-delay' because it seems to trigger at the beginning of the mission without it.

I can provide further details if needed. A debug log is attached as well.

[attachment deleted by ninja]
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on March 26, 2013, 07:35:14 pm
Ummmm. Why do you think that particular SEXP is at fault?

Also what do you mean by a crash? No error message at all? Even in debug?
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on March 26, 2013, 08:04:26 pm
There are a couple chained-events, but I can't imagine why they'd be causing problems. I've attached a picture of the chained events.

By crash, I mean that the screen freezes, and it forces me to my desktop. No error messages, aside from the obligatory windows message indicating that FreeSpace has stopped working. Debug doesn't spit out any messages either.



[attachment deleted by ninja]
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on March 26, 2013, 10:56:00 pm
Yeah but I still don't get why you're blaming those SEXPs? Does the mission not crash if you remove them? Which particular part of the event is causing the crash?
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on March 27, 2013, 11:12:06 am
The mission doesn't crash if I stop them from ever happening. I'll try to dig into which one of them is causing the problem in a couple of hours.
Title: Re: mobcdmoc3's FRED Questions
Post by: mobcdmoc3 on March 27, 2013, 04:18:36 pm
I had the SEXP in question send a message upon returning true, and had the events chained to it do the same. The game crashed before returning any of the messages.

I've since worked around it. While it'd be nice to know what's going on, it's fine if nobody knows.
Title: Re: mobcdmoc3's FRED Questions
Post by: karajorma on March 27, 2013, 09:35:16 pm
SEXPS should never crash the game. They should always bow out gracefully if there is something wrong. The only way I can find out what was causing the crash though is if I can play the mission (or if you can make a simple test mission with the same behaviour).