Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Mar 29, 2024 10:15 pm
All times are UTC + 0
Ammo and NoAmmoWeapon
Moderators: Ares Support Team at PPM, Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Mon Aug 08, 2016 3:28 pm    Post subject:  Ammo and NoAmmoWeapon
Subject description: I don't understand...
Reply with quote  Mark this post and the followings unread

Code:
[CHAMP]
UIName=Name:CHAMP
Name=Crusader Tank
Prerequisite=RADAR,GAWEAP
Primary=105AP
Secondary=105mm2
PipScale=Ammo
Ammo=2
ManualReload=yes
NoAmmoWeapon=1
NoAmmoAmount=2
Strength=555
Category=AFV
Armor=heavy
Turret=no
IsTilter=yes
Crusher=yes
TooBigToFitUnderBridge=true
TechLevel=7
Sight=8
Speed=5
CrateGoodie=yes
Owner=British,French,Germans,Americans,Alliance,Japan
AllowedToStartInMultiplayer=yes
Cost=1100
Soylent=550
Points=25
ROT=8
IsSelectableCombatant=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=ChampSelect
VoiceMove=ChampMove
VoiceAttack=ChampAttackCommand
DieSound=GenVehicleDie
MoveSound=TankDestroyerMoveStart
CrushSound=TankCrush
MaxDebris=2
; origional - Locomotor={55D141B8-DB94-11d1-AC98-006008055BB5}
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
;MovementZone=Destroyer ;gs FLAW needs to be changed to this when The Flaw is fixed
MovementZone=Normal
ThreatPosed=15   ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Accelerates=false
ImmuneToVeins=yes
Size=3
Weight=3.5
ElitePrimary=105AP
EliteSecondary=105mm2E
Sensors=yes
SensorsSight=5
Bunkerable=no


I want its primary weapon as the ammo part considered ammo weapon and its secondary as the non-ammo weapon. The problem is the unit isn't firing its ammo weapon/primary anymore and it keeps firing its secondary. If I make the NoAmmoAmount lower, it will keep firing it's supposedly ammo weapon/primary non-stop when it should be consuming ammo.

Can someone help me on this part as I'm getting confused to get this work.

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Mon Aug 08, 2016 8:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

Do you have Ammo=0 for your secondary/non-ammoed weapon but not for your primary/ammoed weapon?

_________________

Back to top
View user's profile Send private message Skype Account
PillBox20
Commander


Joined: 28 Sep 2013
Location: Plovdiv, Bulgaria.

PostPosted: Tue Aug 09, 2016 3:36 am    Post subject: Reply with quote  Mark this post and the followings unread

I don't see where is the Reload=(frames)?

_________________
"If it ain't broke, don't fix it."
"If you are loyal to everybody, can you truly be loyal to anybody?"
Ares Documentation: http://ares-developers.github.io/Ares-docs/
My YouTube Channel: https://www.youtube.com/channel/UCtxeQoEM_iVd-F-xUIwleyQ
PillBox20's Red Alert 2 Mod: http://www.moddb.com/mods/pillbox20s-red-alert-2/downloads/pillbox20s-red-alert-2-version-02

Back to top
View user's profile Send private message Visit poster's website YouTube User URL Skype Account
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Tue Aug 09, 2016 7:48 am    Post subject: Reply with quote  Mark this post and the followings unread

PillBox20 wrote:
I don't see where is the Reload=(frames)?

Oops I forgot. Lemme fix my code.


cxtian39 wrote:
Do you have Ammo=0 for your secondary/non-ammoed weapon but not for your primary/ammoed weapon?

Sorry but how do I do that?

Anyway, here's my new code:

Code:
[CHAMP]
UIName=Name:CHAMP
Name=Crusader Tank
Prerequisite=RADAR,GAWEAP
Primary=105AP
Secondary=105mm2
PipScale=Ammo
Ammo=1
InitialAmmo=1
Reload=100
EmptyReload=150
ReloadIncrement=80
NoAmmoWeapon=1
NoAmmoAmount=1
Strength=555
Category=AFV
Armor=heavy
Turret=no
IsTilter=yes
Crusher=yes
TooBigToFitUnderBridge=true
TechLevel=7
Sight=8
Speed=5
CrateGoodie=yes
Owner=British,French,Germans,Americans,Alliance,Japan
AllowedToStartInMultiplayer=yes
Cost=1100
Soylent=550
Points=25
ROT=8
IsSelectableCombatant=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=ChampSelect
VoiceMove=ChampMove
VoiceAttack=ChampAttackCommand
DieSound=GenVehicleDie
MoveSound=TankDestroyerMoveStart
CrushSound=TankCrush
MaxDebris=2
; origional - Locomotor={55D141B8-DB94-11d1-AC98-006008055BB5}
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
;MovementZone=Destroyer ;gs FLAW needs to be changed to this when The Flaw is fixed
MovementZone=Normal
ThreatPosed=15   ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Accelerates=false
ImmuneToVeins=yes
Size=3
Weight=3.5
ElitePrimary=105AP
EliteSecondary=105mm2E
Sensors=yes
SensorsSight=5
Bunkerable=no


My problem is, after the ammo is depleted, it doesn't change weapon. Ugh, this is really confusing.

Back to top
View user's profile Send private message
PillBox20
Commander


Joined: 28 Sep 2013
Location: Plovdiv, Bulgaria.

PostPosted: Tue Aug 09, 2016 10:23 am    Post subject: Reply with quote  Mark this post and the followings unread

No ammo weapon needs to be set in the weapon section. I don't have access to my codes, but I can tell you that for both weapons to work you have to go to each of them and set at what ammo to fire. For example the secondary weapon needs to have ammo=0 as stated above. Then when the unit reaches ammo 0 it will start using the secondary weapon.

_________________
"If it ain't broke, don't fix it."
"If you are loyal to everybody, can you truly be loyal to anybody?"
Ares Documentation: http://ares-developers.github.io/Ares-docs/
My YouTube Channel: https://www.youtube.com/channel/UCtxeQoEM_iVd-F-xUIwleyQ
PillBox20's Red Alert 2 Mod: http://www.moddb.com/mods/pillbox20s-red-alert-2/downloads/pillbox20s-red-alert-2-version-02

Last edited by PillBox20 on Tue Aug 09, 2016 12:26 pm; edited 2 times in total

Back to top
View user's profile Send private message Visit poster's website YouTube User URL Skype Account
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Tue Aug 09, 2016 12:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

Oh okay. Now I can get it to work. Thanks to you two guys!

Back to top
View user's profile Send private message
zenoniations
Disk Thrower


Joined: 16 Sep 2008
Location: 77th Battalion headquarter

PostPosted: Fri Oct 21, 2016 6:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

To sum up, it needs:

[WeaponTypes] (Creat this tag)
xx=YourWeapon

[technotype]
Secondary=YourWeapon
NoAmmoWeapon=1

[YourWeapon]
ammo=0

_________________
Red Alert : Reinforced [On hold]
Armored Assault : Operation MOBA [In dev]

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL Skype Account
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Sat Oct 22, 2016 6:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

^ Yeeeeeep.


Anyway, regarding this, another question. Is this only works on units? I tried to do it on defenses but it seems I can't able to make it work.

Back to top
View user's profile Send private message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Sat Oct 29, 2016 4:48 am    Post subject: Reply with quote  Mark this post and the followings unread

So, it's not really possible? I was under the impression that structures would work given that in Ares particularly on NoAmmoWeapon section:

"Units and structures usually always use the same weapon against the same target. If the weapon is not charged because ammo is depleted, the unit will wait for it to reload. It will not try the next available weapon that might not even need ammunition."

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Sat Oct 29, 2016 6:04 am    Post subject: Reply with quote  Mark this post and the followings unread

It could be that a feature of the game interferes with it: Hospital=no and Armory=no buildings immediately reload their ammo when empty.

_________________

Back to top
View user's profile Send private message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Sat Oct 29, 2016 12:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

So should I insert the Hospital=no and Armory=no tag or what?

Well, I tried to tweak those tags but still I can't get it to work. It still always fires its primary(The ammo weapon) weapon and never fires its secondary(The no-ammo weapon) weapon.

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Sun Oct 30, 2016 7:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hospitals and Armories don't reload their ammo at all. They use ammo to heal or promote infantry.

I'm afraid there is no solution yet.

_________________

Back to top
View user's profile Send private message
gameaddict11707
Grenadier


Joined: 15 Jul 2011

PostPosted: Sun Oct 30, 2016 11:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

chr0nicz420, I tested your most recently posted code (on the Pillbox instead of a tank - just to see if this setup worked on buildings, and it does in Ares 0.C) and noticed something odd:

[GAPILL]
;insert other building code here

Primary=Vulcan2
Secondary=VulcanDummy
PipScale=Ammo
Ammo=1
Reload=100
EmptyReload=150
ReloadIncrement=80
NoAmmoWeapon=1
NoAmmoAmount=1

[Vulcan2]
Damage=50
ROF=26
Range=5.5
Projectile=InvisibleLow
Speed=100
Warhead=SA
Report=PillboxAttack
Anim=MGUN-N,MGUN-NE,MGUN-E,MGUN-SE,MGUN-S,MGUN-SW,MGUN-W,MGUN-NW
Bright=yes

[VulcanDummy]
Damage=1
ROF=26
Range=5.5
Projectile=InvisibleLow
Speed=100
Warhead=DummySA
Report=PillboxAttack
Anim=MGUN-N,MGUN-NE,MGUN-E,MGUN-SE,MGUN-S,MGUN-SW,MGUN-W,MGUN-NW
Ammo=0

[DummySA]; targets things normally, but deals no damage
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Versus.none.ForceFire=yes
Versus.none.PassiveAcquire=yes
Versus.none.Retaliate=yes
Versus.flak.ForceFire=yes
Versus.flak.PassiveAcquire=yes
Versus.flak.Retaliate=yes
Versus.plate.ForceFire=yes
Versus.plate.PassiveAcquire=yes
Versus.plate.Retaliate=yes
Versus.light.ForceFire=yes
Versus.light.PassiveAcquire=yes
Versus.light.Retaliate=yes
Versus.medium.ForceFire=yes
Versus.medium.PassiveAcquire=yes
Versus.medium.Retaliate=yes
Versus.heavy.ForceFire=yes
Versus.heavy.PassiveAcquire=yes
Versus.heavy.Retaliate=yes
Versus.wood.ForceFire=yes
Versus.wood.PassiveAcquire=yes
Versus.wood.Retaliate=yes
Versus.steel.ForceFire=yes
Versus.steel.PassiveAcquire=yes
Versus.steel.Retaliate=yes
Versus.concrete.ForceFire=yes
Versus.concrete.PassiveAcquire=yes
Versus.concrete.Retaliate=yes
Versus.special_1.ForceFire=yes
Versus.special_1.PassiveAcquire=yes
Versus.special_1.Retaliate=yes
Versus.special_2.ForceFire=yes
Versus.special_2.PassiveAcquire=yes
Versus.special_2.Retaliate=yes
AnimList=PIFFPIFF


This Pillbox only fires the VulcanDummy weapon, though. Setting it to 0 makes it work fine.

The Ares documentation on NoAmmoWeapon & NoAmmoAmount says (emphasis mine):
"If the current ammo is equal to or below this value, the NoAmmoWeapon will be used. Defaults to 0."

Because of this, the Primary never fires even with full Ammo. That might be part of your problem. Post your weapons' code too, just in case.

Back to top
View user's profile Send private message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Mon Oct 31, 2016 5:53 am    Post subject: Reply with quote  Mark this post and the followings unread

Apparently, it suddenly worked which I don't know how as I didn't make any changes at all. Besides, I know about NoAmmoAmmount should be set to 0. Here's the code:

Code:

[NAHLCN]
UIName=Name:NAHLCN
Name=Sentinel Cannon
BuildCat=Combat
Strength=1000
Armor=steel
TechLevel=7
Prerequisite=NACNST,NATECH
Adjacent=2
Sight=10
Owner=Russians,Africans,Arabs,NorthKorea,Confederation
Cost=2500
Points=30
Power=-200
Crewed=no
ROT=1
NoAmmoWeapon=1
NoAmmoAmount=0
Ammo=1
PipScale=Ammo
EmptyReload=250
Primary=SentinelCannon
Secondary=SentinelGun
Capturable=false
AIBasePlanningSide=1
TargetLaser=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
DebrisAnims=DBRIS1LG,DBRIS1SM,DBRIS4LG,DBRIS4SM,DBRIS5LG,DBRIS5SM
MaxDebris=8
MinDebris=4
;DamageParticleSystems=SparkSys,LGSparkSys
Powered=no
Turret=yes
TurretAnim=NAHLCN_T
TurretAnimIsVoxel=false
TurretAnimX=3
;TurretAnimY=28
TurretAnimZAdjust=-60
;TurretRecoil=yes
TurretTravel=0
BarrelTravel=8
BarrelCompressFrames=3
BarrelHoldFrames=3
BarrelRecoverFrames=40
TurretRotateSound=GrandCannonRotate
;WorkingSound=PowerOn
;NotWorkingSound=PowerOff
BaseNormal=no
AIBuildThis=yes
IsBaseDefense=yes
ImmuneToPsionics=no ; defaults to yes for buildings, no for others
Drainable=no
Sensors=yes
SensorArray=yes
SensorsSight=15
ImmuneToEMP=no
BuildLimit=1


[SentinelCannon]
Damage=250
ROF=5
Range=20
MinimumRange=3
Projectile=GrandCannonBall
Speed=1
Report=GrandCannonAttack
Bright=yes
Warhead=SentinelCannonWH
Anim=GCMUZZLE


[SentinelGun]
Ammo=0
Damage=65
ROF=5
Range=15
MinimumRange=2.5
Projectile=SentinelP
Speed=100
Warhead=QuadWH
Report=Quad2Attack
Anim=GUNFIRE



I'm really confused why it's not working at first... Thanks for the replies though.

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Mon Oct 31, 2016 6:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Gattling can perform this kind of switch as well
If the next stage weapon require more ammo than current ammo the unit has, it won't go to the next stage and stay at current stage.
Code:
[SCHP]
Image=TWBD
Spawns=TMISL
SpawnsNumber=1
SpawnRegenRate=40
SpawnReloadRate=0
NoSpawnAlt=yes
UnloadingClass=SCHD
Turret=no
IsGattling=yes
Gattling.Cycle=yes
OpportunityFire=yes
WeaponCount=8
TurretCount=1
Weapon1=PKX127
EliteWeapon1=PKX127E
Weapon2=TwinbladeLauncher
EliteWeapon2=TwinbladeLauncher
Weapon3=Oduvanchik
EliteWeapon3=OduvanchikE
Weapon4=TwinbladeLauncher
EliteWeapon4=TwinbladeLauncher
Weapon5=PKX127
EliteWeapon5=PKX127E
Weapon6=TwinbladeLauncher
EliteWeapon6=TwinbladeLauncher
Weapon7=Oduvanchik
EliteWeapon7=OduvanchikE
Weapon8=TwinbladeLauncher
EliteWeapon8=TwinbladeLauncher
WeaponStages=4
Stage1=20
Stage2=40
Stage3=60
Stage4=80
EliteStage1=12
EliteStage2=24
EliteStage3=36
EliteStage4=48
RateUp=1
RateDown=0
Ammo=4
InitialAmmo=4
Reload=220
ReloadAmount=4
PipScale=Ammo

[PKX127]
Damage=8
ROF=10
Range=5
Projectile=AGBullet
Speed=100
Warhead=PKX127WH
Anim=QUINANIM2-N,QUINANIM2-NE,QUINANIM2-E,QUINANIM2-SE,QUINANIM2-S,QUINANIM2-SW,QUINANIM2-W,QUINANIM2-NW
OmniFire=yes
Burst=2
LaserDuration=1
IsLaser=true
LaserInnerColor=175,175,175
Ammo=0

[Oduvanchik]
Damage=19
Burst=2
ROF=10
Range=5
Projectile=HeatSeeker4
Speed=100
Warhead=SAMWH2
Anim=TWBDANIM2
TurboBoost=yes
OmniFire=yes

This heli fires missile and machine gun alternately (looks simultaneously due to small ROF) when ammoed and fires only machine gun without ammo
Also, it can deploys to fire rocket

Back to top
View user's profile Send private message Skype Account
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Tue Nov 01, 2016 7:06 am    Post subject: Reply with quote  Mark this post and the followings unread

For the record; what gameaddict11707 meant was that:

for you to have two weapons firing (alternatively or otherwise), NoAmmoAmount needs to be LESS THAN Ammo.

i.e.
Ammo = 1
NoAmmoAmount = 0
NoAmmoWeapon = 1

[SecWeapon]
Ammo=0

This way, the primary will fire when Ammo is full (Ammo is 1), and in doing so one ammo unit is lost (Ammo is 0). With ammo at 0, the secondary weapon fires continuously until the Ammo reloads (Ammo back at 1).

Comprendo?

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.4834s ][ Queries: 11 (0.3136s) ][ Debug on ]