****************************************************
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.
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
Can't you code the W-tank so that it gives you a few large weapon energies?
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)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....
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)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.
Quick question. Because the v2 weapons are already defined in WCOLORS, do we still have to update that when the game hits v2?
Doom Builder 2 has it, just link slumped/slade3 to it in the options.
In the case you don't have Doom Builder 2, you can download it here (http://www.zdoom.org/files/utils/acc/acc150win.zip).
You can download it from ZDoom's website (http://zdoom.org/Download) too if you don't have time to download Doom Builder or you don't have the .Net Framework DB needs to install. Place it anywhere you want and link it to your editor like Ivory said.
You know, I'm probably just going to give up on this. I just can't see myself finishing this on time. :|I'm guessing you mean in time for Weapon Competiton #1. That doesn't really matter, what matters is that more people start making weapons.
ugh i tried to make sprites the transparency fails [even though i erased 50 times] i tried to do the other things but it just wastes my time...and it is tiring and annoying to go through the whole process.now i know how cutmanmike feels.ill try making a weapon again tommarow...and something simpler [instead of a sonic spin dash]...if i can think of any...Use different programs to add transparency, save as indexed colors instead of RGB Colors w/ Alpha...
I tried to make a new weapon, but unfortunatly, making the color change is borderline impossable for me.You have to select the directory where the ACS COMPILER is installed. you can get it in Zdoom Wiki, i think.
I had the colors and stuff perfect but it didnt work, then I remembered I have to compile it, the I clicked compile acs it said choose a program, I didnt know what to choose so I chose skulltag, (obviousely I did something VERY wrong) it said select DOOM directory although I dont have doom so it says, "compile acs failed" and now I cant choose any other program to test it
can anyone here help me remedy this idiotic mistake
I'm using sLumped
[You have to select the directory where the ACS COMPILER is installed. you can get it in Zdoom Wiki, i think.
Quote from: "tsukiyomaru0"[You have to select the directory where the ACS COMPILER is installed. you can get it in Zdoom Wiki, i think.
I have one now, but is it even possable to change the filepath anymore to even use it? Ive tried almost everything and I'm about one more hour from ripping my hair out out of frustrsation
SXF_TRANSFERPITCH — Transfers the calling actor's pitch to the spawned actor. Note that this has no effect on the spawned actor's velocities. If you want the calling actor's pitch to be taken into account for the spawned actor's trajectory, use a formula such as this one: A_SpawnItemEx (<type>,cos(-pitch)*<Dist. from spawner>,<yoffset>,<zoffset>+(sin(-pitch)*<Dist. from spawner>),cos(-pitch)*<Projectile speed>,0,sin(-pitch)*<Projectile speed>,<angle>,<flags>,<chance>)
SlumpEd (http://slumped.mancubus.net/index.php?page=downloads)Slade3 doesn't work in my computer.
or
Slade3 (http://slade.mancubus.net/index.php?page=downloads)
Your choice. Most people use SlumpEd due to it being still widely used, but it's obsolete with Slade3 being the most up to date editor. I'd recommend Slade3, as it probably will overtake SlumpEd at some point. And they are both similar enough as it is.
Grr, why don't A_ChangeVelocity, A_ScaleVelocity, and A_SetAngle exist in skulltag?bug Skulltag staff about it... They might likely give an excuse and ignore it.
I'm working on building my own weapon right now, but Mr. Perfectionist likes to do things right the first time around. My idea is a shield weapon that dissipates upon taking a hit that does 50 HP of damage or more...and since there really isn't a shield-based example for programming, I thought here would be a good place to ask about it.Mirror Buster's shield maybe? But be sure to put some "flag" that suffers reduction when the shield enters the "pain" state and disable fire/altfire/watever calls the shield.
-I'm kind of confused about compiling in general. How does it work, and where do I need to compile to?
-Which shield would you recommend I look off of--just to see how they work--and how would I go about accessing it?
...Hmm...I know I have more questions than this, but I can't for the life of me remember what they were. I guess I'll come back later.
A_SetScale would be nice tooQuote from: "TheBladeRoden"Grr, why don't A_ChangeVelocity, A_ScaleVelocity, and A_SetAngle exist in skulltag?bug Skulltag staff about it... They might likely give an excuse and ignore it.
Because people should learn how to do this stuff by themselves, instead of being spoonfed by the community.There's a small difference between being spoonfed and learning themselves. If CMM didn't spoonfed us, I would NEVER learn how to make a simple weapon. If he had never done so, I would NEVER have learned that it is possible to aim with A_SpawnItemEx using the proper coding. It is more of a matter of learning and applying. And some new additions wouldn't hurt.
At least, that's my argument as to why I don't think that should happen.
http://zdoom.org/wikiHow I learned was a mix of what you gave us and patience to understand each command.
Go here and check out the actor functions, flags etc. This is all you will need to try out new things. That's how I learned, that's how others should learn if they want to do stuff.
Exactly how do you get the screen to flash? And can you get it to flash black?
I should probably post this here so it can get noticed better.I second this. I've been puzzled by this, because I want to make certain weapons that causes flicker and whatanot.Quote from: "SmashTheEchidna"Exactly how do you get the screen to flash? And can you get it to flash black?
Is there a code for possibly making a weapon teleport you or someone else?There is... But uses ACS and is found in ZPortal.
I would really like to know.
There is... But uses ACS and is found in ZPortal.
Actually, ZPortal doesn't even work in ZDoom, as it requires Hardware Rendering/OpenGL. So the odds of its coding being successfully ported to Skulltag are small, I think.Quote from: "tsukiyomaru0"There is... But uses ACS and is found in ZPortal.
STOP! ZPortal Teleportation DOES NOT work outside of single player.
Actually, ZPortal doesn't even work in ZDoom, as it requires Hardware Rendering/OpenGL.... *facepalm*.
You don't get it, do you?Quote from: "tsukiyomaru0"Actually, ZPortal doesn't even work in ZDoom, as it requires Hardware Rendering/OpenGL.... *facepalm*.
The MAPS in ZPortal require opengl because of 3D floors and models. It's nothing to do with the way the teleport mechanics work. Also, try out Hide N Seek, that mod has a fully working teleport gun.
Quote from: "DTDsphere"If you try to run Zportal in ZDoom, it will display a message asking for Hardware Rendering, and you will be unable to move.Quote from: "tsukiyomaru0"Actually, ZPortal doesn't even work in ZDoom, as it requires Hardware Rendering/OpenGL.... *facepalm*.
The MAPS in ZPortal require opengl because of 3D floors and models. It's nothing to do with the way the teleport mechanics work. Also, try out Hide N Seek, that mod has a fully working teleport gun.
TNT1 A 1 A_SpawnItemEx("TheBullet",SpawnX+SpawnZ*(momz/ProSpeed),SpawnY,SpawnZ-SpawnX*(momz/ProSpeed),momx*1.2,momy*1.2,momz*1.2,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION)
SpawnX, SpawnY, SpawnZ: The Distances you want it to spawn at. Keep in mind that you have to imagine their positions as if you could not aim up or down!Replace "momx*1.2,momy*1.2,momz*1.2" with "SubProSpeed-((momz/ProSpeed)*SubProSpeed),0,(momz/ProSpeed)*SubProSpeed" and remove the "SXF_ABSOLUTEMOMENTUM" flag to have the subprojectile be fired at the same direction the projectile was going to but at a set speed and enabling you to change the angle the subprojectile will go at.
THIS THEORY IS YET TO BE PROVED
I did it. (https://dl.dropbox.com/s/djxzbjxe615fy8i/WeaponTemplatev3.pk3?dl=1)Thanks and i'll mirror it soon....
Have fun.
Also could someone shove it on mediafire, please? So that I don't have to worry about people not getting it if I delete it.
its been Mirrored for great justice!
Download link: http://www.mediafire.com/?498zmxb48ljrdho (http://www.mediafire.com/?498zmxb48ljrdho)
No, simply copy and paste the text. If you're using custom textures, tell me the texture names and which one you want to be the idle frame.
BUST B 0 A_JumpIfNoAmmo("NoAmmo")
BUST B 0 A_PlaySoundEx("weapon/mbuster","Weapon")
BUST B 0 A_FireCustomMissile("MegaShot",0,0,8,0)
BUST CD 3
BUST B 2
BUST B 0 A_Refire
I lied about it taking a weekExellect. Now I can continue making my buster shot weapon
https://www.dropbox.com/s/nl6h1tujmfv7btd/WeaponTemplatev4a.pk3?dl=0
256 I believe. 100 should be enough to not cause conflicts.
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....