Author Topic: The Big FRED Quiz  (Read 12946 times)

0 Members and 1 Guest are viewing this topic.

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
These are all really good questions. :)  I give this thread a :yes:.

Where's your answers then?   :P
 
Seriously I actually find 2 of the intermediate ones harder then the advanced. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Steam
These are all really good questions. :)  I give this thread a :yes:.

Where's your answers then?   :P
 
Seriously I actually find 2 of the intermediate ones harder then the advanced. 

maybe because you had the chance to use that kind of sexp in some mission you've made before, for my is just plain new stuff.
I actually used one of this sexps in a mission I was working on so.. tnks for that inspiration people ^^
el hombre vicio...

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Spoiler:
1: Ulysses are not stealthy to begin with. (?)

2: Third operator "true" not set for "is-event-true-delay", game does not know when to show.

3: Distance to wing is measured from nearest ship. Use AND operator to make sure all individual ships are within range. (?)

4: (Random guess) hits-left-subsystem totals all subsystems?

5: If you complete the mission, the cruiser is present when the mission starts, and has-arrived-delay doesn't register as true. The same thing happens if you set the cruiser's arrival delay to true- if it is present at the beginning of the mission, has-arrived-delay will not recognize it as having "arrived".

6: (Guess) set-subsystem-strength does not repair the subsystem, use repair-subsystem instead. the engine may have its % restored, but the game thinks it's still dead.
(´・ω・`)
=============================================================

 
5
Spoiler:
When the Rakshasa is present from the beginning of the mission, it "doesn't arrive", so it doesn't trigger the has-arrived-delay event.

6
Spoiler:
The engines have once been disabled, triggering the is-subsystem-destroyed-delay. Once it's triggered, it doesn't return.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I've edited my first post to reflect this but the events I've written (with the possible exception of the 3rd) are all for the most part correct. They all contain a single flaw which is breaking them. The goal is not to say how you'd solve the original problem but instead how you'd fix what is in front of you. (Or at least why it doesn't work as intended). :)

We FREDders often get to test our event creation skills but the event debugging skills in the community are rather poor in general. I'm sure each one of us can name an occasion where an event we thought would work hasn't and we've simply tinkered with it a little until it did never understanding why it failed the first time but works now. A coding book I once read referred to this practice as superstition and in many ways that's especially apt when it comes to FRED. I've often seen people say that you need to do really outlandish things to make a SEXP work because they had to do that for a mission.

More often than not we'll shrug and say it's a bug. :D But none of the questions I'm putting up will be based on a bug. In a few cases the SCP has improved the SEXP so you can make it work the way it would have been expected to work but in all cases the SEXPs are working as designed.

Anyway. Here are the answers to the first 4 questions.

Question 1 - Answer

This is a perfect snapshot of mission development and a good example of when superstition actually would give people the right answer (I didn't want to reveal the previous step cause I felt it would make things too easy). The mission development has gone like this.

I wanted to make the Ulysses stealthed so the first event I tried was this.

when
-true
-ship-stealthy
--Beta 1 etc

But in the mission the ships were still visible. I then replaced the ship-stealthy with friendly-stealth-invisible as shown in the question and got the same result. The next step for most people would be to do both. And this is the correct answer. Friendly-stealth-invisible does not make ships stealthy. It is a toggle that makes ships already stealthy invisible if they are friendly. Regardless of whether or not you use it enemy ships will still think the ship is stealthed.


Question 2 - Answer

This one confuses a lot of people when they first encounter it. The problem is that the 3rd optional argument to is-event-true-delay is missing. In the same way that is-destroyed-delay directives won't appear if the ships are not present in the mission, directives using is-event-true-delay won't appear unless the event is true (IIRC this is so chaining works since a chain is basically an is-event-true-delay SEXP). The optional parameter allows you say "Only use this SEXP to determine when the event is true, not when the directive should be displayed).


Question 3 - Answer

Again another snapshot of mission development. But this is a case of superstition leading the FREDder down the wrong path. To all those who suggested going from Not > to < sorry but that's not going to help. In fact in the hypothetical example that's actually what I did first. The point I was trying to make is that a superstitious FREDder might simply think that if less than doesn't work then Not Greater than might work. The problem here is that we read the SEXP from top to bottom and that's a dangerous mistake when the NOT SEXP is involved. Not Greater Than 3000m sounds perfectly reasonable but that's not actually what is being tested in this case.

The problem comes from the way the distance SEXP works with teams or wings. As several people spotted the distance SEXPs work out the distance between the closest ships when a group is involved. This will give you the right answer when you use >,  < or = but as soon as you use NOT, all bets are off.

If we work our way from the bottom of the SEXP chain upwards the problem will become clearer.

when
>
-Distance
--Alpha 1
--Cancer
-3000

That SEXP returns true when the distance between Alpha and the member of Cancer wing closest to him is 3000m. The SEXP simply doesn't care where the other two are as long as it's further away.  So when we NOT the SEXP the event returns true if the closest ship isn't more than 3000m away. Again we don't care where the other two are.


Question 4 - Answer

This one is just plain nasty. In fact it's even caught out the :v: FREDders. If you look at the mission objectives in Bearbaiting it's obvious that they've added an is-subsystem-destroyed-delay after hits-left-subsystem didn't work.

The basic problem is that hits-left-subsystem does something rather odd internally. When called for any subsystem you have multiples of it will take the average of their hit points. So in the case of the rakshasa it is taking the average of all the turrets hitpoints rather than just those for Turret01. Since the other turrets aren't being destroyed before the Rakshasa is you'll never see the event trigger. There is a third optional argument in 3.6.10 that tells the SEXP not to be so silly and to give the actual hits-left of the subsystem.

This doesn't affect all subsystems BTW. Only subsystems containing the following words will display this odd behaviour. engine, radar, turret, navigation, communication, weapons, sensors, solar, gas or activator.

Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Okay guys, some new questions and the answer to the old ones. I added an easy(ish) one for those having problems with the harder ones. :)

Question 7 - (Easy) Intermediate

In my mission Cancer wing consists of 3 waves of 3 Maras. However when playing the mission I've noticed at one point I appear to have 4 Maras present instead of the 3 I want. I have Cancer 2, 7, 8 and 9 present. What have I set that I shouldn't have?

Question 8 - Intermediate

For this mission I wanted to have a fairly simple minefield. Which I created by planting crates and blowing them up with an explosion effect SEXP (not shown since it takes up half the screen! You can assume that I did nothing wrong there). The mines work exactly as planned. However I wanted a message to trigger when the first mine goes off so I chained the second event (with a chain delay of 1 second).



The message is never sent though. Why isn't it being sent?

Question 9 - Advanced

In the same mission I decided to give the player a debriefing if he managed to get through the entire mission without triggering any of the mines. This seemed simple. Here's the debriefing stage.



If none of the mines go off during the mission the message is played. However if the mines do go off the debriefing stage is still played. Why?



And now for the answers.

Question 5 - Answer

The cruiser has two possible arrival cues. It may arrive after 50 seconds resulting in the message being sent. However the is-previous-event-x is evaluated at time = 0. If the event is true the cruiser arrives at t=0. In this case the game regards the ship as not having arrived as it was already present at mission start.


Question 6 - Answer

The problem here is the is-subsystem-destroyed-delay SEXP. Most people expect it to check the status of the subsystem and report back with an answer but in fact it doesn't do that at all. is-subsystem-destroyed-delay works by checking if the mission log contains a report of the destruction of the subsystem in question. When the engines were destroyed a log entry was posted. From that point on is-subsystem-destroyed-delay will always report that the subsystem is destroyed no matter what you do to it or the ship it is attached to.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Androgeos Exeunt

  • Captain Oblivious
  • 212
  • Prevents attraction.
    • Wordpress.com Blog
Haven't touched FRED2 for about a year, but I'll give Question 7 a go.

Spoiler:
You set Wave Threshold to 1 for wing Cancer.
My blog

Quote: Tuesday, 3 October 2023 0133 UTC +8, #general
MP-Ryan
Oh you still believe in fairy tales like Santa, the Easter Bunny, and free market competition principles?

  

Offline NGTM-1R

  • I reject your reality and substitute my own
  • 213
  • Syndral Active. 0410.
Spoiler:
7. Curses. I've seen this but never actually bothered to figure it out since it's very rare that I do see it. It's either wave threshold or negative wing delay.

8. I'm going to assume the non-expanded portions of the SEXP are irrevelant. I think it's the every-time-argument, which implies it's designed to trigger more than once. Thus, it resets. The event is never fully completed.

9. Same as above; the event never fully completes so it's always false.
"Load sabot. Target Zaku, direct front!"

A Feddie Story

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Steam
Spoiler:

7- it happened to me but never figured it out, Ill wait for the resolution :D
8- you use a every-time which is a constant loop, it will never become true permanently so the chained event will never happen.

el hombre vicio...

 

Offline Polpolion

  • The sizzle, it thinks!
  • 211
seven
Spoiler:
Wing threshold stuff.
eight
Spoiler:
It's a chain event. The evaluation thingy should just be set to true.
nine
Spoiler:
I remember someone mentioning about every-time conditionals that it flushes the events or something like that. I'm willing to bet that it can't remember that the event is true, whether it's because the event keeps on reevaluating or some crazy FRED cache is flushed..
« Last Edit: August 11, 2008, 11:01:32 am by thesizzler »

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Just number 9 for me, I'm looking forward to the FRED quiz you might pull on the HLP Pub day :nod:

DON'T READ THE LINK IF YOU'RE NOT KARAJOMRA :p

Spoiler:
As much as it seems simple, always asume FRED is fickle and if you give it an opening it will take it. Ensure there's no room for error. I'd do it like this...

see link >>  http://img137.imageshack.us/my.php?image=q9zu0.png

In answer to your question "Why?????" If FRED expects it to be false, then it will play when it believes nothing has triggered? :nervous: ity just makes sense in my head. I can't express it. TEN years of FREDDING has muddled my brain..

[spoiler/]
« Last Edit: August 11, 2008, 12:05:06 pm by Colonol Dekker »
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Spoiler:
7- You have the threshold set above 0
8- Everytime events are  immediate set back to incomplete so the chained event will not fire.  Was really expecting the special explosion taking too long do to lack of kamikaze scenario when you said explosion takes half the screen. 
9- Same reason as 8.  If a mines does go off the event fires then goes back to incomplete.  Incomplete events are changed to false at mission end. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 
7.
Spoiler:
The treshold
8. No idea.

9.
Spoiler:
An event is not "true" or "false" at the end of a mission, it is either "complete" or "incomplete".

 
Q. 7
Spoiler:
You propably set a wing threshold to 1

Q. 8 and 9
Spoiler:
I think, that in both these cases the problem is with the "every-time-argument" conditionals. You only have to trigger the minefield once, and when you set up every-time conditionals it turns incomplete right after it gets true. You also don`t have to set "event-true-delay" cause it`s already chained.
no.one

 

Offline Androgeos Exeunt

  • Captain Oblivious
  • 212
  • Prevents attraction.
    • Wordpress.com Blog
DON'T READ THE LINK IF YOU'RE NOT KARAJOMRA :p

Uh, Colonel, just disable the URL, then. :wtf:
My blog

Quote: Tuesday, 3 October 2023 0133 UTC +8, #general
MP-Ryan
Oh you still believe in fairy tales like Santa, the Easter Bunny, and free market competition principles?

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Just ignore it...... :p
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Steam
so?? how did it go??

It's friday yeahhh! I wanna know the answers (specially the one on easy)! ^^

el hombre vicio...

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I've been rather busy this week and I didn't want to post the answers till I had the next set of questions ready. But since it's taken so long. :)

Question 7 - Answer

I've accidentally set the wave threshold above 0 (In this case it's set to 1). The game checks the wave threshold to know when to send in the next wing. By default the threshold is set to 0 meaning that there must be 0 ships left in the current wave before the next one will arrive (i.e the wave must have been destroyed). 
 In this case the threshold was set to 1. Wave 2 appeared as soon as only Cancer 2 was left. When that happened a second time (Taking out Cancer 4,5 and 6) Wave 3 appeared leaving me with the ships I finally noticed.

Question 8 - Answer

As most of you guessed every-time and every-time-argument will never evaluate to true or false during a mission. The SEXP executes normally but the last thing it does is to flush the SEXP tree clean. That means it is always incomplete during a mission. Since a chain is basically the same as is-event-true-delay the chained event will never occur.

The is-event-true-delay in the second event was a complete red herring BTW. :D

Question 9 - Answer

Closely related to question 8. At the end of a mission the game marks any events which are incomplete as false. So no matter how many times an event using every-time repeats the debriefing will always be marked false.



I'll try to post the next set of questions later tonight or tomorrow.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Question 10 - (Easy) Intermediate

In my mission I want the player to destroy a Shivan Cain class cruiser while protecting a Fenris. I created this event for it but it never plays the message. What have I done wrong?




Question 11 - Advanced

In a mission I'm making I wanted to simulate a repair crew running around the halls of an abandoned Fenris bringing the systems online one by one. The idea was that the crew would repair each subsystem and then move on to the next. I damaged all the subsystems of the Fenris initially and then added this event (Lots of repeats on the event and a delay between repeats of 1 second)



Here's the repair bit in more detail


But it's not working. Only one of the turrets is being repaired. When it reaches 100% nothing happens. I decided that most likely in-sequence is to blame for the problem and I swapped that to random-of (keeping everything else the same). While not as good I figured I could pass this off as several crews working at the same time. I loaded up Freespace, ran the mission and I saw the same turret being repaired (and none of the others were). After swearing a lot I logged onto HLP to ask people what i did wrong both times.

So why are both events failing?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
All too easy........

Spoiler:
10-First theres the use of that dang and-in-sequence (being the evil monster that it is).  The actual culprit is that second part is true as soon as the mission stats (assuming the Fenris is there) so it will never happen in sequence.

11-You never invalidate argument or whatever it's called so it never moves to the next one.   
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras