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 11:59 pm
All times are UTC + 0
TintObjectsNugget
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Golan
Flamethrower


Joined: 21 Nov 2007

PostPosted: Sat Oct 04, 2008 12:02 pm    Post subject:  TintObjectsNugget Reply with quote  Mark this post and the followings unread

I´m currently working on a Medic unit for GDI, however I have some problems with getting it to highlight the unit it is healing. I´m currently using a TintObjectsNugget to recolor the target but this seems to have quite some problems with objectfilters. When using both a DamageNugget and TintObjectsNugget, the Medic properly heals infantry but the target doesn´t get tinted.
Code:
  <WeaponTemplate
      id="GDIMedic_MediGun"
      Name="GDIMedic_MediGun"
      AttackRange="20.0"
      WeaponSpeed="999999.0"
      AcceptableAimDelta="10d"
      RadiusDamageAffects="ALLIES ENEMIES NEUTRALS"
      AntiMask="ANTI_GROUND ANTI_STRUCTURE"
      ClipSize="4"
      ReAcquireDetailType="PER_CLIP">
      <FiringDuration
         MinSeconds="0.5s"
         MaxSeconds="0.5s"/>
      <ClipReloadTime
         MinSeconds="2s"
         MaxSeconds="2s" />
      <Nuggets>
         <ProjectileNugget
            WarheadTemplate="GDIMedic_MediGunWarhead"
            ProjectileTemplate="NODBlackHandFlamerProjectile"/>
      </Nuggets>
   </WeaponTemplate>
   
   <WeaponTemplate
      id="GDIMedic_MediGunWarhead"
      Name="GDIMedic_MediGunWarhead"
      HitStoredTarget="true"
      RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" >
      <Nuggets>
         <!-- Heal to all allies -->
         <DamageNugget
            Damage="50.0"
            Radius="1"
            DamageType="HEALING">
            <SpecialObjectFilter
               Rule="NONE"
               Include="INFANTRY"
               Relationship="ALLIES">
            </SpecialObjectFilter>
         </DamageNugget>
         
         <TintObjectsNugget
            Radius="1"
            PreColorTime="4s"
            SustainedColorTime="0s"
            PostColorTime="1s"
            Frequency="0"
            Amplitude="0">
            <Color R="0.9" G="0.3" B="0.3"/>
         </TintObjectsNugget>
      </Nuggets>
   </WeaponTemplate>


When using the TintObjectsNugget for the Healing damage as well, the tinting works correctly but the ObjectFilter no longer has any effect on the healing process, allowing the Medic to heal vehicles and structures as well.
Code:
   <WeaponTemplate
      id="GDIMedic_MediGunWarhead"
      Name="GDIMedic_MediGunWarhead"
      HitStoredTarget="true"
      RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" >
      <Nuggets>
         <!-- Heal to all allies -->
         <TintObjectsNugget
            Radius="1"
            PreColorTime="0.25s"
            SustainedColorTime="0.5s"
            PostColorTime="0.25s"
            Frequency="0"
            Amplitude="0"
            Damage="50.0"
            DamageType="HEALING">
            <SpecialObjectFilter
               Rule="ANY"
               Include="INFANTRY"
               Exclude="VEHICLE STRUCTURE"
               Relationship="ALLIES">
            </SpecialObjectFilter>
            <Color R="0.9" G="0.4" B="0.4"/>
         </TintObjectsNugget>
      </Nuggets>
   </WeaponTemplate>


Any idea on how to get this to work?

_________________
Off Duty.

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Sat Oct 04, 2008 12:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

I think you've got the most TW modding experience of all us here (excluding Stygs maybe), so I doubt you get much help here Confused
I really must fix my TW disk so I can get back to modding...

Back to top
View user's profile Send private message Send e-mail Skype Account
Kitsune86
Vehicle Driver


Joined: 03 Oct 2008

PostPosted: Sat Oct 04, 2008 1:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, not that I know much, but have you tried putting the object filter outside of the tint filter?

On a side note, after seeing that you'd be using the Black hand weapon for effect, I suddenly got reminded of the medic gun from TF2.

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


Joined: 02 Sep 2007
Location: My avatar pretty much gives it away...

PostPosted: Sun Oct 05, 2008 12:12 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
I think you've got the most TW modding experience of all us here (excluding Stygs maybe), so I doubt you get much help here Confused

*cough* ...just kidding Laughing

Anyway, this seems to be another of the hopeless situations where the SAGE engine does wierd stuff for no appearant reason...
I should say that I've never been working with TintObjectsNuggets before, but there is often a certain similarity between different problems you encounter, so I'll do my best to help you.
I compared your code to the ones of the mothership catalyst weapons (which we know work), and found only 2 significant differences. I'm too lazy and tired to test different codes, but here are my observations:

1. Starting with something unlikely to be the problem: You have a separate warhead weapon for damage and tint effects, wheras the mothership has all the nuggets in the main weapon settings.
This should, however, not be of any significance (and the tint works with the other warhead).... but then again the SAGE engine doesen't always behave logical...

2. Now something that could actually be important: Your TintObjectsNugget appears after DamageNugget in the code, while it's the other way around in the mothership weapon code.
Strictly speaking, this shouldn't have any effect, but I know that the order of the different parts in your code is critical when it comes to AnimationStates. This might also be the case here...

Regarding why the healing in the TintObjectsNugget also fails, I can only speculate... but it could be that the logic that controls wether or not a weapon should be fired at a certain enemy is controlled by the SpecialObjectFilters in DamageNuggets alone...
If objects not included in the SpecialObjectFilter are also tinted and healed (confirm that they are healed, not just fired upon), it could be that SpecialObjectFilters in TintObjectsNuggets doesen't work in general..

_________________

Back to top
View user's profile Send private message
Golan
Flamethrower


Joined: 21 Nov 2007

PostPosted: Sun Oct 05, 2008 11:00 am    Post subject: Reply with quote  Mark this post and the followings unread

Kitsune86 wrote:
Well, not that I know much, but have you tried putting the object filter outside of the tint filter?

That wouldn´t be valid, the filter must be part of a nugget.

Chronosheep wrote:
1. Starting with something unlikely to be the problem: You have a separate warhead weapon for damage and tint effects, wheras the mothership has all the nuggets in the main weapon settings.
This should, however, not be of any significance (and the tint works with the other warhead).... but then again the SAGE engine doesen't always behave logical...

Initially, it was all part of a single weapon without a warhead, but I figured the radius of the Tint might be measured from where the weapon is triggered, not the target. Doesn´t seem to make any difference though.

Chronosheep wrote:
2. Now something that could actually be important: Your TintObjectsNugget appears after DamageNugget in the code, while it's the other way around in the mothership weapon code.
Strictly speaking, this shouldn't have any effect, but I know that the order of the different parts in your code is critical when it comes to AnimationStates. This might also be the case here...

It indeed behaves oddly... changing the sequence of the nuggets deactivated the TintNugget and the filter on the damage nugget. Confused
It seems to me like the Objectfilter somehow breaks the TintObjectsNugget, but I don´t see why it should do so.



Chronosheep wrote:
Regarding why the healing in the TintObjectsNugget also fails, I can only speculate... but it could be that the logic that controls wether or not a weapon should be fired at a certain enemy is controlled by the SpecialObjectFilters in DamageNuggets alone...
According to the schemas, the TintObjectsNugget is just an extended DamageNugget. So the Filter should also apply to both tinting and damage if it´s all in one nugget... well, not that it does... Laughing

Chronosheep wrote:
If objects not included in the SpecialObjectFilter are also tinted and healed (confirm that they are healed, not just fired upon), it could be that SpecialObjectFilters in TintObjectsNuggets doesen't work in general..
The filter definitely works, one of the initial builds had structures and vehicles healed but not tinted when fired upon, whereas infantry would get both healed and tinted. I´m unable to get the filters for both healing and tinting to work properly at the same time, though.

Dutchygamer wrote:
I think you've got the most TW modding experience of all us here (excluding Stygs maybe), so I doubt you get much help here Confused
It´s always worth a try, ´sides I still believe that there are some clever people around, as Chronosheep has proven. #Tongue

_________________
Off Duty.

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Sun Oct 05, 2008 11:15 am    Post subject: Reply with quote  Mark this post and the followings unread

Whoops, completely forgotten about Chronosheep... Sorry Confused

Back to top
View user's profile Send private message Send e-mail Skype Account
Chronosheep
Soldier


Joined: 02 Sep 2007
Location: My avatar pretty much gives it away...

PostPosted: Sun Oct 05, 2008 12:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
Whoops, completely forgotten about Chronosheep... Sorry Confused
No problem... I haven't exactly been too active around the forums lately... studies take much of my time, and modeling/texturing(/coding) for Renovatio takes most of the rest...

Quote:
According to the schemas, the TintObjectsNugget is just an extended DamageNugget. So the Filter should also apply to both tinting and damage if it´s all in one nugget... well, not that it does... Laughing

Yes, I know... but, well... the SAGE code is often stupid, so it could be that they for some idiotic reason made the Filter affect only the tint effect in TintObjectsNugget... not that I can think of any reason why they would do that...
Quote:
The filter definitely works, one of the initial builds had structures and vehicles healed but not tinted when fired upon, whereas infantry would get both healed and tinted. I´m unable to get the filters for both healing and tinting to work properly at the same time, though.

This quote also supports the above hypothesis...

Quote:
It indeed behaves oddly... changing the sequence of the nuggets deactivated the TintNugget and the filter on the damage nugget. Confused
It seems to me like the Objectfilter somehow breaks the TintObjectsNugget, but I don´t see why it should do so.

I'm not sure if I understand your sentence correctly... what excactly happens after you change the order of the two nuggets? With the original code, tint doesen't work, but only infantry gets healed... what happens after changing the order? does it work, or do you get a new problem?

If you still have the problem, you should have a better look at the mothership catalyst weapons. One more thing I noticed in the catalyst weapon codes, is that it uses a different Rule for the SpecialObjectFilter in DamageNugget... perhaps this for some stupid reason could be the problem...? The last resort would of course to start out with CatalystInfantryDeathWeapon, and do one change at a time, and see where it fails.

_________________

Back to top
View user's profile Send private message
Golan
Flamethrower


Joined: 21 Nov 2007

PostPosted: Thu Oct 09, 2008 8:27 am    Post subject: Reply with quote  Mark this post and the followings unread

Chronosheep wrote:
I'm not sure if I understand your sentence correctly... what excactly happens after you change the order of the two nuggets? With the original code, tint doesen't work, but only infantry gets healed... what happens after changing the order? does it work, or do you get a new problem?
With the changed order, tint still doesn´t work but every object can be healed.

Chronosheep wrote:
If you still have the problem, you should have a better look at the mothership catalyst weapons. One more thing I noticed in the catalyst weapon codes, is that it uses a different Rule for the SpecialObjectFilter in DamageNugget... perhaps this for some stupid reason could be the problem...? The last resort would of course to start out with CatalystInfantryDeathWeapon, and do one change at a time, and see where it fails.
It seems like every filter on the TintObjectsNugget breaks the weapon. Guess I should just let it be and use an attribute modifier/conditionstate when needed.

_________________
Off Duty.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 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
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can 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.1756s ][ Queries: 11 (0.0084s) ][ Debug on ]