[A10] Project Armory (v.3.00)

Started by Evul, February 05, 2014, 02:24:54 PM

Previous topic - Next topic

Evul

Quote from: Tynan on February 07, 2014, 01:44:25 PM
Man, there are gonna be so many guns in the game by this time next month....

Awesome :)

In case you want to get a head start on the format, here's an xml template. This data has a global parent for use with all guns, as well as the pistol's bullet and gun data. I hope it's mostly self-explanatory.

<?xml version="1.0" encoding="utf-8" ?>
<Buildings>


<ThingDefinition Name="GunBase" Abstract="True">
<category>Item</category>
<eType>Equipment</eType>
<thingClass>Equipment</thingClass>
<label>Gun</label>
<equipmentType>Primary</equipmentType>
<isGun>True</isGun>
<pathCost>10</pathCost>
<useStandardHealth>True</useStandardHealth>
<selectable>True</selectable>
<maxHealth>100</maxHealth>
<altitudeLayer>Item</altitudeLayer>
<alwaysHaulable>True</alwaysHaulable>
<tickerType>Never</tickerType>
<storeCategories>
<Item>Weapons</Item>
</storeCategories>
<compSetupList>
<Item>Forbiddable</Item>
</compSetupList>
</ThingDefinition>

<ThingDefinition Name="BulletBase" Abstract="True">
<category>Projectile</category>
<tickerType>Normal</tickerType>
<altitudeLayer>Projectile</altitudeLayer>
<thingClass>Bullet</thingClass>
<label>Bullet</label>
<useStandardHealth>False</useStandardHealth>
<neverMultiSelect>True</neverMultiSelect>
<baseMaterialType>Transparent</baseMaterialType>
</ThingDefinition>

<!-- ============================================================== -->

<ThingDefinition ParentName="BulletBase">
<defName>Bullet_Pistol</defName>
<label>Pistol bullet</label>
<texturePath>Things/Projectile/Bullet_Small</texturePath>
<projectile>
<impactWorld>True</impactWorld>
<damageType>Bullet</damageType>
<DamageAmountBase>10</DamageAmountBase>
<Speed>55</Speed>
</projectile>
</ThingDefinition>


<ThingDefinition ParentName="GunBase">
<defName>Gun_Pistol</defName>
<label>Pistol</label>
<description>Ancient pattern automatic pistol. Weak and short range, but quick.</description>
<texturePath>Things/Item/Equipment/Pistol</texturePath>
<interactSound>InteractPistol</interactSound>
<purchasable>True</purchasable>
<basePrice>60</basePrice>
<verb>
<verbClass>Verb_Shoot</verbClass>
<cooldownTicks>30</cooldownTicks>
<hasStandardCommand>True</hasStandardCommand>
<canMiss>True</canMiss>
<projectileDef>Bullet_Pistol</projectileDef>
<accuracy>4</accuracy>
<warmupTicks>68</warmupTicks>
<range>24</range>
<fireSound>ShotPistol</fireSound>
<targetParams>
<canTargetPawns>True</canTargetPawns>
<canTargetBuildings>True</canTargetBuildings>
<worldObjectTargetsMustBeAutoAttackable>True</worldObjectTargetsMustBeAutoAttackable>
</targetParams>
</verb>
</ThingDefinition>

<!-- ============================================================== -->

</Buildings>


Sweet!
This will definitely speed up the weapon production! :D

Tynan

Let's keep it to the thread.

The ParentName attribute means that the item takes all the properties of the thing with that ParentName (before applying its own). Since all guns share many of the same properties, you'll want to use ParentName=GunBase for all your guns. This concept is called inheritance; you'll want to look it up.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Evul

True, your right!
So for exsample heres the values for the FN P90, the gun inherench the BulletBase, witch also inherench the Projectile shown in the code above. I'm i correct?
Is this a correct way of adding a gun? :)

<ThingDefinition ParentName="BulletBase">
<defName>Bullet_FNP90</defName>
<label>FN P90 bullet</label>
<texturePath>Things/Projectile/Bullet_Small</texturePath>
<projectile>
<impactWorld>True</impactWorld>
<damageType>Bullet</damageType>
<DamageAmountBase>5</DamageAmountBase>
<Speed>55</Speed>
</projectile>
</ThingDefinition>


<ThingDefinition ParentName="GunBase">
<defName>Gun_FNP90</defName>
<label>FN P90</label>
<description>A old day weapon used by special forces. It's quick and have high stopping power.</description>
<texturePath>Things/Item/Equipment/Weapon_FNP90</texturePath>
<interactSound>InteractPistol</interactSound>
<purchasable>True</purchasable>
<basePrice>60</basePrice>
<verb>
<verbClass>Verb_Shoot</verbClass>
<cooldownTicks>30</cooldownTicks> <!-- need to time it closer -->
<hasStandardCommand>True</hasStandardCommand>
<canMiss>True</canMiss>
<projectileDef>Bullet_FNP90</projectileDef>
<accuracy>6</accuracy>
<warmupTicks>100</warmupTicks> <!-- need to time it closer -->
<range>34</range>
<fireSound>ShotUZI</fireSound> <!-- need to confirm -->
<targetParams>
<canTargetPawns>True</canTargetPawns>
<canTargetBuildings>True</canTargetBuildings>
<worldObjectTargetsMustBeAutoAttackable>True</worldObjectTargetsMustBeAutoAttackable>
</targetParams>
</verb>
</ThingDefinition>


Tynan

I think that would run.

Also bear in mind you'll be able to make your own gunshot sounds and bullet graphics.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Evul

Awesome!
Sounds and bullets will be a side project. :)
Many thx for the sneak peek of the weapon XML! :D

Evul

@Cala13er
Any luck with your guns?

TimMartland

May I suggest creating an AS VAL assault rifle, G18 automatic handgun, RPG and Mosin 1891.
And maybe a DBS
'Two possibilities exist: Either we are alone in the Universe, or we are not. Both are equally terrifying'
-Arthur C. Clarke'
'Needs moar boosters!'
-Jebadiah Kerman

Evul

#22
Yes you may :)
Will make the weapon when i find a good pic and get inspiration for it. :)

Liquidsonic

Cool project. Since you're taking suggestions, a gun I would really like to suggest is the FN FAL rifle. Thanks in advance.

[attachment deleted by admin: too old]

Evul

#24

Name FN FAL
Class Rifle
Damage 8
Range 36
Accuracy 5
Mode burst(3)
Burst Speed 7
Handling +
Warmup/Cooldown 108/0
Buy 1700 $
Sell ? $
Aim time (sec.) 1,8
DPS 13,3

Galileus

I've always used this site for reference when modelling guns and doing research. There are some awesome weapons people rarely know and that fit beautifully into more sci-fi setting with a bit of retouch. Some notable things to look at:


OTs 14 Groza - XM-29 SABR / OICW - XM8 - FN F2000 - HK G36 - KH G11 - QBS-06 - FX-05 - TRW LMR - CR-21 - K11 - XM25 - USAS-12 - M6 - Jackhammer

Evul

Sweet! I will save the page for future reference! :)
Also the weapon list, I've seen them before but now i know the name for them, and can make them :P

Galileus

Hah, world guns is really an awesome source, quite a few times browsing it I've found guns I've seen before, but never knew what they were ;)

If I can propose something, I would aim to find examples and fill in some areas:

Pistols - I would see them covering two types ("normal" and "strong") over 3 or 4 tiers. With your revolver I believe you have same kind of approach. Normal type could start off with some basic revolver and end up on 1911's or other Smith and Wesson. And no-one said there needs to be only one weapon of said type per tier if you end up with too many candidates, as you will :P Strong type is obviously slow and lower on accuracy, and going to end up on Deagle... unless you actually have taste ;)

SMGs - I would love to see these as a short-range assault riffles. Pretty impossible to do right now as far as I know - but maybe Tynan will read this post ;) What I'm talking about is accuracy and power falloff - basically SMGs should be more powerful than adequate AR at short range, pretty comparable at medium ranges and less accurate and less powerful at long ranges (while still being able to shoot quite far). As for families, with SMGs I would think every model is "normal" except for one example of "exceptional" in each tier. Basically, all SMG work on the same basis EXCEPT for one at every tier - for example P90 at tier 4 would excel at accuracy and speed at short ranges way more than other tier4 smg's, but at the same time suffer larger long-range penalties.

Assault Rifles - what I would love to see here would be differentiation between designated marksman rifles (ar-10, G3) and full-auto rifles (m4, m16). First group would have longer range, while second - longer bursts. These are obviously the same weapons - you can convert your M4, M16, G3 or any modern AR to be DMR, but this is not covered by the game. Thus - differentiation. DMRs are a compromise between sniper rifles and ARs - they do short bursts, are faster, but suffer lower range and damage than "real" sniper rifles.

Machine guns - I want them :3 And all over the place. All inaccurate, all low damage, some more, some less. Trading how much they suck at accuracy and damage for different stats in range and speed of reload between bursts.

Sniper rifles - aside existing "high accuracy, high damage, your colonists will miss every frellin time anyway" rifles, I would love to see some DRM high-end conversions. Pinging rifles - equipped with huge magazines of considerably smaller bullets. G36 is one that can be converted as such - into a rifle that deals rather low damage, but shoots much faster and is much more accurate than sniper rifle.

Consider these as "open thoughts" - use any of that if you want, if not... I'll do it if I find time :)

Evul

#28
interesting thoughts :)
one thought i had now when i have the code is make all weapons caliber dependent meaning that all the a caliber do the same damage. Meaning if you get your hands on a 9mm weapon it will always do X damage with it. But the weapon may differ in firing rate, accuracy and range. (bullet speed is not effected. Cause its determine by the bullet)
or have different damage depending on weapon. Have not decided yet.
At the moment weapons have different values depending on the nature of the weapon and i change it a little now and then.

A thought i have for HMGs is to have a long slow burst(auto fire) 10-20 bullets low accuracy and longer recovery time. Damage depending on caliber. .50cal is deadly for exsampel but the person firing it cant hit for  shit.

Edit:
Exsample of caliber based damage system:
<ThingDefinition ParentName="BulletBase">
<defName>Bullet_9mm</defName>
<label>9mmm bullet</label>
<texturePath>Things/Projectile/Bullet_Small</texturePath>
<projectile>
<impactWorld>True</impactWorld>
<damageType>Bullet</damageType>
<DamageAmountBase>6</DamageAmountBase>
<Speed>55</Speed>
</projectile>
</ThingDefinition>

Galileus

I think we are up to something here.

First though you get with "damage per ammo" is "why?". Well, from logics standpoint it's fine, but from game design? You just throw away one of the variables out of the window, and this means harder balancing. But does it really? With as many variables as firearms present, it really does not... You have range, accuracy, speed, burst... maybe even reload in future (global increase in speed, but reload (meaning cover and wait) every X bursts shot). This does sound tempting, and allows for dropping of some variables which is really, REALLY good. With variable damage, player needs to check damage for each weapon - with damage based on caliber, it's always categorized in much neater fashion. And in the end effective DPS is dependent on accuracy and speed anyway - so balance wise it's the same. Really like this idea.

Now, the only problem I have here is the range variable. This is why I though of non-linear effectiveness falloff in the first place. Range is - IMHO - a rather shoddy variable to have. Especially with dmg per caliber, it could end up producing some "best of all" weapons - like M24/M16 flank combo right now (that annihilates anything). Range is more or less pre-determined - rifles will have bigger range, pistols lower and so on. This leaves a little room for improvement - you have speed and accuracy, and these can be more or less pre-determined as well. Now, variable effectiveness curve fixes that more or less - because range stops being this linear variable. Most of the time range wouldn't change all that much, BUT - example given earlier - AR with the same stats as SMG will still outrank SMG on long range while SMG will outrank AR on short range. It's simple scaling - ARs get 100% of their effectiveness in mid-long range, while SMGs do in short-mid range. While stats are the same, both weapons work differently. In-game it can be simply represented by "personal, short, mid, long, sniper" range indicator (or gradient), where it shows you green, yellow, red and black (unavailable) for different efficiency at different ranges. This gives amazing ability to differentiate weapons while keeping them in line. AI also would be easy to fix to it - because it would seek optimal range, more or less what it does now.

The only question remaining is how long till mod system is powerful enough to support it :P