Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Wili

Change Weapon Ammo Drop depending on Skill Level

Recommended Posts

Hi, I'm making a map for Brutal Doom and a mod for that map,

I modified Weapon.AmmoGive value in MINIGUN.txt file so the minigun only gives 10 bullets instead of 30 bullets.

When I play my map in Realism mode the quantity of ammo is all right because monsters die faster, but if I play my map in any other skill, the player runs out of ammo quickly.
I would like to know how to change the quantity of ammo the minigun drops depending on the skill level you are playing.

I know how to do things using the GZDoom Script Editor depending on the skill level you are playing but I don't know how to change values of the MINIGUN.txt file using the GZDoom Builder Script Editor.
There is any way to do this?

////// Brutal Doom - do things depending on the skill
if (GameSkill () == SKILL_BLACKMETAL)
{
	print (s:"blackmetal!");
}

	else
if (GameSkill () == SKILL_IMTOOYOUNG)
{
	print (s:"IMTOOYOUNG");
}

	else
if (GameSkill () == SKILL_HURTMEPLENTY)
{
	print (s:"HURTMEPLENTY");
}

	else
if (GameSkill () == SKILL_ULTRAVIOLENCE)
{
	print (s:"ULTRAVIOLENCE");
}

	else
if (GameSkill () == SKILL_IAMSUPERBAD)
{
	print (s:"IAMSUPERBAD");
}

	else
if (GameSkill () == SKILL_INAPOINTOF)
{
	print (s:"12INAPOINTOF10");
}

	else
if (GameSkill () == SKILL_POWERFANTASY)
{
	print (s:"POWERFANTASY");
}
Thank you!

Share this post


Link to post

It might be more advisable to download a wad editor, like Slade 3, to do the changes you are looking for. Find where ammo types and amounts are defined within brutal doom and recreate that part in your wad, but changing the value up to 30 as well as adding the check for skill level.

Share this post


Link to post

I have a .pk3 file I made using Slade, inside there is the Minigun.txt file and others I modified also.
I tried to add the check to the Minigun.txt file but this error shows after loading the mod:

Script error, "WiliBrutalMOD2.pk3:minigun.txt" line 20:
Unexpected 'if' in definition of 'MiniGun'

Here is where I made he change, "Weapon.AmmoGive 10", how can I make a check for the skill level the game is inside Minigun.txt file?

ACTOR MiniGun : Chaingun Replaces Chaingun
{
Game Doom
SpawnID 28
Weapon.SelectionOrder 700
Weapon.AmmoType1 "Clip2"
//Weapon.AmmoType2 "Clip2"
Weapon.AmmoGive 10
Weapon.AmmoUse1 1
//Weapon.AmmoUse2 1
    +WEAPON.NOAUTOAIM
	+WEAPON.NOAUTOFIRE
	+FORCEXYBILLBOARD
	+WEAPON.NO_AUTO_SWITCH
Inventory.PickupSound "CBOXPKUP"
Inventory.PickupMessage "You got the Minigun!"
Obituary "%o was mowed down by %k's Minigun."
AttackSound "none"
Scale 0.9
States
{
Thanks for the anwer!

Share this post


Link to post

https://zdoom.org/wiki/MAPINFO/Skill_definition


AmmoFactor = <value>
This affects how much ammo you pick up in the skill level, by multiplying the normal amount by <value>. For example, if the value is set to 2.0, you will receive double the normal ammo, and if it is set to 0.5, you would pick up half ammo.

DropAmmoFactor = <value>
This affects how much ammo you pick up from fallen foes in the skill level, by multiplying the normal amount by <value>. For example, if the value is set to 2.0, you will receive double the normal ammo, and if it is set to 0.5, you would pick up half ammo. This value overrides AmmoFactor for ammo and weapons dropped by monsters. This affects both when an amount is specified in DropItem and when it's the default amount. For example, with DropAmmoFactor set to 4, a former human will drop clips containing 40 bullets while a golem will drop wand crystals containing 12 charges.

Share this post


Link to post

I found you can change that values in the MAPINFO file, thanks for the answer Gez! I will make some tests that way.
There is any way to just modify the Minigun ammo drop only, without affecting the other drops?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×