Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: karajorma on March 30, 2012, 09:46:30 am

Title: The Big FRED Quiz II : Quiz Harder
Post by: karajorma on March 30, 2012, 09:46:30 am
A few years back I ran a big FRED quiz (http://www.hard-light.net/forums/index.php?topic=55631.0). I figured it was high time I ran another one.


As before, I'll be dividing questions into three sections. Beginner, Intermediate and Advanced so that everyone can have a go. Most of the questions will involve the little FRED quirks and gotchas that a good FREDder learns to recognise. You should try to answer without looking in FRED but feel free to open it if you can't. Hell, feel free to build and run test missions to see if you can figure out the answers for yourself. Doing that is great for your FREDding skills.

The purpose of these tests is for users to exercise their debugging skills. In every problem I'll give you a snapshot of the mission and what the FREDder hoped to achieve when he built the mission. The goal is not to tell me how to solve the problem. FREDders get plenty of practice at figuring out how to solve a problem. The goal is to tell me why the SEXP sat in front of you isn't working according the mission designer expected it to.

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. When a problem occurs with a mission in FRED, it's better to figure out why the mission isn't working than to simply change SEXPs and test until it starts working again. You may either prevent similar mistakes in the future, or discover how to better use a feature and get great ideas how to use it.

If you want to answer please put your answer in spoiler tags so that everyone can participate.
Code: [Select]
[spoiler]Your answer[/spoiler]
So let's move on to the questions.



Question 1 - Beginner

In this mission the player is part of an attack on a Shivan Moloch class corvette. When the Moloch gets badly damaged, the Shivans are meant to send in some bombers to take out the capships on the player's side (and distract the player away from the Moloch so it can escape). However, the bombers don't always seem to arrive. Sometimes they appear but sometimes they're not in the mission at all. Here's their arrival cue.
(http://fs2downloads.com/Misc-Pics/Quiz2/Quiz2_Q1.png)
Why aren't the bombers arriving?

Question 2 - Intermediate

For this mission, the designer has come up with a new feature. A weapon that is recharged from the capship. The weapon uses the ballistic weapon code but looks like an energy beam. When the player runs out of "bullets" he's supposed to fly back to the capship where he'll be shot with a no-damage beam to simulate the weapon being recharged.

Here's the event in question.
(http://fs2downloads.com/Misc-Pics/Quiz2/Quiz2_Q2.png)
Repeat Count is set to 10 and Interval Time is set to 120 (cause the player shouldn't be recharging more than once every couple of minutes anyway).

On playtesting however the event works perfectly well the first time round but after that fails every time the the player returns to the Oslo to recharge. A second tester reports that he was able to get the Oslo to recharge his ship a second time but he's not been able to repeat it since.

Nothing is wrong with either the pofs or tables. So what's wrong with the event?

Question 3 - Advanced

In this mission the player is told that the Shivans are fielding an advanced new fighter. The player sent to a region of space where the Shivan super ships have been hunting with orders to destroy the enemy. In order to make things more interesting though, Terran R&D gives the player the order to disable the enemy fighters if possible as research into the new ship would be invaluable.
 Having finished the mission the FREDder decides to test the mission on insane difficulty. The first test, where the FREDder decided to kill all 3 Shivans, goes to plan but on the second test the player decides to kill the first two and then switch to Akherton SDGs and disable the third. The dogfight with the 3rd Shivan is suitably epic until suddenly with the Engines at 34% and the hull at 80% only a few seconds earlier the Shivan craft suddenly blows up. Looking at the Event menu, the player has been given the kill. Somehow the FREDder has managed to kill an enemy ship with an anti-subsystem weapon.
 The FREDder retests the mission but is unable to reproduce the effect. In the next 3 tests the player disables the 3rd ship and as planned a support ship comes in, docks and takes it away. At no point can he even get the Akherton to cause even 1% damage to the enemy ships.

The Shivan craft is a new design but I'll tell you now there is nothing wrong with the pof or table for it. The Akherton is completely unmodified from the retail one. What has the FREDder missed?
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: General Battuta on March 30, 2012, 09:51:09 am
Spoiler:
The Moloch's health may be skipping 50 so the equality is never satisfied

Spoiler:
Should be using trigger count you silly billy - the event is only evaluating every 120 seconds, and the second tester happened to get lucky with the window

Spoiler:
you got me beat here, pardner - something to do with disabled ships self-destructing?
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: TopAce on March 30, 2012, 10:05:09 am
Question 3
Spoiler:
has probably something to do with waved wings. The engine tries to prevent players from delaying the next wave by blowing up disabled fighters. My answer would be: make sure there is only one wave for that wing. Also make sure that: no new ship/wing arrival depends on the destruction of the wing and the relevant mission goals/directives have been added. I don't know which of these are mandatory for the engine to leave disabled fighters alone, but these are the steps I would take before running another test.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: karajorma on March 30, 2012, 10:07:31 am
TopAce,
Spoiler:
There is only one wave for that wing. In addition, the fighter wasn't disabled when it blew up
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: TopAce on March 30, 2012, 10:08:38 am
I edited my post before your reply, so please read again.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: General Battuta on March 30, 2012, 10:11:39 am
I got nothing more than what TopAce got
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: TopAce on March 30, 2012, 10:24:20 am
Spoiler:
Perhaps the Shivan wing should be wing in name only, so in FRED terms, the Shivan fighters are not part of a wing.

Are multiple tips allowed?
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Qent on March 30, 2012, 10:30:58 am
Spoiler:
You accidentally disarmed the fighter.

And the SDG was unmodified except for the spelling. :P
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: General Battuta on March 30, 2012, 10:32:46 am
oh ho! i pledge allegiance to qent
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: karajorma on March 30, 2012, 10:34:02 am
I edited my post before your reply, so please read again.

What do you mean multiple tips? As for your edit, you've kinda made the mistake I referred to in my last quiz. Not knowing what causes a bug, a lot of FREDders take a shotgun approach and tie down a lot of things in the hope of killing it.

Getting people to test and find the root causes is actually part of what this Quiz is about. :D
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Snail on March 30, 2012, 10:51:37 am
I feel inadequate. :(
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Rodo on March 30, 2012, 11:28:26 am
I feel inadequate. :(


Likewise, got some ideas but nothing out of the box really.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Scourge of Ages on March 30, 2012, 11:49:23 am
Question 1:
Spoiler:
With = hits-left 50, it will only trigger if the Moloch hits exactly 50%. If a bomb or beam takes it from 51% to 49% or something, it won't ever hit "50". Solution: use < hits-left instead of =.
Question 2:
Spoiler:
Repeat count will cause the event to fire 10 times, every 120 seconds, on the mark, after the first trigger. If the player isn't 30 meters away at that mark, the event will test, but won't do anything. Solution: use trigger count.
Question 3:
Spoiler:
I really have no idea. Is it a thing with Insane difficulty? No idea.
EDIT: As to #3, there's definitely something going wrong.
Spoiler:
Why was the fighter at 80% hull from just an Akheton? Was there some residual damage or a variable or something from the first playthrough?
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: LordPomposity on March 30, 2012, 01:57:16 pm
Question 1:
Spoiler:
The event will only fire if the Moloch's hull is at exactly 50. If it gets hit with a weapon big enough to inflict several points of damage at once, its hull could skip past 50 and the event would never fire.

Question 2:
Spoiler:
He doesn't know the difference between repeat count and trigger count. Repeat count will repeat the event exactly every 120 seconds after the first activation. Trigger count would wait 120 seconds, and start evaluating the event again afterwards.

Question 3:
Spoiler:
lol dunno.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Lester on March 30, 2012, 02:16:42 pm
Question 1:
Spoiler:
Because the fredder is using = instead of <, sometimes the 50% HP mark gets skipped.
Question 2:
Spoiler:
Repeat count? Shouldn't it be Trigger count? Other than that, I don't see anything wrong with the event in question, though I'd do it a bit different.
Question 3:
Spoiler:
The fredder recently updated to RC5 and AI code got ****ed up :P Specifically, the fighter killed itself with its own missiles.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Sushi on March 30, 2012, 02:29:35 pm
Qent's answer for #3 seems most likely to me.
Spoiler:
I assume the solution is to guardian the weapons subsystem?
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Scourge of Ages on March 30, 2012, 02:51:45 pm
Qent's answer for #3 seems most likely to me.
Spoiler:
I assume the solution is to guardian the weapons subsystem?
Spoiler:
If that is indeed the behavior of fighters in wings that get their weapons knocked out (same as if the engine subsystem is destroyed), then that's the only cause I can think of.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Mongoose on March 30, 2012, 02:52:03 pm
/me is proud of himself that he actually figured out the first one
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Cyborg17 on March 30, 2012, 04:41:37 pm
Question 1:

Spoiler:
If large amounts of damage are hitting the Moloch, there's a chance that the hull strength will "skip" 50% and will therefore never equal 50%.  Using the arithmetic operator "< or = to" instead of "=" should fix the problem.

Question 2:

Spoiler:
I haven't had the opportunity to use repeat count and trigger count a lot, but shouldn't trigger count be used instead of repeat count? It doesn't make sense that the event should be made true only once since the ship will leave the required radius and make the trigger false again.

Question 3:

Spoiler:
Stumped. I would need to see the mission to tie this one down.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: mjn.mixael on March 30, 2012, 04:44:56 pm
1 and 2 are cake with several people already given right answers...

3 though.. yeah... I've got nothin.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: jg18 on March 30, 2012, 06:06:38 pm
Question 1:
Spoiler:
With the arriival cue as written, the bombers will only arrive when the Baal's hull strength is exactly 50%. If the Baal's hull strength drops from say 51% to 49%, then the arrival cue won't become true and the bombers won't arrive.

Question 2:
Spoiler:
It's that tricky Repeat Count at work. After the player first gets in range of the Oslo's FighterRecharge and gets charged, the game will check every two minutes if the player's near the Oslo's FigterRecharge beam, and if so, trigger the recharge. At any other time, nothing will happen, even if the player's near the FighterRecharge.

Question 3:
Spoiler:
Umm... is there some weirdness in game mechanics that only occurs on Insane difficulty? Btw, it's spelled Akheton.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Qent on March 30, 2012, 06:22:32 pm
Tested my answer for #3. :cool:
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Lorric on March 30, 2012, 06:29:30 pm
The categories are correct in my case. I would class myself as a beginner. And I knew the beginner question.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: jg18 on March 30, 2012, 07:25:37 pm
More on Question 3:
Spoiler:
So I tried flying an invulnerable Perseus on Medium difficulty with Akhetons in both primary banks against a Basilisk, where I set the Basilisk's secondaries to None and primaries to Shivan Light Laser (why not?), with all mods off, took out all of its subsystems with the Akhetons, then several more Akheton shots later, it suddenly blows up! I've done that three times. I then tried guardianing the Basilisk's weapons subsystem (threshold of 1) and was still able to blow it up with the Akhetons. WTH is going on?
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: headdie on March 30, 2012, 07:42:33 pm
Spoiler:
is there a bug in how FSO deals with excess subsystem damage when "Puncture" flag is involved?
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Qent on March 30, 2012, 08:20:36 pm
Spoiler:
Was it neither disarmed nor disabled?
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: jg18 on March 30, 2012, 08:24:22 pm
Spoiler:
Was it neither disarmed nor disabled?
Assuming you're replying to me:
Spoiler:
In all cases, I had disabled it before I blew it up, and I had disarmed it (weapons subsystem of 0%) in the first three cases, but in the other two cases, I guardianed its weapons subsystem, so I couldn't disarm it.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Qent on March 30, 2012, 10:41:12 pm
Spoiler:
See if you can with its engines guardianed. Or at least without disabling it.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: jg18 on March 30, 2012, 11:38:55 pm
Spoiler:
See if you can with its engines guardianed. Or at least without disabling it.
Spoiler:
Ok, so if either its weapons subsystem or its engines are guardianed, then I can blow it up with the Akheton, but if both are guardianed, then I can't. But why? Why does disarming or disabling it make it vulnerable to being destroyed by the Akheton?

EDIT:
Spoiler:
Apparently the Akheton is much deadlier than I ever imagined. :shaking:
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Droid803 on March 30, 2012, 11:48:37 pm
3:
Spoiler:
Disabling or Disarming a ship that is a part of a wing will cause the game to blow it up after an amount of time. Even if you don't shoot at it. This is intentional, to prevent people from delaying the arrival of subsequent wings (if any) by neutering one of the wing. Solution: don't put it in a wing, just name it like it is.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: jg18 on March 31, 2012, 12:07:12 am
3:
Spoiler:
Disabling or Disarming a ship that is a part of a wing will cause the game to blow it up after an amount of time. Even if you don't shoot at it. This is intentional, to prevent people from delaying the arrival of subsequent wings (if any) by neutering one of the wing. Solution: don't put it in a wing, just name it like it is.
Spoiler:
Interesting, and confirmed by experiment -- taking the Basilisk out of the wing and unguardianing its subsystems made it impossible to kill with the Akheton. Is that documented anywhere? I wouldn't even know where to look.
Title: Re: The Big FRED Quiz II : Quiz Harder
Post by: Scourge of Ages on March 31, 2012, 01:49:10 am
Spoiler:
Interesting, and confirmed by experiment -- taking the Basilisk out of the wing and unguardianing its subsystems made it impossible to kill with the Akheton. Is that documented anywhere? I wouldn't even know where to look.

Spoiler:
Since it's confirmed, I have documented it: spoiled link (http://www.hard-light.net/wiki/index.php/Capture_Missions)