Author Topic: Improvements about FRED2 Open & Fs2 Open ?  (Read 4658 times)

0 Members and 1 Guest are viewing this topic.

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Improvements about FRED2 Open & Fs2 Open ?
That was suggested some time ago.  Basically, it would be a sexp which would allow the FREDder to change, delete, or add any supported table entry in a ship.  It would apply either to a specific ship in the mission, or to all of a specific ship class in the mission.
The Trivial Psychic Strikes Again!

 

Offline ShivanSpS

  • 210
Re: Improvements about FRED2 Open & Fs2 Open ?
But you can use a sexp to change the weapons allowed in the loadout?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Improvements about FRED2 Open & Fs2 Open ?
But you can use a sexp to change the weapons allowed in the loadout?

Nope. SEXPs are only evaluated once the mission itself starts so there isn't any way that one could affect the loadout screen of the mission it was used in.

If you want to stick non-allowed weapons on a ship though you can just use the set-primary/secondary-weapon SEXPs to change the weapon to whatever you like.

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

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

 

Offline ShivanSpS

  • 210
Re: Improvements about FRED2 Open & Fs2 Open ?
I have another.

The posibility of have more than one asteroid field and more than 256 asteroids each...

I say this because with only 256 asteroids is IMPOSIBLE to create a dense asteroid field... unless their are VERY small, if someone have tested my Dragon Awakes demo, it know of what i talking about...

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Improvements about FRED2 Open & Fs2 Open ?
That was suggested some time ago.  Basically, it would be a sexp which would allow the FREDder to change, delete, or add any supported table entry in a ship.  It would apply either to a specific ship in the mission, or to all of a specific ship class in the mission.

Hmm. With a little string gimmicking you could take advantage of the scripting system for this. Have a SEXP that takes

table-set-ship-variable
--shipname <String>
--variable <string>
--value <string>

Convert it to a lua codeblock like so and feed it to the interpeter:
Code: [Select]
if mn.Ships['$shipname']:isValid() and mn.Ships['$shipname'].$variable ~= nil then
   mn.Ships['$shipname'].$variable = $value
end

Although if you specified a variable that didn't exist, it'd probably throw an indexing error. Also, you'd have to work from the variable names in the scripting.html file rather than the TBL; you could make a conversion chart but I'm not sure it'd be worth the time, most of the variables should be the same.

I'm not saying I'll implement it, but it is one way of achieving the effect. (You could do the same kind of thing with a big series of if statements for each variable, or some kind of specialized array.)
-C

 
Re: Improvements about FRED2 Open & Fs2 Open ?
Here's another thing:

FRED always complains at me if I have Alpha 1 send a message, or if I put the player in a wing other than Alpha. However, nothing goes wrong with the actual mission, which leads me to the belief that FRED is complaining about nothing. Would it be possible to remove those "error" messages?
"You need to believe in things that aren't true. How else can they become?" -DEATH, Discworld

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Improvements about FRED2 Open & Fs2 Open ?
Both can be fixed for the most part.  The message thing is done by placing a "#" ahead of the name for the player ship which is sending the message.  The player-not-Alpha-1 thing is fixed by using the use-non-standard-wings option under Mission Specs.  That said, I think that it would be useful if, just as the game automatically makes "#command" an option in the list of who is sending messages, that  the same thing be added but for the player's ship.  So, if the player ship is Gamma 2, the game would automatically add "#Gamma 2" as a message source option.  As for the player-not-Alpha-1 my above-mentioned solution with the mission specs, wouldn't work if you want the player as another member of Alpha wing.  It might be more useful if a message came up that says, "you are about to make the player fly as a ship other than Alpha 1.  Are you sure you want to proceed?" with yes and no buttons.  It the FREDder selects "yes", then another messages says "enable non-standard wings, yes/no".  If the FREDder selects Yes, it automatically checks this option and brings up the Mission Specs editor.  If on the other hand the FREDder wants the player to fly as Alpha 3, then he/she would select "no", and the fix proposed by Dark Hunter would take effect.
The Trivial Psychic Strikes Again!

  

Offline ShivanSpS

  • 210
Re: Improvements about FRED2 Open & Fs2 Open ?
Well the msg about seting a squad logo for the player wing is also unesesary...

Anyway i got onother good one, a sexp that allows us to turn off the engines of a ship without the "Disable" msgs...