How to create item(gun) with no ammo ?

Discussion in 'Fallout General Modding' started by Mario_Dweller, Jul 2, 2006.

  1. Mario_Dweller

    Mario_Dweller It Wandered In From the Wastes

    153
    Apr 9, 2004
    How to create item(gun) with no ammo ?
     
  2. Silencer

    Silencer Night Watchman Staff Member Admin

    Nov 7, 2003
    You might want to be more specific about that.

    On the map? In the inventory? With a script? With a script on the map?
     
  3. Mario_Dweller

    Mario_Dweller It Wandered In From the Wastes

    153
    Apr 9, 2004
    I guess the simplest way would be via script ?
    I just want to give player a gun with no ammo. So in inventory...
     
  4. Sirren67

    Sirren67 Look, Ma! Two Heads!

    380
    Dec 7, 2004
    Sorry, but as far as I know you Fo2 engine can not spawn weapons with no ammo. Apart from shooting bullets the only thing that can unload a weapon is a critical miss...
    See you.
     
  5. lisac2k

    lisac2k Vault Senior Citizen
    Modder

    Oct 26, 2004
    Correct.
    Now, that was funny!
     
  6. Mario_Dweller

    Mario_Dweller It Wandered In From the Wastes

    153
    Apr 9, 2004
    Yeah, I thought it... Thanx.
     
  7. Mario_Dweller

    Mario_Dweller It Wandered In From the Wastes

    153
    Apr 9, 2004
    So and how to achieve critical miss DAM_LOSE_AMMO ?

    I tried this
    critter_injure(self_obj, DAM_LOSE_AMMO);

    but it works only with DAM_BLIND, AM_CRIP_LEG_LEFT, etc.
     
  8. Per

    Per Vault Consort Staff Member Admin

    Apr 1, 2004
    One way might be to place an empty gun in a designated container (like the shop inventories or temp boxes), then move it into the player's inventory at the proper time. Don't ask me about the details, though.
     
  9. Mario_Dweller

    Mario_Dweller It Wandered In From the Wastes

    153
    Apr 9, 2004
    place an empty gun :?. And where do I get it ? :D
     
  10. Sirren67

    Sirren67 Look, Ma! Two Heads!

    380
    Dec 7, 2004
    You *could* try something like this (I can guarantee no success):
    Spawn the weapon via script WHILE the PC is in a conversation (remember that containers CAN start a conversation, well, kinda...).
    Have your script do so:
    1 Check if dude helds a weapon in the active slot.
    2 Spawn the weapon in dude's inventory.
    3 Have dude wield the weapon.
    4 Injure dude with the DAM_LOSE_AMMO bit.
    5 Have dude holster the empty weapon and put in his/her hand the previous weapon (if there was any).
    Again, I really don't know if this can work. This is all I could think of, sorry.
    See you.
     
  11. Per

    Per Vault Consort Staff Member Admin

    Apr 1, 2004
    When I did the only playable map I ever did, I wanted to put an item with a script attached inside a container, but the mapper only lets you attach scripts to items lying freely. So I put the script on an item, entered playtesting mode, took the item with the in-game character and placed it in the proper container. I don't remember exactly how it worked out, but the end result was that the item was in the container with script and all. So maybe you could put a gun in the mapper, empty it manually, then place it in a container for safekeeping.
     
  12. Mario_Dweller

    Mario_Dweller It Wandered In From the Wastes

    153
    Apr 9, 2004
    Yes, U'r right, that might be the best solution. So I succesfully unloaded the gun, dropped it and saved game. Then I renamed .SAV file to .MAP file and the result is map with unloaded gun on the ground...

    Than U all 4 your time...
     
  13. Sirren67

    Sirren67 Look, Ma! Two Heads!

    380
    Dec 7, 2004
    So it can be done? :shock: And in such simple way!!
    That was really brilliant, Per.