Swivel Weapons Platforms

A place to discuss mods in development and concepts for new mods.
gunship256
Militia Commander
Militia Commander
Posts: 451
Joined: Sat Jul 25, 2015 11:41 pm
Location: repairing armor

Swivel Weapons Platforms

Post by gunship256 » Mon Jan 25, 2016 4:21 am

SWIVEL WEAPONS PLATFORMS

CURRENT VERSION: 0.19 alpha
Swivel Weapons Platforms

This mod creates six types of new devices. Ships with initially poor fighting setups but lots of device slots can mix and match the devices in this mod and become pretty powerful.

* Hermes swivel mount: gives front-firing weapons some swivel. Light weapons receive the most benefit. This reinforces the assumption that light weapons are meant for dogfighting, while heavy weapons are most effective against slow-moving or stationary targets. I am testing the idea that heavy weapons should be penalized when installed in swivel weapon slots.

* Apollo launcher mount: makes the ship's launcher omnidirectional but with a speed reduction.

* Zeus weapon platform: makes the main weapon omnidirectional. This device takes up two device slots.

* Payload enhancer: Increases launcher damage by 75%.

* Atalanta speed enhancer: raises the fire rate of all weapons by 40%. When more than one of these is installed, the effect stacks.

* Spartan damage enhancer: raises the damage of all weapons by 40%. When more than one is installed, the effect stacks.

This is an alpha release. Since I borrowed some ideas from the Automated Turret Controller mod, I'm waiting to hear back from Pip before releasing a beta version.

Any feedback and suggestions are welcomed!


QUESTIONS

* Hermes swivel mount: should the degree of swivel be changed? Which weapons are getting too much swivel: light weapons or heavy ones? Which weapons receive too little swivel? I can adjust the equation based on suggestions regarding weapon balance.

* Are the rebalanced Apollo and Zeus overpowered? If so, how can they be nerfed while staying true to Transcendence 1.7 alpha 1's assumption that making a weapon omni is the same as a 100% enhancement?

* Are the Atalanta, Spartan, and payload enhancer overpowered? Underpowered? Why?

===
2016 May 6 edit: Updated the device descriptions and added a download link for the current alpha.
Last edited by gunship256 on Sat May 07, 2016 4:59 am, edited 17 times in total.

gunship256
Militia Commander
Militia Commander
Posts: 451
Joined: Sat Jul 25, 2015 11:41 pm
Location: repairing armor

Re: Swivel Weapons Platforms

Post by gunship256 » Wed Jan 27, 2016 12:48 am

I made some changes and updated the download link in the original post. Here's a summary:

Increased the amount of swivel for the swivel weapons platform. The ReadMe file now goes through the calculations that justify the equation calculating swivel amount.

Fixed a bug where swivel was only working on one side of the ship.

Renamed the devices using names from Greek mythology to make it easier to remember which device is which.


BALANCE CALCULATIONS

I recalculated the amount of swivel for the swivel weapons mount using the following reasoning:

Assume that weapon DPS doubles every two levels. Using geometric progression, the DPS increase should be 41% per level.

Assume that a plain weapon enhancer improves DPS by 1 level, or 41%. The enhancers in the vanilla game only work on certain types of weapons, which would explain why the DPS increase is 50% to 75%, with the exception of the high-speed howitzer loader. Since a swivel weapon enhancer works on all kinds of weapons, the average enhancement for a light weapon should be around 41%.

Assume that an omni weapon is 2.5 times as powerful as a non-omni weapon, all other things being equal. Assume a linear relationship between the degree of swivel and how powerful a weapon is. In other words, making a weapon omni would be equivalent to a 150% enhancement, and making a weapon swivel through a 180 degree arc would be equivalent to a 75% enhancement. To get a 41% enhancement, the weapon would need to swivel through a (360*0.41/1.5) = 98 degree arc.

Since the degree of swivel decreases with a more massive weapon, the swivel enhancer can be thought of as a light weapon enhancer. Only light weapons should receive a 98 degree swivel. Assume that a 3 ton weapon, which is the mass of a typical light weapon, should receive that degree of swivel. Also assume that a hypothetical weapon with a mass of zero should receive a 360 degree swivel and that the amount of swivel should asymptote to zero as weapon mass approaches infinity.

This gives us a hyperbolic relationship:

s = 404/(m + 1.122)

s = swivel arc, in degrees
m = weapon mass, in tons

The swivel on the left and right side would each be half of the total, so the equation would be s = 202/(m + 1.122) for swivel on each side. If weapon mass is given in kilograms, the expression changes to 202000/(m + 1122).

Based on this relationship, the following swivel arcs result for typical vanilla weapons:

Laser cannon (mass = 1 ton) 190 degrees
Turbolaser (mass = 1.5 tons) 154 degrees
Dual turbolaser (mass = 3 tons) 98 degrees
Moskva 33 repeater (mass = 4 tons) 79 degrees
Mark III howitzer (mass = 5 tons) 66 degrees
Fusionfire (mass = 6 tons) 57 degrees
Ares Plasma Archcannon (mass = 10 tons) 36 degrees

relanat
Militia Commander
Militia Commander
Posts: 380
Joined: Tue Nov 05, 2013 9:56 am

Re: Swivel Weapons Platforms

Post by relanat » Fri Jan 29, 2016 12:05 am

Initial impression of the Hermes and Apollo is way overpowered unless you were aiming for godmod status.

Hermes: Maybe cut the swivel amount by half? Only tried the dual laser and fast-fire laser but they seem too easy to use now.

Apollo: Omni launcher (using the NAMI only so far) is too much. Can use any NAMI missile to hit anything anywhere. Maybe try a 30 degree launch arc? Could work for freighters though. Only used the Wolfen so far.

Haven't got to the Zeus yet but the tradeoff of device slots and launcher to gain omni main weapon sounds good.

Possibly use a ROM to set the mounts to one manufacturer only on installation? Or have them manufacturer specific, but then you run into device stocking issues like at Rasier stations.

And the bug wording in the readme could say "installed/reinstalled" instead of "activate/deactivate" because I was disabling/enabling and not getting the swivel to work (duh)!

Sorry, I haven't had much time to check these out. More to follow.

User avatar
JohnBWatson
Fleet Officer
Fleet Officer
Posts: 1319
Joined: Tue Aug 19, 2014 10:17 pm

Re: Swivel Weapons Platforms

Post by JohnBWatson » Fri Jan 29, 2016 1:23 am

Omni launcher is about balanced with omni thermo cannon, and uses a device slot. Limiting it to 90 degrees would probably fix the issues with the more DPS - intensive launchers.

Partial omni weapon should be a bit more punishing with mass. Something like the APA shouldn't get anything out of it except 2 - 4 degrees.

Omni main weapon could do to be a better version of its lighter cousin. ~90 degrees to APA, ~180 to Plasma cannon, and only full omni for really light stuff.
Last edited by JohnBWatson on Fri Jan 29, 2016 2:19 am, edited 1 time in total.

gunship256
Militia Commander
Militia Commander
Posts: 451
Joined: Sat Jul 25, 2015 11:41 pm
Location: repairing armor

Re: Swivel Weapons Platforms

Post by gunship256 » Fri Jan 29, 2016 2:13 am

Thanks for the feedback! This is what I need to re-adjust the equation. I'm planning to add an additional constant, like so:

s = c/(dm - a)

s = swivel arc, in degrees
m = weapon mass
c, d, a: constants to be adjusted for balance

In order to solve for three constants, I need at least three reference points. One of them will be (0, 360), representing full swivel for a zero-mass weapon. It sounds like the Hermes mount is overpowered, so I probably need to set the 1.5 ton turbolaser at a 98 degree swivel and the 10-ton APA at a 4 degree swivel. Does that sound about right, given that the player has to give up one device slot? If it does, I can re-adjust the equation and upload a new version of the mod.
relanat wrote:Apollo: Omni launcher (using the NAMI only so far) is too much. Can use any NAMI missile to hit anything anywhere. Maybe try a 30 degree launch arc? Could work for freighters though. Only used the Wolfen so far.

Haven't got to the Zeus yet but the tradeoff of device slots and launcher to gain omni main weapon sounds good.

Possibly use a ROM to set the mounts to one manufacturer only on installation? Or have them manufacturer specific, but then you run into device stocking issues like at Rasier stations.
For the Apollo, is there a way to make the device less overpowered for the Wolfen but still usable for freighters and other ships that turn slowly? For example, would it work to keep the omnidirectionality but lower the launcher's fire rate?

For one manufacturer only, do you mean having a mount that has high swivel but only works on a limited set of weapons? Would that cause balance problems for certain kinds of playing styles? For example, players that favor the already overpowered howitzers could give all of their Makayev weapons swivel and simply choose not to install other kinds of weapons. I'm not saying that is a problem, but rather asking if you think it could be.

I thought about doing something similar based on device level. For example, there could be separate versions of mounts for weapons with bands of level 1-3, 4-6, 7-9, and 9-11. The increased expense, power use, and inconvenience could justify having a high degree of swivel. Does that sound about right?
JohnBWatson wrote:Omni launcher is about balanced with omni tritium cannon, and uses a device slot. Limiting it to 90 degrees would probably fix the issues with the more DPS - intensive launchers.

Partial omni weapon should be a bit more punishing with mass. Something like the APA shouldn't get anything out of it except 2 - 4 degrees.

Omni main weapon could do to be a better version of its lighter cousin. ~90 degrees to APA, ~180 to Plasma cannon, and only full omni for really light stuff.
For the omni launcher, do you mean specifically limiting the swivel degree only for high DPS launchers, or for all launchers?

I could make this more robust by limiting the swivel based on missile mass the same way the Hermes launcher works on weapons. For example, Broadswords wouldn't receive very much swivel, but Stilettos would.

A second possibility is to make the swivel arc smaller and use the same arc for all launchers.

A third possibility is to keep the omnidirectionality but weaken the launcher in some way, such as by reducing fire rate.

Do any of those possibilities sound like they would make the device more balanced?

For the partial omni weapon, do you mean that the amount of swivel is currently okay for light weapons, or that it's overpowered for all weapons, not just the APA?

I think the vanilla plasma cannon is a 2-ton weapon, barely heavier than the turbolaser. Its vanilla mass might actually be unbalanced, and I don't think I can fairly use it to balance this mod. I think I see where you're coming from, though. If I can get the Hermes equation tweaked, I have the necessary groundwork to modify the Zeus mount.
Last edited by gunship256 on Fri Jan 29, 2016 2:32 am, edited 1 time in total.

User avatar
JohnBWatson
Fleet Officer
Fleet Officer
Posts: 1319
Joined: Tue Aug 19, 2014 10:17 pm

Re: Swivel Weapons Platforms

Post by JohnBWatson » Fri Jan 29, 2016 2:27 am

gunship256 wrote: For the Apollo, is there a way to make the device less overpowered for the Wolfen but still usable for freighters and other ships that turn slowly? For example, would it work to keep the omnidirectionality but lower the launcher's fire rate?
Having it take ship mass into the equation would work. Larger ships can mount it with more stability, and thus get better firearcs. May not be perfect, but it'd definitely help balance it for large, slow ships.

For the omni launcher, do you mean specifically limiting the swivel degree only for high DPS launchers, or for all launchers?
I suppose all. An omnidirectional NAMI or MAG launcher isn't that overpowered, but the former uses lots of tracking and the latter AOE anyways. The later game launchers would probably need a 90 degree angle or less to be fairly balanced.
I could make this more robust by limiting the swivel based on missile mass the same way the Hermes launcher works on weapons. For example, Broadswords wouldn't receive very much swivel, but Stilettos would. Does that sound like it could work?
Fast, light missiles seem to have the highest DPS.
For the partial omni weapon, do you mean that the amount of swivel is currently okay for light weapons, or that it's overpowered for all weapons, not just the APA?
I think it's probably good for light weapons(though a bit lower may be best for the sake of making sure). Heavy WMD weapons should be more limited, especially high range ones.

gunship256
Militia Commander
Militia Commander
Posts: 451
Joined: Sat Jul 25, 2015 11:41 pm
Location: repairing armor

Re: Swivel Weapons Platforms

Post by gunship256 » Fri Jan 29, 2016 3:08 am

JohnBWatson wrote:Having it take ship mass into the equation would work. Larger ships can mount it with more stability, and thus get better firearcs. May not be perfect, but it'd definitely help balance it for large, slow ships.
That is an excellent idea. Did you play Playership Drones 6 very much? Can you think of examples of a few massive and not-so-massive ships and what launcher fire arcs you think they should have? I can make an equation based on that information.

Would it be too confusing if ordinary weapons swivel were dependent on both ship mass and weapon mass? If that's confusing for the player, it might make sense to leave ship mass out of the basic Hermes mount but incorporate both ship mass and weapon mass in the Zeus platform.
I think it's probably good for light weapons(though a bit lower may be best for the sake of making sure). Heavy WMD weapons should be more limited, especially high range ones.
I think I can see where both you and relanat could be right on this. Relanat tried two ultra-light weapons: the fast-fire laser cannon (1.25 tons) and the dual laser cannon (2 tons). It's possible that the 3-ton light weapon swivel is appropriate but that 1-ton and 2-ton weapons get too much swivel.

Based on that information, I can make a new equation based on the following reference points:

0-ton weapon: 120 degree swivel
3-ton weapon: 98 degree swivel
10-ton weapon: 4 degree swivel

If that sounds right to everyone, I'll do the recalculation.

User avatar
JohnBWatson
Fleet Officer
Fleet Officer
Posts: 1319
Joined: Tue Aug 19, 2014 10:17 pm

Re: Swivel Weapons Platforms

Post by JohnBWatson » Fri Jan 29, 2016 3:43 am

That is an excellent idea. Did you play Playership Drones 6 very much? Can you think of examples of a few massive and not-so-massive ships and what launcher fire arcs you think they should have? I can make an equation based on that information.
I haven't, so unfortunately my knowledge is limited there. I'd work with current stats on the freighter and just go downward from there towards something low for the Wolfen.

gunship256
Militia Commander
Militia Commander
Posts: 451
Joined: Sat Jul 25, 2015 11:41 pm
Location: repairing armor

Re: Swivel Weapons Platforms

Post by gunship256 » Fri Jan 29, 2016 5:12 am

I threw away the equation for the swivel calculation and started over. Here's what I have now:

s = (a*m^n + 121)/(a*m^n + 1) - 1

a = 0.0028
n = 4

This gives the following relationship between weapon mass and swivel:

1 ton -> 120 degrees (laser cannon)
2 tons -> 115 degrees (dual laser, mining laser, light recoilless, DK Arbalest, Shuriken, EMP cannon)
3 tons -> 98 degrees (dual turbolaser, heavy recoilless, Partisan, Flenser, lancer cannon)
4 tons -> 70 degrees (Urak mass driver, Morning Star, dual Moskva, Moskva repeater, TeV 9)
5 tons -> 44 degrees (mark III, Katana, tritium cannon, Iocrym fracture cannon)
6 tons -> 26 degrees (CLAW, heavy CLAW, dual Flenser, Sunflare, mark V, Fusionfire Hecates cannon)
7 tons -> 16 degrees
8 tons -> 10 degrees
9 tons -> 6 degrees (dual TeV 9)
10 tons -> 4 degrees (APA)
11 tons -> 3 degrees
12 tons -> 2 degrees (dual Fusionfire)

This mostly eliminates the large advantage ultra-light weapons had before, penalizes heavy weapons much more than before, and keeps the swivel for 3-ton weapons exactly the same as it was before.

How do the numbers look?
I haven't, so unfortunately my knowledge is limited there. I'd work with current stats on the freighter and just go downward from there towards something low for the Wolfen.
How much swivel should the launcher on the EI500 have?
Omni main weapon could do to be a better version of its lighter cousin. ~90 degrees to APA, ~180 to Plasma cannon, and only full omni for really light stuff.
This seems to be a device that the Wolfen shoudn't be allowed to use, but removing omni penalizes the freighter. Here's the compromise I'm thinking of:

The Zeus platform should give all weapons a lot more swivel than the Hermes device does, but it shouldn't make any of them omnidirectional. It should NOT use weapon slots, since that penalizes the freighter in favor of the Wolfen. Instead, it should take up two non-weapon device slots, making it very difficult for the Wolfen to use effectively and tough even for the Sapphire, which would have to give up a cargo hold, shield, launcher, engine, or Longreach. It should allow the ship the option to use a launcher.

Here are the numbers I'm thinking of:
0 tons: 360 degree swivel
6 tons: 180 degree swivel (dual Flenser, Fusionfire)
10 tons: 90 degree swivel (APA)

This seems okay to me, as a 180 degree swivel should feel about the same as a 75% DPS enhancement, which could be surpassed by using a high-speed howitzer loader + lithium booster instead. It's a 32% (geometric) or 38% (linear) enhancement per slot for a 6 ton weapon, which is the smallest weight of a usable WMD weapon in the late game.

If the device's power requirement is high enough (50 MW?) and the level is relatively high (7?), it would be costly to use it until a point where non-WMD weapons become impractical.

(EDIT: The device may need to be level 6 so it will show up for sale at Commonwealth armed colonies in midgame. The power use of other level 6 devices is 25 MW.)
Last edited by gunship256 on Sat Jan 30, 2016 4:54 am, edited 1 time in total.

User avatar
JohnBWatson
Fleet Officer
Fleet Officer
Posts: 1319
Joined: Tue Aug 19, 2014 10:17 pm

Re: Swivel Weapons Platforms

Post by JohnBWatson » Fri Jan 29, 2016 5:52 pm

The changes look good.

Launcher swivel for the freighter sounds reasonable at around 90 degrees. Might be worth taking mass into account given weapons like the NAMI heavy. Probably worth getting input from people other than me on this, as I rarely pair a freighter with a launcher.

User avatar
Arkheias
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Jun 02, 2014 8:06 pm

Re: Swivel Weapons Platforms

Post by Arkheias » Sat Jan 30, 2016 8:56 am

First of all, your mod is awesome and you should feel awesome. Second, I've found two things that really seem like they should be bugs but aren't because reasons that are unavailable because there's no documentation on any functions.

The first bug-that-is-not-a-bug is that the weapon platforms all seem to set their affected weapons' swivel value to Nil when the weapon platforms are uninstalled/disabled. If the affected weapons already had a swivel value before they were altered by the platforms, this value should be completely and utterly ignored as their swivel value is set to Nil regardless of their original value when the platform is uninstalled/disabled. Instead, these values seem to be reset to normal when the platform is deactivated.

The second bug-that-is-not-a-bug is that the weapon platforms modify all installed weapons of their category when they are installed/enabled and unmodify all installed weapons of their category when the platforms are uninstalled/disabled. Your code does not make any checks for the case in which a weapon is uninstalled while the platform is active.

It seems like you should be able to install a weapon, install/enable a corresponding weapon platform, uninstall the weapon, uninstall/disable the weapon platform, then reinstall the weapon and it would retain its modified swivel value even with the weapon platform inactive because the platforms only check installed weapon when they add/remove their modifications.

For some reason, this is not the case and I have no idea why.

If you use the following line to damage an item:

Code: Select all

(objSetItemProperty gSource theItem 'damaged True)
The item will remain damaged after uninstalling it.

However, if you use the next line to make a weapon omnidirectional:

Code: Select all

(objSetItemProperty gSource theItem 'fireArc 'omnidirectional)
It will reset to normal after uninstalling it.

And if you use the next line to remove all omnidirectional bonuses from a weapon:

Code: Select all

(objSetItemProperty gSource theItem 'fireArc Nil)
The weapon seems to just reset to its default fireArc immediately.

Nil should not be translated to mean default. Nil should be equal to 0. Just 0. Always and forever 0.

None of this makes any sense and yet the game seems to be bending over backwards to make your mod work perfectly.

How.
Cabbage Corp, the only mod with cabbages!

Please feel free to submit bug reports or issues related to the Cabbage Corp mod on the GitHub page, the forum thread, in a private message or even on the Xelerus page. Suggestions are fine too.

regurgi
Miner
Miner
Posts: 28
Joined: Thu Dec 24, 2015 6:39 pm

Re: Swivel Weapons Platforms

Post by regurgi » Sat Jan 30, 2016 9:27 am

I do believe the second one is because of how the game handles uninstalling and installing things.
Basically, when it uninstalls an item, it first deletes that item, then creates an identical one in your hold.

To create the identical one, it checks off a list of properties: Is it damaged? What enhancements does it have? And then applies those to the creation of a new item.

And when it installs an item, it does the same thing, so I think you should be able to modify the swivel value on a weapon in-hold, then install it, and it will also have gone back to default swivel value.

The first one is, I think, because fireArc isn't the only way to get a weapon to swivel or omnidirectional. To swivel I would normally set minFireArc and maxFireArc: just setting fireArc as a list is a new one to me. I would need to experiment, but my intuition tells me that fireArc overrides if present, and if set to Nil, minFireArc & maxFireArc, (or omnidirectional= true), will again work as normal.

If you want to experiment, I think the clearest way would be to change fireArc to minFireArc & maxFireArc in the extension's code and see if it behaves in line with your expectations.

gunship256
Militia Commander
Militia Commander
Posts: 451
Joined: Sat Jul 25, 2015 11:41 pm
Location: repairing armor

Re: Swivel Weapons Platforms

Post by gunship256 » Sat Jan 30, 2016 2:39 pm

Thanks for the feedback! The lack of documentation has been a bit confusing, to say the least. I use PM's mods a lot and am pretty familiar with his devices, so I've been doing multi-file searches for functions to use his code as a substitute for manuals. Some of his ideas, like the autobeamers and Berserker device, are really creative ways to add new functionality to the game while forcing the player to make sacrifices for balance.

Arkheias' Cabbage Corp is pretty creative with custom weapon design, though I'm not familiar enough with it yet to use it as a manual. I'm guessing I'll learn a lot about dockscreens by looking through your code.

Install/uninstall aren't the only strange things happening with weapon properties. For example, setting fireArc to list (170 190) should cause the weapon to become omnidirectional, but if I remember correctly when testing, the weapon reverts to fixed angle. (EDIT: It becomes a fixed-angle weapon that fires BACKWARDS.)

If I'm flying a ship that has built-in swivel slots, setting fireArc to Nil doesn't make a weapon fixed-angle. Its swivel reverts to the default swivel of the slot it's installed in.

I really appreciate the feedback, as the only way I've been able to learn so far is by trial and error, looking at other mods, and getting help on the forums.

How do you feel about the balance of the devices in the mod so far? I'm working on rewriting it to reduce the swivel, but I haven't uploaded a new version yet (see the posts of the past couple of days for the new, yet unimplemented swivel calculations). Are the devices in the current, downloadable version overpowered because they give weapons too much swivel?

User avatar
Arkheias
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Jun 02, 2014 8:06 pm

Re: Swivel Weapons Platforms

Post by Arkheias » Sun Jan 31, 2016 3:17 am

regurgi wrote:I do believe the second one is because of how the game handles uninstalling and installing things.
Basically, when it uninstalls an item, it first deletes that item, then creates an identical one in your hold.

To create the identical one, it checks off a list of properties: Is it damaged? What enhancements does it have? And then applies those to the creation of a new item.
The problem with that is that the game already has a method of copying an itemstruct that should automatically copy all of its properties:

Code: Select all

(setq theItem gItem)
And after the game uninstalls the item, the only property it should have to change to add an uninstalled version to the cargo hold would be:

Code: Select all

(objAddItem gSource (itmSetProperty theItem 'installed Nil))
Instead of creating a new/raw version of the item, copying over all of the old version's properties individually and then adding it to the cargo hold, it should just create a version of the old item, change its installed status, and then add it to the cargo hold.

If this is the problem, then we are stuck praying that George doesn't decide to fix this "problem" lest all mods that utilize this feature become useless, and we end up back at square one when it comes to creating pseudo-enhancer devices like these that function this well.
gunship256 wrote:How do you feel about the balance of the devices in the mod so far? I'm working on rewriting it to reduce the swivel, but I haven't uploaded a new version yet (see the posts of the past couple of days for the new, yet unimplemented swivel calculations). Are the devices in the current, downloadable version overpowered because they give weapons too much swivel?
I'm not sure about the best way to balance these devices, but you could always try turning them into enhancers that decrease the fireRate of affected weapons:

Code: Select all

	<EnhancementAbilities>
		<Enhance type=		"weaponPlatform"
				 criteria=		"wI;"
				 enhancement=	"+speed:200;" 	; This would make installed weapons fire half as often
		 />
	</EnhancementAbilities>
Or you could try to find some way to use objSetItemProperty to decrease the missileSpeed of the weapons by some percentage, or to increase their powerUse by some percentage, or to do something else.
Cabbage Corp, the only mod with cabbages!

Please feel free to submit bug reports or issues related to the Cabbage Corp mod on the GitHub page, the forum thread, in a private message or even on the Xelerus page. Suggestions are fine too.

gunship256
Militia Commander
Militia Commander
Posts: 451
Joined: Sat Jul 25, 2015 11:41 pm
Location: repairing armor

Re: Swivel Weapons Platforms

Post by gunship256 » Sun Jan 31, 2016 6:15 am

Arkheias wrote:I'm not sure about the best way to balance these devices, but you could always try turning them into enhancers that decrease the fireRate of affected weapons.
Thank you for the suggestion. I ended up needing to do that anyway because Transcendence seems to truncate numbers, turning them into integers, whenever I try to do basic mathematical operations with them, causing problems with formulas like this:

s = (330/m + 360)/(330/m + 1) -1

which I would have used to calculate swivel for a missile launcher based on the mass of the ship it's installed on. Based on what I've seen with other calculations in the debug console, the formula would be pretty accurate with small ship masses but would fail to function completely for any ship with a mas greater than 330 tons.

Rather than creating convoluted code to get around the problem, I chose to keep the omnidirectional properties of the Apollo and Zeus and to lower fire rate instead. I also made a new speed-'em-up enhancer that stacks with other enhancers, including itself. Ships with initially poor fighting setups but lots of device slots can mix and match the devices in this mod and become pretty powerful.

Here are the new balance calculations and a link to the mod.
d064_SwivelWeaponsPlatforms 0.12 alpha.zip
(7.42 KiB) Downloaded 40 times
BALANCE CALCULATIONS

(see earlier posts in this thread for the first couple of paragraphs)

Hermes swivel mount: Assume that a 3 ton weapon, which is the mass of a typical light weapon, should receive 98 degrees of swivel. Also assume that a hypothetical weapon with a mass of zero should receive a 120 degree swivel, that the APA should receive a four degree swivel, and that the amount of swivel should asymptote to zero as weapon mass approaches infinity.

This gives us the following relationship:

s = (a*m^n + 121)/(a*m^n + 1) - 1

s = swivel arc, in degrees
m = weapon mass, in tons

a = 0.02
n = 2.2

The equation above gives the following amounts of swivel:

1 ton -> 118 degrees (laser cannon)
2 tons -> 110 degrees (dual laser, mining laser, light recoilless, DK Arbalest, Shuriken, EMP cannon)
3 tons -> 98 degrees (dual turbolaser, heavy recoilless, Partisan, Flenser, lancer cannon)
4 tons -> 84 degrees (Urak mass driver, Morning Star, dual Moskva, Moskva repeater, TeV 9)
5 tons -> 71 degrees (mark III, Katana, tritium cannon, Iocrym fracture cannon)
6 tons -> 59 degrees (CLAW, heavy CLAW, dual Flenser, Sunflare, mark V, Fusionfire, Hecates cannon)
7 tons -> 49 degrees
8 tons -> 41 degrees
9 tons -> 34 degrees (dual TeV 9)
10 tons -> 29 degrees
11 tons -> 24 degrees
12 tons -> 21 degrees (dual Fusionfire)
25 tons -> 4.8 degrees (APA)

(NOTE: The calculation from v0.11 alpha incorrectly used a mass of 10 tons for the APA for the table above.)

The swivel on the left and right side would each be half of the total.

NOTE: Transcendence automatically truncates numbers, turning them into integers, when it does mathematical operations with functions like (divide). I'm not yet sure how to adjust for this without convoluting the calculations in the code.

I first tried to make the Zeus platform give a 0 tons weapon 360 degree swivel, a 6 ton weapon 180 degree swivel, and a 25 tons weapon 90 degree swivel. Because of the number truncation problem, all weapons received too much swivel, and 6 ton weapons actually became omnidirectional. I couldn't figure out how to fix this cleanly, since the math involves taking fractional exponents and multiplying the result by fractional number (a = 0.17; n = 0.89).

The Zeus platform now makes the main weapon omnidirectional but imposes a speed penalty (+speed:120). The speed penalty was calculated assuming that making a weapon omni makes it 2.5 times as powerful and that the two-slot requirement should be about equal to a 100% enhancement already. Using geometric progression, a 20% penalty applied to a 2.5 power weapon reduces it to a 100% enhanced weapon. The speed penalty should feel most punishing for howitzers and the APA, so this uses a different path to get us to the original goal of punishing heavier weapons more than light ones.

For the Apollo platform, using s = (330/m + 360)/(330/m + 1) = 1 (where m = ship mass) will give the 30-ton Wolfen a launcher swivel of 30 degrees, the 150-ton EI500 112 degrees, the 500-ton EI200 216 degrees, and 2100-ton EI7000 310 degrees, and the 10 kiloton Antares V 348 degress. But I can see just from looking at the math that the function roundoff is going to ruin these calculation results.

Instead, I'm choosing to lower fire rate. If making a weapon omni makes it 2.5 times as powerful, making a launcher omni has to have less benefit, since the most useful missiles are tracking missles. Assume that an omni launcher is 2 times as powerful, which is the same as a 100% enhancement or a two-level enhancement. Since a launcher enhancer only affects the launcher, its enhancement should be comparable to other enhancers that affect a very limited scope of weapons. The laser collimator and manufacturer-specific enhancers provide a 75% DPS improvement. If the Apollo device is to improve the launcher by 100% when it should only do so by 75%, there needs to be a speed decrease of a factor of 100/75 = 1.33. The Apollo device will therefore make a launcher omnidirectional but reduce its fire rate by a factor of 1.33.

The Atalanta makes all weapons fire faster, not just howitzers, so it should not improve speed as much as the high-speed howitzer loader does (42%). Also, the Atalanta stacks when multiple versions of the same device are installed, but the howitzer loader doesn't. (The Atalanta and howitzer loader do stack with each other, though.) Set the speed modification at +speed:74, which is the same as a 35% enhancement.


QUESTIONS

* Hermes swivel mount: should the degree of swivel be changed? Which weapons are getting too much swivel: light weapons or heavy ones? Which weapons receive too little swivel? I can adjust the equation based on suggestions regarding weapon balance.

* How do the Apollo and Zeus do with their new fire rate reductions? Are they still overpowered? If so, is that because omni weapons are worth more than the 150% enhancement I'm assuming they're worth, or is it for a different reason?

* Is the Atalanta overpowered? Underpowered? Why?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest