StarMade v0.201.126 - Weapon Update

After over 100 dev builds, the weapons update is finally here. It might be even bigger in scope than the power update. It not only introduces a lot of new features, it also has complete redesigns and code reworks of parts of the codebase. It also comes with fixes for a lot of the more serious bugs as well as stability updates and lot of minor fixes and upgrades.

As always, make sure to do a full backup on your world and blueprints. We tested both fresh installation and upgrade multiple times, and couldn’t find any problem, but there is always a rest risk in updates this big.

The weapon handling, projectile, and block processing code has been completely rewritten, as well as parts of the missile system, and a lot of other backend systems to improve performance and stability. This also allows for a lot faster development for these systems from here on out.

In context of the main focus of this update we also improved combat stability and performance a lot, as well as hopefully fixed most of the nasty bugs that were affecting ship combat in the last release.

There might still be some issues with some systems losing server synch temporarily under load, but those will be addressed in a follow-up cleanup update.

Features

We set out to do this update mainly to make combat and ship battles more interesting and fun. On the backend, this also gave us a chance to completely redesign the code of weapons and other usable modules in the game. A new code design was already partly set up with the power update, and this updates completes it.

To make a more complete package, new features and improvements have been added all across the board.

Weapon & Tool redesign

The goal is to make weapons and their combination a lot more unique, while still being a viable option. Some weapons might be easier to use than most, but others could have a much higher pay off when used properly. As each weapon combination has clear positives and negatives, it is up to you to decide what weapons to make.

We also wanted to give weapons and combat in general a better feeling. This incorporates a broad spectrum of features including the HUD, recoil, explosions, physical force, damage, armor, and many more.

While we changed and added on existing weapons, we did remove the damage pulse entirely as it had no real purpose. It also reduced the amount of combinations possible which allows us to concentrate more on the remaining ones.

Acid Damage model

Acid Damage is the new damage model used by Cannons and Beams to increase block damage without affecting performance. In our tests, this system allowed us to get 90-95% of the original damage to be applied as block damage, giving us the possibility of one projectile destroying thousands of blocks without running into performance problems.

This is achieved by propagating damage outwards, block by block, starting from an origin block.

The propagation speed can be adjusted to move faster or slower depending on the processing power and bandwidth of the server. Several bandwidth optimizations have been made to make the information on removed blocks as small as possible. As a result, even large amounts of blocks get processed quickly without any hiccups.

We can change its behavior while this is propagating as well, allowing for unique damage patterns to be implemented.

Cannons

Cannons are now mainly a high penetration weapon, capable of punching through thin armor and leaving a lot of damage in its wake.

Like before, each projectile has a penetration depth based on its damage. This can range from 1 to 200+ blocks. Each block in this penetration line, acts as the starting point for Acid Damage to start from. The damage of the entire projectile is then distributed accordingly to end up with the appropriate damage shape.

A general change to cannons is that all projectiles are now considerably faster, which will make battles at higher speeds a lot easier.

Over Penetration

Using cannons with too much damage can cause the projectiles to overpenetrate. This happens only when targets have little to no armor, compared to your shot. If this happens, then the penetration depth is stretched before the original damage is distributed on it. This may result in even more system damage...or it may come out of the back of the target and end up wasting most of its damage.

Projectile Width

By putting down blocks next to your weapon’s output, you can increases its projectile width. On impact, this will cause more damage to be redirected towards the front, basically shrinking your damage pattern and increasing its width. This can be used to counter any over penetration, or to destroy more superficial blocks if needed.

Recoil + Impact force

Every Cannon projectile applies a force on both the shooter and the target. The force and amount of movement created, solely depends on the weapon damage.

The physical recoil on your ship is in the opposite way of the firing direction, the impact force on your target is in line with the firing direction as you would expect.

There is also something we call ‘cursor’ recoil, meant to give a better feeling to cannons and reduce its accuracy slightly when fired manually. It’s kept at a manageable level, and scales properly with your fire rate and damage. There’s also a maximum cursor recoil threshold in place to make sure even the biggest of weapons don’t throw your aim around too much.

Cannon Combinations

The core idea of each combination is mostly unchanged, but they behave in different ways. It’s possible we still add or change parts of them depending on feedback, but the overall role of each support should stay the same.

Cannon + Missile: Charge cannon with left click to charge, release to fire. The longer it is charged, the better the efficiency and damage of that shot. It also uses the Cone: Wide-> Narrow damage shape.

Cannon + Beam: A slow firing artillery cannon with a narrow -> wide cone damage shape. Even when over penetrating, it will be relatively efficient, but it is hard to hit.

We’ve changed the Damage <-> Power consumed ratio to be different for each combination. It allows us to balance the high risk weapons to reliable damage dealing ones. A slow firing cannon is always more efficient, as a miss or a bad hit is a huge waste of time and power.

Each combination also has a default sniper zoom mode, toggled with right click. It ranges from 2x to 4x and greatly enhances accuracy on long range targets.

Some examples of the damage left by only a few projectiles:

~ High damage projectile:

~ Multiple medium damage projectiles:

Damage Beams

Damage Beams are mostly about doing surface damage and being easier to use. Beams only apply Acid damage on the block they’re hitting, damage will most likely not reach deep within the target unless you focus fire on a particular spot. The only exception to this rule is the Beam support version, where it does penetrate all the way.

We’ve improved the functionality of Beams to allow for that. Some versions are capable of traveling along its target without you firing or aiming it again, they’ll deal decent damage as well but may not necessarily stay where you want them to be.

Damage over Distance

Unlike Missiles or Cannons, beams lose damage with the distance from target. At maximum range, it goes down to only 40% of its original damage. This increases the closer you get, till it reaches the original value at about 400 meters or less. This can vary depending on the combination and allows us to better balance a hitscan weapon.

Combinations

Default: Latch on beam that breaks off when it has no direct line of sight with the current block.

Beam + Cannon: Aimable beam with short burst time and cooldown

Beam + Missile: Arc beam with a shorter range but doesn’t break when there is no direct line of sight anymore. Has a long burst time.

Beam + Beam: Penetrating beam that can’t be aimed with your cursor. The damage of the beam is distributed equally over the blocks in the penetration line. Requires to be charged before firing and stops your shields from blocking damage while you are charging.

Repair Beam

The repair beam or astrotech beam is now capable of repairing and replacing killed blocks. The reason this has taken longer is several problems to optimize this system for large scale, as well as handling the logic of connections. At the moment, you can only replace the blocks in order (as if you pressed “undo”), but out of order repairing will be added as a follow up.

If you connect any amount of storages to your beam computer, it will be using those for repairs. If there is no storage attached, the blocks will be taken out of the pilot’s personal inventory (if possible).

Keep in mind that for balance reasons you currently cannot repair during battle.

Tractor Beam

The new tractor beam replaces the push and pull beam of the previous release. This weapon is able to hold another entity in place. It can also move with you as you either rotate or move yourself while still firing the beam. It comes with a built-in mode change so you can push the target further out or pull it in. You can change the firing mode by pressing left alt (also now indicated in the context help).

Armor

Armor has been completely redesigned as well. There is no longer an abstract “Armor HP”. Armor now will count where it is and how thick it is, you can see this in build mode as well when looking at any armor block. Here is how it works:

When a bullet hits armor it checks how many armor blocks come behind that block in its path.

The count of armor will stop at any non armor block or air. That count defined the “armor depth”

Each armor block now has an armor rating that will get added up (with possible additional bonuses on thicker armor)

The resulting total armor value along the armor depth is then compared with the bullet’s damage

Is the armor value lower than the bullet’s damage, the bullet will travel on as normal and destroy the armor blocks along its way

Is the armor value higher than the bullet’s damage, the bullet will only do acid damage on the first block and stops completely

Is the armor value much higher than the bullet’s damage, acid damage is not even applied and only a single block gets normal damage and stops completely

This will be repeated for every continuous plate of armor the bullet goes through in a ship, so inner armor a very viable option

This means, that a sufficient armor depth can stop any shot, and it also means that it depends on the angle of the shot, where that armor is, and what type of armor was used. These values mainly affect the penetration of cannon projectiles although beam acid damage gets affected by the armor rating as well.

In addition, the HP of Armor has been increased to make it capable to absorb more damage.

You can check your armor rating in build mode by just looking at your armor while having any armor block selected on your hotbar. It will tell you exactly how deep and how much armor the ship has from the angle you are looking from. Note that the armor rating does not scale linear with thickness but has increased values for every added layer in addition to the flat amount of the block itself..

Missiles

Missile Capacity

To add another layer to using missiles, we added a Missile Capacity system that will also prevent you from spamming them. By placing missile capacity blocks on your entity, you increase the maximum amount of missiles to be stored. The missiles are reloaded in bulk, as soon as you fire a missile, the reload starts. When the timer runs out, all the missing missiles are filled up again.

For AI controlled ships, the reload only starts when they run out of missiles, this helps control the amount of missiles flying around.

In addition, you require additional power for the missile capacity blocks. This should normally not be a concern unless you’re deliberately trying to store too many missiles for your ship’s size.

Missile Shield + Point Defense Prioritization

Each missile has its own its shield, protecting it from Point Defence turrets. The strength of this shield scales with the missile’s damage and should also encourage firing more high damage missiles than trying to flood the field with low damage decoys.

We’ve also implemented proper anti-missile prioritization. You can set any of your AI to fire at a certain category first:

High damage missiles

Low damage missiles

Random (Closest First (old system))

Missile Combinations

Default: Fast non tracking missiles

Missile + Cannons: Heat-seeking swarming missiles

Missile + Beam: Lock-On Missiles

Missile + Missile: A bomb with no self-propulsion and uses the ship’s velocity as its own. The bomb will ignore shields and does friendly fire as well. It will arm itself after several seconds, it won’t detonate (dud) if it isn’t armed yet, so you can’t fire it at point-blank range of your target.

Volley Fire

Changing firing mode from focused to unfocused has been changed to a keyboard toggle for all weapons (default: left alt). We added an additional mode for cannons and missiles as well: Volley fire. This mode will take the time to reload the weapon, and divide it by the amount of groups connected to that computer. When firing, the groups will fire one after another.

Volley fire can also be set in the Bobby-AI module for turrets and drones to use.

New HUD graphics

The HUD graphics have been improved to improve usability and distinction between objects and improve the general look.

All indicators now also have been moved to the center of mass of entities. They will still be on the core if you are aligned or in gravity of an entity.

Undocking

Entities will no longer undock when their rail or rail docker is destroyed. However, until those are replaced at the exact position, or manually undocked and docked on a different one, the dock will not receive any power from the mothership.

This will greatly help with lag in larger ship battles, where the undocking of turrets and other docks was one of the biggest parts of lag-causing elements.

Improved graphical effects

The graphical effects for cannons, beams and missiles have been improved. Also more and better explosions have been added.

Also an all new LoD system has been implemented which is currently in use for the mines to be able to have a lot of them in one sector without problems. The system is written in a way that it can be used for a lot of other things in the future.

New Textures

Kupu has done an exceptional job in upgrading the texture to be more crisp than ever before, fixing many previous tiling issues and colour inconsistencies.

Lead indicator

Cannons and missiles now also have a lead indicator based on the selected weapon’s projectile speed. Currently the indicator is based on the target’s center of mass.

Effects

The old effect computers have all been removed as most don’t have a purpose anymore. We’ve replaced it with a 3 damage type system with base values for each weapon type:

Kinetic (Cannons)

Electromagnetic (Missiles)

Heat (Beams)

You can adjust the basic damage distribution of each weapon by linking it to the specific effect computer you want it to have.

There are also defensive reactor chambers to strengthen your ship/structure against these damage types respectively.

Any damage in the game is now a composition out of these three effects. For example, a sun will now do heat damage. We plan to further expand on this system for the universe update.

Sector Size Weapon Range independency

To make it easier to customize the game for bigger sectors, we added a seperate value in the ServerConfig to set the base range for weapons independently from the sector size. This value will be used as reference for all range config values in the block behavior config. This value can also be set on the fly with an admin command (/set_weapon_range_reference).

If the value is set to 1, all config values will be interpreted as fixed block units (meters).

Mines

The ability to place down stationary mines was added. This feature comes with an all new LoD system that will be reused for other model based things in the future. The Minelayer works like a tiny mobile shipyard, with the Minelayer connected to a Mine core and a storage chest to pull the mine blocks from.

Next to the mine core you can place up to 6 mine-specific block modifications. The mine core block plus its modifications are used as a “blueprint” for the mine’s capabilities, while the constructed and deployed mine itself is not a block but a small 3D model.

Constructing and laying a mine requires blocks from either the pilot’s inventory, or its linked storage. All newly deployed mines are inactive. You can activate them by right clicking, or via the radial ship menu for more options.

Mines can be destroyed by being shot, or simply physically running into them (which may not always be the best idea).

Mines can also be laid via logic by connecting a logic block to the mine layer.

The following mine-types are available:

Cannon Mine: This mine fires cannon projectiles when in range

Missile Mine: This mine fires heat-seeking missiles when in range.

Proximity Mine: The classic mine. Once a targets gets within range, it activates the mine and will follow the entity that triggered it, explodes on impact. Once triggered, it is used up.

The following Mine Modifications are available:

Cannon Mine Mod: turns mine into cannon mine

Missile Mine Mod: turns mine into missile mine

Proximity Mine Mod: turns mine into proximity mine

Strength Mod: increases mine damage

Personal AI Mod: mine will not attack the one that laid it down

Friend AI Mod: mine will only attack the enemies of the person who laid it down

Stealth Mod: with each additional mod the mine will gain one point in stealth. Depending on recon strength while scanning the mine will be invisible at distance (distance depends on the difference of stealth vs recon)

Cargo Damage

Storage chest blocks (the controllers) don’t get physically destroyed anymore unless they’re empty or have no linked used volume remaining.

This block (or group of blocks) is destroyed on passthrough if the connected storage has no remaining items. If the storage has remaining items, the damage is done to the stored items themselves, meaning that items are being destroying emptying the storage. HP are irrelevant to these blocks as every shot will do passthrough damage. The shot will not lose any strength and continue. The storage will lose items on every storage block the shot passes through.

The storage block has the same mechanics as the cargo blocks.

Integrity changes

Integrity will no longer lower while a ship is in battle. When a system block is destroyed, integrity will not update for 5 minutes and only then update itself to the new correct value. This timer resets every time a system block gets taken out.

This means any ship is equally viable in terms of integrity, as long as its integrity is positive when going into battle. It will also help with lag from explosions and the snowball effect once a ship dips into negative integrity.

AI

The AI now uses a better system to gauge their weapon range. Also their aiming has been fixed and improved.

Shield changes

Shields now always regenerate over time again and when under fire only lose regeneration when the shield HP goes down. When not under fire, shields will always regenerate at full speed. Any shield starts in its strongest configuration and can be weakened through high damage weapons if it is a recharge focused shield. Or by a steady stream of small weapon fire if it is a capacity focused shield. The config was changed to allow for that and you may end up with a disportionate amount of regeneration vs capacity with your current builds. Make sure to double check if your regeneration is still positive

New Isanth

Lancake has updated the old Isanths’ systems to use new power and the new weapons. Be aware that these ships pack quite a punch now.

The new model will automatically replace the blueprints of the old ones upon start, so if you have modified and overwritten those blueprints (with the exact same name), be sure to make a backup before running the new version.

Block Hitpoints

All block HP are being migrated to a new system that supports any amount of HP. While at the same time not increasing amount of data used for HP for memory reasons, the only difference would be that a block with max HP higher than 127 will needs a minimum damage dealt to it for its HP to decrease.

The minimum amount of damage is x/127. This means that you need at least ~8 damage to hurt a block with 1000 Max Hitpoints.

Optimizations

Several optimizations have been made to the game.

The rewrite of the weapon and general usable module system made the amount of steps involved in pretty much everything weapon and module related a lot less. Not only does this result in much cleaner code, but also a general speed up.

The update system for modules is now on-demand, which means the system will not bother to even check if the blocks of a group changed as long as there hasn’t been an actual notification for that. This means that the general idle time for all entities has been cut down significantly. This is very noticable in sectors with a lot of entities and docks.

Block processing has been optimized to minimize the amount of lookups by grouping all changes by chunk. This also cuts down on synchronization time between threads and cleans up the code considerably in that section. This makes block processing in general a lot quicker, especially during battles.

Stalling missiles now timeout to not cause performance hit (will be fully fixed in follow up)

What’s next

Next is going to be a bug-fixing and cleanup round. We will be trying to make the game as stable as possible for the period of the universe update development. Other changes might include reactor chamber balance changes and small changes to weapons based on feedback.

We already started with some aspects of the universe update in the background, and we will now focus more and more on that.

We can’t promise a universe related dev build for a while, but there might be a few highly experimental test builds before that.