Location of Artillery Sounds?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
MadClown01
Fast Inserter
Fast Inserter
Posts: 161
Joined: Fri Dec 22, 2017 12:38 am
Contact:

Location of Artillery Sounds?

Post by MadClown01 »

Hello

I am trying to modify the gunsounds for the artillery turret & wagon.
I have successfully done this for hand-held weapons and other turrets by editing the attack_parameters property, which includes the gunsound.

However, when I run the following code

Code: Select all

data.raw.item["artillery-turret"].attack_parameters.sound =
{
	filename = "__Epic-Artillery-Sounds__/sounds/KABOOM.ogg",
	volume = 1
}
I am given an error, as apparently attack_parameters is a nill value for these items.

Does anyone have any idea which properties of the artillery turret & wagon are the ones containing their gunsounds?

Cheers

Bilka
Factorio Staff
Factorio Staff
Posts: 3159
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Location of Artillery Sounds?

Post by Bilka »

It seems to be defined in the gun:

Code: Select all

{
    type = "gun",
    name = "artillery-wagon-cannon",
    icon = "__base__/graphics/icons/tank-cannon.png",
    icon_size = 32,
    flags = {"goes-to-main-inventory", "hidden"},
    subgroup = "gun",
    order = "z[artillery]-a[cannon]",
    attack_parameters =
    {
      type = "projectile",
      ammo_category = "artillery-shell",
      cooldown = 200,
      movement_slow_down_factor = 0,
      projectile_creation_distance = 1.6,
      projectile_center = {-0.15625, -0.07812},
      range = 7 * 32,
      min_range = 1 * 32,
      projectile_creation_parameters = require("prototypes.entity.artillery-cannon-muzzle-flash-shifting"),
      sound =
      {
        {
          filename = "__base__/sound/fight/tank-cannon.ogg",
          volume = 1.0
        }
      },
    },
    stack_size = 1
},
Hope that helps :)
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
MadClown01
Fast Inserter
Fast Inserter
Posts: 161
Joined: Fri Dec 22, 2017 12:38 am
Contact:

Re: Location of Artillery Sounds?

Post by MadClown01 »

Hey thanks heaps! :lol:

Post Reply

Return to “Modding help”