X-Gun (From Gantz's manga)

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Mostachole
Posts: 10
Joined: Tue Aug 26, 2014 4:44 pm

X-Gun (From Gantz's manga)

Post by Mostachole »

Hi, i'm new here, i would like to be part of this community! :)

Idea:
For those who don't know what i'm talking about, Gantz manga characters have these "X-Guns," which after being fired has a little delay and make the target explode into pieces.
I think it would be nice to implement this in Brutal Doom, as there are sprites of mosnters actually exploding in there which fits perfectly. :P

I've finished it. I put a short video but I don't have a decent equipment to record properly so... you are warned about shitty quality :P
Spoiler:
I'm super noob with codes so i'd like to ask for help with this: (This problem is obviously fixed now)
Spoiler:
Sprites may look weird but that's the way it fires in the anime version (those parts iluminate), I just tried to emulate it with basic (maybe too much) photoshop magic.

Note: this is Brutal Doom dependant so you will need it in order for this to function. EDIT: updated it to be used in Vanilla but it certainly won't be the same. I'm leaving a donwload link below.
http://www.moddb.com/mods/brutal-doom/downloads

XGUN.pk3 attached, just grab BD and this one and drag it to GZDOOM :)

Note: I don't think this is balanced gameplay weapon xD It just for recreational purposes for the ones who try it, and for me for being my first experience with modding.
I couldn't figure out how to be able to kick and taunt while holding the weapon, so I erased from the code all stuff related to that. If you want, add it and let me know as that is the last modification I want to do.

EDIT: Replaced slow missile with poison damage for the delay effect, it's easier to aim that way.
Attachments
XGUN.pk3
(147.62 KiB) Downloaded 139 times
Last edited by Mostachole on Mon Sep 01, 2014 8:53 am, edited 14 times in total.
Endless123
Posts: 1560
Joined: Wed Aug 28, 2013 1:36 pm

Re: X-Gun (From Gantz's manga)

Post by Endless123 »

Welcome to the forum :D

First did you added the weapon in the "Player" script?

Secondly, where is the "Spawn" state? If you want it to appear in-game(like if you want it to drop from an enemy) your weapon needs to have a "Spawn" state

For example, if your weapon's sprite is PCCG then the "Spawn" state will be like this

Code: Select all

	Spawn:
		PCCG A -1
		Stop
Third there is a "}" that shouldn't be there

Code: Select all

ACTOR XGUN : Weapon

{
Game Doom
Weapon.SelectionOrder 950
Inventory.PickupMessage "You got the X-GUN"
Weapon.AmmoType "Shell"
Weapon.AmmoUse 1
+Weapon.NoAlert
Weapon.SlotNumber 3

)  //<============ This thing does not belong there

States 

(

Ready:
GTZR A 0 A_PlaySound("CLIPIN")
GTZR A 0 A_WeaponReady
Loop

Select:
GTZR A 0 A_Raise
Loop
Deselect:
GTZR A 0 A_Lower
Loop

Fire:
GTZF A 0 7 A_FireBullets(5.5, 3, 6, 8, "BulletPuff", 1)
GTZF B 1 A_PlaySound("weapons/xgunfir")
GTZF C 2 A_FireBullets(5.5, 3, 6, 8, "BulletPuff", 1)
GTZF D
GoTo Ready

Flash:
GTZF A 2 BRIGHT A_Light2
GTZF A 2 BRIGHT A_Light1
TNT1 A 1 A_Light0
Goto LightDone
)
Should looks like this :

Code: Select all

ACTOR XGUN : Weapon Replaces Pistol // If you want it to replace the pistol

{
Game Doom
Weapon.SelectionOrder 950
Inventory.PickupMessage "You got the X-GUN"
Weapon.AmmoType "Shell"
Weapon.AmmoUse 1
+Weapon.NoAlert
Weapon.SlotNumber 3

States 
(

Ready:
GTZR A 0 A_PlaySound("CLIPIN")
GTZR A 0 A_WeaponReady
Loop

Select:
GTZR A 0 A_Raise
Loop
Deselect:
GTZR A 0 A_Lower
Loop

Fire:
GTZF A 0 7 A_FireBullets(5.5, 3, 6, 8, "BulletPuff", 1)
GTZF B 1 A_PlaySound("weapons/xgunfir")
GTZF C 2 A_FireBullets(5.5, 3, 6, 8, "BulletPuff", 1)
GTZF D
GoTo Ready

Flash:
GTZF A 2 BRIGHT A_Light2
GTZF A 2 BRIGHT A_Light1
TNT1 A 1 A_Light0
Goto LightDone
)
You also have to decide which weapon you want it to replace. If it's an extra weapon to add to an already existing arsenal be sure to define which slot you want your weapon to be selected from.
User avatar
Somagu
Posts: 684
Joined: Fri Nov 22, 2013 8:56 pm

Re: X-Gun (From Gantz's manga)

Post by Somagu »

A bigger problem with the sprites is that he's aiming somewhere far off to his left.
User avatar
Mostachole
Posts: 10
Joined: Tue Aug 26, 2014 4:44 pm

Re: X-Gun (From Gantz's manga)

Post by Mostachole »

Hi, first of all thank you for your answer :)

Well, I did all the things you said. But still doesn't appear when I select it.
This is the code

Code: Select all

ACTOR XGUN : Weapon replaces Chain_saw

{
Game Doom
Weapon.SelectionOrder 950
Inventory.PickupMessage "You got the X-GUN"
Weapon.AmmoType "Shell"
Weapon.AmmoUse 1
+Weapon.NoAlert
Weapon.SlotNumber 3



States 


	Spawn:
      GNTZ A -1
      Stop
	
	Ready:
		GTZR A 0 A_PlaySound("CLIPIN")
		GTZR A 0 A_WeaponReady
		Loop

	Select:
		GTZR A 0 A_Raise
		Loop
	Deselect:
		GTZR A 0 A_Lower
		Loop

	Fire:
		GTZF A 0 7 A_FireBullets(5.5, 3, 6, 8, "BulletPuff", 1)
		GTZF B 1 A_PlaySound("weapons/xgunfir")
		GTZF C 2 A_FireBullets(5.5, 3, 6, 8, "BulletPuff", 1)
		GTZF D
		GoTo Ready

	Flash:
		GTZF A 2 BRIGHT A_Light2
		GTZF A 2 BRIGHT A_Light1
		TNT1 A 1 A_Light0
		Goto Ready
)
I have a little mod in the BDPistol, so I'd prefer not to mess with that :P. So i replaced chainsaw instead. I guess it's the same, it's just for a test isn't it?
Sorry to ask but what did you mean by add it in the Player script? I created a new one named XGUN

Image

I'm sorry my post is so long but I just want you to understand my problem. Thank you very much for your answer.

Somagu: I kinda lost perspective of that :P I think you're right, I'll try to make another. By now I just want to be able to "select" it.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: X-Gun (From Gantz's manga)

Post by wildweasel »

XGUN contains the actual Decorate code, right? Are you making sure to #include it from a main Decorate lump? ZDoom won't know to look for it unless this line is somewhere in a lump called DECORATE:

Code: Select all

#include "XGUN"
And you'll need one of these lines for each one of those code lumps. I am assuming you're working with a .wad file, and not a .pk3 - there are some other things you'll need to keep in mind when using .pk3 format.
Endless123
Posts: 1560
Joined: Wed Aug 28, 2013 1:36 pm

Re: X-Gun (From Gantz's manga)

Post by Endless123 »

Mostachole wrote:Hi, first of all thank you for your answer :)

Well, I did all the things you said. But still doesn't appear when I select it.
This is the code

Code: Select all

ACTOR XGUN : Weapon replaces Chain_saw

{
Game Doom
Weapon.SelectionOrder 950
Inventory.PickupMessage "You got the X-GUN"
Weapon.AmmoType "Shell"
Weapon.AmmoUse 1
+Weapon.NoAlert
Weapon.SlotNumber 3



States 


	Spawn:
      GNTZ A -1
      Stop
	
	Ready:
		GTZR A 0 A_PlaySound("CLIPIN")
		GTZR A 0 A_WeaponReady
		Loop

	Select:
		GTZR A 0 A_Raise
		Loop
	Deselect:
		GTZR A 0 A_Lower
		Loop

	Fire:
		GTZF A 0 7 A_FireBullets(5.5, 3, 6, 8, "BulletPuff", 1)
		GTZF B 1 A_PlaySound("weapons/xgunfir")
		GTZF C 2 A_FireBullets(5.5, 3, 6, 8, "BulletPuff", 1)
		GTZF D
		GoTo Ready

	Flash:
		GTZF A 2 BRIGHT A_Light2
		GTZF A 2 BRIGHT A_Light1
		TNT1 A 1 A_Light0
		Goto Ready
)
I have a little mod in the BDPistol, so I'd prefer not to mess with that :P. So i replaced chainsaw instead. I guess it's the same, it's just for a test isn't it?
Sorry to ask but what did you mean by add it in the Player script? I created a new one named XGUN

Image

I'm sorry my post is so long but I just want you to understand my problem. Thank you very much for your answer.

Somagu: I kinda lost perspective of that :P I think you're right, I'll try to make another. By now I just want to be able to "select" it.
If my memories are correct you need to add the weapon in the Player's lump. Here is an example of what a Player's lump looks like

Code: Select all

ACTOR DoomPlayer : PlayerPawn
{
	Speed 1
	Health 100
	Radius 16
	Height 56
	Mass 100
	PainChance 255
	Player.DisplayName "Marine"
	Player.CrouchSprite "PLYC"
	Player.StartItem "Pistol"
	Player.StartItem "Fist"
	Player.StartItem "Clip", 50
	Player.WeaponSlot 1, Fist, Chainsaw
	Player.WeaponSlot 2, Pistol
	Player.WeaponSlot 3, Shotgun, SuperShotgun
	Player.WeaponSlot 4, Chaingun
	Player.WeaponSlot 5, RocketLauncher
	Player.WeaponSlot 6, PlasmaRifle
	Player.WeaponSlot 7, BFG9000
	
	Player.ColorRange 112, 127
	Player.Colorset 0, "Green",			0x70, 0x7F,  0x72
	Player.Colorset 1, "Gray",			0x60, 0x6F,  0x62
	Player.Colorset 2, "Brown",			0x40, 0x4F,  0x42
	Player.Colorset 3, "Red",			0x20, 0x2F,  0x22
	// Doom Legacy additions
	Player.Colorset 4, "Light Gray",	0x58, 0x67,  0x5A
	Player.Colorset 5, "Light Brown",	0x38, 0x47,  0x3A
	Player.Colorset 6, "Light Red",		0xB0, 0xBF,  0xB2
	Player.Colorset 7, "Light Blue",	0xC0, 0xCF,  0xC2

	States
	{
	Spawn:
		PLAY A -1
		Loop
	See:
		PLAY ABCD 4
		Loop
	Missile:
		PLAY E 12
		Goto Spawn
	Melee:
		PLAY F 6 BRIGHT
		Goto Missile
	Pain:
		PLAY G 4
		PLAY G 4 A_Pain
		Goto Spawn
	Death:
		PLAY H 0 A_PlayerSkinCheck("AltSkinDeath")
	Death1:
		PLAY H 10
		PLAY I 10 A_PlayerScream
		PLAY J 10 A_NoBlocking
		PLAY KLM 10
		PLAY N -1
		Stop
	XDeath:
		PLAY O 0 A_PlayerSkinCheck("AltSkinXDeath")
	XDeath1:
		PLAY O 5
		PLAY P 5 A_XScream
		PLAY Q 5 A_NoBlocking
		PLAY RSTUV 5
		PLAY W -1
		Stop
	AltSkinDeath:
		PLAY H 6
		PLAY I 6 A_PlayerScream
		PLAY JK 6
		PLAY L 6 A_NoBlocking
		PLAY MNO 6
		PLAY P -1
		Stop
	AltSkinXDeath:
		PLAY Q 5 A_PlayerScream
		PLAY R 0 A_NoBlocking
		PLAY R 5 A_SkullPop
		PLAY STUVWX 5
		PLAY Y -1
		Stop
	}
}
Note that this one is the original gzdoom "doomplayer" lump but i only showing it here for info purposes. Look at the lines called "Player.WeaponSlot", they are your assigned weapons for each slot. If your weapon isn't include there it will not show in-game if they aren't defined elsewhere.

Also, did you add a player class? I ask because i encounter the same problem in my predator mod with the weapons i added and after i added a player class in MAPINFO and added a "Player" lump my weapons appeared. Of course the "Player" lump also needs to be included in the DECORATE in order to zdoom to use it.

In other words be sure to include everything new in the DECORATE to be sure zdoom uses it.
User avatar
Mostachole
Posts: 10
Joined: Tue Aug 26, 2014 4:44 pm

Re: X-Gun (From Gantz's manga)

Post by Mostachole »

Oh yeah, I forgot to add that "#" thing to decorate! Thank you so much, now it appears but with so much visual bugs that if I told you, you would have nightmares :lol:
Just need to fix sprite position and i can keep going. Thank you both Endless123 and wildweasel for your help. I'm going to change the sprite, when it's ready I'll edit first post.
User avatar
NachtIntellect
Posts: 305
Joined: Wed Feb 29, 2012 2:10 pm
Location: Bienenstock, Germany

Re: X-Gun (From Gantz's manga)

Post by NachtIntellect »

Welcome to the forums, I can relate to you, I am also new to Decorate and well it's actually a bit easier than ACS.
Endless123
Posts: 1560
Joined: Wed Aug 28, 2013 1:36 pm

Re: X-Gun (From Gantz's manga)

Post by Endless123 »

Whiteace wrote:Welcome to the forums, I can relate to you, I am also new to Decorate and well it's actually a bit easier than ACS.
ACS can be a pain sometimes but they allow more flexibility and more sophisticated effects and fancy stuffs than the usual DECORATE.

Feel free to ask if you have questions :)

@ Mostachole : You're welcome :) Looking forward to try your mod.
User avatar
Doomguy5th
Posts: 397
Joined: Mon Dec 23, 2013 12:49 pm
Location: Somewhere you shouldn't be

Re: X-Gun (From Gantz's manga)

Post by Doomguy5th »

Endless123 wrote:
Whiteace wrote:Welcome to the forums, I can relate to you, I am also new to Decorate and well it's actually a bit easier than ACS.
ACS can be a pain sometimes but they allow more flexibility and more sophisticated effects and fancy stuffs than the usual DECORATE.

Feel free to ask if you have questions :)

@ Mostachole : You're welcome :) Looking forward to try your mod.
Agreed. I am also new to DECORATE, but @ Mostachole , did you create a KEYCONFIG?
User avatar
Mostachole
Posts: 10
Joined: Tue Aug 26, 2014 4:44 pm

Re: X-Gun (From Gantz's manga)

Post by Mostachole »

I actually made a weapon, I can't believe it haha :) I hope you like it I edited first post with everything you should know. Keep in mind that this is my first weapon.

Note: In fact the gun shoots an "un-sprited" missile going at a slow speed (to emulate the delay thing I mentioned earlier), there are probably better ways to do it but the only one that was within my ability. Keep that in mind when you aim.
Endless123
Posts: 1560
Joined: Wed Aug 28, 2013 1:36 pm

Re: X-Gun (From Gantz's manga)

Post by Endless123 »

Not bad for a first weapon :)

I see only one little detail that should be fixed, it's where the weapon is pointing. It pointing to toward the floor instead of toward the front target - i think i simple offsets adjustment would fix that. The firing animation seems really slow even if the projectile is supposed to be slow. For now it looks like the weapon is shooting a laser beam instead of a projectile. The projectile, even without sprites at the moment, seems to go where the crosshair is pointing and i see no evidence of problem at the moment.

BTW no need to have Brutal Doom to run it, just a little cheat giving all the weapons does the trick ;)

NOTE : I suggest you modify your weapon's sprites with Gimp because it has some options to transform and change the view angle of a sprite without too much troubles.
User avatar
Mostachole
Posts: 10
Joined: Tue Aug 26, 2014 4:44 pm

Re: X-Gun (From Gantz's manga)

Post by Mostachole »

I tried it in Vanilla Doom and it does everything (fire animations) but it doesn't actually hit the targets :|

Excelent then, I appreciate your feedback, I'll look into the firing speed and the sprite position.
About the actual projectile, I only wanted the targets to explode without making a new script on my own so I used "invisible rockets". Maybe in the future when I learn more about it I'll improve it.
User avatar
Mostachole
Posts: 10
Joined: Tue Aug 26, 2014 4:44 pm

Re: X-Gun (From Gantz's manga)

Post by Mostachole »

Endless123 wrote:Not bad for a first weapon :)

I see only one little detail that should be fixed, it's where the weapon is pointing. It pointing to toward the floor instead of toward the front target - i think i simple offsets adjustment would fix that. The firing animation seems really slow even if the projectile is supposed to be slow. For now it looks like the weapon is shooting a laser beam instead of a projectile. The projectile, even without sprites at the moment, seems to go where the crosshair is pointing and i see no evidence of problem at the moment.
Edited in first post: I raised a little the sprite with the Perspective tool in Gimp. It still look kinda weird but I think it's better aimed toward the enemy now. I made the fire animation and sound effect faster as well, I hope it's okay.

Endless123 wrote:NOTE : I suggest you modify your weapon's sprites with Gimp because it has some options to transform and change the view angle of a sprite without too much troubles.
It's kinda tricky but just because it has a lot of functions, it's actually not hard to use. Ifound it very useful and varied. :D
Endless123
Posts: 1560
Joined: Wed Aug 28, 2013 1:36 pm

Re: X-Gun (From Gantz's manga)

Post by Endless123 »

Much better :)
Post Reply

Return to “Gameplay Mods”