This is a tough one
I have spent close to four hours scratching my head, and have consulted two other moders to try and solve this problem, with no results yet. So I have turned too the forums in hope of a solution. The error is rather strange, as it only occurs when the part is in game, not when the game is being launched. The part can be seen for a second, before the game crashes. This error is caused by a modified Electro Bolt for Drones ++. I would really appreciate the help! All the related content is below:
Error:
MODS ARE ENABLED. THIS CRASH MAY BE CAUSED BY A MOD.
PLEASE REPORT IT TO THE CREATOR OF THE MOD.
System.NullReferenceException: Object reference not set to an instance of an object.
at Cosmoteer.Ships.Crew.Jobs.AmmoFetchJob.GetAmmoSupplierUncached(Part searchFrom, Boolean requireActualAmmo, Single& distance) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Ships\Crew\Jobs\AmmoFetchJob.cs:line 266
at Cosmoteer.Ships.Crew.Jobs.AmmoFetchJob.GetAmmoSupplier() in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Ships\Crew\Jobs\AmmoFetchJob.cs:line 250
at Cosmoteer.Ships.Crew.Jobs.AmmoFetchJob.get_DesiredCrew() in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Ships\Crew\Jobs\AmmoFetchJob.cs:line 38
at Cosmoteer.Ships.Crew.Jobs.JobManager.MicroUpdate(FixedUpdater microUpdater, SimRoot sim) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Ships\Crew\Jobs\JobManager.cs:line 188
at Cosmoteer.Ships.MicroUpdateableShipComponent.Cosmoteer.Simulation.IMicroUpdateableSimObject.MicroUpdate(FixedUpdater microUpdater, SimRoot sim) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Ships\MicroUpdateableShipComponent.cs:line 158
at Cosmoteer.Simulation.SimRoot.ParallelMicroUpdate(IMicroUpdateableSimObject[] array, Int32 startIndex, Int32 count) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Simulation\SimRoot.cs:line 1104
at Cosmoteer.Simulation.SimRoot.MicroUpdate() in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Simulation\SimRoot.cs:line 954
at Halfling.Timing.FixedUpdater.Update(Time deltaTime, Action action) in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Timing\FixedUpdater.cs:line 110
at Halfling.Scene.Dim2.SceneRoot.Update() in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Scene\Dim2\SceneRoot.cs:line 697
at Cosmoteer.Simulation.SimRoot.Update() in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Simulation\SimRoot.cs:line 542
at Cosmoteer.Game.GameRoot.Update(StateMethodInvoker updateParent) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Game\GameRoot.cs:line 1162
at Halfling.Application.AppStateEx.Halfling.Application.IAppState.Update(StateMethodInvoker updateParent) in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\AppStateEx.cs:line 212
at Halfling.Application.Director.CallUpdate() in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\Director.cs:line 828
at Halfling.Application.Director.DoUpdate() in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\Director.cs:line 718
at Halfling.Application.Director.<GetRunIterator>d__83.MoveNext() in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\Director.cs:line 333
at Halfling.Application.Bases.GenericApp.<ApplicationMainIterator>d__42.MoveNext() in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\Bases\GenericApp.cs:line 249
at Halfling.Windows.D3D11.D3D11Window.RunGameLoop(String[] args, IEnumerable`1 iterator) in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingPlatformWDX\Windows\D3D11\D3D11Window.cs:line 855
at Halfling.Application.Bases.GenericApp.ApplicationMain(String[] args) in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\Bases\GenericApp.cs:line 163
at Cosmoteer.GameApp.Main(String[] args) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\GameApp.cs:line 114
01/28/2018 20:51:43 | Logging successful initialized.
01/28/2018 20:51:43 | .NET Runtime Version: 4.0.30319.42000
01/28/2018 20:51:43 | Running as a 64-bit process.
01/28/2018 20:51:43 | Local: en-AU
01/28/2018 20:51:43 | Language: en-US
01/28/2018 20:51:43 | Cosmoteer version 0.13.5_rc1
01/28/2018 20:51:43 | RELEASE CANDIDATE
01/28/2018 20:51:43 | Microsoft Windows 10 Home 64-bit 10.0.16299
01/28/2018 20:51:43 | Intel(R) Celeron(R) CPU N2840 @ 2.16GHz (2 logical processors)
01/28/2018 20:51:43 | 3978.2 MB RAM
01/28/2018 20:51:43 | Intel(R) HD Graphics (10.18.10.4276) (17/08/2015)
01/28/2018 20:51:43 | 2053.1 MB VRAM
01/28/2018 20:51:43 |
01/28/2018 20:51:44 | Loaded app settings.
01/28/2018 20:51:44 | Mixpanel Distinct ID: 2a89b3fa-f78e-4d07-8094-5f2dd2402945
01/28/2018 20:51:44 | Process is now DPI-aware.
01/28/2018 20:51:44 | Setup default cursor.
01/28/2018 20:51:44 | Using display adapter 0
01/28/2018 20:51:44 | Created DXGI factory.
01/28/2018 20:51:44 | Adapter #0: Intel(R) HD Graphics
01/28/2018 20:51:44 | Output #0: Generic PnP Monitor (1366x768)
01/28/2018 20:51:44 | Output #1: Generic PnP Monitor (1280x1024)
01/28/2018 20:51:44 | Adapter #1: Microsoft Basic Render Driver
01/28/2018 20:51:44 | Updated Windows form configuration for borderless window.
01/28/2018 20:51:44 | Created Windows form.
01/28/2018 20:51:44 | Direct3D Feature Level: Level_11_0
01/28/2018 20:51:44 | Created Direct3D 11 Device.
01/28/2018 20:51:44 | Created swap chain: 1366x768.
01/28/2018 20:51:44 | Created window.
01/28/2018 20:51:44 | Created clock.
01/28/2018 20:51:44 | Created graphics manager.
01/28/2018 20:51:44 | Created XAudio2 device.
01/28/2018 20:51:44 | Created audio manager.
01/28/2018 20:51:45 | Created input manager.
01/28/2018 20:51:45 | Created default font.
01/28/2018 20:51:45 | Initial app state is 'MainMenu'
01/28/2018 20:51:45 | Initial application settings:
01/28/2018 20:51:45 | LastGameVersion:
01/28/2018 20:51:45 | InitState: MainMenu
01/28/2018 20:51:45 | Language:
01/28/2018 20:51:45 | LockCursor: True
01/28/2018 20:51:45 | EdgePanMode: Analog
01/28/2018 20:51:45 | EdgePanSpeed: 15
01/28/2018 20:51:45 | KeyboardPanSpeed: 15
01/28/2018 20:51:45 | KeyboardZoomSpeed: 10
01/28/2018 20:51:45 | KeyboardRotSpeed: 90°
01/28/2018 20:51:45 | EnableMouseWheelZoom: True
01/28/2018 20:51:45 | InvertMouseWheelZoom: False
01/28/2018 20:51:45 | MouseWheelZoomSpeed: 1.12
01/28/2018 20:51:45 | MouseWheelZoomAtCursor: True
01/28/2018 20:51:45 | StickyFocus: True
01/28/2018 20:51:45 | HighDpiMode: False
01/28/2018 20:51:45 | AnimateBackgrounds: True
01/28/2018 20:51:45 | FancyParticles: True
01/28/2018 20:51:45 | UncompressedTextures: False
01/28/2018 20:51:45 | AllowShipDeselection: False
01/28/2018 20:51:45 | CtrlSelectsParts: False
01/28/2018 20:51:45 | PreferBlueprintMode: False
01/28/2018 20:51:45 | BlueprintAutoPause: True
01/28/2018 20:51:45 | BuildAutoFocus: True
01/28/2018 20:51:45 | BuildAutoRotate: True
01/28/2018 20:51:45 | BuildAutoInteriors: True
01/28/2018 20:51:45 | PaintAutoFocus: True
01/28/2018 20:51:45 | PaintAutoRotate: True
01/28/2018 20:51:45 | PaintAllowOverwrite: True
01/28/2018 20:51:45 | PaintMirrorMode: False
01/28/2018 20:51:45 | RepairAutoFocus: True
01/28/2018 20:51:45 | RepairAutoRotate: False
01/28/2018 20:51:45 | BuildAllowOverwrite: True
01/28/2018 20:51:45 | BuildAutoDoors: True
01/28/2018 20:51:45 | BuildEnforceCrewAccess: True
01/28/2018 20:51:45 | BuildMirrorMode: False
01/28/2018 20:51:45 | GrabLeavesCorridors: True
01/28/2018 20:51:45 | RepairAutoDoors: True
01/28/2018 20:51:45 | AutoHireCrew: True
01/28/2018 20:51:45 | PartToolTips: True
01/28/2018 20:51:45 | AutoSave: True
01/28/2018 20:51:45 | AutoSavesToKeep: 10
01/28/2018 20:51:45 | QuickSavesToKeep: 10
01/28/2018 20:51:45 | AutoSaveInterval: 600
01/28/2018 20:51:45 | FtlAutoSave: True
01/28/2018 20:51:45 | ShowOnShipIndicators: True
01/28/2018 20:51:45 | AutoPauseOnLostFocus: True
01/28/2018 20:51:45 | ScreenShake: True
01/28/2018 20:51:45 | VersionCheckMode: Unstable
01/28/2018 20:51:45 | EnableMetrics: True
01/28/2018 20:51:45 | PreferBorderlessWindowToggle: False
01/28/2018 20:51:45 | MasterVolume: 1
01/28/2018 20:51:45 | EffectsVolume: 1
01/28/2018 20:51:45 | InterfaceVolume: 1
01/28/2018 20:51:45 | ShowTutorials: True
01/28/2018 20:51:45 | AutoFtlJump: False
01/28/2018 20:51:45 | PaintSchemes: System.Collections.Generic.List`1[Cosmoteer.Ships.PaintScheme]
01/28/2018 20:51:45 | DefaultBuildTool: Grab
01/28/2018 20:51:45 | DefaultDecalTool: Grab
01/28/2018 20:51:45 | DontReportErrorsForShips: System.Collections.Generic.HashSet`1[System.String]
01/28/2018 20:51:45 | TutorialPageStates: System.Collections.Generic.Dictionary`2[System.String,Cosmoteer.Tutorials.TutorialPageState]
01/28/2018 20:51:45 | PlayerColor:
01/28/2018 20:51:45 | EnemyColor:
01/28/2018 20:51:45 | NeutralColor:
01/28/2018 20:51:45 | MiniviewInCombatMode: Auto
01/28/2018 20:51:45 | MiniviewNotInCombatMode: Auto
01/28/2018 20:51:45 | MiniviewLockRotation: False
01/28/2018 20:51:45 | MiniviewSize:
01/28/2018 20:51:45 | ShowInteriors: False
01/28/2018 20:51:45 | AlwaysShowCommandWidgets: False
01/28/2018 20:51:45 | PreferWorldRelativeAttackAngle: False
01/28/2018 20:51:45 | PreferWorldRelativeFollowAngle: False
01/28/2018 20:51:45 | ShipLibraryLargeIcons: False
01/28/2018 20:51:45 | AdHocFormations: False
01/28/2018 20:51:45 | EnabledMods: System.Collections.Generic.HashSet`1[System.String]
01/28/2018 20:51:45 | DeleteFileOnStartup:
01/28/2018 20:51:45 | FeedbackEmail:
01/28/2018 20:51:45 | DefaultGameMode:
01/28/2018 20:51:45 | DefaultCreativeModeMapSize: 0
01/28/2018 20:51:45 | DefaultBountyModeDifficulty: 0
01/28/2018 20:51:45 | DefaultBountyModeMapSize: 0
01/28/2018 20:51:45 | DefaultBountyModeStarterShip: 0
01/28/2018 20:51:45 | WarnOutOfDateGpuDrivers: True
01/28/2018 20:51:45 | DefaultMPJoinHostname:
01/28/2018 20:51:45 | PlayerName:
01/28/2018 20:51:45 | MPShipColorMode: RandomPerPlayer
01/28/2018 20:51:45 | MPBlipColorMode: FriendAndFoe
01/28/2018 20:51:45 | AutoPortForwarding: True
01/28/2018 20:51:45 | DisplayPublicIP: True
01/28/2018 20:51:45 | PreferLAN: False
01/28/2018 20:51:45 | CustomServers: System.Collections.Generic.List`1[Cosmoteer.Multiplayer.ServerInfo]
01/28/2018 20:51:45 | DefaultServer: 0
01/28/2018 20:51:45 | ShowNewsOnStartup: True
01/28/2018 20:51:45 | ReadNewsArticles: System.Collections.Generic.HashSet`1[System.String]
01/28/2018 20:51:45 | Starting main game loop...
01/28/2018 20:51:45 | Enabled mods:
01/28/2018 20:51:45 | Drones ++
01/28/2018 20:51:45 | Loaded language 'en'.
01/28/2018 20:52:47 | Loaded game rules.
01/28/2018 20:53:37 | Game pushed onto stack.
01/28/2018 20:53:37 | Game mode is: CreativeGameModeManager
01/28/2018 20:56:01 | Memory usage at time of crash: 751,788,032
01/28/2018 20:56:01 | Application state stack at time of crash:
01/28/2018 20:56:01 | Cosmoteer.Game.GameRoot
01/28/2018 20:56:01 | Cosmoteer.Gui.TitleScreen
01/28/2018 20:56:01 | FPS at time of crash: 59.97304
01/28/2018 20:56:01 | Running processes at time of crash: ApplicationFrameHost, audiodg, chrome, chrome, chrome, chrome, chrome, Cosmoteer, csrss, csrss, ctfmon, dasHost, Discord, Discord, dllhost, dwm, explorer, fontdrvhost, fontdrvhost, GoogleCrashHandler, GoogleCrashHandler64, googledrivesync, googledrivesync, HeciServer, Idle, igfxCUIService, igfxEM, igfxHK, InputPersonalization, LenovoSetSvr, LenovoWiFiHotspotSvr, LockApp, lsass, LSCNotify, mDNSResponder, Memory Compression, notepad++, NSBU, NSBU, OneDrive, PDVD10Serv, PhoneCompanionPusher, PresentationFontCache, RichVideo64, RuntimeBroker, RuntimeBroker, RuntimeBroker, RuntimeBroker, RuntimeBroker, RuntimeBroker, SearchIndexer, SearchUI, SecurityHealthService, services, SettingSyncHost, ShellExperienceHost, sihost, SkypeHost, smartscreen, smss, spoolsv, Steam, SteamService, steamwebhelper, steamwebhelper, steamwebhelper, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, svchost, SynTPEnh, SynTPHelper, System, SystemAgentService, taskhostw, taskhostw, wininit, winlogon, WinStore.App, wmpnetwk, WUDFHost, WUDFHost, XboxApp,
01/28/2018 20:56:01 | System.NullReferenceException: Object reference not set to an instance of an object.
01/28/2018 20:56:01 | at Cosmoteer.Ships.Crew.Jobs.AmmoFetchJob.GetAmmoSupplierUncached(Part searchFrom, Boolean requireActualAmmo, Single& distance) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Ships\Crew\Jobs\AmmoFetchJob.cs:line 266
01/28/2018 20:56:01 | at Cosmoteer.Ships.Crew.Jobs.AmmoFetchJob.GetAmmoSupplier() in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Ships\Crew\Jobs\AmmoFetchJob.cs:line 250
01/28/2018 20:56:01 | at Cosmoteer.Ships.Crew.Jobs.AmmoFetchJob.get_DesiredCrew() in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Ships\Crew\Jobs\AmmoFetchJob.cs:line 38
01/28/2018 20:56:01 | at Cosmoteer.Ships.Crew.Jobs.JobManager.MicroUpdate(FixedUpdater microUpdater, SimRoot sim) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Ships\Crew\Jobs\JobManager.cs:line 188
01/28/2018 20:56:01 | at Cosmoteer.Ships.MicroUpdateableShipComponent.Cosmoteer.Simulation.IMicroUpdateableSimObject.MicroUpdate(FixedUpdater microUpdater, SimRoot sim) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Ships\MicroUpdateableShipComponent.cs:line 158
01/28/2018 20:56:01 | at Cosmoteer.Simulation.SimRoot.ParallelMicroUpdate(IMicroUpdateableSimObject[] array, Int32 startIndex, Int32 count) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Simulation\SimRoot.cs:line 1104
01/28/2018 20:56:01 | at Cosmoteer.Simulation.SimRoot.MicroUpdate() in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Simulation\SimRoot.cs:line 954
01/28/2018 20:56:01 | at Halfling.Timing.FixedUpdater.Update(Time deltaTime, Action action) in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Timing\FixedUpdater.cs:line 110
01/28/2018 20:56:01 | at Halfling.Scene.Dim2.SceneRoot.Update() in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Scene\Dim2\SceneRoot.cs:line 697
01/28/2018 20:56:01 | at Cosmoteer.Simulation.SimRoot.Update() in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Simulation\SimRoot.cs:line 542
01/28/2018 20:56:01 | at Cosmoteer.Game.GameRoot.Update(StateMethodInvoker updateParent) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\Game\GameRoot.cs:line 1162
01/28/2018 20:56:01 | at Halfling.Application.AppStateEx.Halfling.Application.IAppState.Update(StateMethodInvoker updateParent) in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\AppStateEx.cs:line 212
01/28/2018 20:56:01 | at Halfling.Application.Director.CallUpdate() in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\Director.cs:line 828
01/28/2018 20:56:01 | at Halfling.Application.Director.DoUpdate() in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\Director.cs:line 718
01/28/2018 20:56:01 | at Halfling.Application.Director.<GetRunIterator>d__83.MoveNext() in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\Director.cs:line 333
01/28/2018 20:56:01 | at Halfling.Application.Bases.GenericApp.<ApplicationMainIterator>d__42.MoveNext() in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\Bases\GenericApp.cs:line 249
01/28/2018 20:56:01 | at Halfling.Windows.D3D11.D3D11Window.RunGameLoop(String[] args, IEnumerable`1 iterator) in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingPlatformWDX\Windows\D3D11\D3D11Window.cs:line 855
01/28/2018 20:56:01 | at Halfling.Application.Bases.GenericApp.ApplicationMain(String[] args) in C:\Users\Walt\Documents\Code\Cosmoteer\Halfling\HalflingCore\Application\Bases\GenericApp.cs:line 163
01/28/2018 20:56:01 | at Cosmoteer.GameApp.Main(String[] args) in C:\Users\Walt\Documents\Code\Cosmoteer\Source\GameApp.cs:line 114
01/28/2018 20:56:01 | Director received exit call.
01/28/2018 20:56:01 | Disposed default font.
01/28/2018 20:56:01 | Disposed XA2AudioManager device.
01/28/2018 20:56:01 | Disposed audio manager.
01/28/2018 20:56:01 | Disposed clock.
01/28/2018 20:56:01 | Disposed input manager.
01/28/2018 20:56:01 | Disposed graphics manager.
01/28/2018 20:56:01 | Disposed swap chain.
01/28/2018 20:56:01 | Disposed Direct3D device.
01/28/2018 20:56:01 | Disposed DXGI factory.
01/28/2018 20:56:01 | Closed Windows form.
01/28/2018 20:56:01 | Director received exit call.
01/28/2018 20:56:01 | Disposed window.
01/28/2018 20:56:01 | Disposed platform interface.
01/28/2018 20:56:01 | Closing log output file...
Electro Bolt Code
Part : /BASE_PART
{
NameKey = "Parts/DroneElectroBolt"
IconNameKey = "Parts/DroneElectroBoltIcon"
IDString = drone_electro_bolt
EditorGroup = "Weapons"
DescriptionKey = "Parts/DroneElectroBoltDesc"
Cost = 3000
AIValue = 15
TypeCategories = [weapon, weapon_using_power]
Size = [1, 3]
PhysicalRect = [0, 1, 1, 3]
SaveRect = &PhysicalRect
SelectionPriority = 1
SelectionTypeByRotation = true
MaxHealth = 6000
PenetrationResistance = 3
ProhibitAbove = 1
AllowedDoorLocations
[
[0, 3]
]
EditorIcon
{
Texture
{
File = "icon.png"
SampleMode = Linear
}
Size = [21, 64]
}
BlueprintSprites
[
{
File = "blueprints.png"
Size = [1, 4]
Offset = [0, -0.5]
}
]
PowerUIStats
{
Min = 2
Ideal = 4
}
CrewUIStats
{
Min = 1
Ideal = 5
}
Components
{
PowerToggle
{
Type = UIToggle
ToggleID = "on_off"
DefaultToggleValue = 1
RequiredForWholePartOperation = true
ToggledOnChoices = [1]
}
FireModeToggle
{
Type = UIToggle
ToggleID = "fire_mode"
DefaultToggleValue = 1
ToggledOnChoices = [1]
}
BatteryStorage
{
Type = AmmoConsumer
AmmoType = battery
MaxAmmo = 4000
LowConsumeJobPriority = &/TERRAN_PRIORITIES/ElectroBolt_LowConsume
HighConsumeJobPriority = &/TERRAN_PRIORITIES/ElectroBolt_HighConsume
EmptyConsumeJobPriority = &/TERRAN_PRIORITIES/ElectroBolt_EmptyConsume
JobUnassignThreshold = 1000000 // Effectively unassignable.
ResupplyThreshold = 1000
RequiredForWholePartOperation = true
AmmoDesireToggle = PowerToggle
ReceiveAmmoMediaEffects = &/EFFECT_PREFABS/PowerDeliver
}
Graphics
{
Type = Graphics
Location = [.5, 2.5]
Floor
{
Layer = "floors"
DamageLevels
[
{
File = "floor.png"
Size = [1, 3]
}
{
File = "floor_33.png"
Size = [1, 3]
}
{
File = "floor_66.png"
Size = [1, 3]
}
]
}
OperationalDoodad
{
Layer = "doodads_high"
DamageLevels
[
{
AnimationFiles
[
"doodads_on1.png"
"doodads_on2.png"
"doodads_on3.png"
"doodads_on4.png"
"doodads_on5.png"
"doodads_on6.png"
"doodads_on7.png"
"doodads_on8.png"
]
Size = [1, 3]
Offset = [0, -0.5]
AnimationInterval = 0.1
}
]
}
NonOperationalDoodad
{
Layer = "doodads_high"
DamageLevels
[
{
File = "doodads_off.png"
Size = [1, 3]
Offset = [0, -0.5]
}
]
}
OperationalLighting
{
Layer = "lights_add"
DamageLevels
[
{
File = "lights.png"
Size = [1, 3]
}
]
}
Walls
{
Layer = "walls"
DamageLevels
[
{
File = "walls.png"
Size = [1, 2]
Offset = [0,-0.5]
}
{
File = "walls_33.png"
Size = [1, 3]
}
{
File = "walls_66.png"
Size = [1, 3]
}
]
}
Roof
{
Layer = "roofs"
DamageLevels
[
{
File = "roof.png"
Size = [1, 2]
Offset = [0,-0.5]
}
{
File = "roof_33.png"
Size = [1, 2]
Offset = [0,-0.5]
}
{
File = "roof_66.png"
Size = [1, 2]
Offset = [0,-0.5]
}
]
}
OperationalRoofDoodad
{
Layer = "roof_doodads"
Offset = [0, -.5]
DamageLevels
[
{
AnimationFiles
[
"roof_doodads_on1.png"
"roof_doodads_on2.png"
"roof_doodads_on3.png"
"roof_doodads_on4.png"
"roof_doodads_on5.png"
"roof_doodads_on6.png"
"roof_doodads_on7.png"
"roof_doodads_on8.png"
]
Size = [1, 2]
AnimationInterval = 0.1
}
]
}
NonOperationalRoofDoodad
{
Layer = "roof_doodads"
Offset = [0, -.5]
DamageLevels
[
{
File = "roof_doodads_off.png"
Size = [1, 2]
Offset = [0, -0.5]
}
]
}
}
Turret
{
Type = TurretWeapon
Location = [.5, .34375] // Relative to upper-left corner of unrotated part.
Rotation = -90d // Relative to unrotated part.
FireInterval = .5
FireDelay = .3
FiringArc = 200d
RotateSpeed = 90d
FireThresholdAngle = 1d
SpawnLoc = [.5, 0]
AmmoStorage = BatteryStorage
AmmoUsed = 250
TargetSearchTriesPerFrame = 1
AIFirepowerRating = 600
FireModeToggle = FireModeToggle
Emitter
{
Type = Bullet
Bullet = &<Drone Electro Bolt Shot.txt>
}
BlueprintArcSprite
{
Texture = &/INDICATORS/WeaponArc
Size = [0, 1.5]
Color = [255, 0, 0, 63]
}
BlueprintArcRadius = 10
BlueprintArcSpriteSegments = 64
CoverageSectorArc
{
Texture = &/INDICATORS/Falloff
VertexColor = [255, 255, 255, 51]
QuadCount = 64
}
}
FireEffect
{
Type = TriggeredEffects
ChainedTo = Turret
Location = [.766, 0]
AnchorMediaEffects = true
MediaEffects
[
: /PARTICLES/ElectroBoltShoot
{
Delay = .3
}
: /SOUNDS/AudioExterior
{
Sound = "electro_bolt_charge.wav"
Volume = .25
Speed = 1.5
}
: /SOUNDS/AudioExterior
{
Sound = "electro_bolt_fire.wav"
Volume = 1
Delay = .3
SpeedVariation = .05
}
]
}
TurretCollider
{
Type = CircleCollider
ChainedTo = Turret
Radius = .45
Density = .75
}
WeaponSprite
{
Type = Sprite
ChainedTo = Turret
Location = [.34375, 0]
Rotation = 90d
Layer = "weapons"
ResetAnimationTrigger = Turret
AtlasSprite
{
AnimationFiles
[
"turret2.png"
"turret3.png"
"turret4.png"
"turret5.png"
"turret6.png"
"turret7.png"
"turret8.png"
"turret1.png"// Loop back to beginning and clamp there.
]
Size = [2, 2]
AnimationInterval = 0.06
AnimationStartTime = MinValue
ClampAnimation = true
}
}
AmmoSprites
{
Type = AmmoSprites
Location = [.5, 2.5]
AmmoStorage = BatteryStorage
Layer = "doodads_low"
AmmoLevels
[
{
File = "batteries1.png"
Size = [1, 3]
}
{
File = "batteries2.png"
Size = [1, 3]
}
{
File = "batteries3.png"
Size = [1, 3]
}
{
File = "batteries4.png"
Size = [1, 3]
}
]
}
OperationEffects
{
Type = OperationEffects
Location = [.5, 1.5]
BecameOperationalMediaEffects = &/EFFECT_PREFABS/PowerOn
BecameNonOperationalMediaEffects = &/EFFECT_PREFABS/PowerOff
}
DestroyedEffects
{
Type = DeathEffects
MediaEffects = &/EFFECT_PREFABS/MedPartDestroyed
Location = [.5, 2]
HitEffects
[
{
Type = PartAreaAmmoDrain
AmmoType = battery
AmountPerPart = 2000
Radius = 4
Falloff = 0
Delay = 0
AllowFriendlyDamage = true
}
{
Type = PartAreaAmmoDrain
AmmoType = battery
AmountPerPart = 1000
Radius = 3
Falloff = 0
Delay = .5
AllowFriendlyDamage = true
}
{
Type = PartAreaAmmoDrain
AmmoType = battery
AmountPerPart = 500
Radius = 2
Falloff = 0
Delay = 1
AllowFriendlyDamage = true
}
{
Type = PartAreaAmmoDrain
AmmoType = battery
AmountPerPart = 250
Radius = 1
Falloff = 0
Delay = 1.5
AllowFriendlyDamage = true
}
]
}
Indicators
{
Type = IndicatorSprites
Location = [.5, 2]
Layer = "indicators"
Indicators
[
// Turned off.
{
Source = PowerToggle
AtlasSprite
{
File = &/INDICATORS/PowerOff
Size = [1, 1]
}
}
// Out of power.
{
Source = BatteryStorage
AtlasSprite
{
File = &/INDICATORS/NoPower
Size = [1, 1]
}
}
]
}
}
}
Electro Bolt Shot Code
ID = drone_electro_bolt_shot
Range = 80
IdealRange = 60
Speed = 60
Components
{
Physics
{
Type = CirclePhysics
Radius = 0.01
Density = 0.1
}
Death
{
Type = DeathByLifetime
// Lifetime will be auto-calculated based on range and speed.
}
Sprite
{
Type = AnimatedSprite
Animation
{
AtlasSprite
{
Texture
{
File = "bolt.png"
SampleMode = Linear
MipLevels = max
}
Size = [2, 2]
}
FrameCount = 8
FrameSize = [128, 128]
FramesPerRow = 2
FramesPerSecond = 60
}
}
MediaEffects
{
Type = MediaEffects
InheritVelocityFrom = Physics
MediaEffects
[
&/PARTICLES/ElectroBoltShotGlow
]
}
Hit
{
Type = PenetratingHit
PhysicsComponent = Physics
PenetratesShields = true
EffectScalePerHit = 0.66
HitShield
{
HitEffects
[
: ../../HitOperational/HitEffects/0
{
Amount = 900
}
]
MediaEffects = &../HitOperational/MediaEffects
}
HitOperational
{
HitEffects
[
{
Type = PartAmmoDrain
AmmoType = battery
Amount = 600
MediaEffectsOnDrain
[
&/PARTICLES/ElectroBoltDischarge
: /SOUNDS/AudioExterior
{
Sound = "electro_bolt_discharge.wav"
Volume = 1
SpeedVariation = .2
}
]
}
{
Type = PartDamage
Damage = 100
}
]
MediaEffects
[
&/PARTICLES/ElectroBoltHit
&/PARTICLES/ElectroBoltSparks
&/PARTICLES/ElectroBoltFlash
: /SOUNDS/AudioExterior
{
Sound = "electro_bolt_hit.wav"
Volume = .4
SpeedVariation = .4
}
]
}
HitStructural
{
HitEffects
[
{
Type = PartDamage
Damage = 75
}
]
MediaEffects
[
&/PARTICLES/ElectroBoltHitStruct
: /SOUNDS/AudioExterior
{
Sound = "electro_bolt_hit.wav"
Volume = .3
SpeedVariation = .4
}
]
}
PenetratingOperational
{
// No effect.
}
PenetratingStructural
{
// No effect.
}
FinishedPenetratingOperational = &PenetratingOperational
FinishedPenetratingStructural = &PenetratingStructural
}
}