Posted: Tue Aug 30, 2016 12:33 pm Post subject:
Determine type of something without looking at the list?
Is it possible to determine the type of vehicle, infantry, aircraft or building by looking at a tag? For example, a tag may always present on a vehicle making it possible to identify it as a vehicle. QUICK_EDIT
Which list you're talking about?
Which tag do you mean?
What do you mean with "type of vehicle, infantry, aircraft or building"? For each exist only one type, a vehicle is a vehicle, nothing else.
Vehicles are listed in the VehicleTypes list, Infantry in the InfantryTypes list etc _________________ SHP Artist of Twisted Insurrection: Nod buildings
[HTNK]
UIName=Name:HTNK
Name=Rhino Heavy Tank
Prerequisite=NAWEAP
Primary=120mm
Strength=400
Category=AFV
Armor=heavy
Turret=yes
IsTilter=yes
TargetLaser=no
TooBigToFitUnderBridge=true
TechLevel=2
Sight=8
Speed=6
CrateGoodie=no
Crusher=yes
Owner=Russians,Confederation,Africans,Arabs
Cost=900
Soylent=900
Points=25
ROT=5
IsSelectableCombatant=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=GenSovVehicleSelect
VoiceMove=GenSovVehicleMove
VoiceAttack=GenSovVehicleAttackCommand
VoiceFeedback=
DieSound=GenVehicleDie
MoveSound=RhinoTankMoveStart
CrushSound=TankCrush
Maxdebris=3
;origional - Locomotor={55D141B8-DB94-11d1-AC98-006008055BB5}
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Destroyer
ThreatPosed=40 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
DamageSmokeOffset=100, 100, 275
Weight=3.5
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Accelerates=false
ZFudgeColumn=8
ZFudgeTunnel=13
Size=3
OpportunityFire=yes
ElitePrimary=120mmE
BuildTimeMultiplier=1.5;Individual control of build time
Is there any tag here that is unique to VehicleTypes? Is it possible to determine the type(i.e VehicleType) of this without looking it up in the VehicleTypes list? If so, is it always present? QUICK_EDIT
Nope. You can have extremely barebones sections for any type with multi-technotyoe flags, so there's no reliable way to see it.
Then again, if you're modding it, one would think you know which section refers to what. If you're just looking to copy from other people's files, I think you'd be deserving of more than the trouble that is a simple Ctrl+F > Enter.
P.S. you can just base it off the Prerequisite flag (where NAWEAP/NAYARD often means vehicle; GAAIRC without GAWEAP often means aircraft, and GAPILE/NAHAND often means infantry), but even that doesn't ALWAYS apply. QUICK_EDIT
Okey. I am not modding. I am writing a preprocessor which should guess the type and automatically add it to the correct list(and a bunch of other cool things). May have to scrap that idea now. QUICK_EDIT
If you could tell us exactly what you want to achieve with what you're writing, maybe we can help you come up with a walk-around to achieving it. QUICK_EDIT
@CV, light is also used by aircraft in the vanilla game.
Moreover, it's not an absolute rule that these armor be used as such. For instance, some people use plate armor on things like drones, to make them vulnerable to anti-infantry weapons, while also being stronger than regular infantry.
Furthermore, with Ares, many modders end up using a magnitude of additional armor types, all for various uses.
It's simply not a surefire method.
@Josh, if you intend to use it for your own mod, you can use your own custom unparsed/invalid flags (that the game doesn't parse) to identify different technotypes. But you'll have to put the flags in all necessary sections to begin with, so it's a lot of work.
Also, if you intend to auto-generate those lists, that WILL break something, like the AI, which references buildingtypes by list index (which would change if you auto-generate it) QUICK_EDIT
@Josh, if you intend to use it for your own mod, you can use your own custom unparsed/invalid flags (that the game doesn't parse) to identify different technotypes. But you'll have to put the flags in all necessary sections to begin with, so it's a lot of work.
Also, if you intend to auto-generate those lists, that WILL break something, like the AI, which references buildingtypes by list index (which would change if you auto-generate it)
Thanks, that valuable. I will have to scrap the idea of auto adding techotypes to their corresponding list then. QUICK_EDIT
You don't need Ares to add new armor= types, 9 (really 11) is plenty for differentiation.
It's usable (and often used) for much more than what armor types have traditionally been used for, especially if a mod has a large variety of new tech. Things like stealth aircraft, and actual submarines (who wouldn't be targetable by anything but ASW weapons under normal circumstances).
Not to mention the fact that new armor types is essentially Ares' version of additional immunities.
I would think that's enough reason to look for other ways to categorize sections. QUICK_EDIT
You don't need Ares to add new armor= types, 9 (really 11) is plenty for differentiation.
It's usable (and often used) for much more than what armor types have traditionally been used for, especially if a mod has a large variety of new tech. Things like stealth aircraft, and actual submarines (who wouldn't be targetable by anything but ASW weapons under normal circumstances).
You don't need Ares to add new armor= types, 9 (really 11) is plenty for differentiation.
It's usable (and often used) for much more than what armor types have traditionally been used for, especially if a mod has a large variety of new tech. Things like stealth aircraft, and actual submarines (who wouldn't be targetable by anything but ASW weapons under normal circumstances).
I'm pretty sure submarines has nothing to do with armor. Ability to attack subs (Underwater=yes) is given by NavalTargeting= tag. Projectile tag ASW= is obsolote, i think from RA1.
You're right. However, the actual behavior is that submarines could still be damaged and destroyed by conventional weapons that aren't meant to(cannons, rifles, etc.) if the user force-fires on them, which doesn't make any sense. Things like a tesla bolt shouldn't be able to damage a submerged submarine.
Custom armor types allowed this limitation to be walked around a bit, though admittedly, even that isn't a perfect solution due to another, less impractical problem. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum