Stygs 25 Posted February 4, 2016 Following from the other topic, I tried to make a simple dropzone with a pretty simpel idea: The building has a special power and once the power finishes reloading, I use LUA to trigger the OCLSpecialPower. Since there was no target choosen, the OCL should use the center of the building as target. This has the advantage that I can use a simple UnitAbillityButton as a timer so players can see how much time is left before the next suply drop. Exept it didnt work - The specialpower spawnt the Ox transports on top of the building and they just hover there, never landing or leaving. Initially I asumed that I used the wrong CreateLocation setting, but it doenst seem to make a difference. I could also use OCLUpdate to trigger the OCL, but I dont unterstand why the transport dont come from the map border. <OCLSpecialPower id="OCLSpecialPower_DeployIonStorm" SpecialPowerTemplate="SpecialPower_GDISupplyDrop" OCL="OCL_GDISupplyDrop" CreateLocation="CREATE_AT_EDGE_NEAR_TARGET_AND_MOVE_TO_LOCATION" /> <SpecialPowerTemplate id="SpecialPower_GDISupplyDrop" ReloadTime="10s" TargetType="LOCATION"> </SpecialPowerTemplate> Share this post Link to post
PurpleGaga27 37 Posted February 4, 2016 (edited) Have you looked in C&C Generals 2 mod for C&C3? The Chinese modder who created it threw almost every idea from the original C&C Generals into C&C3, but I am not sure if a supply drop structure with a special ability existed there. Edited February 4, 2016 by zocom7 Share this post Link to post
Egozi44 27 Posted February 4, 2016 (edited) While it may be the best to wait for Raven and megumi reply, Let me just point that you don't must to use planes in gdi case for the drone zone but rather a pod It more fit for the current gdi's style imo And the pod can't miss the drop zone Also what building you uses for the supply drop? I recall that structures like the armory have some script that not let the ox transport to land on it, or it was something else. . Don't remeber xD Edited February 4, 2016 by Egozi44 Share this post Link to post
Ravendark 43 Posted February 4, 2016 While it may be the best to wait for Raven and megumi reply, Let me just point that you don't must to use planes in gdi case for the drone zone but rather a pod It more fit for the current gdi's style imo And the pod can't miss the drop zone Also what building you uses for the supply drop? I recall that structures like the armory have some script that not let the ox transport to land on it, or it was something else. . Don't remeber xD For all he wants he can use a flying elephant that delivers the payload. It is his mod. The pod won't miss because how the drop pods function and how a call for transport works is a night and day difference. Also what building you uses for the supply drop? I recall that structures like the armory have some script that not let the ox transport to land on it, or it was something else. . Don't remeber xD It is not structure related. 90% sure it is specialpower flag or OCL related that prevent something from spawning ontop of eachother. for example: <SpecialPowerTemplate id="SpecialPowerCallSupportBloodhound" Flags="NOT_CLIFF_CELL IS_PLAYER_POWER NO_FORBIDDEN_OBJECTS SHARED_SYNC" ReloadTime="180s" ForbiddenObjectRange="140" RadiusCursorRadius="140" TargetType="LOCATION" EvaEventToPlayWhenSelectingTarget="SelectSpecialPowerTarget" Money="-3000" InitiateAtLocationSound="GDI_Ox_VoiceReinforcements"> <ForbiddenObjectFilter Rule="ANY" Include="STRUCTURE" /> <GameDependency> <RequiredObject>GDIAirTower</RequiredObject> </GameDependency> </SpecialPowerTemplate> Flags="NOT_CLIFF_CELL IS_PLAYER_POWER NO_FORBIDDEN_OBJECTS SHARED_SYNC" + <ForbiddenObjectFilter Rule="ANY" Include="STRUCTURE" /> prevent the specialpower from triggering ontop of "impassable" terrain. Also TargetType= location might not work here, iirc you need to select a target/area manually for it to work. i would try with TargetType= NONE instead, that should fire the SP on itself. also for the transport to fly in look at the OCL list for the bloodhounds <ObjectCreationList id="OCL_CallSupportBloodhound"> <CreateObject Options="IGNORE_ALL_OBJECTS DONT_SET_PRODUCER ISSUE_MOVE_AFTER_CREATION MOVE_USES_EVACUATE_AND_EXIT MOVE_TARGET_USES_OFFSET" Disposition="LIKE_EXISTING"> <Offset x="42" y="42" z="100"></Offset> <CreateObject>GDIV35Ox_CallSupportBloodhound</CreateObject> </CreateObject> MOVE_AFTER_CREATION lets it fly in evacuate and exit makes it fly off map again after unload + the evacuate map behavior (iirc that what it is called) I would try to build your supply drop after the bloodhound reinforcement power. You can have the payload of the transport be your money maker. Im interested in such sort of effect for a while now, so ill prob look into it somemore. If you havent found a aswer by then and i have (knock on wood) il post my findings. Share this post Link to post
Stygs 25 Posted February 4, 2016 (edited) The OCL is just a copy from the one that drops Riflemen and Missilemen, so its should not be a problem with the OCL itself. "NONE" was my initial setting for the SP, I changed it after realizing it didnt work. And no, DropPods feel overused. Not going to use any more of them in TWA. Edited February 4, 2016 by Stygs Share this post Link to post
Ravendark 43 Posted February 4, 2016 (edited) None and location have the same effect for me aswell. The ox just spawns ontop instead instead of flying from offscreen. Edit: Im wondering if the ocl specialpower can't be triggered correctly like this, maybe it needs a player action and not a script action. I even tried to use: <ActivateModuleSpecialPower id="ModuleTag_ManipulatorDeviceUpdate" SpecialPowerTemplate="SpecialPower_SupplyDropDispatch" > <SpecialPowerModules ModuleId="ModuleTag_CallSupply" TriggerType="SELF_POSITION" /> </ActivateModuleSpecialPower> But it doesnt seem to want to be triggered from a Dospecialpower scipt. Gonna have a look at unit specialabilities and see if that works better. Edited February 4, 2016 by Ravendark Share this post Link to post
Lauren 77 Posted February 4, 2016 Could you please post your ocl and spawned object too? Share this post Link to post
Stygs 25 Posted February 4, 2016 <ObjectCreationList id="OCL_GDISupplyDrop"> <CreateObject Options="IGNORE_ALL_OBJECTS DONT_SET_PRODUCER ISSUE_MOVE_AFTER_CREATION MOVE_USES_EVACUATE_AND_EXIT MOVE_TARGET_USES_OFFSET" Disposition="LIKE_EXISTING"> <Offset x="0" y="0" z="100" /> <CreateObject>GDIV35Ox_SupplyDrop</CreateObject> </CreateObject> </ObjectCreationList> <GameObject id="GDIV35Ox_SupplyDrop" inheritFrom="GDIV35Ox_Summoned"> <Behaviors> <HordeTransportContain xai:joinAction="Overwrite" id="ModuleTag_Contain" ObjectStatusOfContained="UNSELECTABLE" ContainMax="1" Slots="1" AllowEnemiesInside="false" AllowAlliesInside="false" AllowNeutralInside="false" AllowOwnPlayerInsideOverride="true" ShowPips="true" EnterSound="VehicleEnter" ExitSound="VehicleExit" KillPassengersOnDeath="true" FlyOffMapOnEmpty="true" ExtendedExitContainerChecks="true"> <PassengerFilter Rule="ANY" Include="INFANTRY" /> <DieMuxData DeathTypes="ALL" /> <PassengerData BonePrefix="BONEGARRISON"> <Filter Rule="ANY" Include="INFANTRY" /> </PassengerData> <InitialPayload Name="GDIEngineer" Count="1" /> </HordeTransportContain> </Behaviors> </GameObject> <GameObject id="GDIV35Ox_Summoned" inheritFrom="GDIV35Ox" KindOf="PRELOAD CAN_CAST_REFLECTIONS SELECTABLE AIRCRAFT VEHICLE TRANSPORT SUMMONED NO_COLLIDE IGNORES_SELECT_ALL"> <EquivalentTo>GDIV35Ox</EquivalentTo> <Behaviors> <HordeTransportContain xai:joinAction="Overwrite" id="ModuleTag_Contain" ObjectStatusOfContained="UNSELECTABLE ENCLOSED" ContainMax="1" Slots="1" AllowEnemiesInside="false" AllowAlliesInside="false" AllowNeutralInside="false" AllowOwnPlayerInsideOverride="true" ShowPips="true" EnterSound="VehicleEnter" ExitSound="VehicleExit" KillPassengersOnDeath="true" FlyOffMapOnEmpty="true" ExtendedExitContainerChecks="true"> <PassengerFilter Rule="NONE" Include="INFANTRY" /> <DieMuxData DeathTypes="ALL" /> <PassengerData BonePrefix="BONEGARRISON"> <Filter Rule="NONE" Include="INFANTRY" /> </PassengerData> </HordeTransportContain> </Behaviors> <AI> <TransportHelicopterAIUpdate xai:joinAction="Overwrite" id="ModuleTag_AI" FlyOffMapOnUnload="true" DelayAFterLoadingOrUnloading="0.5s"> <UnitAITargetChooserData SympathyRange="100.0" /> </TransportHelicopterAIUpdate> </AI> </GameObject> Share this post Link to post
Ravendark 43 Posted February 4, 2016 (edited) Progress! Rending video proof as i type. Will refine, update and share ofc. normaly in that order Edited February 4, 2016 by Ravendark Share this post Link to post
Ravendark 43 Posted February 5, 2016 (edited) Still a dirty version but it is starting to look like something. I'll upload the code later on. Edit: the coding. Honestly nothing special, hardest was getting the special power to trigger. Probably can be done better. As i said before its dirty and done fast. Feel free to improve alot on it tbh...god knows it needs cleaning up and tuning http://pastebin.com/Nc0KHsLR Ps: Although i am not really planning on using this for my own mod Stygs, i am probably using a version of this as a way to "build" my "orca's" from a helipad and having them fly in from off screen. Edited February 5, 2016 by Ravendark Share this post Link to post
ravage 9 Posted February 5, 2016 Still a dirty version but it is starting to look like something. I'll upload the code later on. Edit: the coding. Honestly nothing special, hardest was getting the special power to trigger. Probably can be done better. As i said before its dirty and done fast. Feel free to improve alot on it tbh...god knows it needs cleaning up and tuning http://pastebin.com/Nc0KHsLR Ps: Although i am not really planning on using this for my own mod Stygs, i am probably using a version of this as a way to "build" my "orca's" from a helipad and having them fly in from off screen. hmm. copyed your code to a building but this OCLSpecialPower do not operates automatically? have to click the playerpower button everytime. Share this post Link to post
PurpleGaga27 37 Posted February 5, 2016 Hmmm. I might try this in my new C&C3 expansion mod. Share this post Link to post
Ravendark 43 Posted February 5, 2016 (edited) hmm. copyed your code to a building but this OCLSpecialPower do not operates automatically? have to click the playerpower button everytime. I based what i posted on Stygs his problem. He already had the correct lua and modelevenconditions setup i expect so i didnt post those. lua: function onSupplydropready(self) ObjectDoSpecialPower ( self, "SpecialPowerDispatchSupplyDrop" ) end eventlist: <ModelConditionEvent Name="Supplydropready"> <Conditions>+SPECIALPOWER1_READY</Conditions> </ModelConditionEvent> <EventList Name="SupplyDockBuildingFunctions" Inherit="BaseScriptFunctions"> <EventHandler EventName="OnPowerOutage" ScriptFunctionName="onBuildingPowerOutage" DebugSingleStep="false"/> <EventHandler EventName="OnPowerRestore" ScriptFunctionName="onBuildingPowerRestored" DebugSingleStep="false"/> <EventHandler EventName="Supplydropready" ScriptFunctionName="onSupplydropready" DebugSingleStep="false"/> </EventList> my conyards AI module: <AI> <AIUpdate id="ModuleTag_AIUpdate" AutoAcquireEnemiesWhenIdle="NO" AILuaEventsList="SupplyDockBuildingFunctions" /> </AI> Also consider this all a explanation on how to do it, not a copy/paste ready solution. I added this to my own personal mod, which has a custom SIDE, an i test most my stuff on that side, hence the OSR_ tags on alot of the lines. I probably could do a easy implement version, but it would require to extract the code out of my stuff and rewrite it abit towards the gdi template abit more. I might do that over the weekend, maybe. Also the SP triggers the firsttime the moment it is build, this is because i forgot to add AvailableAtStart="false" at the module below <SpecialPower id="ModuleTag_DispatchRadarJammingMissile" AvailableAtStart="false" /** forgot this part **/ SpecialPowerTemplate="SpecialPowerDispatchSupplyDrop" UpdateModuleStartsAttack="true"> </SpecialPower> add that to have it wait for its reload time before firing the first time its build. Else it will fire the SP after building construction immediately . Edited February 5, 2016 by Ravendark Share this post Link to post
ravage 9 Posted February 5, 2016 I based what i posted on Stygs his problem. He already had the correct lua and modelevenconditions setup i expect so i didnt post those. thanks! pity there is no codes like "AutoSpecialPower" and we have to relay on lua scripts. Share this post Link to post
Stygs 25 Posted February 5, 2016 (edited) Hmmm. I might try this in my new C&C3 expansion mod. Guess I should really stop asking questions here... Anway: Awsome work Ravendark And of course you can use it, its mostly your code anyway i am probably using a version of this as a way to "build" my "orca's" from a helipad and having them fly in from off screen Sounds interesting - I am still looking for a way to build Nod Salamanders without them spawning inside the building, so I might play around with that myself. Guess I actually have to finish the building model Edited February 5, 2016 by Stygs Share this post Link to post
Egozi44 27 Posted February 5, 2016 (edited) Guess I should really stop asking questions here... You sure love to keep all the dark secrets of the universe to yourself aren't you Edited February 5, 2016 by Egozi44 Share this post Link to post
Lauren 77 Posted February 5, 2016 (edited) thanks! pity there is no codes like "AutoSpecialPower" and we have to relay on lua scripts.There was... in BFME. One could even toggle it. Edited February 5, 2016 by Lauren Share this post Link to post
Ravendark 43 Posted February 5, 2016 There was... in BFME. One could even toggle it. Autoabilitybehavior? <xs:complexType name="Query"> <xs:sequence> <xs:element name="ObjectFilter" type="ObjectFilter" minOccurs="0" maxOccurs="1" /> </xs:sequence> <xs:attribute name="EMax" type="SageInt" default="6" /> <xs:attribute name="Value" type="SageInt" default="-1" /> </xs:complexType> <xs:complexType name="AutoAbilityBehaviorModuleData"> <xs:complexContent> <xs:extension base="UpdateModuleData"> <xs:sequence> <xs:element name="Queries" type="Query" minOccurs="0" maxOccurs="6" /> </xs:sequence> <xs:attribute name="MaxScanRange" type="SageReal" default="1" /> <xs:attribute name="MinScanRange" type="SageReal" default="0" /> <xs:attribute name="Radius" type="SageReal" default="0" /> <xs:attribute name="IdleSeconds" type="Time" default="0s" /> <xs:attribute name="SpecialAbilityName" type="SpecialPowerTemplateRef" /> <xs:attribute name="ForbiddenStatus" type="ObjectStatusBitFlags" /> <xs:attribute name="StartsActive" type="SageBool" default="false" /> <xs:attribute name="UseStartPosition" type="SageBool" default="false" /> <xs:attribute name="AdjustAttackPos" type="SageBool" default="false" /> <xs:attribute name="AllowSelf" type="SageBool" default="false" /> </xs:extension> </xs:complexContent> </xs:complexType> Iirc Madin was playing arround with that, can't remember if he had any progress but last i heared he was planning a funeral for that Module as it was assumed broken? Share this post Link to post
ravage 9 Posted February 5, 2016 There was... in BFME. One could even toggle it. you still have to right-click the buttons to activate that in BFME, and as i remember, the AutoAbilityBehavior works mostly with WeaponFireSpecialAbilityUpdate that require a target location. also i don't think C&C3's UI allow the right-click anymore:( Share this post Link to post
Ravendark 43 Posted February 5, 2016 you still have to right-click the buttons to activate that in BFME, and as i remember, the AutoAbilityBehavior works mostly with WeaponFireSpecialAbilityUpdate that require a target location. also i don't think C&C3's UI allow the right-click anymore:( it doesnt, think that was the problem Madin had with it Share this post Link to post
Lauren 77 Posted February 5, 2016 (edited) you still have to right-click the buttons to activate that in BFMEThat's what StartsActive is for.it doesnt, think that was the problem Madin had with itExactly. Might even not work at all as StartsActive doesn't do anything anymore either. Edited February 5, 2016 by Lauren Share this post Link to post
Stygs 25 Posted February 5, 2016 You sure love to keep all the dark secrets of the universe to yourself aren't you Its not about secrets, its about having something unique in a mod. There is no point in asking for help with a cool idea if the idea get copied before I even tried the solution xD Share this post Link to post
Egozi44 27 Posted February 5, 2016 (edited) I just joked around What you said is true, but in this specific case I won't be surprise, it something that most c&c fans probably want to see and Raven said that the code is "nothing special" even when it unfinished, so I assume that eventually someone else will up come with it Plus when we post something here we always risk the idea getting stolen (like when stupid little me post his xmls, which are nothing special to you guys but can be uses to modders that just start their ways/lazy people who want to get everything ready), but we need help because we crazy and only pm users will limit our chances in getting them from others (it not something new though eh eh xD ) Edited February 5, 2016 by Egozi44 Share this post Link to post
Lauren 77 Posted February 6, 2016 (edited) No xml is special, the options are very limited so as long as you know what you want it's usually very easy to achieve or to determine it to be impossible with the given toolset. Coming up with the idea of what you want to create is what it's about. Edited February 6, 2016 by Lauren Share this post Link to post