Jump to content

Recommended Posts

Hi Everyone,

Just a quick question.

Essentially my mod has the Mastodon have a weapon system that you can purchase "on" the unit. Basically, its some command button special powers that give the Mastodon an "upgrade" depending on what weapon you want to put on it (currently, there are two weapons, Big Gun and Small Gun (Devastator cannon and classic railguns))... but I want to be able to give the AI the option to at least buy the railguns, so I made this AISpecialPowerUpdate...

<AISpecialPowerUpdate
				id="37DB893B"
				CommandButtonName="Command_MastodonSmallGun"
				SecondaryCommandButtonName=""
				SpecialPowerAIType="SPECIAL_POWER_BASIC_SELF_BUFF"
				SpecialPowerRadius="-1"
				ReinforceDistance="0"
				SpellMakesAStructure=""
				SpecificUnit=""
				UnitKindOf="VEHICLE"
				AllyUnitInclude=""
				AllyUnitExclude=""
				EnemyUnitInclude=""
				EnemyUnitExclude=""
				MinimumCutoff="0"
				UpdateTime="1s"
				MaxFrequency="0"
				RandomizeTargetLocation="False" />

... the problem is, the AI rarely (if ever) purchases it. It only costs 2000 credits, which I figured isn't too much for a Brutal AI... but since "equipping" the walker is literally imperative for it to be functional (it only has rocket launchers if you don't give it a weapon), it ends up often being severely gimped in the hands of the AI, unless it has the sudden urge to buy the upgrade.

I'm wondering if there's any chance to increase the possibility of the AI doing something, as it does with MCV's and Surveyors etc (aka, always do this if you have this)... since its no use them having an epic unit that they only upgrade 1 out of every 10 times or so.

My version of the Mastodon is meant to be freely customizable, so I'm not sure how I'd implement it otherwise. o.O

This is what the special power looks like for extra info:

<SpecialPower
				id="GiveSmallInit"
				SpecialPowerTemplate="SpecialPower_MastodonSmallGun"
				AntiCategory=""
				AntiFX=""
				AttributeModifier=""
				AttributeModifierRange="0"
				AttributeModifierFX=""
				WeatherDuration="0"
				InitiateFX=""
				TriggerFX=""
				SetModelCondition="TOPPLED"
				SetModelConditionTime="0s"
				GiveLevels="0"
				ChangeWeather="NORMAL"
				OnTriggerRechargeSpecialPower=""
				BurnDecayModifier="0"
				MaxDistanceFromCommandCenter="0"
				UpdateModuleStartsAttack="True"
				StartsPaused="False"
				ReEnableAntiCategory="False"
				AttributeModifierAffectsSelf="False"
				AttributeModifierWeatherBased="False"
				TargetEnemy="False"
				TargetAllSides="False"
				DisableDuringAnimDuration="False"
				IdleWhenStartingPower="False"
				AffectGood="False"
				AffectEvil="False"
				AffectAllies="True"
				AvailableAtStart="True"
				AdjustVictim="False"
				UseDistanceFromCommandCenter="False"
				ChildModuleHandlesFX="False">
				<AttributeModifierAffects
					Rule="UNPARSED"
					Relationship=""
					Alignment="NONE"
					Include=""
					Exclude=""
					StatusBitFlags=""
					RejectStatusBitFlags=""
					AcceptModelCondition=""
					RejectModelCondition="" />
				<RequirementsFilterMP
					Rule="UNPARSED"
					Relationship=""
					Alignment="NONE"
					Include=""
					Exclude=""
					StatusBitFlags=""
					RejectStatusBitFlags=""
					AcceptModelCondition=""
					RejectModelCondition="" />
				<RequirementsFilterStrategic
					Rule="UNPARSED"
					Relationship=""
					Alignment="NONE"
					Include=""
					Exclude=""
					StatusBitFlags=""
					RejectStatusBitFlags=""
					AcceptModelCondition=""
					RejectModelCondition="" />
			</SpecialPower>
			<GiveOrRestoreUpgradeSpecialPower
				id="GiveSmall"
				GrabPassengerHealGain="0%"
				SpecialPowerTemplate="SpecialPower_MastodonSmallGun"
				StartAbilityRange="1E+07"
				AbilityAbortRange="1E+07"
				PreparationTime="0s"
				PersistentPrepTime="0s"
				PersistentCount="-1"
				PackTime="0s"
				UnpackTime="0s"
				PreTriggerUnstealthTime="0s"
				Options=""
				PackUnpackVariationFactor="0"
				ParalyzeDurationWhenCompleted="0s"
				ParalyzeDurationWhenAborted="0s"
				SpecialObject=""
				MaxSpecialObjects="1"
				EffectDuration="0s"
				EffectValue="1"
				EffectRange="0"
				FleeRangeAfterCompletion="0"
				DisableFXParticleSystem=""
				PackSound=""
				UnpackSound=""
				PrepSoundLoop=""
				TriggerSound=""
				ActiveLoopSound=""
				AwardXPForTriggering="0"
				SkillPointsForTriggering="-1"
				UnpackingVariation="0"
				FreezeAfterTriggerDuration="0s"
				RequiredConditions=""
				RejectedConditions=""
				SetObjectStatusOnTrigger=""
				ClearObjectStatusOnExit=""
				TriggerAttributeModifier=""
				AttributeModifierDuration="0s"
				ChainedButton=""
				RequireAndSpendTiberiumOnCaster="0"
				DisabledTypesToProcess="HELD"
				DisabledTypesToContinueSoundsFor="HELD"
				StartRechargeOnExit="False"
				GoIdleInStartPreparation="True"
				FaceTarget="True"
				UpgradeToGive="Upgrade_MastodonSmallGun"
				WeaponFlags="" />

 

Share this post


Link to post

You need to know one thing: You can theoretically disable the AI and completely rebuild it in lua. That means you can also mimic only parts of it like the desire you mentioned above.

https://pastebin.com/xHHGCVZ1

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×