Getting access to start locations?

Getting access to start locations?

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Getting access to start locations?

Post by QMan »

Anyone know if there is there any way to access the start locations on the map or even the number of players in the game?

-QMan
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Use the TdfParser class to parse script.txt. For exact start psoitions you parse the map data file.

See OTAI and NTai source code.
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Cool, thanks!

-QMan
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

I found the CSunParser class in KAI & OTAI, who wrote that piece of code?

-QMan
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

SJ wrote it for spring, then veylon ported it voer to AIs, then tobi and jelmer tore it out and replaced it with TdfParser which is much better, then I ported TdfParser.

You'll find TdfParser in NTai and OTAI 1.14, CSunParser has a bgu in it that requires it to use kludges sucha s exception handling and generally allows much looser error prone TdfSyntax that TdfParser without giving any indication of an error or where it happened.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Andreas Pokorny tore it out, not jc or me.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

easy mistake to make
Post Reply

Return to “AI”