Posted: Sat Oct 04, 2008 12:02 pm Post subject:
TintObjectsNugget
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.
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.
Joined: 18 Jun 2005 Location: Dordrecht, the Netherlands
Posted: Sat Oct 04, 2008 12:13 pm Post subject:
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
I really must fix my TW disk so I can get back to modding... QUICK_EDIT
Joined: 02 Sep 2007 Location: My avatar pretty much gives it away...
Posted: Sun Oct 05, 2008 12:12 am Post subject:
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
*cough* ...just kidding
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.. _________________ QUICK_EDIT
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.
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...
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
It´s always worth a try, ´sides I still believe that there are some clever people around, as Chronosheep has proven. _________________ Off Duty. QUICK_EDIT
Joined: 02 Sep 2007 Location: My avatar pretty much gives it away...
Posted: Sun Oct 05, 2008 12:07 pm Post subject:
Quote:
Whoops, completely forgotten about Chronosheep... Sorry
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...
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.
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. _________________ QUICK_EDIT
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. QUICK_EDIT
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