Posted: Sat Jun 23, 2007 2:44 pm Post subject:
Errors when adding a new harvester for Yuri
Hello,
I don't know if anyone still plays Yuri's Revenge, but I've started modding again recently and I've ran into a bug that I cannot seem to figure out what it causes.
I've added a Yuri Ore Refinery to the game and a hoverminer, I improved the Slave Miner and increased it's cost and prerequisites (I made it non-buildable for the buildings tab, the only way to make one is with a War Factory. The prerequisites are now YAWEAP and YATECH).
Now everything works fine for me but whenever I set Yuri as an opponent it gives me an internal error. My guess is that there is an AI trigger missing (I read something like that on ModEnc). However, I tried messing with the AImd.ini (replacing all instances of SMIN with YAMIN, my new miner) but that didn't do the trick. Then I set the buildlimit of both SMIN and YAREFN (the deployed version of the SMIN, not my new refinery) to -1. The error disappeared, however now the AI somehow manages to build a SMIN anyway, and can't build any advanced buildings (since I changed the prerequisites for all buildings to my new refinery). I checked all the PROC stuff and the harvester stuff (taken GAREFN as an example in order to build my new refinery), and I can't figure out how to make it work like I want. I can post codes but there is so much I don't know what is necessary.
Can somebody help me out? I just want to have the enemy build my new refinery and doesn't build a SMIN until later in the game. Sorry if my post was too long and confusing.
Thanks. QUICK_EDIT
; Yuri New Ore Refinery
[YARIREFN]
UIName=Name:YARIREFN
Name=Yuri Ore Refinery
BuildCat=Resource
DockUnload=yes
Refinery=yes
;//gs revertNumberOfWaitingPoints=8
NumberOfDocks=1
Bib=yes
Prerequisite=POWER,YACNST
Strength=1000
Adjacent=2
Armor=wood
TechLevel=1
FreeUnit=YAMIN
Sight=6
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,Arabs,YuriCountry
AIBasePlanningSide=0 ;gs 0 for Good, 1 for Evil
Cost=2000
Soylent=300
Points=80
Power=-50
Storage=200
Capturable=true
Crewed=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
HalfDamageSmokeLocation1=0,0,0
DebrisAnims=DBRIS1LG,DBRIS1SM,DBRIS4LG,DBRIS4SM,DBRIS5LG,DBRIS5SM
MaxDebris=10
MinDebris=5
PipScale=Tiberium
ThreatPosed=0 ; This value MUST be 0 for all building addons
;DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys
DamageSmokeOffset=410, 100, 165
AIBuildThis=yes
TogglePower=no
RefinerySmokeOffsetOne=-92, -208, 312
RefinerySmokeOffsetTwo=-92, 208, 312
RefinerySmokeFrames=50
RefinerySmokeParticleSystem=SmallGreySSys;
Spyable=yes
;WantsExtraSpace=yes ; gs This will look for a space AIBaseSpacing+1 when the computer places, but will settle for AIBasSpacing
NumberImpassableRows=3 ; This is the fix to the Repair depots are flat and RadioContact/Enter means I can drive on you assumption. It counts from game west
ImmuneToPsionics=no ; defaults to yes for buildings, no for others
ResourceDestination=yes;gs for the AI to handle the slave miner, it has to understand what makes money
Drainable=yes
The new miner:
; Yuri harvester
[YAMIN]
UIName=Name:YAMIN
Name=All-Terrain Miner
Prerequisite=YAWEAP,PROC
Nominal=yes
ToProtect=yes
Category=Support
Strength=1000
Armor=medium
;Dock=PROC ; Need both in case a building from the other team is captured.
Dock=NAREFN,GAREFN,YARIREFN
Harvester=yes
TechLevel=1
Sight=4
Speed=4
Owner=YuriCountry
AllowedToStartInMultiplayer=no
PipScale=Tiberium
CrateGoodie=yes
Storage=40
Cost=1400
Soylent=1400
Points=55
ROT=5
Crusher=yes
AutoCrush=yes
Crewed=no
SelfHealing=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=AllTerrainMinerSelect
VoiceMove=AllTerrainMinerMove
VoiceAttack=AllTerrainMinerMove
VoiceEnter=AllTerrainMinerMove
VoiceHarvest=AllTerrainMinerMove
DieSound=GenVehicleDie
MoveSound=YuriPrimeMoveLoop
CrushSound=TankCrush
MaxDebris=6
DebrisTypes=TIRE
DebrisMaximums=4
SpeedType=Hover
Locomotor={4A582742-9839-11d1-B709-00A024DDAFD1}
MovementZone=AmphibiousCrusher
Weight=3.5
ThreatPosed=0 ; This value MUST be 0 for all building addons
ThreatAvoidanceCoefficient=.65
DamageParticleSystems=SparkSys,SmallGreySSys
ImmuneToVeins=yes
ImmuneToPsionics=yes
ImmuneToRadiation=yes
ZFudgeColumn=9
ZFudgeTunnel=14
ZFudgeBridge=7
Size=3
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
ResourceGatherer=yes;gs for the AI to handle the slave miner, it has to understand what makes money
Bunkerable=no; Units default to yes, others default to no
The SMIN:
; harvester
[SMIN]
UIName=Name:SMIN
Name=Slave Miner
Prerequisite=YAWEAP,YATECH
Nominal=yes
ToProtect=yes
Category=Support
Strength=2500
Armor=medium
Primary=20mmRapid
ElitePrimary=20mmRapidE
Turret=yes
OpportunityFire=yes
TechLevel=-1
Sight=6
Speed=4
Owner=YuriCountry
AllowedToStartInMultiplayer=no
CrateGoodie=yes
Storage=40
Cost=2200
Soylent=2200
Points=55
ROT=5
Crusher=yes
Crewed=no
SelfHealing=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=SlaveMinerSelect
VoiceMove=SlaveMinerMove
VoiceAttack=SlaveMinerAttackCommand
VoiceHarvest=SlaveMinerHarvest
DieSound=GenVehicleDie
MoveSound=SlaveMinerMoveStart
CrushSound=TankCrush
DeploySound=SlaveMinerDeploy
VoiceDeploy=SlaveMinerDeployVoice
MaxDebris=6
DebrisTypes=TIRE
DebrisMaximums=4
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1} ;drive locomotor
Weight=3.5
MovementZone=Crusher
ThreatPosed=0 ; This value MUST be 0 for all building addons
ThreatAvoidanceCoefficient=.65
DamageParticleSystems=SparkSys,SmallGreySSys
ImmuneToVeins=yes
ImmuneToPsionics=yes
ImmuneToRadiation=yes
ZFudgeColumn=9
ZFudgeTunnel=14
ZFudgeBridge=7
Size=3
StupidHunt=yes ;this guy can't handle a hunt command, so he should just run towards the player
Trainable=yes
DeploysInto=YAREFN
DeployFacing=0;0 = N, 7 = NW
Enslaves=SLAV;gs The Refinery does not get an Enslaves listing because the Slave object will get passed from unit to building upon deploy
SlavesNumber=10
SlaveRegenRate=300
SlaveReloadRate=15
;moving brain to refinery to start
;Ugh. Now that placed as building, problem arises from managing to get a SMIN as vehicle (Campaign map, crate). Both get this listing now, and Brain transplant will check to make sure extra one is not created
ResourceGatherer=yes;gs for the AI to handle the slave miner, it has to understand what makes money
ResourceDestination=yes
DeaccelerationFactor=.2 ; This is TS's mizspelingg knot min
Accelerates=false
Bunkerable=no; Units default to yes, others default to no
OmniCrushResistant=yes; so Crusher can crush Crushable, OmniCrusher trumps Crushable=no, and then OmniCrushResistant trumps OmniCrusher
Parasiteable=no
Unsellable=yes
BuildTimeMultiplier=0.8
The YAREFN (Yuri's old refinery):
; Yuri Ore Refinery ;slave miner building
[YAREFN]
UIName=Name:SMIN
Name=Yuri Ore Refinery
BuildCat=Resource
;Bib=yes
Prerequisite=POWER,YACNST
Strength=2500
Adjacent=2
Armor=medium
Primary=20mmRapid
ElitePrimary=20mmRapidE
Turret=yes
TurretAnim=SMINTUR
TurretAnimIsVoxel=true
TurretAnimX=-25
TurretAnimY=15
TurretAnimZAdjust=-50
TechLevel=-1
Sight=6
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,Arabs,YuriCountry
AIBasePlanningSide=2 ;gs 0 for Good, 1 for Evil
Cost=2200
Soylent=2200
Points=100
Power=0;-50
Storage=400
Capturable=false;gs true
;Crewed=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
HalfDamageSmokeLocation1=0,0,0
DebrisAnims=DBRIS1LG,DBRIS1SM,DBRIS4LG,DBRIS4SM,DBRIS5LG,DBRIS5SM
MaxDebris=10
MinDebris=5
PipScale=Tiberium
ThreatPosed=0 ; This value MUST be 0 for all building addons
;DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys
DamageSmokeOffset=410, 100, 165
AIBuildThis=no
TogglePower=no
RefinerySmokeOffsetOne=-85,-85,220
RefinerySmokeOffsetTwo=-85,90,220
RefinerySmokeOffsetThree=95,-85,220
RefinerySmokeOffsetFour=95,90,220
RefinerySmokeFrames=30
RefinerySmokeParticleSystem=SmallGreySSys;
Enslaves=SLAV;gs The SMIN does not get an Enslaves listing because the Slave object will get passed from unit to building upon deploy
SlavesNumber=10
SlaveRegenRate=300
SlaveReloadRate=15
;moving brain to refinery to start
;Ugh. Now that placed as building, problem arises from managing to get a SMIN as vehicle (Campaign map, crate). Both get this listing now, and Brain transplant will check to make sure extra one is not created
Spyable=yes
;NumberImpassableRows=3 ; This is the fix to the Repair depots are flat and RadioContact/Enter means I can drive on you assumption. It counts from game west
ImmuneToPsionics=yes ; defaults to yes for buildings, no for others
BaseNormal=no
UndeploysInto=SMIN
ClickRepairable=no
DeployFacing=0;0 = N, 7 = NW
ResourceGatherer=yes;gs for the AI to handle the slave miner, it has to understand what makes money
ResourceDestination=yes
VoiceSelect=SlaveMinerSelect
VoiceMove=SlaveMinerMove
VoiceAttack=SlaveMinerAttackCommand
VoiceHarvest=SlaveMinerHarvest
DeploySound=SlaveMinerUndeploy
VoiceDeploy=SlaveMinerUnDeployVoice
Unsellable=yes
Trainable=yes
BuildTimeMultiplier=1.15 QUICK_EDIT
There's a whole section in the rules that deals with what AI builds, and in what order. Search for references to SMIN/YAREFN, and correct them as necessary, like you apparently did in ai.ini.
(AI can build TechLevel=-1 stuff just fine, use =11 instead.) 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