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 6:18 am
All times are UTC + 0
Why i cant build AircraftTypes from Tech Airfield.
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
MustaphaTR
Scorpion Sniper


Joined: 22 Jan 2015
Location: Kastamonu, Turkey

PostPosted: Thu Feb 26, 2015 3:02 pm    Post subject:  Why i cant build AircraftTypes from Tech Airfield. Reply with quote  Mark this post and the followings unread

I'm adding Tech Planes for all sides. I added a dock to Tech Airfield. If i have Allied Airforce HQ or Soviet Airfield i can build This Tech Palnes or anyother plane from Tech Airport. But when Tech Airport is alone i can't build Tech Plane.

Yuri Plane; Others are same except their name and owners.
[YA10]
UIName=Name:YA10
Name=A-10
Prerequisite=CAAIRP,YRRADR
Primary=PlaneMinigun
CanPassiveAquire=no
CanRetaliate=no
Strength=150
Category=AirPower
Armor=light
TechLevel=3
Sight=8
RadarInvisible=no
Landable=yes
MoveToShroud=yes
Dock=GAAIRC,AMRADR,NAHELI,GEAIRC,KOAIRC,FRAIRC,BRAIRC,CAAIRP,GAAIRU
PipScale=Ammo
Speed=14
PitchSpeed=1.1
PitchAngle=0
OmniFire=no ;yes
Owner=YuriCountry
Cost=1200
Points=20
ROT=3
Ammo=4
Crewed=yes
ConsideredAircraft=yes
AirportBound=yes ; If I ever need to land and there are no airports I crash because I can only land on them
GuardRange=30
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
Maxdebris=3
IsSelectableCombatant=yes
VoiceSelect=IntruderSelect
VoiceMove=IntruderMove
VoiceAttack=IntruderAttackCommand
VoiceCrashing=IntruderVoiceDie
DieSound=
MoveSound=IntruderMoveLoop
CrashingSound=IntruderDie
ImpactLandSound=GenAircraftCrash
Locomotor={4A582746-9839-11d1-B709-00A024DDAFD1}
MovementZone=Fly
ThreatPosed=20 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
AuxSound1=IntruderTakeOff
AuxSound2=IntruderLanding
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=STRONGER,FIREPOWER,ROF
Fighter=yes
AllowedToStartInMultiplayer=no
ImmuneToPsionics=yes
ElitePrimary=PlaneMinigunE
PreventAttackMove=yes
PipWrap=2

Rules;
[CAAIRP]
UIName=Name:CAAIRP
Name=Tech Airport
TechLevel=-1
Strength=800
Insignificant=yes
Nominal=yes
Sight=6
Points=5
Armor=concrete
Bib=yes
NumberOfDocks=1
;Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
;MaxDebris=15
;MinDebris=5
;DebrisAnim=Dbris1sm,Dbris1lg,Dbris4sm,Dbris5sm,Dbris4lg,Dbris7sm,Dbris8sm,Dbris5lg,Dbris4lg
DamageParticleSystems=SmallGreySSys,BigGreySmokeSys
Capturable=yes
CaptureEvaEvent= EVA_AirfieldCaptured  ;Eva (and therefore 3way split) voice to use when captured
NeedsEngineer=yes
Unsellable=yes
Radar=yes
SuperWeapon=ParaDropSpecial
RadarVisible=yes;gs put on radar even if insignificant and unowned (insignificant and owned is a UC building)
BaseNormal=no
Factory=AircraftType
Helipad=yes
UnitReload=yes
Rubble.Destroyed=CAAIRPR
Rubble.Destroyed.Owner=special
Upgrades=1

Art;
[CAAIRP]
Normalized=yes
Remapable=no
Foundation=3x3
Height=6
;Buildup=CAAIRPMK
NewTheater=yes
DemandLoad=true
ActiveAnim=CAAIRP_A
ActiveAnimZAdjust=5
ActiveAnimDamaged=CAAIRP_AD
ActiveAnimTwo=CAAIRP_F
ActiveAnimTwoZAdjust=-100
ActiveAnimTwoYSort=362
ActiveAnimTwoPowered=no
DamageFireOffset0=-3,5
DamageFireOffset1=-65,32
BibShape=CAAIRPBB
DockingOffset0=192,192,0
Flat=yes

I'm also getting this on debug.log
[Developer error][NCO Bug detected] House MustaphaTR meets all requirements to build YA10, but doesn't have a suitable factory!

_________________
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
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Feb 26, 2015 3:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

[YA10]
Prerequisite=CAAIRP,YRRADR

This means you need CAAIRP AND YRRADR to build the plane.
So CAAIRP alone does not give you needed prerequisites to build it.

[YA10] has Owner=YuriCountry, but CAAIRP has no Owner= key, thus falls back to Owner=Neutral or Civilian (not sure what it uses in RA2 when undefined)
So when you capture it, you have the factory from a different house. This house has no units on its own, thus you can't build any.

It's like capturing an Allies warfactory as a Soviet player. You can then also build only Allies tanks from it and no Soviet tanks.
Imagine you have no tanks with Owner=Allies. As a Soviet, that captured factory isn't giving you anything new.

To fix it, you could give the unit and the tech factory a custom house that both use.


I don't have much RA2 modding experience but you could give
Prerequisite=DUMMY ;some civil building, so you normally can't build it
PrerequisiteOverride=CAAIRP ;when you get the tech building, you can build the unit
on YA10 a try.
Might be a faster and easier way for you to code that.

Last edited by Lin Kuei Ominae on Thu Feb 26, 2015 3:16 pm; edited 1 time in total

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


Joined: 20 May 2013
Location: Indonesia

PostPosted: Thu Feb 26, 2015 3:15 pm    Post subject: Re: Why i cant build AircraftTypes from Tech Airfield. Reply with quote  Mark this post and the followings unread

This is mine...
Code:
[CAAIRP]
UIName=Name:CAAIRP
Name=Tech Airfield
TechLevel=-1
Strength=850
Insignificant=yes
Nominal=yes
Sight=8
Points=10
Armor=concrete
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=15
MinDebris=5
DebrisAnims=Dbris1sm,Dbris1lg,Dbris4sm,Dbris5sm,Dbris4lg,Dbris7sm,Dbris8sm,Dbris5lg,Dbris4lg
DamageParticleSystems=SmallGreySSys,BigGreySmokeSys
Capturable=yes
CaptureEvaEvent= EVA_AirfieldCaptured
NeedsEngineer=yes
Unsellable=yes
Ammo=5
SuperWeapon=ParaDropSpecial
LeaveRubble=no
RadarVisible=yes
IsBase=no
BaseNormal=no
NumberOfDocks=2
UnitReload=yes
Helipad=yes
Factory=AircraftType

Try to compare it with yours, maybe you were doing mistakes

_________________
Quote:
Humans were born for two things: to pray and be productive.


Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Thu Feb 26, 2015 3:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

LKO is almost right. He's completely right about the cause of the bug. However, his advice is wrong. PrerequisteOverride is bad and should not be used seriously. It cannot fix owner-house based NCO bugs at all and usually leads to a bad coding scheme. (In this scenario, if that DUMMY wouldn't have the proper owners, nothing would change regarding the NCO bug - it'd still be there.)

The sole thing you need to do to fix that bug is to list all houses at CAAIRP's Owner and the issue is fixed.

Owner isn't used as a limiter at prerequisites logic anymore (compared to TS, where Owner was a bit more complex)... RA2 added RequiredHouses and ForbiddenHouses for such - I made FactoryOwners in Ares to reimitate the TS behaviour and even that isn't a 1:1 replication neither.

RA2 only uses Owner at units for checking them with buildings and for giving out starting units, you can safely have all playable countries at all nonstarting units. It does use Owner on buildings for the AI base plan generation.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
MustaphaTR
Scorpion Sniper


Joined: 22 Jan 2015
Location: Kastamonu, Turkey

PostPosted: Thu Feb 26, 2015 5:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

Adding owner= solves problem. Thanks.

_________________
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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 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.2166s ][ Queries: 11 (0.0072s) ][ Debug on ]