Search the Community
Showing results for tags 'power'.
Found 1 result
-
a brainstorm about power/supply depots
Ravendark posted a topic in Tiberium Wars / Kane's Wrath Maps & Modding
Awhile ago i was experimenting with giving units a powerconsumption cost...the idea was to mimic a supplychain effect....build to many units overload your supplychain/powergrid and receive a penalty to your units performace alongside the usual lowerpower effect of buildings....so basicly mimicing a working or breakdown in military logistics. i didnt really got further then giving a unit a power consumption and fiddled arround with the low_power status and the onpoweroutage and onpowerrestored events.....didnt really work like i intended and had someweird effects on my powerturbineupgrades weirdly enough. So last night the idea came back to me (yay for being an insomniac) but under a slightly diffferent idea: When lower power: A:through an auramodifier: Have a persistent building or better yet a persisten gameobject (something that spawns every game(maybe together with the playerspellbook if that works?)) ,have that gameobject be effected by power. On low power have it either use the aura system to effect mapwide everyplayer unit and give it a atribute modifier that reduces speed,rate of fire,vision range etc. So the rough idea atm is to: <AttributeModifierAuraUpdate id="ModuleTag_AttributeModifierAuraUpdate_LowPower" AttributeModifierName="Logistics_Failure_attributeMod" RefreshDelay="1.0s" Range="99999" InitiallyActive="true" RequiredConditions="MOUNTED"> <ObjectFilter Rule="ALL" Relationship="PLAYER" /> </AttributeModifierAuraUpdate> <AttributeModifier id="Logistics_Failure_attributeMod" Category="NONE" Duration="2s" ModelConditionsSet="User_20" > /** maybe set some visual overlay on the effected unit to indicate a supply breakdown <Modifier Type="VISION" Value="50%"/> <Modifier Type="SHROUD_CLEARING" Value="50%" /> <Modifier Type="SPEED" Value="50%"/> <Modifier Type="RATE_OF_FIRE" Value="50%"/> </AttributeModifier> <EventList Name="Logistics_Event" Inherit="BaseScriptFunctions"> <EventHandler EventName="OnPowerOutage" ScriptFunctionName="OnLogisticsFailure" DebugSingleStep="false"/> <EventHandler EventName="OnPowerRestore" ScriptFunctionName="OnLogisticsRestore" DebugSingleStep="false"/> </EventList> function OnLogisticsFailure(self) -- Set MOUNTED state to enable Aura ObjectGrantUpgrade( self, "Upgrade_TriggerMountedAuraState" ) end function OnLogisticsRestore(self) -- Set MOUNTED state to disable Aura ObjectGrantUpgrade( self, "Upgrade_RemoveMountedAuraState" ) end <RemoveUpgradeUpgrade id="ModuleTag_CommandSet_RemoveFor_01"> <TriggeredBy>Upgrade_TriggerMountedAuraState</TriggeredBy> <UpgradeToRemove>Upgrade_RemoveMountedAuraState</UpgradeToRemove> </RemoveUpgradeUpgrade> <RemoveUpgradeUpgrade id="ModuleTag_CommandSet_RemoveFor_02"> <TriggeredBy>Upgrade_RemoveMountedAuraState</TriggeredBy> <UpgradeToRemove>Upgrade_TriggerMountedAuraState</UpgradeToRemove> </RemoveUpgradeUpgrade> <ModelConditionUpgrade id="ModuleTag_ModelConditionUpgrade_TriggerMountedAuraState" AddConditionFlags="MOUNTED"> <TriggeredBy>Upgrade_TriggerMountedAuraState</TriggeredBy> </ModelConditionUpgrade> <ModelConditionUpgrade id="ModuleTag_ModelConditionUpgrade_RemoveMountedAuraState" RemoveConditionFlags="MOUNTED"> <TriggeredBy>Upgrade_RemoveMountedAuraState</TriggeredBy> </ModelConditionUpgrade> This as early concept, another method could be using the ObjectBroadcastEventToAllies through lua maybe, but im not sure if you can broadcast to a whole faction, or just to a single object and if it can differentiate between player objects only and similar allies object aswell?
