Egozi44 27 Posted October 15, 2017 (edited) 6 hours ago, Ravendark said: no point in sending me anything atm, im only at my pc in short bursts. Mostly using my leftarm to do everything now and thats a pain ontop of the pain. But i might look into it later this week, when i feel more able. home for 3 months , so seems like good time to catch up on my modding stuff aswell . Alright, this is literally the only serious thing that hold me from saying farewell to this unit, I rather finish with it before I move on to the next one :/, what was the direct upgrade+button method you was talking about? maybe I could try that till you will be able to check the xmls yourself. Edited October 15, 2017 by Egozi44 Share this post Link to post
Egozi44 27 Posted November 2, 2017 (edited) I thought I report what progress I made so far, I tried few other things which related to self attribute, and other stuff that I forgot at this point which didn't worked, even some LUA dummy scripts that Mjjstral gave me still end up with the same result... However when I tried to applied statusbit in the behavior this way (without the upgrade button though): <StatusBitsUpgrade id="0xA764658E9" StatusToSet="NO_AUTO_ACQUIRE NO_ATTACK_FROM_AI" Duration="5s"> <TriggeredBy>Everyone_Faction</TriggeredBy> </StatusBitsUpgrade> it worked, but now enemies won't attack the unit at all, well the AI still try to attack it with few rockets squads few times, but most of the time they and other anti air units include aircrafts will end up ignore it, I suspect it because the duration code not working properly, I added it there anyway just for test assuming it won't work... I also notice that my unit also won't auto attack anyone after unpack/repack ability, probably due to the "NO_AUTO_ACQUIRE" part? though if it because of that it shouldn't be able to auto attack from the beginning at all cause the statusbitsupgrade being triggered by faction's upgrade the moment the unit being spawned .... At least I confirmed that statusbitsupgrade works, but how can I set it with duration setting now? Edited November 2, 2017 by Egozi44 Share this post Link to post
Ravendark 43 Posted November 2, 2017 duration isn't a valid attribute of either the statusbitupgrade module nor the upgrade module it inherits of. In the ra3buildstudio or the normal tw compiler you would've gotten a error on a invalid attribute and it would've aborted the compile. Its a surprise its willing to work at all with that module at this point. Are you applying the status effect to the original unit or the replacement unit? If its the latter, then its not working because of the explained reason above, duration isn't a valid attribute. if you want a duration you are better of applying a attribute modifier with a duration and statuscondition. you can trigger that with a basic specialpower+atrib mod that you trigger Oncreate with a Dospecialpower lua command. Although you can maybe use a direct EXECUTE_ACTION lua script but from the top of my head im not sure if there is a status codition +duration script, iirc there is a modelcondition one tho, not sure about status. Share this post Link to post
Egozi44 27 Posted November 4, 2017 (edited) So we tried something along these lines, I reach to the conclusion that attribute have ZERO effect on air to air unit, it just ignore it no matter what we tried. Only statusbit have effect but then we have no way to remove it cause lua don't seem to have line that remove status-with-duration that work on these conditions. Mjjstral said we can try something the Scrin have that have upgrade which add statusbit and then upgrade that remove it once the dummy dies (Something along these lines, just different: <CommandSetUpgrade id="ModuleTag_GuardShieldAIModuleActiveCommandset" CommandSet="GuardShieldEmitterCommandSetAIModusON"> <TriggeredBy>Upgrade_GuardShieldAIModusON</TriggeredBy> </CommandSetUpgrade> <CommandSetUpgrade id="ModuleTag_GuardShieldAIModuleInactiveCommandset" CommandSet="GuardShieldEmitterCommandSet"> <TriggeredBy>Upgrade_GuardShieldAIModusOFF</TriggeredBy> </CommandSetUpgrade> <RemoveUpgradeUpgrade id="ModuleTag_CommandSet_GuardShield_RemoveFor_01"> <TriggeredBy>Upgrade_GuardShieldAIModusON</TriggeredBy> <UpgradeToRemove>Upgrade_GuardShieldAIModusOFF</UpgradeToRemove> </RemoveUpgradeUpgrade> <RemoveUpgradeUpgrade id="ModuleTag_CommandSet_GuardShield_RemoveFor_02"> <TriggeredBy>Upgrade_GuardShieldAIModusOFF</TriggeredBy> <UpgradeToRemove>Upgrade_GuardShieldAIModusON</UpgradeToRemove> </RemoveUpgradeUpgrade> <StatusBitsUpgrade id="ModuleTag_GuardShield_StatusBitUpgrade01" StatusToClear="RIDER2" StatusToSet="RIDER1"> <TriggeredBy>Upgrade_GuardShieldAIModusON</TriggeredBy> </StatusBitsUpgrade> <StatusBitsUpgrade id="ModuleTag_GuardShield_StatusBitUpgrade02" StatusToClear="RIDER1" StatusToSet="RIDER2"> <TriggeredBy>Upgrade_GuardShieldAIModusOFF</TriggeredBy> </StatusBitsUpgrade> ) But I suspect it will give other issues to the other Conodors that still don't need that upgrade. If I had sane way to remove the statusbit with duration it may solve my issue... Edited November 4, 2017 by Egozi44 Share this post Link to post
Ravendark 43 Posted November 5, 2017 Are you putting that in the original unit or the replacement unit? Share this post Link to post
Egozi44 27 Posted November 5, 2017 (edited) Right now I'm not trying to add it to anything cause it will effect any other Condor as well once one of them use it's ability. I need some way to trigger it to each unit without any global upgrade. do you know any better way to remove status bit with duration ? telling it somehow to wait for the death of a dummy is not so good either cause it still effect other Condorside, unless it was all via lua I assume Edited November 5, 2017 by Egozi44 Share this post Link to post
Ravendark 43 Posted November 5, 2017 i think you need to take a step back and re-evaluate what you are trying to achieve. You are basically getting lost in the woods looking for a specific tree at this point. Just go back to basics. You don't need all that shield junk. From my understanding this is what you want: 1. You have a firehawk like unit and you want to turn it into a orca like unit, in regards to flight behavior and maybe this orca like thing has a different weapon. The problem you had is you don't want the unit to be attacked(idealy by ground units) while its changing from A to B right? How do we do that? Replace self module <!-- Object = per unit, PLAYER = globaly/army --> <UpgradeTemplate id="Upgrade_A_TO_B" Type="OBJECT" /> <!-- This ONLY goes into unit A, not into Unit B --> <ReplaceSelfUpgrade id="ModuleTag_ReplaceSelf" NewObjectUnpackTime="2.0s" CheckBuildAssistant="false"> <TriggeredBy>Upgrade_A_TO_B</TriggeredBy> <ReplacementTemplate>Unit_B</ReplacementTemplate> </ReplaceSelfUpgrade> <!-- Remember to add a LogicCommand, LogicCommandSet and a PlayerUpgradeButton --> Next , How de we prevent the unit from being attacked? <!-- This ONLY goes into Unit A Behavior section --> <StatusBitsUpgrade id="ModuleTag_StatusBitUpgrade" StatusToSet="UNATTACKABLE"> <TriggeredBy>Upgrade_A_TO_B</TriggeredBy> </StatusBitsUpgrade> <!-- Normally status isnt tranfered between different units so shouldnt need anything to clear it --> Now Lets assume i'm wrong inthe abve comment line and The replaceselfupgrade is hardcoded to transfer Object status to the new Unit B. We can do the following: <!-- This only goes into UNIT B --> <StatusBitsUpgrade id="ModuleTag_StatusBitUpgrade" StatusToClear="UNATTACKABLE"> <TriggeredBy>Upgrade_Remove_NoAttackStatus</TriggeredBy> </StatusBitsUpgrade> <UpgradeTemplate id="Upgrade_Remove_NoAttackStatus" Type="OBJECT" /> And you trigger Upgrade_Remove_NoAttackStatus through lua. Just use the Oncreate condition, look at the existing examples in lua.ini and ScriptedEventlist.xml Remember to add/update your unit B's AILuaEventsList="MyUnitB_Functions" in its <AI</JetAI></AI> section. Try that 1 Share this post Link to post
Egozi44 27 Posted November 5, 2017 (edited) Ummm I will try it but I assume it won't going to work because from what I saw the way EALA used to replace the unit via button (though it honestly up to us) is by replace the unit straight away to unit B the moment you'll press the button and then in the xml they ordered it so it tell the unit to show unpack animations (To unit B in this case), the status won't transfer to unit B as you said but this is exactly why they will attack it (cause unit B will be spawn right away faking unpack animation that make you think it unit A), also these units are supposed to be able to switch between each other at ease (Though having 30s cooldown for the ability) so it not one-side transformation, whatever unit A have will also need to be in unit B or both will get attacked by the evil spaghetti monster I added a video just so you can see things rather than relying on your imagination, as they saying "One video worth one thousand of selfies" https://www.youtube.com/watch?v=z-h4DopzBAc (Btw it not include the bug and you can ignore the game messages that appear above) Edited November 6, 2017 by Egozi44 Share this post Link to post
Ravendark 43 Posted November 6, 2017 (edited) Well if you want Unit B to go back ito A aswell you can duplicate the code into B aswell. The process is the same, just make sure you use a object type upgrade and not a player type upgrade. Normaly the replace happens after "NewObjectUnpackTime"expires. Let us know if it works this time or not, maybe post a vid including what isnt working. Oftopic, the exhaust you use on your aricraft, where did you get it or did you create it yourself(looks like a combination of 2 particle systems the rings and the air distort texture ?) I've been working on and off on getting a nice railgun particle effect and that "air wobly effect" you have going looks rather nice. Edit: Nvm the above particle fx, managed to got it working (worked of the orca engine fx, got the result i wanted.) Edited November 6, 2017 by Ravendark Share this post Link to post
Egozi44 27 Posted November 7, 2017 Umm, it didn't work, I believe the game see unit B as "ground" unit for few secs (I always imagine that the game see it as if it a airctaft that just took off and have few sec till it reach the air.. that the only explanation if it replace the unit right away) Here what I done, I keep using EA's upgrades for trigger since they already set as type object <?xml version="1.0" encoding="utf-8"?> <AssetDeclaration xmlns="uri:ea.com:eala:asset"> <UpgradeTemplate id="Upgrade_Pack" Type="OBJECT" SkirmishAIHeuristic="IGNORE"> <GameDependency ForbiddenModelConditions="UNPACKING" /> </UpgradeTemplate> </AssetDeclaration> <?xml version="1.0" encoding="utf-8"?> <AssetDeclaration xmlns="uri:ea.com:eala:asset"> <UpgradeTemplate id="Upgrade_UnPack" Type="OBJECT" SkirmishAIHeuristic="IGNORE" WaypointQueueable="True"> <GameDependency ForbiddenModelConditions="UNPACKING" /> </UpgradeTemplate> </AssetDeclaration> This what both units have (well unit B have different name for upgrade and support power but that not really import so I included only one of them) : <StatusBitsUpgrade id="ModuleTag_StatusBitUpgrade" StatusToSet="UNATTACKABLE"> <TriggeredBy>Upgrade_UnPack</TriggeredBy> </StatusBitsUpgrade> <SpecialPower id="0xDC53024FE" UpdateModuleStartsAttack="True" AvailableAtStart="False" SpecialPowerTemplate="SpecialPower_GrantUnpackUpgradeCondor"> <AttributeModifierAffects Rule="UNPARSED"/> <RequirementsFilterMP Rule="UNPARSED"/> <RequirementsFilterStrategic Rule="UNPARSED"/> </SpecialPower> <GiveOrRestoreUpgradeSpecialPower id="0x5960413F6" SpecialPowerTemplate="SpecialPower_GrantUnpackUpgradeCondor" UpgradeToGive="Upgrade_UnPack" FaceTarget="True"/> <ReplaceSelfUpgrade id="0xFC1FA59EE" NewObjectUnpackTime="1.8s"> <TriggeredBy>Upgrade_UnPack</TriggeredBy> <ReplacementTemplate>ZOCOMCondorSpeedMod</ReplacementTemplate> </ReplaceSelfUpgrade> Trigger any bit withb lua upon creation Will work but then I have no way how to set statustoclear code with 2 sec duration... unless I use dummy maybe? I may include video of how it looks like in the game later but I don't think it needed, if you want I can send the xmls but I think what ever I posted here is enough. As for the rings, I took that part from the MARV fx and took the firehawk white line effect and recolor it to blue (which is hard to see thank to the rings) I thought about change the rings to orange so they have similar color to the super sonic aircrafts engine or replace it with flame effect of sort, but then recall that the Condor concept art showed it had blue flame effect from the engines so I thought it may be fit after all... not that I tried to follow that concept art (that look 10 times more awesome than the final model imo) to begin with xD Share this post Link to post
Egozi44 27 Posted November 7, 2017 (edited) The only idea that I can think of is: To set two lua commands: one that change status to NO_AUTO_ACQUIRE NO_ATTACK_FROM_AI upon create, And another which spawn a dummy that will disappear after 2 secs that will trigger type object upgrade which will effect the condor's StatusToClear command. The question is if it even possible to effect other units with dummy (and I hope it won't effect All Condors and just the spawner), and if lua can do the second part together with the first part Edit Actually the both parts can be done in the xml and may help the spawn object to detect the spawner? (no idea if it relate or possible) Edited November 7, 2017 by Egozi44 Share this post Link to post
Ravendark 43 Posted November 7, 2017 Been experimenting with it myself and i'm not rly getting anything satisfying either. For testing purposes i've been turning the firehawk into the orca and back. It does seem that the replaceself module wants to insta switch and isnt rly using its unpacktime like i hope/expected it would. So i tried to do a Oncreate Dospecialpower lua thing, but weirdly enough the firehawk doesn't seem to want to do that, the orca does tho....so i have a half working solution but with some additional bugs when its created on the helipad. I hae to rethink and retry somethings, might look into it later this week again. Also i don't think a dummy will do it, its a convoluted solution that most likely will create more issues then it solves. Share this post Link to post
Egozi44 27 Posted November 7, 2017 (edited) I see, if only we had some method aside the attributes to set statusbit duration it would've solve everything, Mjjstral gave me this lua before: function OnZocomCondorCreated(self) ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",self,60,1) local RemoveStatus = function() ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",%self,60,0) end SetScriptTimer(2,RemoveStatus) end But strangely the remove status part after 2 seconds didn't work... Do you perhaps know any other lua commands that can disable it with timer? Edited November 7, 2017 by Egozi44 Share this post Link to post
Ravendark 43 Posted November 7, 2017 did you manage to SET a Status with that function? And what status did you set then? Shouldnt it be something along the lines of ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",self, "UNATTACKABLE",1) then? Also is the %self a spelling error? Did he say you could use it like that or did you need his extended Lua mod for it? Share this post Link to post
Egozi44 27 Posted November 8, 2017 (edited) Afaik the %self is not a spelling error but I'm not a lua expert so I have no clue what the percent mark is for. We manage to set status bit that way, Mjjstral gave me list that show what each number represent (though there's also a way to do it with status name alone apparently). 60=UNATTACKABLE, NO_AUTO_ACQUIRE is 23, and NO_ATTACK_FROM_AI is 26 (I needed 26 and 23 more than 60), All of them works but the remove command doesn't (Mjjstral said it 100% work for him till now but he didn't tried it with air unit as far as I understood), and thanks to that no one attack the unit. Afik I didn't needed any extended lua mod to use it, just this lua function OnZocomCondorCreated(self) ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",self,60,1) local RemoveStatus = function() ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",%self,60,0) end SetScriptTimer(2,RemoveStatus) And simple event like that: <EventList Name="ZocomCondorFunctions" Inherit="BaseScriptFunctions"><EventHandler DebugSingleStep="false" ScriptFunctionName="OnZocomCondorCreated" EventName="OnCreated"/> </EventList> Edited November 8, 2017 by Egozi44 Share this post Link to post
Egozi44 27 Posted November 9, 2017 I thinking about make the lua set the statusbit to the unit and then tell it at the same time to trigger a object upgrade after 2s, which will trigger in the unit xml the upgrade that will clear off the status bit. it should be possible right? Share this post Link to post
Egozi44 27 Posted November 11, 2017 (edited) Good news, thanks to Mjjstral lua "Sagesness" I think we were able to make it work, still few test are needed (you welcome to join if you want ) but it look solid from the few tests I done. Don't think it was possible without the help of you two, I probably would've gave up after months of trying with my poor coding skills~ We may didn't was able to find solution for veterancy (though I sure I saw some veterancy inherit code when I peek on some unit (I think the shadows?) unpack ability), but I sort of fine with it, ofc if you know something I will always be glad to know. Really thanks for the help. Edited November 11, 2017 by Egozi44 Share this post Link to post