Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: FUBAR-BDHR on March 17, 2008, 12:57:05 am
-
I've got a mission with some mines that I want neither side to attack at the beginning and one side to be able to attack in the middle of the mission. One hostile cap in particular needs them on the target list. By default the mines are stealthy so no problem at the beginning of the mission. Since I need the hostile ships to attack and they aren't friendly I made them neutral. Now here's the problem. As soon as I turn stealth off both sides can attack them. Is there an easy way to get all the friendly ships to ignore them without having to add an ignore order for every friendly ship or wing for each mine? Not only that but re-adding them every time goals are cleared and new orders are given to a ship or wing. I don't care either way if the mines are stealth or not but they can't show up as friendly. Also it's multiplayer so a new iff_def is out.
Question 2. What's the difference between ai-ignore and ai-ignore-new? They both have the same description.
Question 3. Do ships accept more than 5 orders? In this case 6 or 7. I know 10 are listed in the initial orders with 6-10 grayed out but are 6-10 usable with sexps?
-
2)ai-ignore did a whole bunch of things on top of giving the ship the ignore order in order to bulletproof the ship being ignored. The drawback is that it can lead to everything ignoring that ship. Hence ai-ignore-new which only does what it's supposed to.
3)You have a maximum of 5 AI Goals.
I'll have a think about 1 but without an IFF_def nothing is leaping out at me.
-
I was afraid of that. Kind of tosses a monkey wrench in the whole works. Have to rethink that part of the mission then since I would have to give each wing or ship 5 ai-ignore orders which leaves no other orders.
Can a turret (non-beam) be ordered to fire at a stealth object and hit it using the sexp? I could do something with waypoints and the ship withing weapon range that way. I also assume that I can't order a hostile to attack another hostile target.
-
Do you foresee any problems with making the mines into a wing since there are only 5 of them? The reason I ask is there will be ships docking with each of them and then doing waypoints. I've had problems with things like that in the past.
It's probably as much work as the ignore solution since I already have 90% of the events and goals done but it would cut the ignore orders down to one per ship/wing at a time. Still going to try the turret firing idea first.
-
Come on, this is like an old-fashioned logic puzzle. :D
Friendly attacks Neutral and Hostile.
Hostile attacks Neutral and Friendly.
Neutral attacks Friendly.
Unknown attacks Hostile.
Solution:
Side A: Friendly
Side B: Neutral
Mines: Unknown at beginning, Hostile later on
And that should do it. It should even work with retail. :D
EDIT: And docking doesn't play well with wings.
-
Great idea. Going to try that in a few minutes after I stare at the logic because it seems like it can't be that simple. Don't even have to make the mines unknown at the beginning because they are stealth then.
Figured as much with the wings that's why I'm using fake ones. Just numbered mines and docking ships without being wings. Though maybe I could get away with the dockees being in a wing but I'd rather not push my luck.
-
New it was too good to be true:
Come on, this is like an old-fashioned logic puzzle. :D
Friendly attacks Neutral and Hostile.
Hostile attacks Neutral and Friendly.
Neutral attacks Friendly.
Unknown attacks Hostile.
Solution:
Side A: Friendly
Side B: Neutral
Mines: Unknown at beginning, Hostile later on
And that should do it. It should even work with retail. :D
I don't want the mines attacked by friendly ships just hostile but they can't be friendly. Good thing I took a nap on it before I decided to try it.
I could turn them friendly while they are docked and then set them back when the ships undock but that wouldn't look to good.
-
I don't want the mines attacked by friendly ships just hostile but they can't be friendly. Good thing I took a nap on it before I decided to try it.
Maybe you should take another nap. :p Or maybe you should actually try it.
Don't think in terms of "friendly" and "hostile" because Friendly and Hostile are just IFF names. Think in terms of Side A, Side B, and Mines.
-
Seems to be working. Don't understand why the friendly AI aren't blowing the heck out of the hostile mines but I'll take it. I still need to add hostile fighters in. Well they are in but their arrival is set to false for testing.
Now I have another problem. Think I know what is causing it though. I have the ship set to warp if the distance from any hostile and any neutral is > X. Now I think that what is happening is if all the neutral or hostile ships are destroyed the distance is returning 0 which will never be > x. Need to confirm this.
Just made a test mission. Standard ship starts out about 1500 away and does a waypoint toward another ship. 3 events with everytime send message. One distance > 1000 one < 1000 and > 0 and one = 0. When the ship is destroyed it just quits giving any message. Doesn't seem to even evaluate the sexp if there are no hostile ship. Easy workaround with percent ships destroyed but seems kind of weird that distance > X doesn't work if there are no ships.
-
If the specified ship isn't present in the mission the distance between them is Not a Number. I suspect it's doing the same thing with Any Neutral. It seems a little counter-intuitive I agree.
-
Well it was easy to get around anyway. Of course after I fixed it it took me all day to figure out it was now actually working and the event chained to it wasn't firing. :mad: Didn't notice because I never added the send message to the distance event. Still haven't figured out why the chained event isn't working. It's simple.
(chained 6 seconds)
when
-->not
----->is-destroyed-delay
---------><ship>
--------->0
-->add-goal
-----><ship>
----->ai-warp-out
-------->89
and a bunch of other warps but the first warp never occurs. The previous even even clears the goals for the ship just in case. The ship just stops dead and that's it.
Getting ready to take the not is-destroyed-delay out but I don't see why that would cause it since the ship doesn't get killed in those 6 seconds. It can't I have it set to invincible for testing.
-
Ai-warp-out won't work if the ship is disabled IIRC so check for that (Add a test message so we can check whether the event is actually firing or not) cause I can't see any reason why not is-destroyed-delay would be giving your hassle either.
-
Well the ship is not disabled as it is moving at a speed of 11 when given the order. Now one or two of the 4 engines is disabled. Could that be doing it? I quit after that post last night so I still need to try it without the not is destroyed delay. If that doesn't do it I'll make the test mission.
-
That could be it. Ships won't warp out if their engines are damaged below a certain level. I think it's around 30% IIRC.
-
Is that something specific to the ai-warp-out sexp? I remember ships warping just fine with no engines, nav, or any subsystems at all using the departure cue.
Looks like that is the problem. Did a repair to the engines right before the warp and it worked.
-
What build are you using? I do seem to remember this being a problem (It was in fact the reason that the Minbari cruiser wasn't jumping out in the Earth-Minbari war campaign) but I thought it was fixed.
-
I think it's the latest TBP 3.6.9 but I will need to double check on that computer. I know this computer has the most current build. If I copied the test mission up to the network I should be able to confirm it at least.
OK just tried it with the exe that's packed in the next 3.4b. It's dated 3/3/08. Same results. Here's the scenerio:
Ship with 4 engines:
No warp
Engine 1 43%
Engine 2 38%
Engine 3 0%
Engine 4 14%
Repair engines 1 2 and 4 to 99 % and it warps.
-
The average percentage for all 4 is less that 30%. I remember looking this all up a while back but I've forgotten how it all worked now.
-
Yea it is less then 30% overall. Still seems like a strange rule for the only sexp available for multi player warpout. Kind of limits the one ship opening a jump point for another damaged ship or ships.
Can that info be added to the comments for the sexp?
Actually the comments for that sexp aren't correct to begin with. It shows 2 arguments but only accepts one.
-
I thought the 30% threshold was only valid for fighters and bombers.
-
Apparently not this is a transport and is flagged as "freighter" in the table.
Another problem. I'm using the set-subsystem-strength sexp to set enough engines on each ship to 99% to get around this problem. I get most of them done then FRED crashes on me. Is there a limit to the number of sexps you can use? If so is it per event or per mission? I've went to adding them one at a time and it always crashed at the same place. File looks fine in notepad and if I add it manually that way instead of using FRED it crashes when I try to open the file.
Looks like it's per event. I got past it by splitting it into 2 events.
-
One more question. Any way to tell what killed a ship? I see the sexps to tell if a player killed the ship but is there any way to tell if it died from say a mine explosion or was killed by some other means? Seems like there should be since it's logged as killed by the mine when you hit F4.
-
It could be that I missed that when I ported your fix for this problem to the BtRL codebase (which is what TBP is using). I'll take a good look at both sets of code.
Edit : Nope, the code seems to be the same in both versions. I'm a little mystified as to why it's not warping out then.