Author Topic: sexp help  (Read 2547 times)

0 Members and 1 Guest are viewing this topic.

Are there any good tutorials that explain how this works? I've done a little scripting for Neverwinter Nights and Oblivion, but this sexp thing confuses me. I can't seem to get any thing to go where I want it to. I'm not sure I like this "point and click scripting", meby I just have to get used to the interface.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Did you do the walk through? 
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

 
Are you talking about the "FRED docs" that come with the editor? I read that a few times but it still confuses me. Is there a different tutorial that explains the interface a little better?

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
http://www.hard-light.net/wiki/index.php/Portal:FRED

Check that out if you haven't already. 

The way I learned was by opening missions you have played and are familiar with and seeing how it was done. 
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

 
I'm sorry but your link didn't help, all I could find was a "reference for sexps" (a very good reference, I'll be using that later, thanks)

I'll check out some missions from "derelict", I've been playing that and I'm very impressed with the quality. I'll post in a few days if I'm still lost.

I guess I'm just gonna have to play with the interface until I "get it", but right now I'm having problems making my Shivan comm node scannable. I opened the ship editor and found my comm node. Than I clicked the Misc button and found a box marked "scannable" so I checked it, but I can't scan it in game. I tried adding cargo but it still didn't work.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
The best way to learn these things imho is to have some kind of goal/purpose you want to achieve. And then ask things a bit more specific. Just throwing up your hands and saying "I don't get it!" makes it hard for us to help you.

And as Fubar already suggested, you can open up missions (get a .vp opening program from the wiki) and use those as examples.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
ok try this, please don't be offended if you already know this but i am taking things to the very basics to make sure everything is covered

events in Freespace are instructions to the FS engine to run a defined script (usualy hard coded into the engine) using the values supplies withing the sexp.

most of the event editor is driven with the right mouse button over the line you want to change and selecting the option you want from the subsequent drop menus

now say I have a fighter called alpha and  I want an event to happen that say when alpha is disabled to repair its engines to 50%

the event would looks something like in the picture below to explain I have hit the new event button and got a blank event

next to the blue dot is the name of the event, right click on that line and select edit data to change it

next is the word "When" - this is a condition which sets up how the game handles logic checks on the event and you wont want to change it to begin with though there are advantages with events that occur often

next is the line where by we define what event in game triggers the event in this case "Is-Disabled-Delay", this tells the game we are checking for a ship with all its engines knocked out and the two values after are 0 which is the delay after the ship is disabled to make the event true, the second is the name in FRED of the ship you want to check for the ship being disabled.

Next is the event you want to happen as a result in this case "repair-subsystem" which will set a subsystem to a value you define. so the first value is the ship Alpha the next is the sub system <engines> and finally the value in percent 50%.

the next blue dot denotes the next event (in this case a default event)

[attachment deleted by admin]
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 
In the FREDdocs, follow the advanced walkthrough. Takes a while, but definitely worth it.

 
Thank you headdie, that was by far the best explanation of the interface I've found yet. I think I know what I was doing wrong, I was simply right clicking on the wrong things.

Like I said before I only have a little scripting experience with text based scripting. I just couldn't wrap my brain around this point and click thing, but I think I get it now. Thanks for the help.

Also, I'm not "just trowing up my hands and saying 'I don't get it'" I think I made it clear that I was having problems understanding the interface... that seems specific enough to ask for help. I do have a goal/purpose I want to achieve but what good is asking "how do I make the enemy call for reinforcements when the player is detected... but only if the primary objective is not complete" when I have no idea how to operate the scripting engine?

"To ask a question you must know at least 60% of the answer."  - Albert Einstein

Any ideas on my "scannable shivan comm node" problem I mentioned in my last post? Or should I just start a new thread?

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Make sure the "cargo known" box isn't checked.

As for your sexps, make sure you're using the right operator.  A lot of FREDders (including me) initially got confused when they tried to set up something like

Code: [Select]
when
--hits-left
----Alpha 1
----50
--do-something

when it should really be

Code: [Select]
when
--<
----hits-left
------Alpha 1
----50
--do-something

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Aren't shivans comm nodes unscannable for some reason?  - something with a shiptype-flag they have in the tables?

EDIT: well with this tbm it should work... just place it in your mod-folder under data/tables (if things still dont add up cross-check the tbm with the ships.tbl you use)
otherwise I should work as decibed above

[attachment deleted by admin]
« Last Edit: December 14, 2009, 04:00:17 pm by 0rph3u5 »
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
As far as I know you cannot even do
Code: [Select]
when
--hits-left
----Alpha 1
----50
--do-something
without a logical <, > or = sexp in fred. hits-left will be greyed out in FRED.
And yeah, at me to the list of people being confused about that part.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 
I just got Dragon Age: Origins, so I'm gonna take a little break from FREDing... however I did find time to check out 0rph3u5's suggestion, thanks. I replaced the comm node with a cargo pod and it works fine that way. It's a little odd... don't you scan these comm nodes in the main campaign? I'll take a look a your tbm file, I would prefer to make the modifications myself so I know what's  going on.

Also, thanks goober, I probably would have back in a week with a similar problem. I'll keep an eye out for missing operators.

  

Offline ReeNoiP

  • 27
  • I FRED
I just got Dragon Age: Origins, so I'm gonna take a little break from FREDing... however I did find time to check out 0rph3u5's suggestion, thanks. I replaced the comm node with a cargo pod and it works fine that way. It's a little odd... don't you scan these comm nodes in the main campaign? I'll take a look a your tbm file, I would prefer to make the modifications myself so I know what's  going on.

Also, thanks goober, I probably would have back in a week with a similar problem. I'll keep an eye out for missing operators.

I think you scanned the crystal part as a subsystem rather than the "check cargo scan". But if you get a VP extractor (like QuickVP) you can have a look at the retail mission in root_fs2.vp. This is generally usefull when you want to have a look at how something is done.
Uncharted Territory is released. But I still need voice actors