Attack on Toys

Attack on Toys

Not enough ratings
🔧 Attack on Toys MOD: Weapons
By N7T-GAMES
• Create [WEAPON] for Toys AI
• Create [ITEM] [WEAPON] for Player
   
Award
Favorite
Favorited
Unfavorite
⚑ [WEAPON] Multishoot
  • Base Prefab: [WEAPON] Base
  • You will need to set MultiShootTime and set MuzzleEnds more than one
    • Result: Rapid Revolver shoot two time every 0.12s. Then reload back for 2s (Rate Of Fire)
⚑ [WEAPON] Heal
  • Base Prefab: [WEAPON] Base Heal
  • This will target and heal Friendlies (+75 HP * Bullet Heal Scale)
⚑ [WEAPON] Melee
  • Base Prefab: [WEAPON] Melee Base
  • Recommended to set Favourite Target Tag Soldier to increase damage to Soldier
    • Damage To Soldier (300 * 2.5) = 750
    • Damage To Vehicle & others = 300
    You could also use this method for Sniper that focus on killing Soldier

  • RateOfFire is only used for AI, so it will play Melee Attack Animation for every 0.5s.
    • Player use Animations HitBox Frame Data, so this value doesn't really affect Player.

⚫ Weapon Melee Zombie *Example
  • Using Radius as distance check
  • RateOfFire, Attack for every 1.5s
⚑ [WEAPON] Animations
⚫ Simple Rotation Animation
  • You could use RotationActions for simple rotation Animation
  • Adjust rotation Axis & Speed based on your weapon. Minigun-like weapon mostly using Z_AXIS

A. Create Custom Animation
  • For more Complex [WEAPON] Animation you could create [AO] (Animator Override)
B. Create Custom Animation Key Frames
  • Create your own Weapon Animation Key frames using Unity Animation Recording.
    IMPORTANT!: Make sure your Weapon is Final before doing this step. Because slight change of Transform may cause Animation to not working and you must redo this step again!
⚑ [WEAPON] Base & Muzzle Rotation To Target
  • Add Base Rotation (Tank Head Rotation) and then Muzzle Rotation (Tank Barrel Rotation)

  • You also could add Pump Actions Animation
    • Adjust how far it Pump Action goes (-1.2, Minus value will go backward)
    • Then adjust how much the Speed (1.2)
⚑ [WEAPON] Adjust [IsVisible] Box
  • Adjust the Purple Box to cover most of the 3D Weapon Model and don't forget to revert back
  • This is for game Optimization

  • Most ArmyMan & BlocksMan [WEAPON] Soldier are relatively small size. So you could leave the scale to (1.5 / 1.5 / 3)
★ [WEAPON] Stats Details
  • FavouriteTargetTag: Increase Damage to specific Tag
  • SpecialFavouriteTargetTag: Add Damage to specific Tag
  • BulletSpread: Weapon Bullet Spread or Accuracy

  • Radius: Distance when Toys AI start Attacking
  • RateOfFire: Lower Value means Faster FireRate
  • RotationSpeed: Weapon for Soldier doesn't need rotation, so you could set it to 0.
    Tank, Tower, etc might need RotationSpeed

  • MultiShootTime: Rapid firing mode
    • Example: Assault Rifle Three Round Burst Round, Rapid Revolver, etc

  • FireSound: Drag and insert your [SOUND].
    • Example: [SOUND] Assault Rifle Fire, [SOUND] Shotgun Fire, [SOUND] Zombie Melee Attack

  • Base & Muzzle Rotation: Mostly used for Tank, Tower, Turret, etc (Rotating to target)

  • BulletQuantity: How much Bullet in each shoot.
    • Example: Shotgun

  • EffectMuzzleFlash: This is where Bullet Spawns and also play [EFFECT] Muzzle Flash

  • Recoil: PLAYER ONLY. Bigger Recoil means bigger Camera Shake
⚑ Player [ITEM] [WEAPON] Pistol
  • Base Prefab: [ITEM] [WEAPON] [PRIMARY] Base
  • Set IdleAnimation to Pistol
⚑ Player [ITEM] [WEAPON] Sniper
  • Base Prefab: [ITEM] [WEAPON] [PRIMARY] Base
  • Add [AIM FOCUS] and then adjust it's position somewhere in sniper scope

  • CameraAimingFOVMultiplier: Just like actual Sniper, you could add Zoom in & out mechanic (Player Using mouse wheel scroll while Aiming). Smaller Value means it could Zoom-in more!
    • Example:
    - SniperAimFOV = 6 & FOVMultiplier = 0.5
    - Result: Player could Zoom-in from 6 FOV to 3 FOV (6 * 0.5) 'Smaller FOV will Zoom-in more'
⚑ Player [ITEM] [WEAPON] Mortar
  • Base Prefab: [ITEM] [WEAPON] [PRIMARY] Mortar Base
  • Set all Crosshair to Mortar
  • Adjust AimZoomOut, how much zoom out when Player aiming using Mortar
    • Y: Increase Camera height
    • Z: Zoom Out Camera Distance (Recommended is -45)
⚑ Player [ITEM] [WEAPON] Melee
  • Base Prefab:
    [ITEM] [WEAPON] [PRIMARY] [MELEE] Base
    [ITEM] [WEAPON] [PRIMARY] [MELEE] Blunt Base
    [ITEM] [WEAPON] [PRIMARY] [MELEE] Edge Base
    [ITEM] [WEAPON] [PRIMARY] [MELEE] Point Base

  • OnlyHitOneTarget: Only able to hit single target in one swing
  • isDoRagdollOnHit: Enemy goes to Ragdoll State when got hit by Player
  • isIgnoreToyHeroRagdoll: Enemy Hero will NOT go to Ragdoll State when hit
⚑ Player [ITEM] [WEAPON] Dual Left Hand Weapon
  • Base Prefab: [ITEM] [WEAPON] [ABILITY] Left Hand Primary Weapon Base
  • Make sure isDualWieldWeapon is ✔ Active

  • CustomLeftHandFire: Custom Player Animation picking up Dual Wield Weapon with Left Hand and ready to fire. Make sure your Animation Clip Name start with: Left Hand Fire Custom
    • Example: Left Hand Fire Custom SMG, Left Hand Fire Custom Shotgun, etc
⚑ Player [ITEM] [WEAPON] Grenade
[WEAPON] Grenade
[ITEM] [WEAPON] [2ND] Grenade

  • Base Prefab: [ITEM] [WEAPON] [2ND] Grenade Base
  • Make sure to use Bullet Grenade inside WeaponBaseScript
    IMPORTANT!: All things that related to Grenades is for PLAYER ONLY. Toys AI CAN NOT use Grenade Weapon

  • You could add CustomThrowAnimation, make sure your Animation Clip Name start with: Left Hand Throw Custom
    • Example: Left Hand Throw Custom Flashbang, Left Hand Throw Custom Molotov, etc
⚑ [ITEM] [WEAPON] - [LEFT HAND] Helper
  • You could drag [MOD HELPER] Left Hand to [LEFT HAND] Position
  • This will help you get an idea to adjust [LEFT HAND] Position correctly.
  • Don't forget to remove the [MOD HELPER] Left Hand afterward
⚑ [ITEM] [WEAPON] Profile Data ICON
★ [ITEM] [WEAPON] [PRIMARY] Stats Details
  • BulletDamageScale: Increase Weapon Damage Scale
  • BulletDamageScale: Increase Weapon Spread
  • RateOfFireScale: Lower Value means Faster FireRate

  • FavouriteDamageScale: Increase Favourite Damage Scale
  • SpecialFavouriteDamageScale: Add Special Favourite Damage Scale

  • HitEffectIntervalScale: Bigger Value means decreasing the HitEffect
    • Example: Flamethrower shoot [BULLET] Flame... and then the Bullet can spawn [DAMAGE] Flame HitEffect. So you might need to decrease the spawn otherwise the Flamethrower might bee to overpowered and also will cause Game Performance Issue because too much Flame Effect Playing at once

  • MaxMagazine: Set 0 to unlimited ammo slot (By default) or you could adjust the value for overpowered weapons.
    • Example:
    - Ammo = 3 & Max Magazine = 10
    - Result: The Maximum Ammo Capacity Total is 30 (3 * 10)

  • AmmoReductionChance: Chance to not use any Ammo when shooting, set it to 100 for Unlimited Ammo
    • Example: Pistol

  • isSingleFire: Shoot once per Mouse Click

  • Crosshair: Choose Crosshair that match with your Weapon
  • AimFOV: Bigger Value means the Player Aim will get more Zoom-in

  • FirstPersonVector: Sometime there is Weapon that are too big in sizes like Bazooka, Quad Rocket. You might need to adjust them so the First-Person-Mode Camera View doesn't get blocked.
    • X: Add Left or Right Position
    • Y: Add Height Position
    • Z: Add Forward or Backward Position


  • ReloadAnimation: Set to default to enable Reload Animation Function

  • CustomReloadAnimation: Custom Animation Clip Name must start with Reload Custom
    • Example: Reload Custom Shotgun, Reload Custom Bazooka

  • CustomReloadingSoundAnimation: Delay Timer to play Reloading Sound, when Player start doing Reload Animation

  • DisableFPSMode: Player can't go to First-Person-Shooter Mode.
    • Example: Player can't go FPS Mode while using Melee Weapon

  • FullUpperBodyAnimation: Take total control of Upper Body Animation. This function mostly used for Melee Weapon Only.

  • CustomIdleAnimation: Custom Animation Clip Name must start with Idle Weapon Custom
    • Example: Idle Weapon Custom Shotgun, Idle Weapon Custom Revolver

  • CustomAttackAnimation: Custom Animation Clip Name must start with Attack Custom
    • Example: Attack Custom Rifle, Attack Custom Submachinegun

  • LefthandIKOverride: Set to default if you don't want Player Original LeftHandIK Settings
🔧 Weapons Mod - Next Guide