First Weapon mod for Hexen

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
Sanjurodlc
Posts: 7
Joined: Tue Aug 23, 2016 11:46 pm

Re: First Weapon mod for Hexen

Post by Sanjurodlc »

HexaDoken wrote:Yeah it is. You're already modifying the monsters anyway, so monster compatbility is out of the window, extra code is not really a concern, and the target way ensures you only get ammo for kills that are actually yours, + makes multiplayer work.
Incompatibility with other mods was not intended, it's a side effect of not knowing what i'm actually doing hehe :P
If there is other way of adding the line to specific Actors without replacing them i will for sure use it. Any guidance?

As for the two frames calling Jump and GiveToTarget:

Code: Select all

ACTOR AEttin : Ettin replaces Ettin
{
  States
  {
  Death:
    TNT1 A 0 A_Jump(100,2)
    TNT1 A 0 A_GiveToTarget("FallenSoul", 1)
  }
}
If i put it this way in my monster override file, would the state be added to the start of the monster's state, to the end, or would it simply replace the entire Death state of the monsters with only what is declared by me?
My concern is that if i have to copy all the monsters death state to add the lines i want, it'll be a lot of lines, big file, and in the end truly only for the sake of Multiplayer, since to Single Player i already limit the receiving actor with Inventory.RestrictedTo in the item spawner (only the player using my specific player class can receive Souls, and since using a modified player class is needed to substitute the Sapphire Wand...).
HexaDoken wrote: Try the +WEAPON.AMMO_OPTIONAL or +WEAPON.ALT_AMMO_OPTIONAL flags, then at the beginning of Altfire state do A_JumpIfInventory for ammo, throwing the flow to true altfire state if ammo is found, and letting it fall to Goto Ready or Goto Fire otherwise.
Why the flags? They're needed for the Inventory/Ammo check?
Right now i'm using A_JumpIfNoAmmo in the first frame (tried TNT1 too) of AltFire state and it is not working at all, the engine is simply ignoring it. Is there a A_JumpIfNoAmmo2?
Before adding the A_jumpIfNoAmmo i tried the WEAPON.AMMO_OPTIONAL and it just made the weapon fire AltFire even if i had 0 ammo for it.

I'll try using the flag+A_JumpIfInventory instead of JumpIfNoAmmo and see what i get.

Edit: So, i've added the +WEAPON.ALT_AMMO_OPTIONAL and tested first with A_JumpIfNoAmmo("Ready"), and guess what, it worked...
So now i know that for the Jump to properly check for ammo and work i must use the flag too, nowhere in the wiki this is said at any given moment. :|
Well, now it's working and i'm doing some other touches around for it.

Edit2: Just updated the version to 0.3, removing the weapon switching when no ammo bug.

Return to “Gameplay Mods”