Missiles

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

pisang
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 13
Joined: Mon May 12, 2014 1:30 pm

Missiles

Post by pisang » Mon May 12, 2014 1:36 pm

Hi. New BA player and loving it.

I am looking to do a modern day mod and I absolutely need to figure out how to do missile attacks.

I have been exploring the scripts and I have looked into the engine documentation.

Can anyone point me in the right direction on where to look? I am fairly experienced in programming, I just need a kickstarter for BA.

Many thanks.

Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

Re: Missiles

Post by Amaris » Mon May 12, 2014 2:03 pm

Well I guess the most easily way is to add a new 'action' for the missile attack. As you don't have to modify the scripts HE/AP firing.

You can found the documentation here: http://www.slitherinebravo.net/GameWiki ... _functions

You can also look the scripts for the HE/AP firing and the indirect fire to understand how the damage is set on BA.

Good luck! 8)
“Take care, my friend; watch your six, and do one more roll… just for me.”

pisang
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 13
Joined: Mon May 12, 2014 1:30 pm

Re: Missiles

Post by pisang » Mon May 12, 2014 2:39 pm

Hi Amaris. Thanks. Saw your mod awhile back. Wickedly cool stuff! You are the man :shock:

Sorry for not being very specific on my question! I think I can follow the logic in adding UI functionalities and damage setup. My problem is more on the graphical representation.

How do you represent the "missile" itself. Is it actually a unit (i.e., an entry in squads.csv) that is "created" upon firing, inherits the attack information of the firing unit and is "destroyed" upon contact with the intended target?

I think I saw a youtube video of yours showing torpedo attack IIRC, that is what is stumping me. Appreciate some help :mrgreen:

pipfromslitherine
Site Admin
Site Admin
Posts: 8952
Joined: Wed Mar 23, 2005 10:35 pm

Re: Missiles

Post by pipfromslitherine » Mon May 12, 2014 3:24 pm

It's not really something that the engine is set up for. You cannot (in script) easily create free-moving objects. The best you could probably do is to create a 'taking off' and 'hitting target' anims for missiles and play one on the firing unit and the other on the target.

That said, perhaps Amaris' torpedo attack is far cleverer than the engine :)

Cheers

Pip
follow me on Twitter here

Navaronegun
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 946
Joined: Sun Sep 22, 2013 5:39 pm
Location: Arizona, USA -7 GMT

Re: Missiles

Post by Navaronegun » Mon May 12, 2014 4:57 pm

I concur with Pip. Animation is your best bet for a missile attack. Otherwise we are merely talking about AP, HE and Range values. The time scale of the engine, regardless of what unit scales you bathtub to, are in minutes, not seconds, so having a missile in flight isn't necessary. It should launch and hit the target in the same turn.
I think the best way to describe our operations to date is that they have violated every recognized principle of war.
General Eisenhower, Supreme Commander Allied Expeditionary Force, on the Tunisian Campaign, 27 DEC 1942.

pisang
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 13
Joined: Mon May 12, 2014 1:30 pm

Re: Missiles

Post by pisang » Mon May 12, 2014 11:43 pm

pipfromslitherine wrote:It's not really something that the engine is set up for. ....
Aha. I thought so. I found nothing in the existing scripts / documentation to support it, which makes Amaris torpedo attack thingy even the more amazing.
Navaronegun wrote:Animation is your best bet for a missile attack...
Yes, this seems to be the quick work-around.

Thanks yall.

Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

Re: Missiles

Post by Amaris » Tue May 13, 2014 7:32 am

pisang wrote:Hi Amaris. Thanks. Saw your mod awhile back. Wickedly cool stuff! You are the man :shock:

Sorry for not being very specific on my question! I think I can follow the logic in adding UI functionalities and damage setup. My problem is more on the graphical representation.

How do you represent the "missile" itself. Is it actually a unit (i.e., an entry in squads.csv) that is "created" upon firing, inherits the attack information of the firing unit and is "destroyed" upon contact with the intended target?

I think I saw a youtube video of yours showing torpedo attack IIRC, that is what is stumping me. Appreciate some help :mrgreen:
Well you need to make a specific animation for the missile attack for all units allowed to fire a missile. Ie either modify existing 3D models or create new ones with a specific animation for this. This is what I did for the torpedo. :wink:
“Take care, my friend; watch your six, and do one more roll… just for me.”

Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

Re: Missiles

Post by Amaris » Tue May 13, 2014 8:44 am

A very primitive and quickly test for the launch of a missile:



I love my M3 Scout Car 'TOW missile' :mrgreen:
“Take care, my friend; watch your six, and do one more roll… just for me.”

pisang
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 13
Joined: Mon May 12, 2014 1:30 pm

Re: Missiles

Post by pisang » Tue May 13, 2014 9:12 am

Amaris wrote:A very primitive and quickly test for the launch of a missile ...
:shock:

How did you do that? Surely custom effects ? Or is it canned animation?

Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

Re: Missiles

Post by Amaris » Tue May 13, 2014 10:20 am

pisang wrote:
Amaris wrote:A very primitive and quickly test for the launch of a missile ...
:shock:

How did you do that? Surely custom effects ? Or is it canned animation?
I make a new animation for the missile and a special action to be able to launch it (which trigger the specific animation.) I used an already existent effect for the flame of the missile.

But this way have some issue: if the direction is correct, the flight distance of the missile is fixed into Gmax ; so if the target is too far or too close, the animation will be incorrect...
“Take care, my friend; watch your six, and do one more roll… just for me.”

pisang
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 13
Joined: Mon May 12, 2014 1:30 pm

Re: Missiles

Post by pisang » Tue May 13, 2014 12:46 pm

Merci beaucoup Amaris!

Very clever. I suppose a min-max can be set on the firing range so that the animation / effect looks just right.

Navaronegun
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 946
Joined: Sun Sep 22, 2013 5:39 pm
Location: Arizona, USA -7 GMT

Re: Missiles

Post by Navaronegun » Tue May 13, 2014 12:50 pm

pisang wrote:Merci beaucoup Amaris!

Very clever. I suppose a min-max can be set on the firing range so that the animation / effect looks just right.
What era are you trying to simulate, pisang?
I think the best way to describe our operations to date is that they have violated every recognized principle of war.
General Eisenhower, Supreme Commander Allied Expeditionary Force, on the Tunisian Campaign, 27 DEC 1942.

pisang
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 13
Joined: Mon May 12, 2014 1:30 pm

Re: Missiles

Post by pisang » Tue May 13, 2014 12:57 pm

@Navaronegun

Modern. Circa 80s to present. Have been looking around for a long time for an engine to mod and BA just hits the spot for me.

Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

Re: Missiles

Post by Amaris » Tue May 13, 2014 12:59 pm

pisang wrote:Merci beaucoup Amaris!

Very clever. I suppose a min-max can be set on the firing range so that the animation / effect looks just right.
Well I'm not sure that's possible... The best solution is to create a new effect 'missile' with the particle effect editor(*) as the '"tracer flashes'...

(*): the particle effect editor isn't available ; you must ask nicely to Slitherine's guys. And it's not friendly UI! :mrgreen:
“Take care, my friend; watch your six, and do one more roll… just for me.”

Navaronegun
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 946
Joined: Sun Sep 22, 2013 5:39 pm
Location: Arizona, USA -7 GMT

Re: Missiles

Post by Navaronegun » Tue May 13, 2014 1:02 pm

Well, in a standard Fulda Gap era scenario using wire guided and "next gen" AT weapons (TOW, SAGGER, DRAGON, etc.) most had a minimum range of at least 50m, so you should be good with 1 hex (IIRC....been a while).

Nav
I think the best way to describe our operations to date is that they have violated every recognized principle of war.
General Eisenhower, Supreme Commander Allied Expeditionary Force, on the Tunisian Campaign, 27 DEC 1942.

pisang
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 13
Joined: Mon May 12, 2014 1:30 pm

Re: Missiles

Post by pisang » Tue May 13, 2014 1:04 pm

Amaris wrote: particle effect editor isn't available ; you must ask nicely to Slitherine's guys ...
Thanks for the heads up, I need to get on the Slitherine guys good side eventually then I guess :mrgreen:

pisang
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 13
Joined: Mon May 12, 2014 1:30 pm

Re: Missiles

Post by pisang » Tue May 13, 2014 1:08 pm

Navaronegun wrote:Well, in a standard Fulda Gap era scenario using wire guided and "next gen" AT weapons (TOW, SAGGER, DRAGON, etc.) most had a minimum range of at least 50m, so you should be good with 1 hex (IIRC....been a while).

Nav
Thanks. Will keep that in mind. :)

morge4
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2100
Joined: Fri Apr 29, 2011 2:56 pm
Location: Penalty Box
Contact:

Re: Missiles

Post by morge4 » Tue May 13, 2014 3:39 pm

Amaris wrote:A very primitive and quickly test for the launch of a missile:



I love my M3 Scout Car 'TOW missile' :mrgreen:
WOW! Love it!you have a great gift for this Amaris!

pisang
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 13
Joined: Mon May 12, 2014 1:30 pm

Re: Missiles

Post by pisang » Wed May 14, 2014 4:49 am

I believe pip has just given me my missiles.

http://www.slitherinebravo.net/GameWiki ... ing_ui_hot

Thanks pip, and thanks again to amaris for the insights :mrgreen:

jcb989
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1418
Joined: Fri Nov 05, 2010 12:02 am
Location: Bradenton, Florida

Re: Missiles

Post by jcb989 » Sat May 17, 2014 6:39 pm

That M3 - TOW car needs to show up in Tunis

Post Reply

Return to “Battle Academy : Modders Corner ”