Artillery Cooldown Hardcoded?

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
5thHorseman
Posts: 1672
Joined: Sat Mar 02, 2013 2:29 am
Location: On the bridge of The Potential
Contact:

Artillery Cooldown Hardcoded?

Postby 5thHorseman » Thu Sep 19, 2013 9:35 am

I'm working on a ship idea with an artillery weapon with a different cooldown. Ideally I'd like to set the cooldown for each step.

I can't seem to get it to do anything but the default 50/40/etc cooldowns. Am I right in guessing that this is hard coded and I'm out of luck? Or is there a way to do it?

EDIT: Actually, I can change it but it's changing to some crazy long time. Like 5 minutes or something even though I set it to 12. Also, the default is set to 40 which makes no sense at all considering it starts at 50. I'm confused. :?
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
al244098
Posts: 36
Joined: Wed Jan 16, 2013 7:21 am

Re: Artillery Cooldown Hardcoded?

Postby al244098 » Thu Sep 19, 2013 10:55 am

I don't think it is, In the Insane Difficulty mod by brothershogo:
viewtopic.php?f=11&t=14101
(links to custom player ships are included in the thread)

The artillery is overclocked to fire at very short intervals, I don't really know how but maybe you could reverse engineer the dat files for a clue.

I actually wanted to make enemy ships which fires a super beam at you using a very long charging artillery beam.
User avatar
kartoFlane
Posts: 1470
Joined: Mon Jan 14, 2013 10:20 pm

Re: Artillery Cooldown Hardcoded?

Postby kartoFlane » Thu Sep 19, 2013 12:27 pm

IIRC the artillery cooldown is defined by the cooldown of the artillery weapon itself (ARTILLERY_FED), but each level of artillery system reduces that cooldown by a hardcoded fraction, or by a flat value.

In the latter case, if you set the weapon cooldown to be very small, and it gets reduced by a flat value, it can end up being negative. If the variable that stores the cooldown is of an unsigned type, and assumes values 0..255, then the cooldown would be around 255 seconds, due to underflow... And 255 seconds happens to be around 4.25 minutes.

Soo... I guess artillery system reduces cooldown by a flat value?
Superluminal2 - a ship editor for FTL
User avatar
5thHorseman
Posts: 1672
Joined: Sat Mar 02, 2013 2:29 am
Location: On the bridge of The Potential
Contact:

Re: Artillery Cooldown Hardcoded?

Postby 5thHorseman » Thu Sep 19, 2013 1:39 pm

kartoFlane wrote:IIRC the artillery cooldown is defined by the cooldown of the artillery weapon itself (ARTILLERY_FED), but each level of artillery system reduces that cooldown by a hardcoded fraction, or by a flat value.

In the latter case, if you set the weapon cooldown to be very small, and it gets reduced by a flat value, it can end up being negative. If the variable that stores the cooldown is of an unsigned type, and assumes values 0..255, then the cooldown would be around 255 seconds, due to underflow... And 255 seconds happens to be around 4.25 minutes.

Soo... I guess artillery system reduces cooldown by a flat value?


It's more than that, though. It doesn't explain why the cooldown is 40 in the base file. 40 what? Seconds? Then why is the level 1 cooldown 50 seconds? And if I made it 12, that would imply either 22 seconds 12+10 is like 40+10) or 2 seconds (because it drops 10 seconds with each level). Neither of those is the case.

And for fun, I set the cooldown to be 30 seconds and it didn't seem to have an effect. I need to get a stopwatch out to be sure but it looked to my untrained eye like it didn't make a bit of difference.

al244098 wrote:I don't think it is, In the Insane Difficulty mod by brothershogo:
viewtopic.php?f=11&t=14101
(links to custom player ships are included in the thread)

The artillery is overclocked to fire at very short intervals, I don't really know how but maybe you could reverse engineer the dat files for a clue.

I actually wanted to make enemy ships which fires a super beam at you using a very long charging artillery beam.

Thanks for the lead! I'll poke around and see what I can find.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
aaaaaa50
Posts: 258
Joined: Thu Apr 11, 2013 9:08 pm

Re: Artillery Cooldown Hardcoded?

Postby aaaaaa50 » Thu Sep 19, 2013 2:25 pm

The Krakatoa had a modified artillery that fired very fast, but I never upgraded the artillery system fully so I don't know if it's broken or not.

If worst comes to worst you can always restrict it to three upgrades instead of four and change the costs.
First ever AE-exclusive ship mod: The Extra Features!
Ye Olde and Outdated Pre-AE Ship Mod Recommendation List!
User avatar
5thHorseman
Posts: 1672
Joined: Sat Mar 02, 2013 2:29 am
Location: On the bridge of The Potential
Contact:

Re: Artillery Cooldown Hardcoded?

Postby 5thHorseman » Thu Sep 19, 2013 2:35 pm

I got it. The cooldown number of 40 does match to a 50 second cooldown, and the steps are hard coded to be a percentage. You can put more than 4 power into it but it does weird things. I had an amusingly OP steady stream of ion blasts coming out of the thing at one point.

My problem wasn't with the cooldown, it was actually that, once the cooldown stopped it didn't know what to shoot so it just sat there, full. To my tired and untrained eyes it looked like it was moving slow because it HAD mad progress, but in fact it had stopped, trying to shoot a nothing at the enemy. :oops:
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
dalolorn
Posts: 532
Joined: Sun Sep 23, 2012 8:06 am
Location: R.S. Dominator

Re: Artillery Cooldown Hardcoded?

Postby dalolorn » Thu Sep 19, 2013 2:53 pm

5thHorseman wrote:I got it. The cooldown number of 40 does match to a 50 second cooldown, and the steps are hard coded to be a percentage. You can put more than 4 power into it but it does weird things. I had an amusingly OP steady stream of ion blasts coming out of the thing at one point.

My problem wasn't with the cooldown, it was actually that, once the cooldown stopped it didn't know what to shoot so it just sat there, full. To my tired and untrained eyes it looked like it was moving slow because it HAD mad progress, but in fact it had stopped, trying to shoot a nothing at the enemy. :oops:


So the 50 second cooldown is 125% of the set cooldown. I don't quite understand the second paragraph, though.
User avatar
5thHorseman
Posts: 1672
Joined: Sat Mar 02, 2013 2:29 am
Location: On the bridge of The Potential
Contact:

Re: Artillery Cooldown Hardcoded?

Postby 5thHorseman » Thu Sep 19, 2013 3:26 pm

dalolorn wrote:
5thHorseman wrote:I got it. The cooldown number of 40 does match to a 50 second cooldown, and the steps are hard coded to be a percentage. You can put more than 4 power into it but it does weird things. I had an amusingly OP steady stream of ion blasts coming out of the thing at one point.

My problem wasn't with the cooldown, it was actually that, once the cooldown stopped it didn't know what to shoot so it just sat there, full. To my tired and untrained eyes it looked like it was moving slow because it HAD mad progress, but in fact it had stopped, trying to shoot a nothing at the enemy. :oops:


So the 50 second cooldown is 125% of the set cooldown. I don't quite understand the second paragraph, though.


I think that's right. 8 is a 10-second cooldown which is what I wanted. leveling it up to 4 makes it a 4 second cooldown which is also what I wanted. So lucky me. For fun, I tried level 8 and it was a machine gun.

For the 2nd paragraph, I misspoke. I DID make that* mistake as well (which caused my blasts to do no damage at all, which was funny in and of itself) but the mistake that caused my artillery ion to charge up and then not fire was that the original cannon doesn't have a <shots> variable. I guess you don't need it with a beam because it's always 1. Well, you do need it for an Ion (and I'd assume a laser and missile) or it thinks (very reasonably) that you want it to do 0 shots.

*EDIT: "that mistake" was not adding ion damage to the blueprint for the artillery_fed. I removed the damage because I wanted it to be ion damage, but I forgot to add the ion. So, it fired an ion blast that, when it hit the shield, did nothing. :)
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: Artillery Cooldown Hardcoded?

Postby speedoflight » Fri Sep 20, 2013 9:04 pm

I always thought that the artillery beams reduces 10 seconds on every level, not percentajes.. everyday i learn something new. :) u can put the cooldown you want, the only thing is , u cant change the ui graphic since its hardcoded, and it will be really weird and sometimes it will confuse you more than once. xD.
My currently mods / wips ->
ImageImage
User avatar
5thHorseman
Posts: 1672
Joined: Sat Mar 02, 2013 2:29 am
Location: On the bridge of The Potential
Contact:

Re: Artillery Cooldown Hardcoded?

Postby 5thHorseman » Fri Sep 20, 2013 10:12 pm

speedoflight wrote:I always thought that the artillery beams reduces 10 seconds on every level, not percentajes.. everyday i learn something new. :) u can put the cooldown you want, the only thing is , u cant change the ui graphic since its hardcoded, and it will be really weird and sometimes it will confuse you more than once. xD.


Nope, you can change it. The 4 graphics are in img\systemUI:

button_artillery_1.png
button_artillery_2.png
button_artillery_3.png
button_artillery_4.png

Resizing took me a bit of trial and error because the highest one isn't 50 OR 40 pixels high. I swear, the devs made this hard on purpose :D
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."

Who is online

Users browsing this forum: Google [Bot] and 8 guests