Artillery Weapons

Discuss and distribute tools and methods for modding. Moderator - Grognak
Crusher
Posts: 48
Joined: Wed Mar 20, 2013 9:18 pm

Artillery Weapons

Postby Crusher » Wed May 01, 2013 12:52 am

Hello everyone. So I was glancing through the FTL data files today trying to figure out how I can customize my own artillery weapon(s). I see where artillery systems are defined and I see where the Federation cruisers and Rebel flagship stages are given artillery systems, but for the life of me, I don't see how the game decides which artillery system each ship gets. What am I missing? Hardcoded elsewhere perhaps? Essentially, I want to know if I make my own artillery system and my own ship, how can I make sure that system goes to the right ship. If no one knows off hand, I'll just experiment a bit and report back what I find, but I figured I'd draw on everyone's experience first.
Crusher's Type C(hallenge) Mod Ships containing:
Mantis Type C: The Sarcosuchus (No O2!)
Engi Type C: The Singularity (Boarding Drones!)
Zoltan Type C: The Annihilator (No Starting Reactor Power!)
Rock Type C: Krakatoa (Fire Boarding!)
thashepherd
Posts: 194
Joined: Fri Nov 16, 2012 11:45 pm
Location: Rochester, NY

Re: Artillery Weapons

Postby thashepherd » Wed May 01, 2013 1:08 am

Most of it is hardcoded. I did some playing around and it looks like the Boss's artillery slots are populated by ARTILLERY_BOSS_n[/i[ in order. I [i]believe that they are mounted on mount points 5 through n in ship.xml.

It's also possible that it's NOT hardcoded and that the game is doing string matching - i.e. ARTILLERY_BOSS, ARTILLERY_FED, etc. I'm pretty sure the game has done something similar elsewhere. But you're in pretty uncharted territory.
You are the weak, and I am the tyranny of evil men - but I'm trying, I'm trying real hard to be the shepherd.

"Wow, that Kieve guy is one angsty nerd eh."
Sonata - "Best use of Common Lisp in an indie space roguelike!"
aaaaaa50
Posts: 258
Joined: Thu Apr 11, 2013 9:08 pm

Re: Artillery Weapons

Postby aaaaaa50 » Wed May 01, 2013 1:16 am

The Tsunami Battlecruiser has an ion artillery beam. Hope that helps.
First ever AE-exclusive ship mod: The Extra Features!
Ye Olde and Outdated Pre-AE Ship Mod Recommendation List!
Crusher
Posts: 48
Joined: Wed Mar 20, 2013 9:18 pm

Re: Artillery Weapons

Postby Crusher » Wed May 01, 2013 2:05 am

Ah, useful thanks. So the Tsunami does it by overwriting ARTILLERY_FED. I was hoping I could make an artillery weapon for another ship while still having the vanilla Federation ships be functional. Two artillery weapons on the same ship was something I was considering too. Might still be possible I guess. I still have a lot of fooling around to do.
Crusher's Type C(hallenge) Mod Ships containing:
Mantis Type C: The Sarcosuchus (No O2!)
Engi Type C: The Singularity (Boarding Drones!)
Zoltan Type C: The Annihilator (No Starting Reactor Power!)
Rock Type C: Krakatoa (Fire Boarding!)
thashepherd
Posts: 194
Joined: Fri Nov 16, 2012 11:45 pm
Location: Rochester, NY

Re: Artillery Weapons

Postby thashepherd » Wed May 01, 2013 2:15 am

Crusher wrote:Ah, useful thanks. So the Tsunami does it by overwriting ARTILLERY_FED. I was hoping I could make an artillery weapon for another ship while still having the vanilla Federation ships be functional. Two artillery weapons on the same ship was something I was considering too. Might still be possible I guess. I still have a lot of fooling around to do.


You can do that the same way the boss is coded to do it.
You are the weak, and I am the tyranny of evil men - but I'm trying, I'm trying real hard to be the shepherd.

"Wow, that Kieve guy is one angsty nerd eh."
Sonata - "Best use of Common Lisp in an indie space roguelike!"
Crusher
Posts: 48
Joined: Wed Mar 20, 2013 9:18 pm

Re: Artillery Weapons

Postby Crusher » Wed May 01, 2013 3:00 am

Also good to know. Do you know if something like ARTILLERY_ROCK will be recognized by the game as an artillery weapon for Rock Cruisers? Seems less likely.
Crusher's Type C(hallenge) Mod Ships containing:
Mantis Type C: The Sarcosuchus (No O2!)
Engi Type C: The Singularity (Boarding Drones!)
Zoltan Type C: The Annihilator (No Starting Reactor Power!)
Rock Type C: Krakatoa (Fire Boarding!)
brothershogo
Posts: 80
Joined: Fri Mar 22, 2013 11:03 am

Re: Artillery Weapons

Postby brothershogo » Wed May 01, 2013 6:05 am

The artillery beam is pretty hardcoded as far as I know. Meaning you can't modify it without replacing the vanilla one. But I may be wrong. I'm no expert.
ImageImageImage
Image
User avatar
kartoFlane
Posts: 1470
Joined: Mon Jan 14, 2013 10:20 pm

Re: Artillery Weapons

Postby kartoFlane » Wed May 01, 2013 10:07 am

The artillery system uses ARTILLERY_FED as its weapon, no matter what ship it is placed on -- so you can override it with a modded blueprint with the same name.
It doesn't even have to be a beam... It can be a laser, missile, or ion weapon. Only the name has to be exact, the rest is as moddable as any other weapon.
Superluminal2 - a ship editor for FTL
DryEagle
Posts: 363
Joined: Thu Oct 04, 2012 11:17 am

Re: Artillery Weapons

Postby DryEagle » Wed May 01, 2013 11:03 am

it's worth noting that you can place multiple artillery rooms on a player ship, but only the first one will be the one which controls the other weapon. the other rooms will do nothing, and taking system damage on them won't affect your artillery.
All ships I have created include custom weapons, graphics etc:
Image
ImageImageImageImage
Crusher
Posts: 48
Joined: Wed Mar 20, 2013 9:18 pm

Re: Artillery Weapons

Postby Crusher » Wed May 01, 2013 3:07 pm

kartoFlane wrote:The artillery system uses ARTILLERY_FED as its weapon, no matter what ship it is placed on -- so you can override it with a modded blueprint with the same name.
It doesn't even have to be a beam... It can be a laser, missile, or ion weapon. Only the name has to be exact, the rest is as moddable as any other weapon.


Are you saying that ARTILLERY_FED is hardcoded to work for every player ship and ARTILLERY_BOSS is hard coded to work for the boss ship (or perhaps any enemy ship)?
Crusher's Type C(hallenge) Mod Ships containing:
Mantis Type C: The Sarcosuchus (No O2!)
Engi Type C: The Singularity (Boarding Drones!)
Zoltan Type C: The Annihilator (No Starting Reactor Power!)
Rock Type C: Krakatoa (Fire Boarding!)

Who is online

Users browsing this forum: No registered users and 8 guests