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

Changing ammo

Recommended Posts

I've downloaded a few new weapons and after checking them with Slade 3. The majority either have no ammo codes in their scripts for the custom ammo they use... Or they all use cells, clips, shells etc...

Example- I've got 2 sub-machine guns, one's more powerful then the other and the weaker one uses it's own ammo (and it works as I've tested it). The other gun uses default, standard clips and bullets. I want to use the custom set of ammo from the first custom weapon to work with another (like clips/bullets do with pistol & chaingun). Every attempt at it so far hasn't worked.

Any levels, weapons etc. I'm using aren't going to be posted online. I'm experimenting with level, weapon and ammo modifications, I'm simply to make the game a bit more interesting to play...

Share this post


Link to post

Welcome to the world of DECORATE editing!

You surely know that the DECORATE files can be altered anyhow you want, to achieve any effect you want. Therefore, feel free to change the weapon's properties to define its ammo consumption characteristics (ammo type, count etc.). Also feel free to define your own ammo classes, in the same way how stock ammo classes are defined (one example for all). Then just assign your ammo class to the weapon(s) you want, using Weapon.AmmoType "xxx".

dbj87jb said:

Every attempt at it so far hasn't worked.

You should elaborate what exactly you've already tried, so that we have a better idea how to help you.

Share this post


Link to post

[/B][/QUOTE] You should elaborate what exactly you've already tried, so that we have a better idea how to help you. [/B][/quote]Weaker Gun's set up/ammo set up
actor (weapon's name) : Weapon (code to add it to game)
{
obituary "----"
radius --
height 16
attacksound "--"
inventory.pickupmessage "--"
weapon.ammotype "xxxAmmo"
weapon.ammouse 1
weapon.ammogive 40
Decal "---"
Weapon.SlotNumber 2

ACTOR (ammos name): Ammo (code to add it to game)
{
Inventory.PickupMessage "----"
Inventory.Amount 60
Inventory.MaxAmount 300
Ammo.BackpackAmount 60
Ammo.BackpackMaxAmount 600
Inventory.Icon "---"

I copied the ammo type and added that over where to
"weapon.ammotype "clip" would've been. And copied the Ammo's actor name and all codes for it so both guns have the same ammo code and should have the same ammo, but when testing either neither weapon get any extra ammo from the item. Unless you pick the same gun up again or it says there's a hidden error in the script and the game just doesn't run when testing the map.

Both weapons are pistols so both are assigned to weapon slot 2.

Share this post


Link to post

To be honest, your "censored" elaboration shows too little and is not much helpful. I'm not sure what could be wrong.

Are all your actor names and numbers unique? Do you have only one DECORATE entry in your wad, or 2 or more of them? If the latter is the case, keep in mind that DECORATEs get merged when the game is launched. Therefore they shouldn't contain conflicting actors (same names or same code numbers). If you (for example) have declared the same ammo type twice (even in 2 different DECORATEs), you can expect an error.

Share this post


Link to post

Now, I think I've now just cracked it...

Both weapons have the same ammo type set- but instead of copying the ammo codes from weapon 1 to weapon 2 (so both weapons 1 & 2 have the ammo codes) I've left it alone... Now when collecting the weapons and ammo, the ammo is stocking up like it should do. Of course this does mean both weapons will still have to be in the level's wad (so I can get ammo for 2 and for enemies that drop the ammunition) but at least the map isn't going to be over-run with 3-4 of the same weapon I'm testing at every secret area or ammo spot to get restocked :)...

The forum's open to any other tips, suggestions for ammo, weapon or monster modification.

Right now, I'm just merging ammo for other downloaded weapons because too many weapons are using the same as the standard sets-- cells and bullets being the biggest pain, can't do much for shotgun shells, a shotgun's a shotgun! lol. Not ready to try creating my own yet.

Share this post


Link to post

scifista42 said: If you (for example) have declared the same ammo type twice (even in 2 different DECORATEs), you can expect an error. [/B]


I think that's what's been going wrong, everything else had different names, numbers etc. So it's been the 2 seperate decorates having the same ammo type declared.

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
×