Advanced Search

Author Topic: MM8BDM official Weapon Template (v5d)  (Read 84885 times)

0 Members and 1 Guest are viewing this topic.

January 06, 2011, 09:32:27 PM
Read 84885 times

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
MM8BDM official Weapon Template (v5d)
« on: January 06, 2011, 09:32:27 PM »
Due to the complex way weapons are coded, it's no surprise that there are hardly (seriously, none) any weapon mods showing up. A tutorial would have humongous to write, so instead I decided to create a weapon template. This file includes 2 new weapons, a buster weapon and a throwing weapon. The first example is well documented, explaining every element of the code. The example also includes all the other necessary bits and bobs to make the weapon work properly in MM8BDM.

I do have to warn you, this is a lot harder than mapping mostly due to the way things are implemented in Skulltag. If you have a passion for game development, and the patience of a statue, this template may be the doorway to finally having brand new weapons in MM8BDM. I hope it helps.

From the readme:

Code: [Select]
****************************************************
MM8BDM WEAPON TEMPLATE v5 - For use with MM8BDM v5d!
****************************************************

http://zdoom.org/wiki/Main_Page - Code reference

---------------
Introduction
---------------

Welcome to the MM8BDM weapon example! First I'd like to apologise for how awkward it is to implement new weapons into
MM8BDM. This is due to many things. The way I've coded things, and the way Skulltag handles certain lumps.
This example is designed to briefly explain the DECORATE weapon code, give you an idea of the PK3 structure and
(hopefully) make things easier when it comes to making your own weapons for MM8BDM.

To test this example, to see that it's working, just open the MM8BDM launcher and hit "add file". Run the game
and use "Give All" to acquire your new toys!

When things are getting stressful, just remember that the I had to follow these steps for every weapon in the game...

Good luck!

--CutmanMike
---------------
Procedure
---------------

Here's some steps to follow when starting out with a new weapon. You don't have to follow this order, but it's the
way I've been doing it for the past year. (ed - More like 10 years)

1. Adding the sprites (sprites folder) and sounds (sounds folder).
   - For sprites, don't forget those offsets and PNG transparency!
   - Define the HUD sprites in the TEXTURES.HUDS file.
   
2. Coding the weapon itself (see actors/newweapon.txt). There are two examples here that may help.
3. Including the newly coded weapon in the main DECORATE lump.
4. At this point you should be able to at least test the weapon. Test until you're happy with the results.
   - To run, use the add file button on the launcher under single play.
   - You may get some console errors. If the game doesn't bomb with an error message, you can test it! Use the Give All cheat.

6. Define the weapon's icon in the TEXTURES.ICONS file.
7. Define the weapon's energy bar graphics in the TEXTURES.BARS file.
8. Adding BOTH vertical and newly coded horizontal bar graphics to SBARINFO (see SBARINFO.H.txt).
   - This file will need to be updated new weapons are added to MM8BDM!
   
9. Editing the COLORS.acs lump to add color translations (palette swaps).
   - Again when MM8BDM gets new weapons this will have to be updated too.
   - This is the most complicated section. Read the notes thoroughly.
   - DON'T FORGET TO COMPILE THIS LUMP! In SLADE, right click and hit compile!
10. Editing the WEPACS.acs lump to add LMS data and energy item pickups.
   
11. Edit the weapon definition to add the new color translation you just created in COLORS.acs.
12. Final test. Don't forget the following:
   - Make sure energy items and W tanks work.
   - Make sure M Tanks work (use "give MTank" to test this).
   - Make sure your colors are correct (check the mirror in Roll's room or use chasecam).
   - Make sure the energy bar is displayed for BOTH HUDs (use + and - to toggle the horizontal HUD).
   - Make sure the weapon's icon is displayed under/next to the energy bar.
   
13. If you've made it this far, congratulations! Take your new creation online for balance testing and robot blasting!

---------------
Notes
---------------

* When MM8BDM is updated, you WILL have to update your weapon pk3 file. If you do not, the new weapons in MM8BDM will
  fail to work correctly, if the game even starts.
* Because of the way SBARINFO works, you CANNOT mix and match weapon pk3 files. Do not attempt to launch the game with
  more than one pk3 that includes new weapons.
* HOWEVER to counter this, you caoveralln merge the pk3's by copying over the code and implementing it into a single pk3 file.
  Be sure to have the weapon author's permission before you do this if you wish to distribute the file afterwords.
* If you're stuck with ANY of the code, the ZDoom wiki is the place to go. The link is at the top of this file!
* Still stuck? We don't blame you. Go to the cutstuff.net forums and post in the editing forum!
* Made a rad weapon? Sweet! Please help others out if you can!
 
Good luck, and thank you for trying to expand MM8BDM's growing collection of user content!

Donate if you love me!

~ CutmanMike 2011 - http://cutstuff.net

Update Notes:
Korby updated for v2, but he's mostly just copy and pasting.
Lego updated for v3, again he also pasted in stuff.
Lego again for v4a, added information of recoloring buster HUDs and also copy pasting stuff.
Balrog updated for v5d, updated overall tutorial to be more useful for v5 and the Year of Our Lord Two-thousand and Nineteen.

https://files.catbox.moe/cvov9n.zip

January 06, 2011, 09:50:38 PM
Reply #1

Offline Ivory

  • MM8BDM Extender
  • *********
  • Date Registered: August 25, 2009, 08:17:59 AM

    • View Profile
    • http://www.cutstuff.net/
Re: MM8BDM official Weapon Template (v1)
« Reply #1 on: January 06, 2011, 09:50:38 PM »
Well. When you called it the awsum weapon, it is infact awesome. A solid tutorial for new comers, good job.

Though, Freeze Cracker is still missing from the M-Tank List  ;)

January 06, 2011, 10:19:09 PM
Reply #2

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
Re: MM8BDM official Weapon Template (v1)
« Reply #2 on: January 06, 2011, 10:19:09 PM »
arg!

January 06, 2011, 10:24:15 PM
Reply #3

Offline Korby

  • Global Moderator

  • Benvenuto nella room italiana!
  • *************
  • Date Registered: March 04, 2010, 03:36:02 AM

    • View Profile
    • Korby Games
Re: MM8BDM official Weapon Template (v1)
« Reply #3 on: January 06, 2011, 10:24:15 PM »
(click to show/hide)
Nevermind, it's canceled out because of another thing.

Great job, Cutman! Be prepared for thirty thousand craptacular weapons and few awesome ones :>

January 06, 2011, 10:26:16 PM
Reply #4

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
Re: MM8BDM official Weapon Template (v1)
« Reply #4 on: January 06, 2011, 10:26:16 PM »
Kinda the same thing as notes 2 and 3 at the bottom of the read me.

January 06, 2011, 10:28:12 PM
Reply #5

Offline tsukiyomaru0

  • MM8BDM Extender
  • *
  • Date Registered: November 07, 2010, 05:01:56 PM

    • View Profile
Re: MM8BDM official Weapon Template (v1)
« Reply #5 on: January 06, 2011, 10:28:12 PM »
What's the highest value that the color set variable can have? 'cause you can suggest them to start from the highest value possible (255, 65535, 4294967295 or higher?) to prevent conflicting with MM8BDM's V2

January 06, 2011, 10:48:53 PM
Reply #6

Offline TERRORsphere

  • MM8BDM Contributor
  • ****
  • Date Registered: August 22, 2009, 08:45:17 PM

    • View Profile
    • http://www.youtube.com/user/DoomThroughDoom
Re: MM8BDM official Weapon Template (v1)
« Reply #6 on: January 06, 2011, 10:48:53 PM »
Can't you code the W-tank so that it gives you a few large weapon energies?

January 06, 2011, 11:01:55 PM
Reply #7

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
Re: MM8BDM official Weapon Template (v1)
« Reply #7 on: January 06, 2011, 11:01:55 PM »
Quote from: "tsukiyomaru0"
What's the highest value that the color set variable can have? 'cause you can suggest them to start from the highest value possible (255, 65535, 4294967295 or higher?) to prevent conflicting with MM8BDM's V2

256 I believe. 100 should be enough to not cause conflicts.

Quote from: "DoomThroughDoom"
Can't you code the W-tank so that it gives you a few large weapon energies?

That would be the obvious choice and I think I did try it and something went wrong... I hope. I actually want to try it now just to make sure....

January 06, 2011, 11:12:53 PM
Reply #8

Offline TERRORsphere

  • MM8BDM Contributor
  • ****
  • Date Registered: August 22, 2009, 08:45:17 PM

    • View Profile
    • http://www.youtube.com/user/DoomThroughDoom
Re: MM8BDM official Weapon Template (v1)
« Reply #8 on: January 06, 2011, 11:12:53 PM »
Quote from: "CutmanMike"
Quote from: "DoomThroughDoom"
Can't you code the W-tank so that it gives you a few large weapon energies?

That would be the obvious choice and I think I did try it and something went wrong... I hope. I actually want to try it now just to make sure....
Maybe you would make another actor that is almost identical to the current weapon energy, only this one is invisible and has a much smaller radius (and gives more ammo), it also disappears after 1 second (just incase lag in involved and the health doesn't spawn in the player)

January 07, 2011, 01:00:24 AM
Reply #9

Offline KillerChair

  • Standard Member
  • Date Registered: August 24, 2010, 11:27:42 PM

    • View Profile
    • http://www.youtube.com/pixellerate
Re: MM8BDM official Weapon Template (v1)
« Reply #9 on: January 07, 2011, 01:00:24 AM »
I am sooo not going to make weapons  :mrgreen:
Mapping takes enough time for me. Cool that you posted a template for those that would do it though. ;)

January 07, 2011, 01:21:13 AM
Reply #10

Offline tsukiyomaru0

  • MM8BDM Extender
  • *
  • Date Registered: November 07, 2010, 05:01:56 PM

    • View Profile
Re: MM8BDM official Weapon Template (v1)
« Reply #10 on: January 07, 2011, 01:21:13 AM »
Quote from: "CutmanMike"
Quote from: "tsukiyomaru0"
What's the highest value that the color set variable can have? 'cause you can suggest them to start from the highest value possible (255, 65535, 4294967295 or higher?) to prevent conflicting with MM8BDM's V2

256 I believe. 100 should be enough to not cause conflicts.
If 0 is an acceptable value, then the highest may be 255... Hm... Try testing that out. Still, starting from the last variable is always better (I had sad experiences with variables in RPG Maker once, lol)

January 07, 2011, 07:57:29 AM
Reply #11

Offline Max

  • MM8BDM Extender

  • i ate those food
  • ************
  • Date Registered: July 09, 2010, 08:10:13 PM

    • View Profile
    • ??
Re: MM8BDM official Weapon Template (v1)
« Reply #11 on: January 07, 2011, 07:57:29 AM »
I pity the fool who didn't know all this already!

I didn't know half of it

January 07, 2011, 10:47:29 AM
Reply #12

Offline Disco

  • Standard Member
  • Date Registered: October 27, 2010, 07:35:57 AM

    • View Profile
Re: MM8BDM official Weapon Template (v1)
« Reply #12 on: January 07, 2011, 10:47:29 AM »
Whoa, really awesome of you to take the time to do this for us, Cutman

January 07, 2011, 06:19:08 PM
Reply #13

Offline TheBladeRoden

  • MM8BDM Extender
  • ***
  • Date Registered: October 14, 2010, 07:26:58 PM

    • View Profile
    • TheBladeRoden's Home Page
Re: MM8BDM official Weapon Template (v1)
« Reply #13 on: January 07, 2011, 06:19:08 PM »
Thanks for this

January 07, 2011, 08:13:39 PM
Reply #14

Offline Korby

  • Global Moderator

  • Benvenuto nella room italiana!
  • *************
  • Date Registered: March 04, 2010, 03:36:02 AM

    • View Profile
    • Korby Games
Re: MM8BDM official Weapon Template (v1)
« Reply #14 on: January 07, 2011, 08:13:39 PM »
Quick question. Because the v2 weapons are already defined in WCOLORS, do we still have to update that when the game hits v2?