August 21st 2020 by SDGNelson
188.8.131.52 update with Scorpion-7 defenses, electric flashlight and dual-wielding pistols.
Scorpion-7 personnel left these automated defenses watching over their facility during evacuation. Their scanners detect motion, so you can stand still while they pass over you to remain unseen.
It may seem odd to add robots before zombies, but these were a good match for the features in this update e.g. reworking some aspects of the weapon rigs for dual-wielding allowed the weapon animations to play on the drone. I also want to have a good basis for AI in the game before starting the open-world roaming zombies.
The drones share the same weapon code as players. This was a big step up from Unturned where the sentry guns have their own implementation of the gun features. Sharing the code will be useful for AI humans, sentries, mounted turrets, vehicle turrets, etc.
I am curious to experiment with enemy variety for Unturned II. I think that different locations having different enemy types with different strategies (e.g. the motion sensors) will help spice things up.
Flashlight and Pistol
A one-handed flashlight and batteries have been added. This should make the maps explorable at night time. I went a little overboard with the electric item features: the battery voltages and amp hours are measured, and affected by whether the item is wired in series or parallel. Depending on feedback I might simplify this to stored joules instead.
The one-handed test pistol from ages ago has been brought up to date, and 9mm ammo was added for it. Note that some aspects like dual-wielding reloads have not been sorted out yet.
Future dual-wielding changes needed:
- Animations that affect both hands. For example reloading the gun with a flashlight should use the flashlight hand to grab a new magazine.
- Two-handed grips for one-handed items. Holding a pistol with both hands would enable aiming down sights.
- Adjust item pose based on the paired item. Holding a pistol and flashlight should rest the pistol arm on the flashlight arm.
Following all the improvements in 2.8 and Epic officially supporting Blender with Unreal, I have been getting back into using Blender full time. Soon I intend to work on some Unturned II addons for Blender. The trirotor drone was my first character made with the tool in a long time:
Persistent Reference Improvements
When saving the game the drone spawners keep a reference to the drone they spawned, and likewise the new item spawners on the Firing Range keep a reference to the latest item they spawned. This allows the save to be loaded without respawning existing enemies, and led to a variety of savedata improvements. In the future this will be used for items like car keys to be referenced by the vehicle.
There were a lot of fixes behind the scenes as part of the other features, but these ones are actually relevant to gameplay:
- Handbrake animation now stops when exiting a vehice.
- Pressing R to reload does not interrupt the reload in progress.
- Spawn item command was not formatting the name properly if the item got merged (and subsequently destroyed) during grant.
- Falling out of the map will teleport back to a spawnpoint.
The engine was updated from 4.24.3 to 4.25.3. This should not have much noticeable impact. I did however replace my hacked-together animation graph linking with the new built-in animation layers features.
Originally the motion of the weapon in the denizen hands was kept in the weapon animations, but this was a bad idea. It meant every character weapon anim needed a matching item weapon anim, and weapons could not be static meshes. For everyone's sanity this has been moved into Weapon_L and Weapon_R joints on the character, and the anim specific to the weapon e.g. chamber sliding back can be played on non-characters like the drone. The fire axe was converted to a static mesh.
Other Trirotor Drone Stuff
Since they are pawns you can actually play as drones in the editor. It might be fun to have an admin command for that at some point.
The attribute modifiers (used for attachments and wearables) were used to modify the drone stats to make them worse at aiming. Unfortunately the AR is so accurate that the drone has literally a +10,000% worse spread stat. This might need to be reconsidered.
Since drones cannot reload they have infinite ammo, but this feels like a cheat. Bandit AI will need to be able to reload as well, so at some point I would like to have a machine the drones return to for ammo refills.