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 Thu Apr 18, 2024 10:27 am
All times are UTC + 0
AttachEffect.ArmorMultiplier not working on Big Stuctures
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [11 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Thu Nov 03, 2022 2:26 pm    Post subject:  AttachEffect.ArmorMultiplier not working on Big Stuctures
Subject description: Attacking units and pillboxes give the effect but Construction Yards and Power Plants don't
Reply with quote  Mark this post and the followings unread

So the animation DOES damage to structures even the big ones, so that means the animation is hitting the target,
but the AttachEffect isn't given unless it's small. Tried it with pillboxes.

Essentially, if you know about the Synchronin/Synchronaut in Mental Omega, that's what I'm trying to achieve.

Here is the code:
Code:
[TARGETPAINTER]
Weapon=LaserPointer
Normalized=yes
Layer=ground
AltPalette=no
Sticky=yes
Damage=1
Layer=top
UseNormalLight=yes
ZAdjust=-512
YSortAdjust=2000

[LaserPointer]      ; Anti-surface gun
Projectile=DummyProj
Warhead=LaserPointerWH

[LaserPointerWH]
CellSpread=.5
PercentAtMax=.5
Verses=3%,3%,3%,3%,3%,3%,3%,3%,3%,3%,3%
InfDeath=2
AnimList=
Sparky=no
ProneDamage=70%     ; Presumes air burst
Bullets=yes
AttachEffect.ArmorMultiplier=0.5
AttachEffect.Duration=5

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Thu Nov 03, 2022 3:38 pm    Post subject: Re: AttachEffect.ArmorMultiplier not working on Big Stuctures Reply with quote  Mark this post and the followings unread

[TARGETPAINTER]
Weapon=LaserPointer (why do you have the weapon that spawns the anim attached to the anim, are you trying to make an infinite loop?)
Normalized=yes
Layer=ground
AltPalette=no (no is the default so you can remove this)
Sticky=yes (this is old buggy logic that doesn't work properly & isn't needed as the AttachEffect will stick to its targets anyway)
Damage=1 (the Weapon= code at the top makes this redundant)
Layer=top (you have layer twice)
UseNormalLight=yes
ZAdjust=-512
YSortAdjust=2000

[LaserPointer] ; Anti-surface gun
Projectile=DummyProj
Warhead=LaserPointerWH

[LaserPointerWH]
CellSpread=.5 (is there a reason why you need such a small CellSpread? I presume the weapon isn't inaccurate, so it would be better to remove this)
PercentAtMax=.5 (same as above)
Verses=3%,3%,3%,3%,3%,3%,3%,3%,3%,3%,3%
InfDeath=2
AnimList= (if you dont list anything then you can remove this code)
Sparky=no (no is the default so you can remove this)
ProneDamage=70%     ; Presumes air burst
Bullets=yes (this is used by the IFV & doesn't do anything here)
AttachEffect.ArmorMultiplier=0.5
AttachEffect.Duration=5

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Thu Nov 03, 2022 4:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sorry about the messy code. I created a lot of units at this point and I know about the mistakes,
I'm going to clean them after as I want to arrange them properly as well.
I've looked into ModEnc and used those probably on some unit and just copy pasted it. And if you look at the comments (the one with the ";"), they came from one of the stuff from rulesmd.

But yeah, Do you know why AttachEffect doesn't work on larger structures?
Also I'll make sure they're cleaner when posting it in the forums. It might make things confusing now that I think about it.

Also also, LaserPointer is not the weapon that spawns the anim it's another weapon with a different name of course.
Another edit, Damage=1 is redundant? I thought that was important. I remember having another weapon that did have damage but it didn't work. It had to be on the animation.

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Thu Nov 03, 2022 5:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you use Damage= on a animation then you also need to use Warhead= otherwise the game wont know how to apply the damage. You are using the Weapon= code though witch was added by Ares & replaces the Damage/Warhead code with a full weapon. So either remove the Damage= & keep the Weapon= or remove the Weapon= & add a Warhead=. Edit: Ignore this bit I miss remembered how the Ares Weapon= code is handled.

Using the unit's main weapon to apply the AttachEffect would be the easiest method. I dont understand why you need to have a weapon spawn an anim, that spawns a weapon that applies the AttachEffect o.0 Seams a but unnecessary, unless there is also some other effect/trigger you haven't mentioned?

I haven't heard of anyone else having problems with AttachEffect on larger structures. I presume it's because of the unusual way you have the weapons/anims set up or something to do with the CellSpread.

For a simple laser weapon that lowers the targets armour all you should need is:

Code:

[LaserPointer]
Damage=1
ROF=100 ;change to what you want
Range=10 ;change to what you want
IsLine=true
IsHouseColor=true
Projectile=Invisible
Warhead=LaserPointerWH
MigAttackCursor=yes ;optional extra

[LaserPointerWH]
Verses=1%,1%,1%,1%,1%,1%,1%,1%,1%,1%,1%
AttachEffect.ArmorMultiplier=0.5
AttachEffect.Duration=100 ;make it the same or higher then ROF
AttachEffect.Animation=TARGET

[TARGET]
Layer=top
UseNormalLight=yes
LoopStart=0
LoopEnd=1


_________________



Last edited by Mig Eater on Thu Nov 03, 2022 11:54 pm; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Thu Nov 03, 2022 9:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

Okay, Here is the complete code:

Code:
[Spyglass]  ;Actual Weapon used to summon the TARGETPAINTER
Damage=1
ROF=1
Range=10
Projectile=TargetDesignator
Speed=100
Warhead=SpyglassWH
LaserInnerColor = 216,0,0
LaserDuration = 1
IsLaser=true   ; this flag tells the game to use the special laser draw effect
IsSingleColor=yes

[TargetDesignator]
Inviso=yes
AA=no
AG=yes
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=yes

[SpyglassWH]
CellSpread=.5
PercentAtMax=.5
Verses=3%,3%,3%,3%,3%,3%,3%,3%,3%,3%,3%
InfDeath=2
ProneDamage=70%
AttachEffect.Animation=TARGETPAINTER
AttachEffect.Duration=5

[LaserPointer]
Projectile=DummyProj
Warhead=LaserPointerWH

[LaserPointerWH]
Verses=3%,3%,3%,3%,3%,3%,3%,3%,3%,3%,3%
InfDeath=2
ProneDamage=70%
AttachEffect.ArmorMultiplier=0.5
AttachEffect.Duration=5

[TARGETPAINTER]
Weapon=LaserPointer ;Dummy weapon for attaching effects on anims
Normalized=yes
Damage=1
Layer=top
UseNormalLight=yes
ZAdjust=-512
YSortAdjust=2000

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Thu Nov 03, 2022 9:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

I dont understand why you dont just add the ArmorMultiplier= to the SpyglassWH. What is the reason for attaching the animation with the weapon & then the effect with a second weapon attached to the animation?

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Thu Nov 03, 2022 9:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

That is what I used. I don't really understand how the Animation Damage code work as I had never seen an example,
but when I gave the TARGETPAINTER's dummy weapon "LaserPointer" a Damage=, it makes the animation do nothing and I had to give the damage to the TARGETPAINTER.
I do know however that the actual weapon that spawns the anim needs to have damage.

I don't really have proper tutorials on how to use Animation Damage and mostly based it of off what was written in Ares documentation and I still got
confused at first as it wasn't stated there that it was in art.ini(but I did know about it later as I'm using it now)
Usually I look at examples as I'm used to making datapacks.

But yeah, I will try your code and move the AttachEffect from the TARGETPAINTER's dummy weapon "LaserPointer" to the weapon that spawns the anim which is "Spyglass"
and see if it works.

Edit: This was made before you replied I was still typing when you already replied

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Thu Nov 03, 2022 10:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

From my understanding from Ares documentation, that is how you get effects to work.

But just to be clear, for future references in doing codes, does the weapon used by the animation (not the one that creates it) actually do damage?

What is the purpose of adding a weapon to animation? It would be helpful in understanding for me if there was an example,
as it does feel like I'm just doing something redundant.

Also confusing for me is that the code actually works. Though for some things only like 1x1 structures and all infantry and units but not big structures.

Edit: Just tested it and it works! Thanks Mig Eater again for the help!
But now I'm even more confused. I guess I might be coding things wrong after all. Anyways back to rechecking things again.

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


Joined: 11 Jun 2016

PostPosted: Sat Nov 05, 2022 11:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Let's just say Attach Effects aren't the best to attach further effects on buildings. May have something to do with the hitboxes.

To get around your issue with bigger buildings, simply move AttachEffect.ArmorMultiplier= to the FIRST attach effect. Use the AttachEffect Animation ONLY for doing damage.

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Tue Nov 08, 2022 4:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yeah that's what I did, and having animation only do damage was also the same conclusion I had. Thanks for clarifying either way silverwind.  Very Happy

At least I won't try to mess with it again, just in case.

Back to top
View user's profile Send private message
GlaWorker
Vehicle Driver


Joined: 01 May 2022

PostPosted: Sat Dec 31, 2022 7:13 pm    Post subject:   Reply with quote  Mark this post and the followings unread

Is it possible to increase the range for the duration of the bonus?

p.s.: Sorry for the offtopic, but I don't feel like creating a new thread.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [11 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.1482s ][ Queries: 11 (0.0084s) ][ Debug on ]