Jump to content
Sign in to follow this  
ztz2019

An opinion about a new kind of defense structure

Recommended Posts

I think it just like the neutral bunker or neutral DefensiveTower, and a bit like the firebase in ZH.

 

In my opinion, I'll build a defense structure I name it as emplacement which on my side, but can't work until my infantry/squad enter in. And when grenader, blackhand flamethrower or corruptor attack the emplacement, the inside manipulator die just like garrisoned soldier, and it needs squad enters in again.

 

How to emplement this new one come true?

 

First I think it's a bit like EngineerContain function, but what to do next? I need it both can't work and on my side when in unmanned state. And then it should like a garrisoned civilian structure.

 

 

 

In fact, there's a ZH mod named ShockWave, and it has the neutral flak turret which mostly just like what I said, except not be built by my force, and I think it's interesting if could emplement in CC3.

 

 

 

 

Share this post


Link to post

Another, how to make a transporting unit contained passenger when it just came up from factory ?

 

And is a structure just the same?

 

Then how to let a bunker resist anti_garrison weapon just like China's bunker in ZH?

Edited by ztz2019

Share this post


Link to post

for the transport:

 

InitialPayload allows you have a unit inside on creation.

 

<InitialPayload
                    Name="GDIPitbull_Veteran"
                    Count="1" />
 

 

 

where as buildings can use initialroster sequence iirc. it should work more or less the same as initialpayload i think

 

as for your firebase like structure...

 

Just make it a normal defense building but with the garrisoncontain module (needed so infantry can garrison in it)

You could give the weapon on the building a RequiredFiringObjectStatus="GARRISONED"

That should make it only fire if the building is garrisoned

 

this will stil lrequire an engineer to capture the building by the enemy.



if you want it build then turn neutral..you might have to replace the building on buildcompletion into a neutral version...like with a realy short lifetime update and a createdieupdatemaybe...i think you can give the ocl that spawn with the creatdie update a neutral side or player atribute, atleast iirc.

Share this post


Link to post

for the transport:

 

InitialPayload allows you have a unit inside on creation.

 

<InitialPayload
                    Name="GDIPitbull_Veteran"
                    Count="1" />
 

 

 

where as buildings can use initialroster sequence iirc. it should work more or less the same as initialpayload i think

 

as for your firebase like structure...

 

Just make it a normal defense building but with the garrisoncontain module (needed so infantry can garrison in it)

You could give the weapon on the building a RequiredFiringObjectStatus="GARRISONED"

That should make it only fire if the building is garrisoned

 

this will stil lrequire an engineer to capture the building by the enemy.

 

if you want it build then turn neutral..you might have to replace the building on buildcompletion into a neutral version...like with a realy short lifetime update and a createdieupdatemaybe...i think you can give the ocl that spawn with the creatdie update a neutral side or player atribute, atleast iirc.

 

Oh, no need to turn neutral, just always mine no matter garrisoned or not. So many thanx. And it needs anti_engineer or mastermind control function.

 

Share this post


Link to post

And if so, is it possible to re-edit ZH firebase? I wanna create the Tank Bunker in CC3, which means enemies can attack passenger contained in bunker, and passenger has extra armor and vision (this can emplement in AttributeModifier). When the bunker destroyed, it create FireWeaponWhenDead to take damage but not kill to passenger/garrisoner.

Share this post


Link to post

1. anti engineer, should just be that you dont include a engineer contain module..without that engineers cant enter stuff. Take heed that if you copy most of the cnc3 buildings..they inherit the engineer contain from

 

<xi:include
                href="DATA:Includes/GenericEngineerContain.xml" />
 

 

 

2. i think you can exlude objects in the mastermind manipulator weapon...if it cant target the object it cant control it.

3. ZH uses w3d files...if you have a way to import them into 3dsmax9 then rig them to work with cnc3 and export as w3x you can reuse them i guess.

4. you would have to give the attacking unit a HitStoredTarget="true" and DamageContainedNugget module in their weapon...if you dont put the dmg at extreme values like cnc3 does, you should be able do dmg units and not insta kill them i think.

 

5. not sure there is a way to do a certain amount of dmg to a garrisoned unit when the garrison gets destroyed, but you might be able to put a delay in the fireweaponwhendead weapon's damagenugget iirc.

Edited by Ravendark

Share this post


Link to post

1. anti engineer, should just be that you dont include a engineer contain module..without that engineers cant enter stuff. Take heed that if you copy most of the cnc3 buildings..they inherit the engineer contain from

 

<xi:include
                href="DATA:Includes/GenericEngineerContain.xml" />
 

 

 

2. i think you can exlude objects in the mastermind manipulator weapon...if it cant target the object it cant control it.

3. ZH uses w3d files...if you have a way to import them into 3dsmax9 then rig them to work with cnc3 and export as w3x you can reuse them i guess.

4. you would have to give the attacking unit a HitStoredTarget="true" and DamageContainedNugget module in their weapon...if you dont put the dmg at extreme values like cnc3 does, you should be able do dmg units and not insta kill them i think.

 

5. not sure there is a way to do a certain amount of dmg to a garrisoned unit when the garrison gets destroyed, but you might be able to put a delay in the fireweaponwhendead weapon's damagenugget iirc.

 

About the Tank bunker, I realized the GDIV35Ox_SummonedForVehicle, which could make the passenger vehicle outside the V35, and the passenger's passenger(if V35 contains APC) can fire outside. So maybe there's a way could make enemies attack APC not the V35. Because in <HordeTransportContain> there's a handle ObjectStatusOfContained that set flag"UNSELECTABLE", if I set it to "CAN_ATTACK" just like APC's <HordeTransportContain> and remove the "UNSELECTABLE" , maybe it could come true.

 

 

The code of tank bunker I suppose:

 

<HordeTransportContain

id="ModuleTag_Contain"

ObjectStatusOfContained="CAN_ATTACK" //remove the UNSELECTABLE flag, is it means passenger can be aimed and attacked?

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">

<IncludeThing>GDIAPC</IncludeThing>

<IncludeThing>GDIPitbull</IncludeThing>

<IncludeThing>GDIPredator</IncludeThing>

// ...... and so on

</PassengerFilter>

<DieMuxData

DeathTypes="ALL" />

<PassengerData

BonePrefix="BONEGARRISON">

<Filter

Rule="NONE"

Include="VEHICLE" />

</PassengerData>

</HordeTransportContain>

 

 

The last work is just make the w3x's bone could set the passenger upon the ground.

 

 

Would you please try to implement this suppose? No matter it succeed or not, just tell me the result. Now I'm in my working company far from my hometown, and my laptop

isn't beside me.

 

Share this post


Link to post

Not sure if the SELECTABLE or UNSELECTABLE status determines wether it can be attacked...if im not mistaken you can achieve that my adding or removing in this case the ENCLOSED statusbit. If a weapon uses the anti garrision nugget + stored target it can dmg inside units enless the container has the ENLOSED statisbit.....normal targeting gets done through the default autoaquire statisbit and can be prevented by adding NOT_AUTOACQUIRABLE. if im not mistaken.

 

But outside of that im no even sure if you can use a transport contain on a building enless you make the building a vehicle with IMMOBILE statisbit maybe

Share this post


Link to post

Not sure if the SELECTABLE or UNSELECTABLE status determines wether it can be attacked...if im not mistaken you can achieve that my adding or removing in this case the ENCLOSED statusbit. If a weapon uses the anti garrision nugget + stored target it can dmg inside units enless the container has the ENLOSED statisbit.....normal targeting gets done through the default autoaquire statisbit and can be prevented by adding NOT_AUTOACQUIRABLE. if im not mistaken.

 

But outside of that im no even sure if you can use a transport contain on a building enless you make the building a vehicle with IMMOBILE statisbit maybe

 

 

How to add new script to game?

 

I once checked the forgotten mod code and found the file scriptevents.xml, however, I don't know how to use it, and where it comes from. Why I can't find it in MOD SDK?

Share this post


Link to post

Ea didnt release it with the modsdk (forgot it i guess) you can extract scriptevents.xml from misc.big iirc, aswell as scripts.lua...those 2 basicly go hand in hand.

 

when you recompile them, you need to put the altered scriptevents.xml and scripts.lua inside MODSDK/buildmods/mods/yourmodname/data/scripts/ if the the /scripts/folder doesnt exist create it. no need to reference it anywhere else...if its inthat folder location it will get compiled with your mod.

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×