acidbrain
9 years ago

How My Ai Philippines Build Buildings?

Originally Posted by: adrianemapmaker 


The same way as you build your CC.
Make the object, make the command button, add the command button to the dozer command set.

Originally Posted by: klingondragon 



I think that Adriane meant how the ai will build the buildings, commandcenter already is in the mod...
Adriane check out the EA scripts and look for the 'Base Building' scripts, the ai uses a buildlist which can be found in 'AIData.ini', looks like this, took USA as example...



SideInfo America
    ResourceGatherersEasy     = 2
    ResourceGatherersNormal   = 2
    ResourceGatherersHard     = 2   
    BaseDefenseStructure1     = AmericaPatriotBattery  ;PhilippinesGattlingCannon in your case

    ; You can change these to your own sciences if they are ready
    SkillSet1
      Science = SCIENCE_PaladinTank
      Science = SCIENCE_StealthFighter
      Science = SCIENCE_A10ThunderboltMissileStrike1
      Science = SCIENCE_A10ThunderboltMissileStrike2
      Science = SCIENCE_A10ThunderboltMissileStrike3
      Science = SCIENCE_SpectreGunshipSolo
      Science = SCIENCE_DaisyCutter
    End

    SkillSet2
      Science = SCIENCE_PaladinTank
      Science = SCIENCE_StealthFighter
      Science = SCIENCE_Pathfinder
      Science = SCIENCE_Paradrop1
      Science = SCIENCE_Paradrop2
      Science = SCIENCE_Paradrop3
      Science = SCIENCE_DaisyCutter
    End
  End

;Skirmish AI Build List
  SkirmishBuildList America
    Structure AmericaCommandCenter
      Location = X:501.22 Y:546.25
      Rebuilds = 0
      Angle = -135.00
      InitiallyBuilt = No
      AutomaticallyBuild = Yes
    END ;Structure AmericaCommandCenter
    Structure AmericaPowerPlant
      Location = X:770.43 Y:727.79
      Rebuilds = 0
      Angle = -45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaPowerPlant
    Structure AmericaPowerPlant
      Location = X:759.90 Y:555.84
      Rebuilds = 0
      Angle = -45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaPowerPlant
    Structure AmericaPowerPlant
      Location = X:374.82 Y:371.69
      Rebuilds = 0
      Angle = -45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaPowerPlant
    Structure AmericaPowerPlant
      Location = X:477.11 Y:174.62
      Rebuilds = 0
      Angle = -45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaPowerPlant
    Structure AmericaPowerPlant
      Location = X:189.19 Y:522.00
      Rebuilds = 0
      Angle = -45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaPowerPlant
    Structure AmericaPowerPlant
      Location = X:418.35 Y:827.10
      Rebuilds = 0
      Angle = -45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaPowerPlant
    Structure AmericaAirfield
      Location = X:767.04 Y:376.40
      Rebuilds = 0
      Angle = -135.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaAirfield
    Structure AmericaBarracks
      Location = X:247.52 Y:734.59
      Rebuilds = 0
      Angle = 45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaBarracks
    Structure AmericaParticleCannonUplink
      Location = X:594.59 Y:635.72
      Rebuilds = 0
      Angle = -45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaParticleCannonUplink
    Structure AmericaStrategyCenter
      Location = X:384.36 Y:652.24
      Rebuilds = 0
      Angle = 45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaStrategyCenter
    Structure AmericaSupplyDropZone
      Location = X:515.66 Y:347.88
      Rebuilds = 0
      Angle = 45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaSupplyDropZone
    Structure AmericaSupplyDropZone
      Location = X:637.41 Y:490.20
      Rebuilds = 0
      Angle = 45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaSupplyDropZone
    Structure AmericaSupplyDropZone
      Location = X:488.83 Y:760.27
      Rebuilds = 0
      Angle = 45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaSupplyDropZone
    Structure AmericaSupplyDropZone
      Location = X:322.39 Y:502.03
      Rebuilds = 0
      Angle = 45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaSupplyDropZone
    Structure AmericaWarFactory
      Location = X:650.93 Y:843.45
      Rebuilds = 0
      Angle = 45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaWarFactory
    Structure AmericaWarFactory
      Location = X:259.56 Y:289.71
      Rebuilds = 0
      Angle = -135.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaWarFactory
    Structure AmericaPatriotBattery
      Location = X:676.07 Y:670.51
      Rebuilds = 0
      Angle = 45.00
      InitiallyBuilt = No
      AutomaticallyBuild = No
    END ;Structure AmericaPatriotBattery
  END ;SkirmishBuildList FactionAmerica

It looks a bit overwhelming in the beginning but it isnt that hard to grasp, just play around with the coordinates and check what happens in game.
'Rebuilds = 0' means infinite rebuilds
'Initially Build = Yes' means that the building is already build at gamestart, the commandcenter for example.
I did a lot of testing with the buildlist coordinates and i think the ai uses a diagonal x-y cross with the reference point at the commandcenter/playerxstart waypoint so the cc is 0, 0.
It takes some time to learn it but it is worth the time.
There are multiple skillsets because the ai picks a random skillset list to work with, there is a script to make the ai use a skillset of choice.

Greetz
Panem et kirkinses
AdrianeMapMaker
9 years ago
Thanks , Guys.

But However i Noticed That My Ph Faction doesnt Use Any Music .. How to get rid out of this ?
What should i change?
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




acidbrain
9 years ago
If you want your faction to have music you have to create a skirmish folder for your faction, i think the gla music would fit the ph the best so you can just copy the music scripts from the gla to your ph folder...

I was full of sjit now i read it back, if you want music you have to add the music to the civilian folder, create a folder named 'PH Music' or something and copy/paste the scripts from 'GLA Music', rename the counters and timers to PH.
Panem et kirkinses
AdrianeMapMaker
9 years ago
What are You Talkin about Using Worldbuilder or the ini thingy?


; Just give Me an Example , Thanks In Advanceeeeeeeeeeeeeeeeeeeeeeeeee
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




acidbrain
9 years ago

What are You Talkin about Using Worldbuilder or the ini thingy?


; Just give Me an Example , Thanks In Advanceeeeeeeeeeeeeeeeeeeeeeeeee

Originally Posted by: adrianemapmaker 



Adriane, READ the scripts and READ the posts, there is and ini example in post #21, you can find that ini file in 'Data/INI/Default', it's called 'AIData.ini'...Good Luck
Panem et kirkinses
AdrianeMapMaker
9 years ago

If you want your faction to have music you have to create a skirmish folder for your faction, i think the gla music would fit the ph the best so you can just copy the music scripts from the gla to your ph folder...

I was full of sjit now i read it back, if you want music you have to add the music to the civilian folder, create a folder named 'PH Music' or something and copy/paste the scripts from 'GLA Music', rename the counters and timers to PH.

Originally Posted by: acidbrain 



Now I Have The Scripts For The WorldBuilder And I Notice Do I really Need To this At All of My Maps ,Export Import , Import And Import Again ; I am sure There's A way to get Rid out of this ?
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




acidbrain
9 years ago
Edit the EA skirmish scripts, you don't have to add them to all maps if you do that...
Panem et kirkinses