Home   Help Search Login Register  

Author Topic: How to find the Ammo name in a .PBO?  (Read 1783 times)

0 Members and 1 Guest are viewing this topic.

Offline Toante

  • Members
  • *
  • I'm a llama!
How to find the Ammo name in a .PBO?
« on: 11 Oct 2007, 19:44:58 »
Hello everyone,
sorry for the inconvenience, but I need yours truly help to correctly equip an unarmed civilian (by Faceplant Civilian pack) with the PM12 submachinegun found on OFPinfo.

The problem arose because the PM12 PBO come without any readme, so i can't found the Weapon and the Ammo name for the _this addmagazine_ command.

So I unpacked the PBO and I found the names within the config.cpp file weapons[] = {PM12}) & magazines[]={"MP5A4mag"}.

But, when i paste the following command to the unit:

Code: [Select]
this addmagazine "MP5A4mag" ; this addweapon "PM12"
 the unit start the mission preview with an "Out of Ammo" message.
The strange thing is that if I insert the same command in a Player unit, the weapon has the right weapon loaded.

So, can i ask you how can I equip an unarmed unit with a weapon if I don't know the gun & ammo name ?

Thank You,
Toante
« Last Edit: 11 Oct 2007, 21:12:09 by bedges »

Offline Toante

  • Members
  • *
  • I'm a llama!
Re: How to find the Ammo name in a .PBO?
« Reply #1 on: 11 Oct 2007, 22:56:49 »
Just a little more information about that i've just discovered experimentin' with the .PBO's:

If I change the Faceplant unit with an another unit (I triyed NATO soldier & a Resistance insurgent) the unit start correctly equipped with a the gun & ammo i've chosed.  :good:

So now I think the codes I've found in the config.cpp are the right names, and the problem arise with the Faceplant units only: so what must I change in the Faceplant unit codes to be able to equip them with a loaded weapon?  ???

Thank You again,
Toante

Offline schuler

  • Contributing Member
  • **
Re: How to find the Ammo name in a .PBO?
« Reply #2 on: 12 Oct 2007, 09:40:00 »
 add at least 1 magazine for the weapon before you type the 'add weapon' if needed so the weapon is automatically loaded.
Semper Fi

Offline Toante

  • Members
  • *
  • I'm a llama!
Re: How to find the Ammo name in a .PBO?
« Reply #3 on: 12 Oct 2007, 17:37:36 »
Thank You for the answer, Schuler, but, as you can see, I've already added the
this addmagazine "MP5A4mag" ; this addweapon "PM12" commands
( because it seem that the PM12 use the MP5A4 magazine (magazines[]={"MP5A4mag"})
and effectively if I use the PM12 as player, or assign that to a "normal" unit it start correctly equipped.

At this point, I fear that the "Out of Ammo" message arise only with the Faceplant civilians equipped with a gun: maybe they are units coded for non to be equipped with any weapons.

Someone could find if this supposition is true?

Thank You again,
Toante

Offline schuler

  • Contributing Member
  • **
Re: How to find the Ammo name in a .PBO?
« Reply #4 on: 13 Oct 2007, 01:05:54 »
sorry iam not sure but it looks like youve tried everything, and it should work,, ive not played with Faceplant Civilian pack yet so iam not much help. but it looks to me that your hunch might be right and civ's can't carry weapons. can you see open slots in the civ's gear? maybe try just 2 mags. just to see if it works. civs in ofp have only 4 slots for mags. i hope someone can help you.  :yes: cheers schuler
« Last Edit: 13 Oct 2007, 01:24:21 by schuler »
Semper Fi

Offline Toante

  • Members
  • *
  • I'm a llama!
Re: How to find the Ammo name in a .PBO?
« Reply #5 on: 13 Oct 2007, 12:06:57 »
Schuler,
thank  you, thany you very much: you're really inside the editor mechanic!

You're completely right about the ammo: the problem IS NOT in the Faceplant model, in effect first I tryed to change the civilian with those by FML and those units too started the preview with the "Out of Ammo" message.

Then, I followed your advice, and inserted the command

removeallweapons this ; this addmagazine "MP5A4mag" ; this addmagazine "MP5A4mag" ; this addweapon "PM12"

givin' TWO magazines before the GUN and... POOF! the unit started wih a "Ammo Low" message and 2 magazines available (if I make them drop the gun, I find now a gun with two magazines).

Problem resolved with you kindly help, it appear the the PM12 need more than a magazine in the init field to load the weapon: now I will experiment with the right magazine number to correctly equip the units.

Thank You again, and I apologize for my noobiness, startin in the y2007 a game so old but so realistic!!

Bye,
Toante