Skip to content

Conversation

@royfalk
Copy link
Contributor

@royfalk royfalk commented Dec 28, 2025

Ammo will not add mass or volume. This includes missiles.
This is a temporary fix for now. Ideally, we should refactor both mounts and turrets.
However, this is a major undertaking.

Closes #1488

Code Changes:

Issues:

  • Ammo should have mass and volume.
  • Guns have ammo. Missiles are ammo. Not sure how the game handles the dissonance.

Ammo will not add mass or volume. This includes missiles.
as volume was 0 and there was a div by 0 error.
Copy link

@kheckwrecker kheckwrecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unable to confirm whether this has resolved the issue or not, as I'm now unable to purchase any ammo or weapons at all for the Dostoevsky. Everything under ammo and weapons shows up in Ship Upgrade in purple, including the dumbfire ammo.

@royfalk
Copy link
Contributor Author

royfalk commented Dec 29, 2025

I'm unable to confirm whether this has resolved the issue or not, as I'm now unable to purchase any ammo or weapons at all for the Dostoevsky. Everything under ammo and weapons shows up in Ship Upgrade in purple, including the dumbfire ammo.

Well that's not good. Are you starting from a new game and buying a clean Dostoevsky?

@kheckwrecker
Copy link

I started from a new game and bought a clean Dostoevsky. I also started from an older saved game and purchased a clean Dostoevsky. I was unable to purchase dumbfire missiles in either scenario.

@royfalk
Copy link
Contributor Author

royfalk commented Jan 5, 2026

Hmm. Looks like this is more complicated.
Weapons in general shouldn't count toward upgrade volume, as they are all mounted on dedicated hard points.
But, the game also has some kind of calculation for missile mounts - you can fit several light missiles in a medium mount.
Need some more tweaking.

- Prevent weapons from costing upgrade volume
- Refactor concluseTransaction
- Remove superfluous upgradeNotAddedToCargo function.
@royfalk
Copy link
Contributor Author

royfalk commented Jan 5, 2026

Accidentally committed to task_fix_1411 and not here.
Two main issues remain:

  1. Need to check we've covered all possibilities for upgrades.
  2. Number of missiles upgrades is a weird function of mount sizes (really a bit field). This hack produces inconsistent but plausible results. For example, Dostoevsky buys a light missile. light missile size is 64. Missile mount size is light (64) + medium (128) + heavy (256). Result is seven missiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Problems upgrading Dostoevsky ships

4 participants