Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 3:09 pm
All times are UTC + 0
Determine type of something without looking at the list?
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Josh Is 25% Larger
Vehicle Drone


Joined: 17 Apr 2013

PostPosted: Tue Aug 30, 2016 12:33 pm    Post subject:  Determine type of something without looking at the list? Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Aug 30, 2016 1:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

what?

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Josh Is 25% Larger
Vehicle Drone


Joined: 17 Apr 2013

PostPosted: Tue Aug 30, 2016 2:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sorry for being unclear.

Lets have a look at the Rhino tank:

Code:
[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?

Back to top
View user's profile Send private message
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Tue Aug 30, 2016 2:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Josh Is 25% Larger
Vehicle Drone


Joined: 17 Apr 2013

PostPosted: Tue Aug 30, 2016 2:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
PillBox20
Commander


Joined: 28 Sep 2013
Location: Plovdiv, Bulgaria.

PostPosted: Tue Aug 30, 2016 3:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

The name, FOR SURE, can tell you what type of unit it is. Laughing

_________________
"If it ain't broke, don't fix it."
"If you are loyal to everybody, can you truly be loyal to anybody?"
Ares Documentation: http://ares-developers.github.io/Ares-docs/
My YouTube Channel: https://www.youtube.com/channel/UCtxeQoEM_iVd-F-xUIwleyQ
PillBox20's Red Alert 2 Mod: http://www.moddb.com/mods/pillbox20s-red-alert-2/downloads/pillbox20s-red-alert-2-version-02

Back to top
View user's profile Send private message Visit poster's website YouTube User URL Skype Account
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Tue Aug 30, 2016 3:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Chrono Vortex
Medic


Joined: 23 Nov 2015

PostPosted: Tue Aug 30, 2016 5:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

The armor is usually a sure-fire way to determine the type.

None, Flak, Plate - Infantry
Light, Medium, Heavy - Vehicles
Wood, Steel, Concrete - Buildings

_________________

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Tue Aug 30, 2016 9:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

This is putting the cart before the horse.
Something is a Vehicle is because it's under VehicleType list.

_________________

Back to top
View user's profile Send private message Skype Account
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Tue Aug 30, 2016 9:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

@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)

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed Aug 31, 2016 12:29 am    Post subject: Reply with quote  Mark this post and the followings unread

You don't need Ares to add new armor= types, 9 (really 11) is plenty for differentiation.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Wed Aug 31, 2016 6:02 am    Post subject: Reply with quote  Mark this post and the followings unread


_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
Josh Is 25% Larger
Vehicle Drone


Joined: 17 Apr 2013

PostPosted: Wed Aug 31, 2016 7:50 am    Post subject: Reply with quote  Mark this post and the followings unread

silverwind wrote:
@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.

Back to top
View user's profile Send private message
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Wed Aug 31, 2016 11:45 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
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.

Back to top
View user's profile Send private message
MustaphaTR
Scorpion Sniper


Joined: 22 Jan 2015
Location: Kastamonu, Turkey

PostPosted: Thu Sep 01, 2016 2:44 am    Post subject: Reply with quote  Mark this post and the followings unread

silverwind wrote:
G-E wrote:
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.

_________________
CnCD2K Mod: http://www.moddb.com/mods/red-alert-2-yuris-revenge-cncd2k-mod
Changed Dune Mod: http://www.moddb.com/mods/changed-dune
MustaphaTR's D2K Mod: http://www.moddb.com/mods/mustaphatrs-d2k-mod
Generals Alpha: http://www.moddb.com/mods/generals-alpha
Romanov's Vengeange: https://www.moddb.com/mods/romanovs-vengeance

Back to top
View user's profile Send private message
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Thu Sep 01, 2016 3:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

MustaphaTR wrote:
Spoiler (click here to read it):
silverwind wrote:
G-E wrote:
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.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.1728s ][ Queries: 11 (0.0085s) ][ Debug on ]