Dispenser ODF - RefillFromItem Property

Started by Phobos, April 04, 2016, 01:41:20 AM

Previous topic - Next topic
Quote from: jdee-barc on January 09, 2011, 07:30:48 PM
I found a way of making a weapon not be able to refill its ammo from a recharge droid or ammo pack. That way ensures that you can only have 3 EMP mines at a time and it is also the reason that you can't refill on Health and ammo packs from a recharge droid
put this line in the weapon odf, not the ord odf or exp odf

RefillFromItem      = 0
I just tested this on a custom vehicle dispenser ODF, but it still refills from dropped ammo packs. This is confusing, it should not supply ammo since the same setting prevents stock pilot dispensers from refilling by ammo packs.

Quote from: Gistech on January 10, 2011, 02:00:20 AM
Incorrect. It won't stop you from refilling at an ammo droid but it will stop you from refilling by picking up ammo packs. In any case, I won't use this line in the ODF of the EMP mine.
In the case of TWD mod I want to be able dispense the vehicles such as the motorcycle only once per character life. So I used the ammo bot patcher I made to remove all the ammo bots from map. The trouble is "RefillFromItem = 0" seems to be ignored, when I pick up an ammo pack the dispenser refills anyway.

Here is my ODF
[WeaponClass]
ClassLabel = "dispenser"

[Properties]
GeometryName = ""

RoundsPerClip = "1"
ShotDelay = "0.5"
ReloadTime = "9999.0"
IconTexture          = "HUD_timebomb_icon"
TriggerAll = "1"
AnimationBank = "gam" // "grenade"
RefillFromItem = 0
FireAnim                = "2"
TrackingSound        = ""

WEAPONSECTION = 1
ModeTexture = "HUD_weap_mine"
//ModeTextureColor = "42 235 42 100"
ReticuleTexture = "reticule_00"
OrdnanceName = "twd_hover_motorcycle"
ShotDelay = "1.0"
MaxItems = "1.0"
AutoAimSize = "1.0"
MinStrength = "2.0"
MaxStrength = "2.0"

FireSound           = "com_weap_throw_fire"
FireEmptySound      = "com_weap_inf_ammo_empty"
FireLoopSound       = ""
ReloadSound         = "all_weap_inf_equip_med"
ChargeSound         = ""
ChargeSoundPitch    = ""
ChangeModeSound     = "all_weap_inf_equip_med"
WeaponChangeSound   = "all_weap_inf_equip_med"
OverheatSound       = ""
OverheatSoundPitch  = ""
OverheatStopSound   = ""
ClankLeftWalkSound  = ""
ClankRightWalkSound = ""
ClankLeftRunSound   = ""
ClankRightRunSound  = ""
JumpSound           = "all_weap_inf_pistol_mvt_jump"
LandSound           = "all_weap_inf_pistol_mvt_land"
RollSound           = "all_weap_inf_pistol_mvt_roll"
ProneSound          = "all_weap_inf_pistol_mvt_squat"
SquatSound          = "all_weap_inf_pistol_mvt_lie"
StandSound          = "all_weap_inf_pistol_mvt_getup"

Quote from: Sereja on April 04, 2016, 06:37:28 AM
Well, I just checked those line "RefillFromItem      = 0"
and I guess it doesn't work at all. The matter is in dispenser ordance odfs:
ClassLabel = "powerupitem"     = can't be refilled
ClassLabel          = "mine"         = always be refilled
Thanks Sereja for looking into this. It seems ClassLabel = "hover" functions the same as "mine", and cannot prevent refill from ammo packs.
This means the RefillFromItem property is probably hard-coded to only function for the "powerupitem" ordnance classlabel, or it doesn't even function at all :(