Author Topic: Confirming kamikaze hits??  (Read 5475 times)

0 Members and 1 Guest are viewing this topic.

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Confirming kamikaze hits??
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
Code: [Select]
$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]
Code: [Select]
$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...
"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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Confirming kamikaze hits??
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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Confirming kamikaze hits??
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
"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 Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Confirming kamikaze hits??
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.
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Confirming kamikaze hits??
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 :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Confirming kamikaze hits??
Ah,I'm you best trainee. :)
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Confirming kamikaze hits??
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... :)
"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 AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Confirming kamikaze hits??
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?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Confirming 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.
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 
Sig nuked! New one coming soon!

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Confirming kamikaze hits??
left....
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Confirming kamikaze hits??
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)
"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 Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Confirming kamikaze hits??
Our suggestions were ok or not?
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Confirming kamikaze hits??
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
"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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Confirming kamikaze hits??
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).
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

  

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Confirming kamikaze hits??
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?
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Confirming kamikaze hits??
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 on how the ship stuff works.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Confirming kamikaze hits??
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"
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Confirming kamikaze hits??
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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Confirming kamikaze hits??
Using variables should make everything easier,both creating and managing the new SEXPs.

ETA...?
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]