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 Wed Apr 24, 2024 12:26 pm
All times are UTC + 0
Infantry won't reload its ammo
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [29 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Fri Dec 21, 2012 11:47 am    Post subject:  Infantry won't reload its ammo
Subject description: (Yes, this is with Ares)
Reply with quote  Mark this post and the followings unread

I am trying to re-create the 'firestorm' effect from Generals in YR. For this, I have created an infantry unit which is created via MakeInfantry from the Mig's warhead. Enough yapping on my part, why won't the following infantry reload it's ammo? Did I forget anything or is it a genuine bug in Ares?

Code:
[FirestormDummy]
UIName=Name:DUMY
Name=Firestorm Dummy
Image=CIV2 ; temp
Category=Soldier
Primary=DummyDelete ; primary weapon which deletes the dummy via limboing, so the deathweapon is not triggered.
Prerequisite=BARRACKS
TiberiumProof=yes
Crushable=no
Warpable=no
Strength=1000
Pip=yellow
OccupyPip=PersonGreen ; choices are green yellow white red blue purple
Armor=special_6 ; this needs to be a newtype, vulnerable only to the Mig's WH
TechLevel=1 ; test
Sight=0
Speed=1
Owner=Americans,British,French,Russians,Confederation,Empire
AllowedToStartInMultiplayer=no
Cost=0
Soylent=0
Points=5
VoiceSelect=
VoiceMove=
VoiceAttack=
VoiceFeedback=
DieSound=
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
ThreatPosed=5   ; This value MUST be 0 for all building addons
ImmuneToVeins=yes
ImmuneToRadiation=yes
ImmuneToPoison=yes
TypeImmune=yes
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,SIGHT,FASTER,SCATTER
Size=1
InitialAmmo=0
Ammo=-2      ; needs to be negative, since InitialAmmo is really InitialAmmo-1, and setting -1 is a special value.
PipScale=Ammo   ; test
Reload=1 ; reload length determines the interval in which additional missiles will cause the firestorm by killing the dummy - after this period, it will gain ammo, fire its primary and delete itself. Think of it like a MaxEC ~rvx
Explodes=yes
DeathWeapon=IvanBomber
;PixelSelectionBracketDelta=999


Perhaps anyone has an idea?
Also, if anyone manages to fix it, do consider it a Tutorial for Mig Firestorms in YR. #Tongue

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Fri Dec 21, 2012 11:52 am    Post subject: Reply with quote  Mark this post and the followings unread

What is that Ammo=-2 thing there?

hm.. on a second read, can you explain this for someone who don't know the ZH logic at all?

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Fri Dec 21, 2012 12:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ammo has never worked in infantry, so not ARES issue but rather an original game issue from the start, somewhat well known issue.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri Dec 21, 2012 12:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ammo=-2 doesn't exist
-1 means unlimited ammo, everything else needs to be a positive value for a limited amount of ammo

Infantry (just like in TS) reload only when they do the prone transition animation. The reload keys do not work on infantry.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Fri Dec 21, 2012 12:29 pm    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Fri Dec 21, 2012 12:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

According to ModEnc, -2 (or any other negative number smaller than -1) causes a unit to start with 0 InitialAmmo (-1 simply means "same as Ammo"). Now I'm wondering if the way Ares made Reload work on infantry perhaps did not account for that feature and hence on infantry it does not work as it does on vehicles?

Also, as for Generals' firestorm, it is an effect which kicks in if several flame-based weapons attack the same location. Their damage adds up and if meeting a certain treshhold, a "firestorm" will break out at that location, which is basically a larger napalm flame which lasts for awhile, dealing damage over time to whatever happens to get caught in it.

I suppose if I can't get "zero initial ammo" to work, I could do some animation spawn/damage magic to cause the firestorm dummy to get warped away after some time instead of self-destructing.

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Fri Dec 21, 2012 12:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well first.

If you set InitialAmmo=0 then the inf in question start without ammo. I don't know what the heck your comment wanna mean there, it's just utter stupidity.

Secondly, the Ares hook seems OK from here. I just checked the code. I am moreso thinking about that you got a signed-unsigned mismatch, and InitialAmmo=-2 ended up being 4 million or a complete overflow.

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Fri Dec 21, 2012 1:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

InitialAmmo=0 makes the unit start with 1 Ammo, both according to ModEnc and my own research.

EDIT:
From ModEnc:
Quote:
This flag determines the ammunition supply of a unit, with Ammo set to a positive integer greater than 0, when it is created from the corresponding Factory. Values for InitialAmmo other than −1, which is a special case↓, result in a starting ammo supply of that number plus 1.

Although usable ammo points are only measured in positive integers, it is possible to have a unit's current ammo be a negative number when it is created. If InitialAmmo is set to a negative integer less than −1, the unit will be created with no usable ammunition, and have an inversely proportional delay before it reloads enough to have a positive ammo supply.

If InitialAmmo is set to a value greater than Ammo, then the unit will be created with its current ammo equal to InitialAmmo. However, if the unit has PipScale=ammo, the pip display will innacurately represent an amount equal to Ammo until the unit depletes enough rounds so that its current ammo is no more than Ammo.

Regardless, a unit can never reload its ammo by any means to an amount greater than Ammo, nor deplete its ammo to an amount less than 0.


...implying that someone's previous research turned up with negative values being functional.

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Fri Dec 21, 2012 1:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

I think I have to look into this deeper in regards of how negative Ammo values are handled by Ares. Mind you opening a bugreport?

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Fri Dec 21, 2012 1:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Will do.

Edit: Nevermind... issue solved. I made a mistake when transferring ModEnc's instructions - the -2 is supposed to go into the InitialAmmo of course, and I misplaced it into Ammo. *sigh*

Topic can be closed/deleted.

Edit:
The issue that remains though is that the unit will still start with 1 ammo, no matter what InitialAmmo value is set. I will post a bug report for that one.

Back to top
View user's profile Send private message
Cranium
Defense Minister


Joined: 05 Dec 2009
Location: USA

PostPosted: Fri Dec 21, 2012 3:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

I like you Graion, but really? does it always have to come to this from you everytime someones trying to figure something out?

Graion wrote:
I don't know what the heck your comment wanna mean there, it's just utter stupidity.

_________________

The enemy shall be injected with toxic poison - Venom

Back to top
View user's profile Send private message Visit poster's website Skype Account
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Fri Dec 21, 2012 4:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well Cranium, there are times when I can overlook things but recently I've seen too many idiots around.

This is a case where I overlooked it, indeed.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
kenosis
Commander


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Sun Dec 23, 2012 5:13 am    Post subject: Reply with quote  Mark this post and the followings unread

so how a firestorm is started when you are attacking a building?

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Sun Dec 23, 2012 1:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

The idea is that the Mig's warhead places an invisible infantry via MakeInfantry. This infantry has a special armor type which is vulnerable only to the Mig's warhead. It also has a DeathWeapon which creates the firestorm effect.
If subsequent Migs attack the same spot, their attacks will kill the dummy, causing it to explode in a firestorm.
The dummy's HP can be adjusted to determine how many missiles it will take to create a firestorm.

However, to limit the length of time during which additional attacks will cause a firestorm, the dummy needs to be removed after some time (so, for example, you don't end up with a firestorm being created 20 minutes after a Mig attacked a spot, because the dummy is still there). Because Suicide=yes weapons would trigger the DeathWeapon, the dummy infantry instead would use a LimboLaunch weapon which simply makes it disappear. Finally, to determine the length of time the dummy stays placed, we need to impose a delay on it during which it can't fire after spawning. This is where I tried to implement the Ammo system, however it did not work as planned, as the dummy will always start with 1 Ammo now, instantly delete itself and hence is not available to create the firestorm.

An alternative route I'm currently exploring would be to have the animation which creates the dummy also spawn an additional animation which loops N times, then transitions to another animation which deals instantly-fatal damage with a chrono-type warhead, warping the dummy into nothingness without triggering his death weapon.

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

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


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Sun Dec 23, 2012 2:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

you cannot spawn infantry when the animation is placed on occupied land.
to make such effect a suppress death weapon tag is needed.

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Sun Dec 23, 2012 3:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Curious, the infantry does actually spawn, that part is working flawlessly. Granted, it spawns NEXT to the building, rather than on top of the building (I assume Ares fixed something here, cause it used to cause an IE pre-Ares), but it does spawn and can be affected by further Mig attacks if the Mig's warhead has enough CellSpread.

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

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


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Sun Dec 23, 2012 4:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

humm……I remember there used to be"ARES will delete the animations if they cannot spawn",oooh.

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
mevitar
Missile Trooper


Joined: 31 Dec 2010

PostPosted: Mon Dec 24, 2012 1:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

InitialAmmo=0 means the object will start with 1 ammo, because the "reload" function kicks in immediately. In Ares, ammo reload works for infantry too, but InitialAmmo still has this problem. I think only units that need to be reloaded on a building don't suffer from it.
BTW, this was already reported when ammo reload logic in was being tested, but i don't remember what happened with it later.

kenosis wrote:
humm……I remember there used to be"ARES will delete the animations if they cannot spawn",oooh.

Ares indeed doesn't spawn infantry that would end up blocked by something, but apparently it applies only when the game tries to spawn stuff on units or infantry. The engine must be applying some checks for buildings that force spawned infantry into a different spot.

Millennium wrote:

An alternative route I'm currently exploring would be to have the animation which creates the dummy also spawn an additional animation which loops N times, then transitions to another animation which deals instantly-fatal damage with a chrono-type warhead, warping the dummy into nothingness without triggering his death weapon.

Temporal=yes doesn't work on animations. And i don't think there is any way an infantry could make itself vanish after some time without triggering the death weapon (not counting LimboLaunch, but i think that the units vanished that way will still stay in the memory...).

Btw, did you think about giving the weapon a cumulative Attached Effect that deals damage instead of using dummy infantry? Or you could use AE to kill the dummy infantry, if they didn't have a death weapon...

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


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Mon Dec 24, 2012 2:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Give the infantry a dummy weapon, its firing anim loops several time and then Next to a killing animation to kill itself.
Missile warhead set InfDeathAnim to turn the dummy into a fire animation, and use trailer to do damage. Set warhead animation to do normal damage(Im not sure if infdeathanim can work on animation warhead)
Dummy has no death weapon.

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Mon Dec 24, 2012 5:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

AttachEffect? This isn't listed in the Ares documentation for 0.2, and I remember hearing something about the AE code being exclusive to MO. I don't have access to it, unless it's available publicly now?
Also very creative concept Ken, thanks much! The only limitation I can currently see from this is that it would turn _any_ infantry into a firestorm, or alternatively, would not be able to be used upon infantry at all. Of course, I can just give the mig two visually identical weapons, one for anti-infantry (with normal death anim), one for other targets (with flamey death).

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Mon Dec 24, 2012 5:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

http://ares.strategy-x.com/unstable/ Left column 4th from top at the time of writing.

It's out for a while now. The exact promise of mine was that AE betas will be out after 0.2 got released, and I usually keep my words.

The doc is handled separately to not end up with modders who wouldn't read the "Included in version" footnote reporting their 0.2 doesn't have AE.

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
kenosis
Commander


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Mon Dec 24, 2012 6:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

npext's multiple weapon in one shot is useful feature

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Tue Dec 25, 2012 1:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Since we're so intent on using MakeInfantry for firestorms, why do you not just make each infantry a "Jumpjet" to spawn on buildings, giving it Armor=Special_1, a weapon that only hurts Special_1 with very small range, and that way, you would need at least 2 to spawn a firestorm.
Voila, no death weapon needed and you can make them just go away.

_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
kenosis
Commander


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Tue Dec 25, 2012 3:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

so how to make fs when you need at least 4 missiles? or if you.have 4 missiles hit one place will you get 2 fs?

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Wed Dec 26, 2012 6:47 am    Post subject: Reply with quote  Mark this post and the followings unread

If you shot 2 Burst=2, then yes, you could use 4 missiles. The point is, when more than 1 infantry is around, you're going to get a firestorm. Any more than 2 will just fuel it faster.

I suppose you could make the infantry need 3 mig shots to die (strength=600 or something and a firestorm would do 1000% damage to them), but then you couldn't make it jumpjet unless your migs are now anti-air as well.

Wouldn't spawning a building with BuildAnywhere=yes be more efficient? That way it would at least be in the damage radius of the projectile.

_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
Atomic_Noodles
Defense Minister


Joined: 05 Oct 2011

PostPosted: Wed Dec 26, 2012 7:00 am    Post subject: Reply with quote  Mark this post and the followings unread

MakeInfantry wouldn't work for it.

Theres also the problem of having 3 Infantry per cell. (Balloon Hovers cannot do this however)

I prefer the more mundane method of just giving the animation a damage and controlling the damage of the animation via Verse Percentages.

Make a very long animation or control how long the animation stays with Rate.

Or just spawn a "smoke" particle like the Virus Death when the Weapon detonates their WH.

_________________
~ Excelsior ~

Back to top
View user's profile Send private message Visit poster's website
kenosis
Commander


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Wed Dec 26, 2012 8:00 am    Post subject: Reply with quote  Mark this post and the followings unread

this is an old FS animation I made



firestorm.rar
 Description:

Download
 Filename:  firestorm.rar
 Filesize:  352.17 KB
 Downloaded:  53 Time(s)


_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Wed Dec 26, 2012 1:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Spawning buildings via warheads? You've lost me there, I guess I'm not up to date on what the latest Ares can do. Apart from that, 4Star's solution with the infantry with special weapons did work more or less, I did the minor modification of adding AttackFriendlies.

Last edited by Millennium on Wed Dec 26, 2012 2:00 pm; edited 1 time in total

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Wed Dec 26, 2012 1:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

Noone made such yet. O_o

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [29 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.1838s ][ Queries: 13 (0.0107s) ][ Debug on ]