ztz2019 1 Posted December 14, 2015 (edited) When I tried to imitate the SpecialPower_SpotTargetBombard for Specter's new specialpower, I just paste and change like this: <SpecialPowerTemplate id="SpecialPower_NODSpotTargetBombard" xxxxxx <GameDependency> <ObjectFilter Relationship="ALLIES" Rule="NONE"> <IncludeThing>NODShadowSquad</IncludeThing> </ObjectFilter> </GameDependency> </SpecialPowerTemplate> and for Specter's own code: <SpecialPower id="ModuleTag_SpotTargetSP" SpecialPowerTemplate="SpecialPower_NODSpotTargetBombard" UpdateModuleStartsAttack="true" /> <WeaponFireSpecialAbilityUpdate SpecialWeapon="NODMobileArtilleryBombard" id="ModuleTag_SpotTargetSPUpdate" SpecialPowerTemplate="SpecialPower_NODSpotTargetBombard" xxxxxx DestealthClosestObjectMatchingFilter="true" /> <AISpecialPowerUpdate id="ModuleTag_ArtilleryBombard" CommandButtonName="SpecialPower_NODSpotTargetBombard" SpecialPowerRadius="375" SpecificUnit="NODShadow" SpecialPowerAIType="SPECIAL_POWER_SPECIFIC_UNIT" /> For testing I let GDISniperSquad could be built in HandOfNOD, and wierd thing comes. I've already change GameDependency GDISniperSquad to NODShadowSquad, but still invalid on NODShadowSquad but valid on GDISniperSquad. Then I deleted RequiredTargetObjectStatus="CAN_SPOT_FOR_BOMBARD" DisallowedTargetObjectStatus="IN_STASIS" DisallowedTargetModelStates="TRANSPORT_MOVING MOVING" three handles, when only GDISniperSquad being built the SpecialPower button of Specter's NODSpotTargetBombard is invalid as expect. When I build the ShadowSquad, the SpecialPower button is activated and could work well as Juggernaught's SpotTargetBombard, but the GDISniperSquad even other squad unit also have the affective SpecialPower mark circle and could active the SpotTargetBombard SpecialPower. .xsd seems no relationship among the SP. So how could the SpecialPower work correctly? Edited December 14, 2015 by ztz2019 Share this post Link to post
Ravendark 43 Posted December 14, 2015 (edited) the spotting unit needs to have the CAN_SPOT_FOR_BOMBARD Object status. The sniper gets it true lua when its created: AILuaEventsList="GDISniperSquadFunctions" <EventList Name="GDISniperSquadFunctions" Inherit="BaseScriptFunctions"> <EventHandler EventName="OnCreated" ScriptFunctionName="OnGDISniperSquadCreated" DebugSingleStep="false"/> </EventList> function OnGDISniperSquadCreated(self) ObjectSetObjectStatus( self, "CAN_SPOT_FOR_BOMBARD" )end <SpecialPowerTemplate id="SpecialPower_SpotTargetBombard" Flags="LIMIT_DISTANCE NEEDS_OBJECT_FILTER FIND_REACHABLE_TARGETS WATER_OK TARGET_NEEDS_OBJECT_STATUS NO_FORBIDDEN_MODEL_STATES" RequiredTargetObjectStatus="CAN_SPOT_FOR_BOMBARD" <- without this bit the bombard thing wont work DisallowedTargetObjectStatus="IN_STASIS" DisallowedTargetModelStates="TRANSPORT_MOVING MOVING" etcetc. three handles, when only GDISniperSquad being built the SpecialPower button of Specter's NODSpotTargetBombard is invalid as expect. When I build the ShadowSquad, the SpecialPower button is activated and could work well as Juggernaught's SpotTargetBombard, but the GDISniperSquad even other squad unit also have the affective SpecialPower mark circle and could active the SpotTargetBombard SpecialPower. Don't really understand what you are tryingto say here? You want other units to have spotting circle aswell or? Edit: nvm on a second read through i think i understand: the special power has a game dependancy that says <includething>shadowsquad </...> This basicly ENABLES the specialpower when a unit of that type is present. But the CAN_SPOT_FOR_BOMBARD status together with the object filter gives that circle where within you can fire the special power....basicly any unit that has that status can be used as a "targeting beacon" what you could do is change the object filter to: <ObjectFilter Relationship="ALLIES" Rule="ALL" /> into <ObjectFilter Relationship="ALLIES" Rule="NONE" > <- or should this be ANY? i truthfully suck at keeping this apart <IncludeThing>shadowsquad</IncludeThing> </ObjectFilter> Edited December 14, 2015 by Ravendark Share this post Link to post
ztz2019 1 Posted December 15, 2015 (edited) the spotting unit needs to have the CAN_SPOT_FOR_BOMBARD Object status. The sniper gets it true lua when its created: AILuaEventsList="GDISniperSquadFunctions" <EventList Name="GDISniperSquadFunctions" Inherit="BaseScriptFunctions"> <EventHandler EventName="OnCreated" ScriptFunctionName="OnGDISniperSquadCreated" DebugSingleStep="false"/> </EventList> function OnGDISniperSquadCreated(self) ObjectSetObjectStatus( self, "CAN_SPOT_FOR_BOMBARD" ) end Thanks, I mean no matter whatever ObjectFilter set, the SniperSquad always effective with bombard specialpower, now I know it is because the LUA set. Well, still no use after I add AILuaEventsList="GDISniperSquadFunctions" to ShadowSquad's AI There must be sth. I didn't notice yet. Edited December 15, 2015 by ztz2019 Share this post Link to post
Ravendark 43 Posted December 15, 2015 Try adding the SNIPER kindof to your shadowsquad...i just looked at a similar unit i made and i have the sniper kindof in it, not sure if i was being redundant or i did that because somehow the bombard code needed that. But everything else is basicly the same as i explained above Share this post Link to post
ztz2019 1 Posted December 16, 2015 (edited) <ObjectFilter Relationship="ALLIES" Rule="ALL" /> <GameDependency> <ObjectFilter Relationship="ALLIES" Rule="ALL"><!--NONE can't include multi thing--> <IncludeThing>GDISniperSquad</IncludeThing> <IncludeThing>GDIOrcaSensorPod</IncludeThing> <IncludeThing>GDIOrcaSensorStickyPod</IncludeThing> </ObjectFilter> </GameDependency> (SP for short of SpecialPower) After I change SpecialPower_SpotTargetBombard like this to make both SensorPod and SniperSquad have bombard SP, new problem comes: If <GameDependency>'s Filter Rule="NONE", it can't include multi thing, only 1st thing available. If Rule="ANY", without SniperSquad the sensor's ability is invalid, but after build a SniperSquad, all 3 thing could able to support bombard SP. if Rule="ALL". If none of the 3 includedthing are built, Juggernaught's SP_button is lighting but no available target ground. And if any single incluededthing is built, they all could activite the SP. So what I need is: let 3 thing available for the SP, and Juggernaught's SP_button can't lighten before the 3 thing's built. Edited December 16, 2015 by ztz2019 Share this post Link to post
Ravendark 43 Posted December 16, 2015 In your case what you did is alter the game dependancy...that basicly decides what object enables the button. ANY means that either OBECT1 OR OBJECT2 needs to present on the map before it actives. ALL means that OBJECT1 AND OBJECT2 need to be present at the same time. So ANY should work for your dependancy. As for the circle thing..its not decided by that part it is hardcoded of the SPOT_FOR_BOMBARD and <ObjectFilter Relationship="ALLIES" Rule="ALL" /> if you want only certain units to display the circle you cange that object filter. Or atleast that is how it should work. Share this post Link to post
Stygs 25 Posted December 16, 2015 (edited) As far as I know, that NOT how ObjectFilter work. The Rule= defines if you need all, none or any of the kindofs from Include=/Exclude=. IncludeThing is totally indepent from that. The Amount also doenst matter - either there is a unit on the map that fits the conditions or there isnt, there is no way to check for the amount of units. So, if you only want to include the 3 units, it should look like this: <ObjectFilter Relationship="ALLIES" Rule="NONE"> <IncludeThing>GDISniperSquad</IncludeThing> <IncludeThing>GDIOrcaSensorPod</IncludeThing> <IncludeThing>GDIOrcaSensorStickyPod</IncludeThing> </ObjectFilter> That way, the abillity will be addvaible if any of the 3 exists. If you want the abillity to require all the units before it can be used, you need RequiredObject= instead of ObjectFilter. Edited December 16, 2015 by Stygs Share this post Link to post
Ravendark 43 Posted December 16, 2015 (edited) As far as I know, that NOT how ObjectFilter work. The Rule= defines if you need all, none or any of the kindofs from Include=/Exclude=. IncludeThing is totally indepent from that. The Amount also doenst matter - either there is a unit on the map that fits the conditions or there isnt, there is no way to check for the amount of units. So, if you only want to include the 3 units, it should look like this: <ObjectFilter Relationship="ALLIES" Rule="NONE"> <IncludeThing>GDISniperSquad</IncludeThing> <IncludeThing>GDIOrcaSensorPod</IncludeThing> <IncludeThing>GDIOrcaSensorStickyPod</IncludeThing> </ObjectFilter> That way, the abillity will be addvaible if any of the 3 exists. If you want the abillity to require all the units before it can be used, you need RequiredObject= instead of ObjectFilter. Megumi tried to drill this into me ones, what i basicly understood from her was that if i used something like: <ObjectFilter Relationship="ALLIES" Rule="ANY"> <IncludeThing>GDISniperSquad</IncludeThing> <IncludeThing>GDIOrcaSensorPod</IncludeThing> <IncludeThing>GDIOrcaSensorStickyPod</IncludeThing> </ObjectFilter> that if a snipersquad OR a sensorpod OR a sticky pod would be present, the criterea would be filled for that object filter. Maybe over simply put its a logic OR function while <ObjectFilter Relationship="ALLIES" Rule="ALL"> <IncludeThing>GDISniperSquad</IncludeThing> <IncludeThing>GDIOrcaSensorPod</IncludeThing> <IncludeThing>GDIOrcaSensorStickyPod</IncludeThing> </ObjectFilter> is your logic AND function: snipersquad AND sensorpod AND stickyPOD = 1, you need all 3 of the include things at the same time present. And from the things i used it for it actually worked like that in my tests....somewhere on this forum there is a post with some back and forth disussion between me and her about that stuff...i remember because she smacked me over the head about this before I do hope i am right...Megumi can smack rather hard and i bruse easely Edited December 16, 2015 by Ravendark Share this post Link to post
ztz2019 1 Posted December 17, 2015 (edited) As far as I know, that NOT how ObjectFilter work. The Rule= defines if you need all, none or any of the kindofs from Include=/Exclude=. IncludeThing is totally indepent from that. The Amount also doenst matter - either there is a unit on the map that fits the conditions or there isnt, there is no way to check for the amount of units. So, if you only want to include the 3 units, it should look like this: <ObjectFilter Relationship="ALLIES" Rule="NONE"> <IncludeThing>GDISniperSquad</IncludeThing> <IncludeThing>GDIOrcaSensorPod</IncludeThing> <IncludeThing>GDIOrcaSensorStickyPod</IncludeThing> </ObjectFilter> That way, the abillity will be addvaible if any of the 3 exists. If you want the abillity to require all the units before it can be used, you need RequiredObject= instead of ObjectFilter. You mean this? But still can't effective. Or you mean delete the GameDependency, just use ObjectFilter? And still, if delete GameDependency, only use objectfilter, the condition is just like if Rule="ALL". If none of the 3 includedthing are built, Juggernaught's SP_button is lighting but no available target ground. And if any single incluededthing is built, they all could activite the SP. And I need to solve is Juggernaught's SP_button won't lighten until one of the 3 thing is built. Edited December 17, 2015 by ztz2019 Share this post Link to post
ztz2019 1 Posted December 17, 2015 Megumi tried to drill this into me ones, what i basicly understood from her was that if i used something like: And from the things i used it for it actually worked like that in my tests....somewhere on this forum there is a post with some back and forth disussion between me and her about that stuff...i remember because she smacked me over the head about this before I do hope i am right...Megumi can smack rather hard and i bruse easely Once I thought GameDependency's Filter just Rule="ANY" is enough for the SP, but it's weird no SniperSquad no available at all, when SniperSquad creates all other 2 are available. This is Sensor's AI: <AI> <AIUpdate id="ModuleTag_AI" AutoAcquireEnemiesWhenIdle="YES" AILuaEventsList="GDISniperSquadFunctions"/> </AI> So I can't understand why like this. Share this post Link to post
Stygs 25 Posted December 17, 2015 (edited) The problem is not the filter. NONE + IncludeThing works fine (using it for a couple of spotter units in TWA). The problem ist the SensorPod. When looking at my Shadow Squad beacon (works like the KW one), I found an old note from myself: "If you mess with the kindofs, make sure that the SpecterSpotTargetBombard SP works - I had some cases where the filter simply ignored the beacon and the SpecterSpotTargetBombard SP didnt become addvaible." As far as I can tell, the GDI sensor pod needs to have a KindOf like MINE or INFANTRY or VEHICLE or anything similiar to classify the object or the Gamedepency will not work on it. I suggest adding MINE to it and see if that changes anything. Edited December 17, 2015 by Stygs Share this post Link to post
Ravendark 43 Posted December 17, 2015 I used th spotteer thing for a sensor pod aswell some months ago and for a upgraded radar ping beacon aswell, here are their kindofs : for the sensorpod KindOf="SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT STEALTH_GARRISON CAN_CAPTURE SNIPER CAN_BE_FAVORITE_UNIT SCORE IMMOBILE" and for my radar beacon KindOf="SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT STEALTH_GARRISON CAN_CAPTURE SNIPER CAN_BE_FAVORITE_UNIT SCORE IMMOBILE UNATTACKABLE NOT_AUTOACQUIRABLE" Now i''l admit i can't remember why i have something like can attack and so in it, i used to experiment alot with those units....so you can reduce some of those kindofs i think...but i think you might need the sniper kindof...like their is something hardcoded with it or so. Share this post Link to post
ztz2019 1 Posted December 17, 2015 (edited) The problem is not the filter. NONE + IncludeThing works fine (using it for a couple of spotter units in TWA). The problem ist the SensorPod. When looking at my Shadow Squad beacon (works like the KW one), I found an old note from myself: "If you mess with the kindofs, make sure that the SpecterSpotTargetBombard SP works - I had some cases where the filter simply ignored the beacon and the SpecterSpotTargetBombard SP didnt become addvaible." As far as I can tell, the GDI sensor pod needs to have a KindOf like MINE or INFANTRY or VEHICLE or anything similiar to classify the object or the Gamedepency will not work on it. I suggest adding MINE to it and see if that changes anything. Still no use after I add MINE or INFANTRY or VEHICLE . Edited December 17, 2015 by ztz2019 Share this post Link to post
Stygs 25 Posted December 17, 2015 Well, my beacon uses KindOf="PRELOAD IGNORES_SELECT_ALL TARGETABLE IMMOBILE MINE NO_COLLIDE" and can spot fine. Share this post Link to post
Ravendark 43 Posted December 17, 2015 quick little test...styg is right it should work just as he said for the game dependancy...tried it with my commando and my sensor ping beacon. disregard the sniperkindof, you dont need that it seems. Share this post Link to post
ztz2019 1 Posted December 17, 2015 I used th spotteer thing for a sensor pod aswell some months ago and for a upgraded radar ping beacon aswell, here are their kindofs : for the sensorpod KindOf="SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT STEALTH_GARRISON CAN_CAPTURE SNIPER CAN_BE_FAVORITE_UNIT SCORE IMMOBILE" and for my radar beacon KindOf="SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT STEALTH_GARRISON CAN_CAPTURE SNIPER CAN_BE_FAVORITE_UNIT SCORE IMMOBILE UNATTACKABLE NOT_AUTOACQUIRABLE" Now i''l admit i can't remember why i have something like can attack and so in it, i used to experiment alot with those units....so you can reduce some of those kindofs i think...but i think you might need the sniper kindof...like their is something hardcoded with it or so. OK, thanks. I once add SNIPER but no use. However I paste your kindof code and let SP just like Stygs's filter set, and it works. Share this post Link to post
Ravendark 43 Posted December 17, 2015 (edited) My beacon http://pastebin.com/X3nfn4e4 My SP http://pastebin.com/hqH3kixX ye the sniper thing, no idea why i was fixated on that...i have it in all my bombrd targets....call it a brainfart back then i guess. Edited December 17, 2015 by Ravendark Share this post Link to post