# Weapon Rewrite

**URL:** <https://forums.pixeltailgames.com/t/weapon-rewrite/20133>\
**Category:** Roadmap: Trello Updates\
**Created:** [March 21, 2017, 12:36am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133 "2017-03-21T00:36:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 21, 2017, 12:36am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/1 "2017-03-21T00:36:31Z")

</div>

## Card

[https://trello.com/c/o1ai6p3i/267-weapon-rewrite](https://trello.com/c/o1ai6p3i/267-weapon-rewrite)

## Description

This card has no description.

## Todo

[ul][li]Rework folder structure[/li][li]Clean up bad references[/li][li]Weapon base for FX[/li][li]View model arm base[/li][li]New weapon materials[/li][li]Clean up / completely rewrite 99% of Virus gameplay code[/li][li]Change Virus gamemode code to work with the new weapon system[/li][li]Migrate Virus weapons[/li][li]Migrate Lobby weapons[/li][li]Migrate Virus weapon: 9mm[/li][li]Migrate Virus weapon: Double Barrel[/li][li]Migrate Virus weapon: Autorifle[/li][li]Migrate Virus weapon: Flak Handcannon[/li][li]Migrate Virus weapon: Sci-fi Handgun[/li][li]Migrate Virus weapon: Dual Silencers[/li][li]Migrate Virus weapon: TNT[/li][li]Migrate Virus weapon: Tommy Gun[/li][li]Migrate Virus weapon: Plasma Autorifle[/li][li]Migrate Virus weapon: Sonic Shotgun[/li][li]Migrate Virus weapon: Adrenaline[/li][li]Migrate Lobby weapon: Unit Bills[/li][li]Migrate Lobby weapon: Confetti Gun[/li][li]Migrate Lobby weapon: Bubble Gun[/li][li]Finalize Lobby weapon: Unit Bills[/li][li]Migrate Lobby weapon: Fishing Rod[/li][li]Finalize Lobby weapon: Fishing Rod[/li][li]Migrate Lobby weapon: Metal Detector[/li][li]Rework decal and weapon FX system[/li][li]Redo weapon icons[/li][li]Add support for alt fire for Double Barrel[/li][li]Add support for air blasting objects (for Sonic Shotgun)[/li][li]Add support for charging up a weapon (for Sonic Shotgun)[/li][li]Add melee weapon damage support[/li][li]Migrate to 4.15[/li][li]Migrate into Tower code base[/li][li]Improve hold type system for player models[/li][li]Fix weapon holding animations not applying while you jump, crouch, or sit[/li][li]Backport fake animations from Virus for weapons that won’t have custom animations just yet (idle breathing, reloading, deploy/holster)[/li][li]New weapon view bob[/li][li]Finalize Virus weapon: 9mm[/li][li]Finalize Virus weapon: Double Barrel[/li][li]Finalize Virus weapon: Autorifle[/li][li]Finalize Virus weapon: Flak Handcannon[/li][li]Finalize Virus weapon: Sci-fi Handgun[/li][li]Finalize Virus weapon: Silencer[/li][li]Finalize Virus weapon: TNT[/li][li]Finalize Virus weapon: Tommy Gun[/li][li]Finalize Lobby weapon: Metal Detector[/li][li]Finalize Virus weapon: Sonic Shotgun[/li][li]Finalize Virus weapon: Plasma Autorifle[/li][li]Finalize Virus weapon: Adrenaline[/li][li]Finalize Lobby weapon: Confetti Gun[/li][li]Finalize Lobby weapon: Bubble Gun[/li][li]Add weapon based crosshair support to Lobby[/li][li]Add weapon based ammo HUD to Lobby[/li][li]Bullets now have different decals and hit effects based on the material it hit (aka different effects for shooting at sand, metal, etc.)[/li][li]Weapons should push physics objects around[/li][li]Damage HUD effects[/li][li]Damage hit notes[/li][li]Plasma autorifle has been changed: Now has ammo like the regular autorifle, but comes with a secondary charging beam blast[/li][li]Clean up old weapon model references[/li][li]Implement kill icon support[/li][/ul]

---

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 21, 2017, 12:36am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/2 "2017-03-21T00:36:35Z")

</div>

[ul][li]A new checklist named “Todo” has been added to the card.[/li][/ul]

---

<div class="post-metadata">

**Author:** ![rythian](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/rythian/32/83765_2.png) [@rythian](https://forums.pixeltailgames.com/u/rythian)\
**Post date:** [March 21, 2017, 12:38am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/4 "2017-03-21T00:38:35Z")

</div>

Whoa

---

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 21, 2017, 12:38am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/5 "2017-03-21T00:38:38Z")

</div>

[ul][li]“Macklin Guy” commented "This is an extension of the weapon prediction card, detailing the implementation of the weapon prediction systems into our current games.  
"[/li][/ul]

---

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 21, 2017, 12:52am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/6 "2017-03-21T00:52:50Z")

</div>

[ul][li]“Clean up bad references” has been checked off on the “Todo” checklist.[/li][/ul]

---

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 21, 2017, 1:15am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/7 "2017-03-21T01:15:59Z")

</div>

[ul][li]“Weapon base for FX” has been checked off on the “Todo” checklist.[/li][/ul]

---

<div class="post-metadata">

**Author:** ![AmGona](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/amgona/32/79422_2.png) [@AmGona](https://forums.pixeltailgames.com/u/AmGona)\
**Post date:** [March 21, 2017, 3:15am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/8 "2017-03-21T03:15:03Z")

</div>

What?! 😮

---

<div class="post-metadata">

**Author:** ![PatrykPL24](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/patrykpl24/32/19252_2.png) [@PatrykPL24](https://forums.pixeltailgames.com/u/PatrykPL24)\
**Post date:** [March 21, 2017, 5:58am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/9 "2017-03-21T05:58:55Z")

</div>

Just asking, how much does it take to port 1 weapon?

---

<div class="post-metadata">

**Author:** ![macdguy](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/macdguy/32/3448_2.png) [@macdguy](https://forums.pixeltailgames.com/u/macdguy)\
**Post date:** [March 21, 2017, 7:43am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/10 "2017-03-21T07:43:03Z")

</div>

Basically, first I make a new weapon class. Then, I make a new material instance for the weapon because the old materials needed to be cleaned up (this is not the same as a texture, a material defines how the texture reacts to its environment, ie. is it metal, etc). After that, I put in the world model into the weapon and position it properly (same with the first person model). Then, I set all the properties of the weapon (how much ammo, clip size, fire rate, crosshair, icon, sounds, etc). I look at the old weapon system to get these values again. And then, I setup any special things about the weapon (most are just bullet shooters - nothing fancy). And finally, I save, compile, and test away - tuning as needed.

It is a pretty tedious process, but doesn’t take too long. I didn’t migrate any weapons today. We were deciding on the naming schemes and the overall design, plus I spent most of the day cleaning up the game, so we can actually start doing this conversion.

---

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 21, 2017, 7:31pm UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/11 "2017-03-21T19:31:27Z")

</div>

[ul][li]“Rework decal and weapon FX system” has been checked off on the “Todo” checklist.[/li][/ul]

---

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 22, 2017, 2:32am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/12 "2017-03-22T02:32:00Z")

</div>

[ul][li]“View model arm base” has been checked off on the “Todo” checklist.[/li][/ul]

---

<div class="post-metadata">

**Author:** ![Fluffypaws](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/fluffypaws/32/40223_2.png) [@Fluffypaws](https://forums.pixeltailgames.com/u/Fluffypaws)\
**Post date:** [March 22, 2017, 8:15am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/13 "2017-03-22T08:15:05Z")

</div>

The view model arm base is gonna be great because this will make any future weapons easier to animate!

---

<div class="post-metadata">

**Author:** ![kakkiphu](https://forums.pixeltailgames.com/letter_avatar_proxy/v4/letter/k/76d3ee/32.png) [@kakkiphu](https://forums.pixeltailgames.com/u/kakkiphu)\
**Post date:** [March 22, 2017, 11:46am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/14 "2017-03-22T11:46:49Z")

</div>

I see my hand now

---

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 22, 2017, 5:15pm UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/15 "2017-03-22T17:15:54Z")

</div>

[ul][li]“Migrate Virus weapon: 9mm” has been checked off on the “Todo” checklist.[/li][li]“New weapon materials” has been checked off on the “Todo” checklist.[/li][/ul]

---

<div class="post-metadata">

**Author:** ![PatrykPL24](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/patrykpl24/32/19252_2.png) [@PatrykPL24](https://forums.pixeltailgames.com/u/PatrykPL24)\
**Post date:** [March 22, 2017, 5:35pm UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/16 "2017-03-22T17:35:52Z")

</div>

[wow](https://youtu.be/Xm_dS-wEFvs?t=3s)

---

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 22, 2017, 7:26pm UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/17 "2017-03-22T19:26:40Z")

</div>

[ul][li]“Migrate Virus weapon: Sci-fi Handgun” has been checked off on the “Todo” checklist.[/li][/ul]

---

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 23, 2017, 12:31am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/18 "2017-03-23T00:31:18Z")

</div>

[ul][li]“Migrate Virus weapon: Double Barrel” has been checked off on the “Todo” checklist.[/li][/ul]

---

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 23, 2017, 1:01am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/19 "2017-03-23T01:01:30Z")

</div>

[ul][li]“Migrate Virus weapon: Autorifle” has been checked off on the “Todo” checklist.[/li][/ul]

---

<div class="post-metadata">

**Author:** ![bot](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/bot/32/50994_2.png) [@bot](https://forums.pixeltailgames.com/u/bot)\
**Post date:** [March 23, 2017, 1:14am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/20 "2017-03-23T01:14:37Z")

</div>

[ul][li]“Migrate Virus weapon: Flak Handcannon” has been checked off on the “Todo” checklist.[/li][/ul]

---

<div class="post-metadata">

**Author:** ![kakkiphu](https://forums.pixeltailgames.com/letter_avatar_proxy/v4/letter/k/76d3ee/32.png) [@kakkiphu](https://forums.pixeltailgames.com/u/kakkiphu)\
**Post date:** [March 23, 2017, 2:27am UTC](https://forums.pixeltailgames.com/t/weapon-rewrite/20133/21 "2017-03-23T02:27:50Z")

</div>

BOT PLS! VIRUS WINNING US I can see my hand and actually reload!! 😃 😃 😃

[Next page](https://forums.pixeltailgames.com/t/weapon-rewrite/20133.md?page=2)
