Posted by: acidbrain - Monday, August 20, 2018 4:09:49 PM
Hey fellaz, So i am working on a big skirmish map and im testing all kinds of ideas, i got this idea for a supply source that can be dropped by a plane, there already is the crate drop but that was not what i was looking for, i wanted it to be more like a supplydock. So after a bit of tweaking and tinkering i came up with this stuff, made only with map.ini. Tell me what you guys think and i will post the code if you like. Vid has no sound for some reason but it is just a quick showcase of an idea... [YOUTUBE]http://www.youtube.com/watch?v=estlZTSNDCA&feature=youtu.be[/YOUTUBE] Cheers and have fun

Posted by: UTD^Force - Monday, August 20, 2018 6:18:28 PM
That is so cool! I'll try to do it myself before you post the code. EDIT: I suggest adding the code to the ini code snippets too, it might inspire even more ideas.

Posted by: SkyMix_RMT - Monday, August 20, 2018 7:50:45 PM
holy shjt I never thought something like that was even possible with just a map.ini can't wait to see the code.

Posted by: Unknown Editor - Tuesday, August 21, 2018 2:17:29 AM
WoW , This was awesome , Then my idea was and well still is a SupplyWareHouse which regenerates Supplies by a Plane every 4 mins .

Posted by: acidbrain - Tuesday, August 21, 2018 8:02:53 AM
It all started with 2 things: 1. A question about the OCLUpdate module. So i thought this...A supplydropzone object has a OCLUpdate module which sends a cargoplane to the model to drop some crates every 120000 msec(2 minutes), what if i make an object that lives for 1 msec with a OCLUpdate module 'MinDelay' and 'MaxDelay' set to 1 msec also, does the ocl get triggered and sends the plane?..Well it does!!! 2. Finding an unused supplydock model. When i was searching the interwebs for unused c&c content i found a site that talked about a unused techbuilding, a radio station, i went looking for the models and then i saw model 'ZBPile' in the zh w3d big file, i instantly linked that ocl update module and this model, i thought ...What if you spawn an object that lives for 1 msec, triggeres an ocl which sends a cargoplane which drops different kind of crates but as on of the first crates you throw a special crate, a crate which dies at height 10.0 and spawns the 'ZBPile' model with ocl and fades the model in slowly while the smoke from the dying at 0.01 height other crates mask the spawn a little... Here is some more detail about the 'ZBPile' model and the mechanics of a supplydock... If you check the code of the supplydock you will find the following 2 modules: [code] Draw = W3DSupplyDraw ModuleTag_02 ExtraPublicBone = SUP ConditionState = NONE Model = ZBSupplyDK_B End SupplyBonePrefix = SUP End and Behavior = SupplyWarehouseDockUpdate ModuleTag_06 AllowsPassthrough = No NumberApproachPositions = -1 StartingBoxes = 400 End [/code] These 2 modules are connected, the 'ZBSupplyDK_B' model contains all the seperate boxes that make up the supplies on the supplydock, the name of the seperate objects is SUP01 to SUP whatever, with the 'StartingBoxes = 400' you specify what graphically full is, so how many SUP objects are visible, 400 is default amount $30000, i set it to 250 which gives a $18750 supplydock... The 'ZBPile' model is a model just like the 'ZBSupplyDK_B' model, it contains seperate objects called SUP. I really dont understand why they implemented only 1 type of supplydock while this model was also there, lack of time due to a money horny EA i guess... Here you have the idea, now the fun part, some code, i used rebel ambush logic to spawn the object that triggers the cargoplane... [code=plain] ;Nice unused special power with a button that has a 'SCTempDefaultCommand' image, rather blank than wrong image, text tooltips do the job good enough... SpecialPower SuperweaponTerrorCell Enum = SPECIAL_TERROR_CELL ReloadTime = 0 ;No reload time for testing purposes SharedSyncedTimer = No PublicTimer = No InitiateSound = TerrorCellActivated ViewObjectDuration = 30000 ViewObjectRange = 250 RadiusCursorRadius = 30 ShortcutPower = No End ; --- CommandButton Command_TerrorCell Command = SPECIAL_POWER SpecialPower = SuperweaponTerrorCell Options = NEED_TARGET_POS CONTEXTMODE_COMMAND TextLabel = CONTROLBAR:DropSupplySource ;in map.str Science = None ButtonImage = SCTempDefaultCommand ButtonBorderType = ACTION DescriptLabel = CONTROLBAR:TooltipDropSupplySource ;in map.str RadiusCursorType = AMBUSH InvalidCursorName = GenericInvalid End ; --- ;Create new commandset for outhouse CommandSet OutHouseCommandSet 1 = Command_TerrorCell End ; --- ;Used this crapper to stash the button Object OutHouse CommandSet = OutHouseCommandSet KindOf = -CAN_SEE_THROUGH_STRUCTURE -CLEARED_BY_BUILD +STRUCTURE +SELECTABLE AddModule ;Add production update Behavior = ProductionUpdate Module_Add01 ; End ;When we push the button a vendingmachine is created Behavior = OCLSpecialPower Module_Add02 SpecialPowerTemplate = SuperweaponTerrorCell OCL = OCL_SupplySourceTrigger CreateLocation = CREATE_AT_LOCATION End End End ; --- ;This object is spawned when you use SuperWeapon TerrorCell on location ObjectCreationList OCL_SupplySourceTrigger CreateObject ObjectNames = AsianVendingMachine Count = 1 FadeIn = No DiesOnBadLand = Yes End End ; --- ;Lets use a vending machine to trigger the cargo plane Object AsianVendingMachine ;We dont want you to look like a vending machine so we remove your model RemoveModule ModuleTag_01 ;Remove W3DModelDraw module ;We want you to die without anyone noticing it so we remove your death fx RemoveModule ModuleTag_10 ;Remove FXListDie module AddModule ;In my short life i trigger an ocl which ;sends an airplane to drop some crates Behavior = OCLUpdate Module_Add01 OCL = OCL_SendCargoPlane MinDelay = 1 MaxDelay = 1 CreateAtEdge = Yes End ;Set object lifetime to 1 msec, we only need object for ocl trigger ;Ocl update is set to 1 msec so every msec a plane is send if we dont kill ;this object in 1 msec Behavior = LifetimeUpdate Module_Add02 MinLifetime = 1 MaxLifetime = 1 End End End ; --- ;OCL that spawns the cargoplane which drops the crates ObjectCreationList OCL_SendCargoPlane DeliverPayload Transport = AmericaJetCargoPlane StartAtPreferredHeight = Yes StartAtMaxSpeed = Yes MaxAttempts = 1 DropOffset = X:0 Y:0 Z:-5 DropDelay = 310 PutInContainer = AmericaParachute Payload = Sprinkler 1 ;Spawns supplysource on death Payload = Crate 2 Payload = Crate02 2 Payload = ShippingCrate 2 Payload = Crate 3 Payload = StackedBoxes 2 Payload = Crate02 3 ParachuteDirectly = Yes ;Bunch up on target DeliveryDistance = 330 End End ; --- Normal crates --- Object Crate KindOf = -IMMOBILE -CLEARED_BY_BUILD +PARACHUTABLE +CRATE AddModule Behavior = PhysicsBehavior Module_Add01 Mass = 75.0 End Behavior = HeightDieUpdate Module_Add01 TargetHeight = 0.01 TargetHeightIncludesStructures = No End End End ; --- Object Crate02 KindOf = -IMMOBILE -CLEARED_BY_BUILD +PARACHUTABLE +CRATE TransportSlotCount = 1 AddModule Behavior = PhysicsBehavior Module_Add01 Mass = 75.0 End Behavior = HeightDieUpdate Module_Add01 TargetHeight = 0.01 TargetHeightIncludesStructures = No End End End ; --- Object StackedBoxes KindOf = -IMMOBILE -CLEARED_BY_BUILD +PARACHUTABLE +CRATE TransportSlotCount = 1 AddModule Behavior = PhysicsBehavior Module_Add01 Mass = 75.0 End ;I die at 0.01 height Behavior = HeightDieUpdate Module_Add01 TargetHeight = 0.01 TargetHeightIncludesStructures = No End End End ; --- Special crate --- ;I am a sprinkler disguised as crate, ;i get dropped from a plane with a parachute and die at 10.0 height, ;when i die i spawn a supplysource which will fade in in 6 seconds Object Sprinkler ;We don't want you to be a sprinkler anymore ;we want you to be a crate because we are sick ;of getting wet all the time. ReplaceModule ModuleTag_01 Draw = W3DModelDraw ModuleTag_01_Override DefaultConditionState Model = PMCrat02 End End End ;I am not immobile anymore and i cant get cleared by build anymore ;because well, uhm i kinda come falling from the sky now so i am ;parachutable now like a crate, try placing a building on that!, i dare ya... KindOf = -IMMOBILE -CLEARED_BY_BUILD +PARACHUTABLE +CRATE ;I take 1 slot in a transport TransportSlotCount = 1 AddModule ;I die at height 10.0 Behavior = HeightDieUpdate Module_Add01 TargetHeight = 10.0 TargetHeightIncludesStructures = No End ;I spawn a supplysource on death Behavior = SlowDeathBehavior Module_Add02 DeathTypes = ALL OCL = INITIAL OCL_SpawnSupplySource End ;My object gets destroyed when i die Behavior = DestroyDie Module_Add03 ; End End End ; --- ;This ocl spawns the supply source, used a barrel ;because i was a bit thirsty ObjectCreationList OCL_SpawnSupplySource CreateObject ObjectNames = Barrel Count = 1 FadeIn = Yes FadeTime = 6000 DiesOnBadLand = Yes End End ; --- ;Lets make a supplydock from a barrel, just because we can ;There is a nice unused model called 'ZBPile', lets blow the dust of it and use it. Object Barrel ;We dont need your model anymore barrel, but first we drink your content... ReplaceModule ModuleTag_01 Draw = W3DModelDraw ModuleTag_01_Override DefaultConditionState Model = None End End End RemoveModule ModuleTag_02 ;Remove ActiveBody module RemoveModule ModuleTag_03 ;Remove SlowDeathBehavior module TransportSlotCount = 1 RadarPriority = STRUCTURE KindOf = +SUPPLY_SOURCE_ON_PREVIEW +NO_COLLIDE +SUPPLY_SOURCE +IGNORED_IN_GUI +UNATTACKABLE +PARACHUTABLE ;+STRUCTURE? AddModule ;I am a barrel disguised as supply source and im immortal, yay Body = ImmortalBody Module_Add01 MaxHealth = 1.0 InitialHealth = 1.0 End ;Draw and visually manage amount of boxes Draw = W3DSupplyDraw Module_Add02 ExtraPublicBone = SUP SupplyBonePrefix = SUP ConditionState = NONE Model = ZBPile End End ;Need this to function as supply source Behavior = SupplyWarehouseCreate Module_Add03 ; End Behavior = SupplyWarehouseDockUpdate Module_Add04 AllowsPassthrough = Yes ;It's a drive through baby NumberApproachPositions = 9 ;Max in line StartingBoxes = 250 ;Graphical amount of boxes(250 = $18750) DeleteWhenEmpty = Yes ;Remove object when empty End End Shadow = SHADOW_VOLUME End [/code] I used several civilian props, you can use any prop you want so pick your own models, it depends on what props you used on your map. I attached a map so you guys can check it out without having to make stuff yourself. For some strange reason it doesnt always work when i have the game open in the background, so restart the game before checking out the map i attached, also i have to restart the game sometimes after a start to get it to work, really strange, in my other map it always works. If someone wants a more detailed explanation about something don't be afraid to ask... If you see stuff that can be done better please notify so we can make this stuff as good as it can be, i dont know everything, usually i just throw a lot of sjit on a pile and try to get it to work, quite often without knowing what the heck im doing...:P [quote=Unknown Editor]Then my idea was and well still is a SupplyWareHouse which regenerates Supplies by a Plane every 4 mins .[/quote] That is going to be hard if not impossible, you can get it to work however if you have a fixed supplysource with a name, adjust the ocl that spawns the plane and remove the crate that spawns the supply source, make an area around the supplydock of choice and drop the crates on the supplydock, make a listener script that detects if there are crates of type that the cargoplane dropped in the supplydock area and if so update the warehouse value...Ez When you drop a nameless supply source on a unknown position you have a good challenge on your hand...:P Cheers and have fun *Edit* this solution is rather devious but i had to do it like this because i have used up the other special powers and stuff, map.ini for skirmish has it's limitations... You can make this mechanism much quicker and easier by just using the cratedrop and modify the ocl which drops the crates... [ATTACH]2166[/Attach]