Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: headdie on May 19, 2009, 11:38:57 am
-
Hi
Is there a way to stop a ship class from warping in the table. I want to set this because the mod I am attempting has a dynamic in the back story that prevents ships below a certain size from warping and don't want to have to manually set each ship so it can't warp but allow others to.
-
There is (you can find it in the Wiki) but if that is the only thing you are changing for the ship you are better off just doing it in FRED. It only takes a couple of seconds per mission to select all the ships in the list and change the flag so they can't warp.
-
The reason why I prefer a flag in each class in the ships table is because in this story fighters considered light and as well as some medium are unable to warp because of power demands where as heavy fighters and bombers can direct enough power to do it (though with a damage penalty). its a mechanism to explain why except in emergencies fighters can't/won't warp. Call me lazy but it's how i want to do it and knowing me I will forget to set the warp expressions.
How do you do it i have looked right through the Ships.tbl section of the wikki and can't see it
-
But if you're going to damage ships that warp, you're going to have to set up SEXPs for that anyway. Disabling hyperdrives completely for some ships doesn't seem to be that much extra effort.
-
at the moment I am only considering one mission which would involve fighters jumping which is a rapid response deployment of the player and their wing to bolster friendly forces. so I am mostly stopping 1) player from alt+J during mission where in a light fighter (for the response mission they will be in a heavy so can jump, the heavy fighter won't be flagged), 2) stopping player from ordering fighters to depart via warp, 3) stopping me accidentally scripting a warp leave for a fighter that supposedly cant warp, thus maintaining continuity (a major issue for me).
-
Break-warp sexp is all you need. You can also set it in the ship editor via a flag there. You need to set up player orders for fighters anyway so just turn warp out off as an allowed player order. If you script a force warp then that would probably override a ship flag anyway.
So just stick to flags and orders and departure cues. It's all basic FREDding that needs to be done for every mission anyway. If you think it is more work then needed then you aren't doing all the setup and bug checking you should be doing in the first place.
-
There could be some complications if a mission gives the player the choice of which ship to fly in, and some fighters can warp and other can't. The solution I can see would be an event to check if any of the fighters the player has the option to change the type of, are one of the can-warp types, then it should allow warping for those fighters. I'd use an every-time-argument, list all the fighters that can be changed, and an is-ship-class sexp to check if its one of the warping types. If there are more than one type of ship that can warp, you'd use an "or" logical to link a group of is-ship-class, one for each possible warping type. Also, to be on the safe side, use an invalidate-argument at the end of the event. So, it'd be:
Event: Fighters May Warp
-every-time-argument
--any-of
---Alpha 1
---Alpha 2
---Alpha 3
---Alpha 4
--or
---is-ship-class
----Warpable-1
----<argument>
---is-ship-class
----Warpable-2
----<argument>
--allow-warp
---<argument>
--invaludate-argument
---<argument>
Granted, you'd want an event with "never-warp" for all said ships to precede the argument-based event, so the above event can enable for any ships that should allow it.
-
There's a "no subspace drive" ship flag in FRED. That may be what you're looking for.
-
Why are you using every-time FUBAR? You don't need to ever have it execute more than once unless the player wings are reinforced later or have more than one wave. And even then it might work cause the allow-warp SEXP is actually smart enough to set itself for ships not currently in the mission.
And I'd agree with Goober on the use of the no subspace drive
-
Every-time wasn't my suggestion. My first suggestion was to flag them so they couldn't warp in the ships editor. Second suggestion wast to use the break-warp. So yell at Trivial Psychic for the every-time. :P
-
I'm just talking about situations when the player will have control before the mission, of what fighter the player wants to fly, and what ships will be flown by the wingmen and other wings that the player can change in the ship select screen. If some of the types can warp, and others can't, you'll need the event to enable it if the warpable type of fighters are chosen. As for the every-time, I suppose if could be done with a when-argument with a repeat count equivalent to the number of fighters listed as potential arguments, but I like using the every-time, and I make sure that I use invalidate-argument so it happens only once per affected ship.
-
Yeah but you don't need a repeat let alone one using every-time. Simply mark everything as never-warp in FRED and then use the event at t=0 to check what the ship classes of the wingmen are and set them to allow-warp.
Every-time wasn't my suggestion. My first suggestion was to flag them so they couldn't warp in the ships editor. Second suggestion wast to use the break-warp. So yell at Trivial Psychic for the every-time. :P
My bad. I saw the TBP badge and assumed it was you. :D
-
... My first suggestion was to flag them so they couldn't warp in the ships editor. ...
This is what I am after, at the original suggestion I have looked through
http://www.hard-light.net/wiki/index.php/Ships.tbl#Ships.tbl_flags
top to bottom several times now and can't find the flag, yes I know am declaring myself a dumb sob :( by saying this but
What is the flag??????
-
It's not a ship_info (i.e table) flag but a ship flag (i.e FRED->Ship Editor->Misc or Initial Status).
In this case No Subspace Drive.
-
Sorry about that. thanks
-
Yeah but you don't need a repeat let alone one using every-time. Simply mark everything as never-warp in FRED and then use the event at t=0 to check what the ship classes of the wingmen are and set them to allow-warp.
You still recommend using an argument-based event, right? Would a non-repeating argument event work for all ships listed in the arguments at time zero in one run through, or would it only affect one ship from the list?
-
Depends on which argument you used. Any-of is the correct choice. It would go down the list and enable warp on any of the ships that were the right class.