Jump to content
dvs1

tweaking defenses n stuff

Recommended Posts

I figured out how to add veterancy to base defenses, tested and working. What I can't quit figure out is how to increment via the attribute modifier 3 other things.

 

I want the range, vision, and shroud clearing be x% for veteran, y% for elite, and z% for heroic; I borrowed the coding from the zone trooper upgrade to do this.

 

	<AttributeModifier
		id="Defense_Veteran"
		Category="LEVEL INNATE_VISION"
		Duration="0s"
		MetaDuration="0"
		StartFX=""
		EndFX=""
		ModelConditionsSet=""
		ModelConditionsClear=""
		ObjectStatusToSet=""
		StackingLimit="1"
		ReplaceInCategoryIfLongest="False"
		IgnoreIfAnticategoryActive="False">
		<Modifier
			Type="DAMAGE_MULT"
			Value="125%" />
		<Modifier
			Type="HEALTH_MULT"
			Value="125%" />
		<Modifier
			Type="RANGE"
			Value="125%" />
		<Modifier
			Type="VISION"
			Value="125%" />
		<Modifier
			Type="SHROUD_CLEARING"
			Value="125%" />
	</AttributeModifier>

This is the current code I'm working with. As always, I've done my looking and comparing to see how something works. The dmg and h% work, but the R, V, S do not. I tried it with INNATE_VISION and without. Same thing.

 

I tried to get the heroic heal to kick in too (the main reason for adding veterancy) and it doesn't work. I tried the c/p method from the APC to the WatchTower, that didn't work so I tried changing the id to the module; that didn't work either. I made sure everything was linked together, spelling correct, etc. Checked the other files too not requiring my changes, nothing there it looked like it needed changing, being generic. So how can or does one add an autoheal function to a structure? If this were possible, of course.

 

I've actually got a long list of stuff done. I know I ask a lot of questions, but don't think I ask 'everything'. Just the stuff I spend way too much time on trying to figure out.

 

 

the other stuff

 

does the sonic fence need to be a bone to show? I added it to the power plant, its "there" but doesn't show... I forgot how to add a bone, which is a different problem...

 

I changed the combat engineer; I added stuff like demo, traps, and want to make him only capture husks. At the same time, I want the engineer to only capture buildings and not husks. I tried changing the ID from "SteelTalonsCombatEngineer" to "GDICombatEngineer" where applicable but the game crashed on start. When I make an id change like this, do I need to treat the unit as a new one and "import" everything?

 

I tried changing the power output on the power plants from 20 to 30 and it didn't work. At this point I start asking 3-letter questions that begin with "W".

 

Why. The questions are "why". Not the other one. We both know what you were thinking. Altho that one does come to mind often too.

 

Lastly, for this round, I want to upgrade wall segments to hubs. After some thinking on the issue, making it an "upgrade" is the way to go, and the easiest way to patch a hole in the wall too without replacing the whole blasted thing between hubs. Before I start this one, is there anything I should know? I need to use an upgrade template, create a LGS for the segment, and set the triggers in the g/o code. Anything else or what could I use as a guide?

Share this post


Link to post

So how can or does one add an autoheal function to a structure? If this were possible, of course.

 

it is possible but it won't work actually if this part of code is missing inside the structure's GameObject file.

<AutoHealBehavior
	id="Upgrade_HeroicHeal"
	StartHealingDelay="1s"
	HealingAmount="10"
	HealingDelay=".5s">
	<TriggeredBy>Upgrade_Veterancy_HEROIC</TriggeredBy>
</AutoHealBehavior>

 

as for the engineer... you can create a new engineer by copying and renaming, but you'll have to change the "engineercontain" stuff inside of every single structure/husk to make it possibly enter/not enter it.

 

<EngineerContain xmlns="uri:ea.com:eala:asset"
		id="ModuleTag_EngineerContain"
		NameOfVoiceToUseForFriendlyEnter="VoiceEngineerRepair"
		NameOfVoiceToUseForHostileEnter="VoiceCaptureBuilding" 
		EvaEventForRepair="BuildingRepaired"
		EvaEventForCapture="EnemyBuildingCaptured"
		FXForRepair="FX_Building_Repaired" 
		FXForCapture="FX_Building_Captured"
		FXForCaptureAndReplace="FX_Building_Captured"
		ImmediatelyEnabled="true">
			<CanEnterFilter Rule="NONE">
				<IncludeThing>GDIEngineer</IncludeThing>
				<IncludeThing>NODSaboteur</IncludeThing>
				<IncludeThing>AlienAssimilator</IncludeThing>
				<IncludeThing>SteelTalonsCombatEngineer</IncludeThing>
				<IncludeThing>ZOCOMEngineer</IncludeThing>
				<IncludeThing>BlackHandSaboteur</IncludeThing>
				<IncludeThing>MarkedOfKaneSaboteur</IncludeThing>
				<IncludeThing>Traveler59Assimilator</IncludeThing>
				<IncludeThing>Your New Engineer</IncludeThing>
			</CanEnterFilter>
</EngineerContain>

Share this post


Link to post

1. try this instead

 

<AttributeModifier
		id="Defense_Veteran"
		Category="NONE">
                <Modifier Type="DAMAGE_MULT" Value="125%"/>
                <Modifier Type="HEALTH_MULT" Value="125%" />
		<Modifier Type="SHROUD_CLEARING" Value="125%"/>
		<Modifier Type="VISION" Value="125%"/>
		<Modifier Type="RANGE" Value="125%"/>
</AttributeModifier>

Is your sonic fence mesh set as geometry? Else it won't show ingame.

 

Changing power on the powerplant is basic, no reason it shouldn't work.

 

The only things i can think of is

1. you either changed the wrong power attribute...

EnergyProduction="20" /** this is the on you need **/
EnergyBonus="10" /** this one only comes into effect from the turbine upgrade **/

 

2. you forgot to reference you powerplant xml in your static.xml

 

3. could be there is some syntax error in the xml which gives a error and fails to compile your xml into your mod.

 

 

 

As for turning segments into hubs, i used a replaceself specialpower for something similar a while back. Think mcv unpack coding.

Share this post


Link to post

 

it is possible but it won't work actually if this part of code is missing inside the structure's GameObject file.

<AutoHealBehavior
	id="Upgrade_HeroicHeal"
	StartHealingDelay="1s"
	HealingAmount="10"
	HealingDelay=".5s">
	<TriggeredBy>Upgrade_Veterancy_HEROIC</TriggeredBy>
</AutoHealBehavior>

 

This is the code I've been using:

 

<AutoHealBehavior
	id="Upgrade_HeroicHeal"
	InitiallyActive="true"
	HealOnlyIfNotInCombat="false"
	HealOnlyIfNotUnderAttack="false"
	StartHealingDelay="1s"
	HealingAmount="100"
	HealingDelay=".5s">
	<TriggeredBy>Upgrade_Defense_HEROIC</TriggeredBy>
</AutoHealBehavior>

And the Upgrade Template is:

 

<UpgradeTemplate
	id="Upgrade_Defense_HEROIC"
	Type="OBJECT"
	BuildTime="0s"
	BuildCost="0"
	ResearchSound=""
	UnitSpecificSound=""
	UpgradeFX=""
	UseObjectTemplateForCostDiscount=""
	GroupOrder="0"
	SkirmishAIHeuristic="INVALID"
	Options="DO_NOT_TRANSFER"
	WaypointQueueable="False" />

 

When I changed the InitiallyActive in the AutoHealBehavior tag from false to true, it works. It works at every level though. Not exactly what I was going for, so I'll come back to this in a minute. I changed it back to false once I got it fixed so the hero heal will kick in on the upgrade.

 

as for the engineer... you can create a new engineer by copying and renaming, but you'll have to change the "engineercontain" stuff inside of every single structure/husk to make it possibly enter/not enter it.

 

Exactly. I wanted to copy & rename because I figured it would be easier to change 5 husk files to add him, and remove the gdi engineer, than dozens of everything else.

 

1. try this instead

 

<AttributeModifier
		id="Defense_Veteran"
		Category="NONE">
                <Modifier Type="DAMAGE_MULT" Value="125%"/>
                <Modifier Type="HEALTH_MULT" Value="125%" />
		<Modifier Type="SHROUD_CLEARING" Value="125%"/>
		<Modifier Type="VISION" Value="125%"/>
		<Modifier Type="RANGE" Value="125%"/>
</AttributeModifier>

Is your sonic fence mesh set as geometry? Else it won't show ingame.

 

Changing power on the powerplant is basic, no reason it shouldn't work.

 

The only things i can think of is

1. you either changed the wrong power attribute...

EnergyProduction="20" /** this is the on you need **/

EnergyBonus="10" /** this one only comes into effect from the turbine upgrade **/

 

Long story short: there was a syntax error somewhere in the coding from when I added the SRF. I wiped the file and put in fresh code, then changed the energy output and it works. I'll let you know how rest develops.

 

 

2. you forgot to reference you powerplant xml in your static.xml

 

So far I've only done this once.

 

3. could be there is some syntax error in the xml which gives a error and fails to compile your xml into your mod.

 

There was. I wasn't interested in reading every line to find it, so I'll have to go back and do it over again.

 

After messing around with the power plant and realizing my tweaked one wasn't being built, it got me to thinking about the defenses and how all the code was in place but what if the files weren't being acclimated because they weren't compiled properly? Then it dawned on me. Some of the files I put into a folder called "Global". Even tho I cited everything accurately, they weren't being added how I wanted. I renamed the folder from Global to AllFactions and *BAM!* everything freaking worked! Now my GDI base defenses are seriously OP and need toned down.

 

It's always the simple stuff that drives one mad.

 

As for turning segments into hubs, i used a replaceself specialpower for something similar a while back. Think mcv unpack coding.

 

That makes a lot more sense than what I was going to try. I'll let you know if it works.

 

 

I like how this works. I ask a question. Ideas are thrown around. I tool a bit more based off the ideas and suddenly everything works.

Share this post


Link to post

Exactly. I wanted to copy & rename because I figured it would be easier to change 5 husk files to add him, and remove the gdi engineer, than dozens of everything else.

renaming= new unit. Means you NEED to add him to EVERY buildings' Engineercontain module if he is to be able to capture anything. You are better of keeping the original engineer and removing him from those 5 huskfiles.

From a bigger picture...GDIengineer is used in skirmish ai and singleplayer map scripting and conquest mode....removing it possibly breaks those aswell.

Share this post


Link to post

i dont see the point in using a different upgrade template. don't you trigger the heroic status by experience like the units do?

Share this post


Link to post

renaming= new unit. Means you NEED to add him to EVERY buildings' Engineercontain module if he is to be able to capture anything. You are better of keeping the original engineer and removing him from those 5 huskfiles.

From a bigger picture...GDIengineer is used in skirmish ai and singleplayer map scripting and conquest mode....removing it possibly breaks those aswell.

 

I was going to change GDIEngineer to GDICombatEngineer for the husks ..... but ... damn you're right. The AI wouldn't know what to do. I've only been playing and testing as GDI, nothing else. The Scrin and Nod factions only have 1 engineer. See, what I was thinking is that you have the GDI Engineer for buildings and bridges, while the Combat Engineer (CE) would be used for capturing husks, setting traps, and demolitions. I wanted to rename the CE from Steel Talons, that way the subfaction would remain unchanged if chosen to play as that. Thanks for the thought. I'll test it and see what happens. If the AI can't figure it out then I'll have to do something else.

 

i dont see the point in using a different upgrade template. don't you trigger the heroic status by experience like the units do?

 

 

You're right. It wasn't working before, but now that it is, it only makes sense to reset it back to default.

Share this post


Link to post

See, what I was thinking is that you have the GDI Engineer for buildings and bridges, while the Combat Engineer (CE) would be used for capturing husks, setting traps, and demolitions.

Well that is doable for the CE, because you leave the biggest coding part out....modifying every buildings Engineercontain....but currently you can't change or add to the skirmishAI files, so the ai will not really use your new CE effectively or at all maybe. Keep that in mind. Basicly if you haven't noticed in a skirmish game engineers are used for 1. capturing buildings(player and civ), 2.repairing bridges 3. capturing husks. Demo traps aren't really used...honostly the ai coding is as broken as EA's customer policies.

 

So remember that the ai will use the normal engineer because:

1. it has skirmishai scripts for it where your CE doesn't.

2. or it will build the CE (specialy if its cheaper then the normal) but don't do anything with it (besides maybe suicide it into your base) because it doesn't understand what it can do and not do anymore.

Share this post


Link to post

If the AI suicides it into my base... that's just something else to run along with the horde of slingshots that invade and surround the harvester to keep it from moving or entering the refinery.

 

The CE is set at 700. I knocked the Engineer down to 200.

 

Here's my notes on them

 

			□ ENGINEER
				® CAPTURE/REPAIR BUILDINGS/BRIDGES
				® SPEED: 80 (36)
				® COST: 200 (500)
				® TIME: 2 (5) 
				® CAPTURE TIME: 1 (3)
			□ COMBAT ENGINEER
				® CAPTURE HUSK ONLY
				® DEMOLITIONS
				® DEMO TRAP BUILDINGS/BRIDGES
				® SPEED: 80 (36)
				® COST: 700 (500)
				® TIME: 7 (5)
				® CAPTURE TIME: 1 (3)
				® UPGRADES
					◊ COMPOSITE ARMOR
					◊ AP AMMO

 

I find it personally enjoyable to get a squad of CE onto a bridge, about 4 or 5, and trap every segment then watch the enemy attempt to cross it. Same with dropping a mine field on a tib spike. But even with a speed of 80, I've had to run circles around a Tib Spike (quite literally, its hilarious to watch) while Buzzers are chasing them. They can barely stay ahead of them too.

 

There is a skirmish AI tag. Because they have the same special powers as a saboteur, if I replaced the skirmish ai tag info with the nod version, that should tell the ai how to use it effectively, even if it can't capture buildings it *might* still send it out to do other things. I haven't done this yet, but I will soon.

 

I've seen the AI use demos and traps on the bridges of barstow's badlands--which really surprised me when the bridge collapsed for no apparent reason. I only play against brutal and balanced too.

 

I got the Mini Orca to build on the first try (yea for me), but not the Ox... its there, but not buildable (yet). Anyways, so I was thinking this over about the Mini Orca and find it would be useful, imo anyways, as an air-to-air unit only. I was going to make it like the hammerhead, but why duplicate that? It has the Firehawk locomotor and I want to hook it up with the Firehawk missiles.

 

The more I make time to play with this, the easier it gets. If you want to see something crazy, quadruple the value of green tiberium crystal (and field values x4 too) from 7 to 28 and cut the regrowth time down to 2s between 3s stages then play against a brutal balanced ai on a large map 1v1. The only way I've managed to barely control the situation is to set the Ion Cannon with a 30s cooldown. The AI will throw everything it has and can at you nearly non-stop.

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.

×