Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Adding new weapons?

edited 2013 Sep 4 in DOOM
Well, information about adding a new weapon is next to null in the wiki so I started hunting in the ded files that comes in doomsday and found some "requirements" for it, being a "Thing" block to spawn the pickup sprite
Thing {
  ID = "CHAINGUN";
  DoomEd number = 2002;
  Spawn state = "MGUN";
  See state = "NULL";
  Pain state = "NULL";
  Melee state = "NULL";
  Missile state = "NULL";
  Death state = "NULL";
  Xdeath state = "NULL";
  Raise state = "NULL";
  See sound = "None";
  Attack sound = "None";
  Pain sound = "None";
  Death sound = "None";
  Active sound = "None";
  Reaction time = 8;
  Spawn health = 1000;
  Radius = 20;
  Height = 16;
  Mass = 100;
  Flags = special;
}

And the weapon states themselves:
State {
  ID = "CHAIN";
  Sprite = "CHGG";
  Frame = 0;
  Tics = 1;
  Action = "A_WeaponReady";
  Next state = "CHAIN";
}

State {
  ID = "CHAINDOWN";
  Sprite = "CHGG";
  Frame = 0;
  Tics = 1;
  Action = "A_Lower";
  Next state = "CHAINDOWN";
}

State {
  ID = "CHAINUP";
  Sprite = "CHGG";
  Frame = 0;
  Tics = 1;
  Action = "A_Raise";
  Next state = "CHAINUP";
}

State {
  ID = "CHAIN1";
  Sprite = "CHGG";
  Frame = 0;
  Tics = 4;
  Action = "A_FireCGun";
  Next state = "CHAIN2";
}

State {
  ID = "CHAIN2";
  Sprite = "CHGG";
  Frame = 1;
  Tics = 4;
  Action = "A_FireCGun";
  Next state = "CHAIN3";
}

State {
  ID = "CHAIN3";
  Sprite = "CHGG";
  Frame = 1;
  Tics = 0;
  Action = "A_ReFire";
  Next state = "CHAIN";
}

State {
  ID = "CHAINFLASH1";
  Sprite = "CHGF";
  Frame = 0;
  Flags = fullbright;
  Tics = 5;
  Action = "A_Light1";
  Next state = "LIGHTDONE";
}

State {
  ID = "CHAINFLASH2";
  Sprite = "CHGF";
  Frame = 1;
  Flags = fullbright;
  Tics = 5;
  Action = "A_Light2";
  Next state = "LIGHTDONE";
}

However, there is a warning in the very start of objects.ded saying that "order of definitions is important". My question is, what does define the order of every state? is it the order they are placed in the text? And what does link them to be interpreted as a "weapon", since there are no "brackets" saying "hey look, this is the chaingun and it's separated from others with our 'end' command at the very end of all states!"?

Comments

  • If you replace the original objects.ded file, you must make sure the original state and thing defs are listed in your new ded and listed in exactly the same order they were in the original file, though you can edit their content in any way you wish. Any new states and thing defs you add to it must be listed after.

    If you are not replacing the original objects.ded file and instead loading a new ded over the top of the original, you can ignore that message. This way is of course far far better.

    Doomsday currently has no support for adding new weapons; only replacing existing ones. Have a look in values.ded for the defs that define the various staes for each weapon.
Sign In or Register to comment.