Author Topic: Crs1  (Read 3803 times)

Offline Eddy-B

  • Moderator
  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Crs1
« on: January 06, 2007, 05:08:28 PM »
CRS1  (Colony Renegades Starship 1)

Currently programming for this colony game is in progress.
The current verson of the colony is a LoS type. I am thinking about changing it entirely to CRL1.

Below is my progress of the AI, and some issues that need to be addressed might also be included.  Feel free to comment.


----------------------------------------------------------------------------

The AI has a fixed research and building order, just like the default AI systems of OP2. There's 1 exception: the location where buildings are placed IS randomized. The AI has a list of predetermined locations, at which it can place structures. The items in this list state the maximum size of a building spot, so the AI can find a suitable location, since it "knows" the size of the building it wants to deploy.

At certain times it will wait for a research to be done, before continueing with building instructions. For example: the first GP has to wait until MicroWave or Laser has been discovered (for obvious reasons). This ensures that the AI can always build the structure.

Currently, the AI is set to what is called "AI mode" in Outpost2. This means, that morale has been deactivated, and the AI has 4096 workers, 4096 scientists and 256 children. It has the ability to construct any and all kinds of units at the factories, no matter if the required tech has been researched or not.
However, my AI code puts a limit on the number of scientists it uses for research, deducting scientists whenever the nursery and/or university are operational. The number of scientists slowly decreases as long there is no university. Once a university is active, the AI will ad 1 scientist after each second technology has been researched.
Likewise: there are checks to determine if the AI has researched the required technologies, before building any units, making sure all is fair.

Power and ore have no specific "AI mode" settings, which means if there is a power shortage, there will be buildings idled. Currently, there is no code in place to detect power shortages, but the AI does have code to repair damaged buildings, and it will replace lost buildings either due to disaster or by enemy forces.
Same goes for ore: if there is not enough ore available, it cannot construct units. Walls are contructed whenever there is enough ore to spare. Currently the treshold is at 8000 common ore. Whenever there is enough ore, the AI will build a wall section. These sections should be kept rather small, a dozen tiles at most to reserve as much ore as possible, but still building the walls. After each research is done, the AI will check the ore balance and will build a new section of wall, even if the previous one isn't finished yet.

Whenever the AI orders a building to be recorded (=placed into the building list for construction), it will check to see if the location has tube access. If it doesn't an earthworker will be sent to build a tube. Currently all tubes are predetermined. In later versions, the AI will try to make the shortest possible tube connection.

Every 5 time marks, the AI will check all buildings (except GPs) for damage. If a damaged building is found, the closest idle convec is located and sent to repair it. Currently the AI will only repair 1 building at any given time. If a structure kit is ready, any convec that is repairing a building can be interrupted to pick up the kit and start constructing the building. The repair will have to wait till a later time, when there is another convec idle. GuardPosts are not repaired, due to explosion danger.
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline instigator

  • Jr. Member
  • **
  • Posts: 89
Crs1
« Reply #1 on: January 06, 2007, 09:43:13 PM »
cool stuff! hmm.... spiders are cheaper so they could repair GP. Eden has the repair vehicle so that could repair GPs too. Convec cost more ore

Offline Eddy-B

  • Moderator
  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Crs1
« Reply #2 on: January 07, 2007, 06:05:07 AM »
i thought about repair vehicles for eden, but i didn't put them in yet.
Spiders: they are cheaper, but as i recall they can only do 50% repair.

Spiders are included into the AI at the moment for offense, and i have sent them on attack runs together with EMP vehicles, but i have yet to see them take over an enemy vehicle: there's just too much hostile fire to get it done in time. Also, i found that when you include regular tanks in the attack run (like microwave or RPG), they keep firing at the disabled units and destroy them before any spider can 'convert' them. I will have to look into this. I have been looking for an Eden mission in the original set to see how the Dynamix coders have those spiders work correctly, and i have found 1 yesterday: the Eden colony game (starship): it contains spiders, and they successfully taken over a few of my units.

I've run into some odd bugs in Outpost 2.
Normally, when a convec wants to build something on a spot that is occupied by a friendly unit, the unit will move aside, so the convec can do its work. For a couple times now, i found a convec that was unable to build something, because there was a unit that just wouldn't move! I have no clue how this could happen, but i now have built in a strategy that will help the convecs out. It is impossible to monitor each and every unit to see if it may be placed in a building spot, so i have them move around the base every few marks. That way, if there's a problem, all the convec has to do it wait a few seconds, and it can build (at least that's the theory).
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline Sl0vi

  • Sr. Member
  • ****
  • Posts: 464
Crs1
« Reply #3 on: January 07, 2007, 07:40:00 PM »
Spiders and Repair vehicles can only repair other vehicles up to 50% They can repair buildings up to 100%
!!!YAY!!!

Offline Eddy-B

  • Moderator
  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Crs1
« Reply #4 on: January 08, 2007, 08:22:40 AM »
Then its worth looking into.
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz