Author Topic: FRED Trick of the Week  (Read 6278 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
FRED Trick of the Week
It might be cool to start this up again.  I'll start.  And I'll start with an easy one since I don't know what level of tricks people expect. :)

Although you can only grant one medal per mission, there's nothing stopping you from calling the grant-medal sexp more than once per mission.  The effect of this is to replace the previous medal with the new medal.  This can be used with great effect to award the player different medals depending on how much extra work he does.

For example, there's a mission in Silent Threat: Reborn where if the player completes all his objectives, he gets the Distinguished Flying Cross medal.  He is then permitted to return to base.  However, if he stays in the area and continues to help out, his medal is changed to the Meritorious Unit.  (He has another opportunity to earn the Distinguished Flying Cross later in the campaign, so he doesn't miss out on that one.)

Because the player could return to base at any time after the mission was done, there was no specific time where I could say, "Okay, the player is done; let's award either this medal or that medal."  Awarding the first medal and then replacing it was the solution. :)

[attachment deleted by admin]

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: FRED Trick of the Week
Do we have to wait a week before posting?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: FRED Trick of the Week
Nah. Trick of the week was a thread from the old VBB where FREDders and modders could swap little FREDding tips and tricks with each other. You can find a copy here


@Goober : I've never written a mission where I was able to hand out medals (let alone more than one) so I was unaware of that trick.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline PotzUK

  • 28
    • PyroPort
Re: FRED Trick of the Week
Ahh this is a great idea :)

I've been wondering why someone hasn't created a FRED sexp snippets library :)

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: FRED Trick of the Week
How about adding these (with perhaps .jpg images) to FSWiki?

There are very few examples as of yet in FRED Examples category like Forcing Directive Failures and Stealthing Ships To Force Target Loss (both could need proper formatting)...

IMHO wiki would be ideal for creating a library of these various tricks that can be made with FRED
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: FRED Trick of the Week
Ahh this is a great idea :)

I've been wondering why someone hasn't created a FRED sexp snippets library :)

My FRED cookbook was supposed to do that. I have a few more things to add to it. If anyone wants to steal the examples for the Wiki I have no problem with it though.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: FRED Trick of the Week
Ok, here's a good trick. How to become an Admiral in one mission.

Then put it in a campaign. :nod:

 

Offline Mefustae

  • 210
  • Chevron locked...
Re: FRED Trick of the Week
The... stupidity... it boggles... the mind! *Scream*

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: FRED Trick of the Week
:D

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: FRED Trick of the Week
Here is one trick I've used a few times to force the game to change to the battle music at a specific moment, but without playing the enemy arrive music. Make a neutral and a hostile Pegasus jump in somewhere far away without the warp effect, so that they're facing each other, both are invulnerable and one of them is disabled and disarmed. Tell one to attack the other and then make both depart or vanish after a few seconds.

You can also force a switch to the ambient music. Use change-soundtrack with "no music" along with a looping play-sound-from-file with the ambient track's filename. You can also undo this (if you need to start the battle music again) by using change-soundtrack back to the real music and play-sound-from-file with a bogus filename (so it reverts to playing nothing) one or two seconds later.

 

Offline NGTM-1R

  • I reject your reality and substitute my own
  • 213
  • Syndral Active. 0410.
Re: FRED Trick of the Week
Stupid FRED Trick, something to remember if you're new. (I don't believe I realized this for two weeks.)

If you have a directive and a message related to its completion, put them in the same SEXP. You can do that you know. :p
"Load sabot. Target Zaku, direct front!"

A Feddie Story

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: FRED Trick of the Week
This is more for the newer Fredders out there.

If you want to calculate positions for cutscene cameras, But are unsure of the relative values, Just place a solitary waypoint and note the position values of it. You can use this technique to also add targets for the cameras that wont show up in-game, Creating effective camera  pans and the like....
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 TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Re: FRED Trick of the Week
What I'm going to put here only makes sense if there are 2 missions connected through red-alert.

The badge/promotion you gain in the first mission won't be lost, but since there's no debriefing in the first red-alert mission, you won't get notified about it. Simply disable promotions/badges in the first mission of the red-alert to prevent this. The promotion/badge will appear in the debriefing of the second red-alert mission, even if you gained it in the first mission.
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: FRED Trick of the Week
Now that is a neat trick TopAce :yes: I wonder how it will work with the one Goober mentioned earlier? :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Re: FRED Trick of the Week
Having a grant-medal in the first mission of red-alert? You would get the medal, but you won't notice it unless you go to your medal case and see you have a new medal. The Disable Promotions/Badges thing still gives you a medal, I think. But I'm not sure, it's basically illogical to have a grant-medal in a mission you wouldn't like the player promoted.
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: FRED Trick of the Week
I meant what happens if you disable promotions and grant a medal in the first mission and then grant a different medal in the second one. Would you get both or would you only get the newer one?

Goober's post suggests the latter outcome.

Does this only apply to red-alert missions I wonder?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: FRED Trick of the Week
I'm pretty sure that a) it would only apply to red-alert missions, and b) you'd get the newer medal.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: FRED Trick of the Week
A new week and a new trick.  Here's how to test whether the player is running a mission through the tech room versus in the normal course of the campaign:

[attachment deleted by admin]

 

Offline PotzUK

  • 28
    • PyroPort
Is str10 an in-built string that's set when you play the mission in a campaign?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Str10 is the previous mission's filename. In techroom missions the SEXP will always evaluate to false because there is no previous campaign mission.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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