Jump to content

autoTurret Custom


AWFordJr1975

Recommended Posts

Alright so I want to copy the below to make my own AutoTurret that does not require any ammo or power to become a stand alone turret. Can someone tell me how to do this? I know I need to copy the code, and give it a new Block ID# which is not yet in use, and I do not care about icons.

 

Desired settings,

 

* 100 Range

* Attacks Zombies & enemies

* Causes Bleed Damage

* Fires Rockets

* No Block Damage

* Indestructible

* Dev block

 

Thank you very much for any help with this.

 

<block id="1678" name="autoTurret">
<property name="Class" value="Ranged"/>
<property name="Material" value="Mmetal_medium"/>
<property name="Shape" value="ModelEntity"/>
<property name="Mesh" value="models"/>
<property name="Model" value="Entities/Traps/AutoTurret/Auto_TurretPrefab"/>
<property name="OnlySimpleRotations" value="true"/> <!-- the targeting math will NOT work if it's not upright -->
<property name="AmmoItem" value="9mmBullet"/>
<property name="TurnSpeed" value="22.5"/>
<property name="MaxDistance" value="30"/>
<property name="EntityDamage" value="22"/> <!-- 146 dps, 330 / burst -->
<property name="BlockDamage" value="1"/>
<property name="RaySpread" value="2.6"/> <!-- Spread 2.6deg: 1m cone (55% hit) @ 22m -->

<property name="BustRoundCount" value="15"/>
<property name="BurstFireRate" value="0.15"/>
<property name="CooldownTime" value="2"/>
<property name="OvershootTime" value="0.4"/>
<property name="FallAsleepTime" value="10"/>
<property name="WakeUpTime" value="0.5"/>

<property name="YawRange" value="90"/>
<property name="PitchRange" value="90"/>

<property name="ParticlesMuzzleFire" value="nozzleflashuzi"/>
<property name="ParticlesMuzzleSmoke" value="nozzlesmokeuzi"/>

<property name="DamageBonus.head" value="3"/>
<property name="DamageBonus.glass" value="1"/>
<property name="DamageBonus.wood" value="2"/>
<property name="DamageBonus.earth" value="0.2"/>
<property name="DamageBonus.stone" value="0.2"/>
<property name="DamageBonus.metal" value="0.2"/>

<property name="TargetingSound" value="turret_retarget_lp"/>
<property name="OverheatSound" value="turret_overheat_lp"/>
<property name="WakeUpSound" value="turret_windup"/>
<property name="FireSound" value="Pistol_Fire"/>
<property name="RequiredPower" value="15"/>

<property class="RepairItems">
	<property name="forgedIron" value="12"/>
	<property name="mechanicalParts" value="2"/>
	<property name="electricParts" value="2"/>
</property>
<drop event="Harvest" name="mechanicalParts" count="1,4" tool_category="Disassemble"/>
<drop event="Harvest" name="electricParts" count="1,4" tool_category="Disassemble"/>
<drop event="Harvest" name="scrapIron" count="10,40" prob="1"/>
<drop event="Destroy" count="0"/>

<property name="Stacknumber" value="30000"/>
<property name="EconomicValue" value="3000"/>
<property name="EconomicBundleSize" value="1"/>
<property name="ImposterExchange" value="imposterBlock" param1="109"/>
<property name="Group" value="Tools/Traps,Science"/>
<property name="PickupJournalEntry" value="cameraTip"/>
</block>

<block id="1679" name="shotgunTurret">
<property name="Extends" value="autoTurret"/>
<property name="Model" value="Entities/Traps/AutoTurret/Auto_TurretShotgunPrefab"/>
<property name="AmmoItem" value="shotgunShell"/> <!-- does not use the damage value -->
<property name="MaxDistance" value="15"/>
<property name="EntityDamage" value="11"/> <!-- 180 dps, 440 / burst -->
<property name="BlockDamage" value="1"/>
<property name="RaySpread" value="5.2"/> <!-- Spread 5.2deg: 1m cone(55% hit) @ 11m -->
<property name="RayCount" value="10"/>

<property name="BustRoundCount" value="4"/>
<property name="BurstFireRate" value="0.61"/>
<property name="CooldownTime" value="2"/>
<property name="OvershootTime" value="0.8"/>

<property name="ParticlesMuzzleFire" value="nozzleflash_shotgun"/>
<property name="ParticlesMuzzleSmoke" value="nozzlesmokeuzi"/>

<property name="Buff" value="shotgunWound"/>
<property name="BuffChance" value="0.8"/>

<property name="FireSound" value="pump_shotgun_fire"/>
<property name="EconomicValue" value="2500"/>
<property name="PickupJournalEntry" value="cameraTip"/>
</block>

Link to comment
Share on other sites

Haven't tested it, but my first instinct for having it not need ammo would be to copy a couple lines from the gunJustDie admin gun in the items.xml:

	<property name="Single_magazine_usage" value="true"/>
	<property name="Infinite_ammo" value="true"/>

 

Having it fire rockets is easy, you just change the magazine item:

	<property name="Magazine_items" value="rocket"/>

 

However, a rocket that doesn't do block damage is probably not possible, since the game won't allow attacks that do less than 1 damage. You could make a copy of the rocket item in items.xml and call it like magicTurretRocket or something, and reduce the BlockDamage and Explosion.BlockDamage to 1, so it only does a little block damage, but I don't think you can eliminate it.

 

Obviously if you did that, you'd have to make the magazine item your new rocket item, not the original rocket item.

 

Making the turret indestructible is a major problem though. Normally it's trivial to make a block indestructible, you just set it so that the downgradeblock is the same as it, so when it's destroyed it's replaced by another copy of the same block.

 

The problem here is that this would work, but you'd end up with a new turret block with no settings... Any custom aiming you'd done with it would be lost, it would have no ammo (Which is no big deal if the infinite ammo thing works) and it would not be hooked up to whatever power source you'd set up to power the previous one, which would mean it would not function.

 

As far as I know, there's no way to make turrets function without being hooked up to power. You could try setting their requiredpower to 0, but I suspect they'd still refuse to work without being hooked up to a generator of some kind (Though in theory hooking them up to a battery bank would make them work forever... still doesn't solve the problem of the downgrade replacement not being connected though).

 

So I don't believe you can make the turret indestructible.

 

You could give it a billion HP (Assuming the variable they're using for block HP is large enough, I haven't experimented with that), but you can't really make it indestructible.

 

Edit: What you *can* do, is create a block that you can shoot through, which is indestructible (Downgrades to itself), and surround your custom turret with those. That would protect it from zombies (Though not Cops, if you want the turret to fire rockets, as cop puke will pass through any block that allows rockets to pass), but not from players with guns, if that's what you're trying to protect against...

Link to comment
Share on other sites

Thanks for the quick reply

 

Hey,

 

Thanks for the fast reply & the useful information. I have made indestructible hay blocks which I use around things to keep zombies from destroying them & they work really good because you can easily move them being you can pick them up. Not really sure how to make a block that I can play a turret in but that is a good idea. On note of the rocket I guess I will just use the shotgun or something else which really isn't an issue. I will however give that infinite ammo a try though. I have already made a duplicate of the turret just had no idea about where to find anything on infinite ammo, so thanks for that.

 

Any idea how I can change the voltage on batteries because I have tried & it doesn't seam to change in game.

 

Thanks again man!

Link to comment
Share on other sites

Thank you for the useful information

 

Hey,

 

Thank you very much for the quick reply. I also wanted to ask how to use that information you gave me, and am I using it right here?

 

<block id="1680" name="awfordjrTurret">
<property name="Extends" value="autoTurret"/>
<property name="Model" value="Entities/Traps/AutoTurret/Auto_TurretPrefab"/>
<property name="AmmoItem" value="AWFordJr762mmBullet"/> <!-- does not use the damage value -->
<property name="MaxDistance" value="100"/>
<property name="EntityDamage" value="11"/> <!-- 180 dps, 440 / burst -->
<property name="BlockDamage" value="0"/>
<property name="RaySpread" value="5.2"/> <!-- Spread 5.2deg: 1m cone(55% hit) @ 11m -->
<property name="RayCount" value="10"/>

<property name="Single_magazine_usage" value="true"/>
<property name="Infinite_ammo" value="true"/>

<property name="BustRoundCount" value="4"/>
<property name="BurstFireRate" value="0.01"/>
<property name="CooldownTime" value="0"/>
<property name="OvershootTime" value="0.8"/>

<property name="ParticlesMuzzleFire" value="nozzleflash_shotgun"/>
<property name="ParticlesMuzzleSmoke" value="nozzlesmokeuzi"/>

<property name="Buff" value="shotgunWound, bleeding, burning"/>
<property name="BuffChance" value="100"/>

<property name="FireSound" value="pump_shotgun_fire"/>
<property name="EconomicValue" value="1000000"/>
<property name="PickupJournalEntry" value="cameraTip"/>
</block>

 

I replied but for some reason my post isn't showing up, who knows. I am using a copy of the sniper ammo which is the AWFordJr762mmBullet renamed. I can do without the indestructible I guess, and I have no clue how to even start to make a block that I can shoot threw. I know how to make it indestructible I just put it as "Mbedrock" which is what I do with hay to use for walls to keep zombies from destroying my base or to make quick moveable structures. Then again I have also recently noticed that I can just go into the xmls to set block damage to "0" for all zombie types then they only damage players.

 

I have a paid test server I am playing with settings on & will be for a few months. I am using it to test things out for a bigger one my cousin is going to host for me on Google Fiber on one of his Dual 6Core Xeon servers to be a 100 slot. The test one I am paying for is only 10, but more then enough for us to test things on.

 

I really appreciate your reply & help.

 

Thanks, and trying to find the +rep option as I know most forums have them.

Link to comment
Share on other sites

I don't see any obvious errors in that, but I also don't know whether that stuff will work or not, it was just off the top of my head.

 

If you want to make blocks you can shoot through, you just override the "Collide" property:

 

<property name="Collide" value="movement,melee,rocket"/>

 

That's from the iron bars block, you can see, it makes it so that melee attacks trigger collision, and attempting to walk through it does, and it blocks rockets, but all other projectiles just pass through it.

 

This is from some other block in the file, and I think it actually covers all possible collision types, so frankly I'm not sure why they bothered to override the property at all:

 

<property name="Collide" value="movement,melee,bullet,arrow,rocket"/>

 

Basically just add a collide property, and only add the types of things you actually want it to block. Everything else will pass through it.

 

However, if setting the material of a block to Mbedrock works to make them indestructible, you can probably just set that on the turret and make it indestructible. That's a trick I wasn't aware of (Never tried to make an indestructible block before).

 

I wonder how that works... Is it just hardcoded to not allow damage to things with the bedrock material, or is it the fact that it's the only material with a hardness over 1 that blocks the damage. And if so, I wonder how the hardness property works, exactly. I'll have to test it later.

Link to comment
Share on other sites

* 100 Range - max distance to 100

* Attacks Zombies & enemies pretty sure this is hard coded too

* Causes Bleed Damage try this <property name="ApplyBuff" value=".35,.35" param1="arrowCriticalBleedout"/> tho it will keep shooting till they die so bleed is pretty much useless

* Fires Rockets not doable- the ammo type is basically for looks. you can change ammo to anything and damage stays the same

you can change the sound to this to make it sound like its firing rockets

 

<property name="Particles_muzzle_fire" value="rocketLauncherFire"/>

<property name="Particles_muzzle_smoke" value="nozzlesmoke_m136"/>

* No Block Damage

* Indestructible

* Dev block

Link to comment
Share on other sites

Letting the test realm go

 

I wanted to thank everyone for the great & useful information that they have posted in reply to this post. I will however be getting rid of the paid server I use as a test realm because of the lack of options & their cpanel over riding my server settings xml file all the time making it impossible to really have control over the server. Its a good host, they just don't have a good cpanel that allows for more then a few useless options on a modded server & every time it resets it sets a new random seed which also over rides the users settings.

 

I did however try those settings in the first reply which did not work. The other suggestions will be noted & explored in the future once we get our server up or once I get a better computer then this laptop to run the home based server for testing.

 

Thank you very much everyone for your help & suggestions which are greatly appreciated.

 

Hope everyone has a great weekend!

Link to comment
Share on other sites

* 100 Range - max distance to 100

* Attacks Zombies & enemies pretty sure this is hard coded too

* Causes Bleed Damage try this <property name="ApplyBuff" value=".35,.35" param1="arrowCriticalBleedout"/> tho it will keep shooting till they die so bleed is pretty much useless

* Fires Rockets not doable- the ammo type is basically for looks. you can change ammo to anything and damage stays the same

you can change the sound to this to make it sound like its firing rockets

 

<property name="Particles_muzzle_fire" value="rocketLauncherFire"/>

<property name="Particles_muzzle_smoke" value="nozzlesmoke_m136"/>

* No Block Damage

* Indestructible

* Dev block

In all likelihood, the reason the damage didn't change when you swapped ammo types would be because the turret has an EntityDamage property... If you eliminate that, then it should default to the EntityDamage property of the ammo it's using.

Link to comment
Share on other sites

  • 8 months later...
  • 3 months later...
In all likelihood, the reason the damage didn't change when you swapped ammo types would be because the turret has an EntityDamage property... If you eliminate that, then it should default to the EntityDamage property of the ammo it's using.

 

unfortunately it doesnt, it jsut does 0 damage

 

ive made 2 extra rounds, 9mm iron bullet (damage same as brass) and 9mm heavy (does min 100 damage), i can get the turrets to accept the rounds, but have no idea of changing the damage value, ive tried adding ",22,100" on the entity damage, but it doesnt like that "invalid input"

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...