Advanced Search

Author Topic: Making Classes In mm8bdm  (Read 1308 times)

0 Members and 1 Guest are viewing this topic.

November 08, 2016, 07:22:03 PM
Read 1308 times

Offline SMMG44

  • Standard Member

  • I want my account deleted

  • Date Registered: November 07, 2016, 12:08:19 AM

    • View Profile
Making Classes In mm8bdm
« on: November 08, 2016, 07:22:03 PM »
Hey,Use the v4 template if you want to learn it yourself!
If not,then Welcome!

Use SLADE for making the class you're making!

Now,there will be 3 chapters:
1.Making the Weapon
2.Adding extra bits/Putting code in files..

CHAPTER ONE:Making the weapon.

You will STILL need the V4 template.

The weapon code should be like so:

actor TNTCannon : BaseMM8BDMWEP
Weapon.AmmoUse 1 // This is how much ammo is used per shot (see below for when the ammo leaves the player's inventory)
Weapon.AmmoGive 999
Weapon.SlotNumber 2 // Which weapon slot/category this weapon belongs to (5 = power weapon etc).
Obituary "%o was killed by %k's TNT Bombs." // Message displayed when a player is defeated by this weapon.
Inventory.Pickupmessage "Power up! TNT!" // Message displayed when picking up the weapon.
weapon.ammotype "TNTCannonAmmo" // Ammo type to use. Keep the names similar to avoid confusion!
inventory.pickupsound "weapon/weaponup" // Weapon sound to be played when it is picked up.
inventory.icon "COOWI" // Weapon icon to be displayed in the HUD. (usually defined in TEXTURES)
Scale 2.0

// The weapon's states are defined below. These are not fixed and you can use whatever state names you like.
// The important state names are Spawn, Ready, Deselect, Select, Fire and NoAmmo.
// The format is as follows:
// XXXX Y 1 A_Example
// XXXX is the first four letters of the sprite (i.e COOWA0.png would become COOW).
// Y is the next letter of the filename, which defines the frame of that sprite. (i.e COOWA0.png would be A)
// You can have as many frames (letters) here as you like, but they will all have the same duration and call any function you specify over and over.
// 1 is the duration of the frame in tics. A tic is 1/35 of a second. 0 means instantanious, use with care.
// A_Example is the name of one of the many functions in Skulltag. Look these up on the ZDoom wiki to discover what they do.
// Note: TNT1 A is an internal name for a completely non-existant invisible frame.

Spawn: // The state for the weapon lying on the floor. It can be animated if you wish.
COOW A 1 // CWEPA0 is the sprite name for the weapon icon.
Ready: // This state is for when the weapon is idle, ready to be fired or switched out.
TNTC A 0 ACS_ExecuteAlways(991,0,77) // This calls the color changing script. The last argument defines what colors to change to player to (see WCOLORS for more info)
TNTC A 1 A_WeaponReady // A_WeaponReady is called when you want to allow the player to do something with the weapon, so it must be called repeatedly in the idle state.
TNTC A 1 A_GiveInventory("TNTCannonAmmo",1)
Goto Ready+1 // Go back to ready but skip the ACS_ExecuteAlways function.
Deselect: // You shouldn't have to change these except for the sprite names.
TNTC B 1 A_Lower
Select: // Same as the deselect state.
TNTC B 1 A_Raise
Fire: // This is the firing animation for the weapon, where you tell Skulltag what to do when it is fired.
TNTC B 0 A_JumpIfNoAmmo("NoAmmo") // First check if there's any ammo. If not, go to NoAmmo state.
TNTC B 0 A_PlaySoundEx("weapon/magnetmissile","Weapon") // Play the weapon sound, defined in SNDINFO.
TNTC B 0 A_FireCustomMissile("TNTBomb",0,1,8,0) // Fire the Cool Projectile.
TNTC A 1 A_GiveInventory("TNTCannonAmmo",1)
TNTC A 1 A_TakeInventory ("TNTCannonAmmo",5)
TNTC CD 3 // The following frames call nothing but contain the firing animation.
TNTC B 16 // This lasts longer so the weapon does not fire too rapidly.
TNTC B 0 A_Refire // This function repeats the firing frame if the fire button is held. Sometimes important, but not here.
Goto Ready+1 // Go back to the ready state, but skip the color change/sound script.
NoAmmo: // This state is called in the firing frame if the player doesn't have enough ammo to fire it.
Goto Ready+1 // Go back to the ready state, but skip the color change/sound script.
TNT1 A 0 A_JumpIfInventory("TNTCannonAmmo",100,"TNTBombALT")
Goto Ready
TNT1 A 0 A_TakeInventory("TNTCannonAmmo",100)
TNT1 D 0 A_CustomMissile("HyperBomb",64,0,0, 2)
TNT1 D 0 A_CustomMissile("DrillBomb",64,0,0, 2)
TNT1 A 30
goto Ready

actor TNTCannonAmmo : Ammo
inventory.amount 100
inventory.maxamount 100

// Here is the projectile definition.
// For states, Spawn is when the projectile is created and Death is called when the projectile hits something.
// If you do not define a death state, the projectile will vanish when it is destroyed.

actor TNTBomb // As always, take care with the actor names as they can be case sensitive later.
PROJECTILE // This adds a bunch of flags to the actor to let Skulltag know it's a projectile.
Radius 2 // Radius (hitbox) of the projectile
Height 2 // Height (hitbox) of the projectile
scale 2.5 // Unless for some reason you want to scale the sprite of the actor, this should always be 2.5 (MM8BDM specific).
damage (25) // How much damage the projectile causes. Keep in mind players have 100 health.
Damagetype "DrillBomb"// Damage type of the actor. This can be used for different things, but ThunderBold does nothing special.
+FORCEXYBILLBOARD // This special flag makes it so you can't look up/down at the projectile as if it was a paper cutout in the OpenGL renderer. Recommended for round projectiles.
speed 40 // How fast the projectile travels from when it is created. With speeds above 60, it is recommended to place ": FastProjectile" after the actor name.
SNTS AAAA 3 // This is a basic projectile that just plays it's animation with nothing special.
MMFX BCDE 3 // MMFX is a sprite found in the MM8BDM pk3 file. You can use any resources included in it.
stop // Stop removes the projectile from the game.

You can see I used the v4 template. You can change the TNTC to any other 4-letter Sprites, as long as they are in the sprites folder! And you can also change TNTCannonAmmo!

And there's some extra code, like:

TNT1 A 0 A_TakeInventory("TNTCannonAmmo",100)
TNT1 A 0 A_JumpIfInventory("TNTCannonAmmo",100,"AltATK)

Copy and paste the code above the one above  into anything you want, as long as it stays somewhat similar!
You can change the "DrillBomb" to Any weapon name like HyperBomb (think of it like a weapon (quickboomerangwep) without the "wep" part.

Well,This might either take awhile or not,depending on how you want to make it.

Make Folders to organize every file so its easy to understand.Then, In the Decorate,SBARINFO, SNDINFO,and WEPACS lie the Weapon adding system, while KEYCONF lies the classes system. Just be sure to update the WEPACS and SBARINFO files every mm8bdm update or the bars for the updated weapons won't show.

Decorate is for adding the files.
#include "actors/SMMG4/SMMG4"
#include "custom/newweapon.txt"
#include "custom/FireBall.txt"
#include "Actors/Mario/Mario"
#include "custom/MarioPunchWep"
#include "Actors/SharpBuster/SharpBuster"
#include "custom/SharpBusterWep"
#include "custom/SharpERBusterWep"

you can have as many as you'd like!This makes sure the files DO get included instead of being EXCLUDED,and we don't want a game crash,do we?NO!

In SBARINFO, add this code:

   IsSelected AnotherBuster
   Drawbar"BARAMMO1", "BAREMPTY", Ammo1, vertical, 16, 8;
In the "Vertical Bars" section,add this code:

IsSelected AnotherBuster
   Drawbar"VARAMMO1", "VAREMPTY", Ammo1, vertical, 16, 8;

be sure to change the weapon name [after "IsSelected"] So it works propertly.

and the -'s separate it,so don't copy that or you're gonna crash.

In WEPACS, add this line of code:

#DEFINE AnotherBuster 100

and this:
{"SharpBusterWep", "SharpBAmmo", "A Sharp Buster"}

Again,Change "AnotherBuster", 'SharpBAmmo", and "A Sharp Buster" to your weapon name, ammo, and whatever you want for the 3rd one[in order]. And you can change the 100,since that is the puke/color changing script.

Also, ACS_ExecuteAlways(991,0,77) is to prevent the game from making an annoying noise when using the special attack. And you can change the "77" as well, since it's another puke script.

make an actors folder,add files,and put a txt file in.Then,put this code:

actor SMMG4 : PlayerPawn
Health 300
player.displayname "SMMG4"
player.soundclass "megaman"
player.startitem "TNTCannon"
player.startitem "TNTCannonAmmo", 28
player.forwardmove 0.9, 0.9
player.sidemove 0.88, 0.88
player.jumpz 10
mass 9999
gravity 0.8
scale 2

Goto Spawn+2
Goto Spawn
goto Spawn
goto PainContinue
goto DeathContinue
goto MegaDeathEnd

Again,you can add custom skins and change the "SMMG" to 4-letter things. And change the ammo and weapon to what you need.

Once you're done,it should work.If not,keep trying. It'll go well sometime!

May 23, 2017, 02:38:04 PM
Reply #1

Offline Sir Anon0mos

  • Standard Member

  • Soundtrack Admirer

  • Date Registered: July 29, 2016, 02:00:58 AM

    • View Profile
Re: Making Classes In mm8bdm
« Reply #1 on: May 23, 2017, 02:38:04 PM »
Danke! I've been waiting for a class tutorial.

May 25, 2017, 06:22:41 PM
Reply #2

Offline BombHornet

  • Standard Member

  • Date Registered: September 25, 2013, 11:18:23 PM

    • View Profile
Re: Making Classes In mm8bdm
« Reply #2 on: May 25, 2017, 06:22:41 PM »
SlumpEd works with this too doesn't it?

May 25, 2017, 09:41:45 PM
Reply #3

Offline GameAndWatcher

  • Standard Member

  • Gosh!

  • Date Registered: April 03, 2011, 05:44:04 AM

    • View Profile
Re: Making Classes In mm8bdm
« Reply #3 on: May 25, 2017, 09:41:45 PM »
SlumpEd works with this too doesn't it?
Technically, yes, but SLADE is a much better program.

August 27, 2017, 07:33:32 PM
Reply #4

Offline Morps

  • Standard Member

  • Date Registered: July 19, 2017, 01:21:37 AM

    • View Profile
Re: Making Classes In mm8bdm
« Reply #4 on: August 27, 2017, 07:33:32 PM »
This doesn't exactly seem like a good tutorial. It doesn't seem cover all of the bases.


With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Note: this post will not display until it's been approved by a moderator.
Name: Email:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
Who is the character to the right of the Cutstuff Forums logo above? (in lowercase, no spaces):