Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: 0rph3u5 on November 24, 2006, 02:03:26 pm
-
I need to arrange some FREDing in which the number of kamikaze fighters hiting a cruiser plays an important role... but I've yet not figured out how to determine this without major problems which could turn the whole thing to become crappy and buggy
I figured out 2 ways yet but both have their pros and cons... but you will see
It's following situation (it's a test run so don't expect much story, logic or something similar):
- EAS Hera and EAS Zeus (two Hyperion-class cruisers [no AAA beams but a lot of laser turrets]) are travelling on paralell waypoints, fighter wings Alpha, Beta and Zeta (each 4 fighters - just primaries and dumpfires) provide escort.
- Whole formation gets jumped by fast kamikaze ships (no weapons) which appear at short range
- Once the hera is hit 15 times she gets disabled
1)
via distance - hit count stored in varible
$Formula: ( every-time
( <
( distance "EAS Hera" "<any hostile>" )
100
)
( modify-variable
@HitsonHera[0]
( + 0 @HitsonHera[0] )
)
)
+Name: hera hit +1
+Repeat Count: 1
+Interval: 1
+Team: 0
$Formula: ( when
( > @HitsonHera[0] 15 )
( send-message
"EAS Hera"
"High"
"hera done for"
)
)
+Name: hera pounched enough v
+Repeat Count: 1
+Interval: 1
+Team: 0
contra: very in-accurate since no all possible points which maybe hit are in this range or ships which enter the range and get shot down are still counted
2)
via hull status - 1 kamikaze does 1% damage on the hera[/i]
$Formula: ( when
( < ( hits-left "EAS Hera" ) 85 )
( send-message
"EAS Hera"
"High"
"hera done for"
)
)
+Name: hera pounched enough h
+Repeat Count: 1
+Interval: 1
+Team: 0
contra: firendly fire from fighters and by the zeus influnces the count...
I hope you can improve any of those or help me to find a thrid, fourth or fifth solution which might be better...
-
When do you need this by? Cause I'm planning on some changes after 3.6.9 that might make this a whole lot easier.
-
I want to have this done ASAP 'cause it has been pestering me since a long time...
but the campaign I'm using this in can't be released prior TBP 3.4 which has yet no concrete release date (except form "soon")
ergo we got nearly all time of the world
-
When do you need this by? Cause I'm planning on some changes after 3.6.9 that might make this a whole lot easier.
WOO-HOOO!!!! THAT'S WHAT MAKE US PROUD!!!!
Accept my suggestion...it could be bogus(I haven't tried it)...
I don't know if a ship ordered to do a kamikaze run on a specific target will go straight for a specific subsystem if it was ordered to attack it previously....
Using when-argument, do something like this...
a kamikaze ship destroyed close from a subsystem(use <argument> for all the subsystems)will increase the kamikaze count of 1 unit. The Hyperion has many turrets and subsystems so the area valid for kamikaze attacks goes all around the hull. You may select just the engines and make the kamikaze go straight for them...boh...
What Hyperion are you using? The Hyperion I have DLed time ago had a problem with docking,I have fixed it with PCS.Your model could have the same problem.
-
He's talking about the Babylon 5 Hyperion most likely :)
I do like the idea of using when-argument. I was having similar thoughts earlier this morning but I wanted to play about with them in FRED before I posted in case I could come up with something better :)
-
Ah,I'm you best trainee. :)
-
I'll toy around a bit with your suggestion... maybe we'll see aceptable results later...
But as I see it I'll have to do all events for all kamikazes at any time... I'm not quite sure if it works but if you don't try you don't fine out... :)
-
I have to wonder why you absolutely need to do the mission that way. Is there a specific reason you can't just have the enemy disable the engine normally? Or are you just going for the novelty of counting kamikaze hits?
-
Well he want to do this way.
Anyway you could come up with a better idea:since there aren't other hostile forces,simply use < hits-left than. See which amount of damage a kamikaze inflicts and moltiplicalo per 15 times. If a kamikaze inflicts 2% of damage,then hits-felt less than 71.
If other strike forces(not kamikaze units)attack the Hyperions before the kamikaze,you have to assign the hits left after this strike to a variable and then consider it for the kamikaze.
-
then hits-felt less than 71.
Felt? ;)
-
left....
-
I have to wonder why you absolutely need to do the mission that way. Is there a specific reason you can't just have the enemy disable the engine normally? Or are you just going for the novelty of counting kamikaze hits?
I won't tell... I will not spoil my campaign's story here (I've been working a year on it and kept it all secret; makes no sense stating talking about it now)
-
Our suggestions were ok or not?
-
Our suggestions were ok or not?
I don't know if a ship ordered to do a kamikaze run on a specific target will go straight for a specific subsystem if it was ordered to attack it previously....
Using when-argument, do something like this...
a kamikaze ship destroyed close from a subsystem(use <argument> for all the subsystems)will increase the kamikaze count of 1 unit. The Hyperion has many turrets and subsystems so the area valid for kamikaze attacks goes all around the hull. You may select just the engines and make the kamikaze go straight for them...boh
this one was good... in-vitro it appeared to be fine (but you should not turst in-virto-FREDing) - will run a less determined version later...
but I'm waiting for kara to present his new code-"thing" before I draw a concluding judgement
Anyway you could come up with a better idea:since there aren't other hostile forces,simply use < hits-left than. See which amount of damage a kamikaze inflicts and moltiplicalo per 15 times. If a kamikaze inflicts 2% of damage,then hits-felt less than 71.
I posted something similar initially... You will see aboth that this variant had an error I couldn't ignore
-
It will be a while. I have a fair bit on my plate at the moment. And it does rather depend on whether the game currently counts kamikaze damage when working who who damaged whom for the events log (Something I've yet to bother looking up in the code).
-
Keep us updated...
Karajorma:YOu talked about team loadout,right?
In a mission you have to escort,I don't know,some frighters carrying weaponry.For each freighter down,the number of warheads available in the next mission is reduced in proportion.
Actually you can create three different missions and every mission has a specific X number of warheads of a particular type available.
What are you going to do is connected to stuff like this?
-
What are you going to do is connected to stuff like this?
Finish the team loadout code. That's EXACTLY the sort of thing it was supposed to allow :D
It already does it for ships. I simply have to finish it so that it does it for weapons too. If you're really interested I wrote a page in the wiki (http://www.hard-light.net/wiki/index.php/Improved_Team_Loadout) on how the ship stuff works.
-
Well,we are lucky.
Missions like the one I have described are vital in a campaign ans should be common too.
It's the exact meaning of the word "supply"
-
Oh I agree. The reason I wrote the whole system was that I wanted to make a campaign where you were based on a capship in enemy terratory and as your wingmen got killed you found less and less ships and weapons available in the loadout options.
As I said the system is basically working for ships. Although the SEXP for checking how many ships are left at the end of a mission is very crude at the moment and will be replaced by several SEXPs giving you much more granular control.
Now that I think about it the changes 0rph3u5 is waiting on and the ones I need to make for finishing off the loadout code actually go through the same code. That probably means that the damage stuff might come faster than I initially thought.
-
Using variables should make everything easier,both creating and managing the new SEXPs.
ETA...?
-
The system works using standard persistent variables so there's absolutely nothing stopping you from simply ignoring the SEXP I made and simply adjusting the variables yourself.
As for an ETA. Some time after BtRL's demo is out I'll start working on it again.
-
I'm sure I will like it. It's powerful and interesting.