How to edit the english.dat file?

Have modding questions or discovered something new? Post here.
User avatar
{RaheeXF}
Map Maker
Map Maker
Posts: 171
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: How to edit the english.dat file?

Post by {RaheeXF} »

Tommy, Tommy, the AI is just making the units of the base_army_orderers.cfg not my units! Please take a look at this if you want. Thanks.
Attachments
Ant Friendship.rar
Fu**ing AI
(84.2 KiB) Downloaded 393 times
Ant Friendship.rar
Fu**ing AI
(84.2 KiB) Downloaded 393 times
*RaheeXF*
User avatar
{RaheeXF}
Map Maker
Map Maker
Posts: 171
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: How to edit the english.dat file?

Post by {RaheeXF} »

Hello Tommy, I have just uploaded my very first single player map. Please check it out and make sure to vote. Thanks a lot. You are the best.

viewtopic.php?f=17&t=2844
*RaheeXF*
User avatar
{RaheeXF}
Map Maker
Map Maker
Posts: 171
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: How to edit the english.dat file?

Post by {RaheeXF} »

You taught me all of these, thank you soooo much! #RespectToTommyCD1
*RaheeXF*
User avatar
TommyCD1
Moderator
Moderator
Posts: 1155
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: How to edit the english.dat file?

Post by TommyCD1 »

I've taken a look at your code and the mistake that you have made is very common.

You're mistaken in believe that a "typebase" script will actually order units. It will not. It will only grab those units from a base if they are already built. This is where the base_army and base_army_orderers files come in.

When you execute a script here

Code: Select all

      ExecuteScript("type1*", "squad.move.typebasetotrail", 1000, 3)
      {
        Op("%.types", "=", "type1");
        Op("%.base", "=", "Tan");
        Op("%.trail", "=", "base-base");
        Op("%.attack", "=", 1);
        Op("%.acceptInsufficient", "=", 1);
      }
This tells the AI to "recruit units required for type1 and send them along the base-base trail". It only tells the AI to grab the units that it has, not built anything new. This is the reason for the "acceptInsufficient" flag. This flag, if 1, will tell the AI to send whatever it can grab on startup, rather than wait until it can grab 100% of the required units before starting trail movement.

In order to get an AI to build, you first have to define what base the AI is using.

Code: Select all

      AddBase("Tan", "army")
      {
        Orientation(120);
      }
As you can see, this base "Tan" is using the config "army". We define the base config in the base_army.cfg file.

Code: Select all

CreateBase("army")
{
  InitialState("army.units");

  State("army.units")
  {
    Orderers()
    {
      Add("army.units.infantry", 2000);
      Add("army.units.vehicles", 1000);
    }
  }
}
This tells the game what orderers this base wants. Orderers are the actual list of units that this base wants to make. Orderers are then defined in the base_army_orderers.cfg file.

Code: Select all

CreateBase::Orderer("army.units.infantry")
{
  Manifest("BaseLevel")
  {
    Placement("army.units");
    Types()
    {

    }
    Random(1);
    CanBuild(1);
  }
}


CreateBase::Orderer("army.units.vehicles")
{
  Manifest("BaseLevel")
  {
    Placement("army.units");
    Types()
    {

    }
    Random(1);
    CanBuild(1);
  }
}
Here I've taken the file from your map again. You can see that you have zero'd out all of the units, therefore, the base will request these orderers, which are empty, and will build nothing. So in order to get the units you want, you have to add them to these orderers.
Please note though, that an orderer is queued ONCE and maintained from that point onward. This means that if you have multiple scripts running, or random squad arrangements, then your orderer will have to build the units for ALL of these scripts simultaneously. So for example, if script1 and script2 both use 3 grunts, and script3 uses 5 grunts, then the orderer will need to contain 11 total grunts, otherwise the grunts may not be able to satisfy all scripts. If this is okay, however, feel free to have insufficient units in the order.
I may not make the best maps, or be the best player, but I put a lot of time, effort, and care into my stuff. That counts for something, right? No.
Image
"Can we order a pizza?"
GameRanger ID: 913974
User avatar
{RaheeXF}
Map Maker
Map Maker
Posts: 171
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: How to edit the english.dat file?

Post by {RaheeXF} »

Thanks a lot mate! I have now understood my mistakes! Thanks. 😄
*RaheeXF*
User avatar
{RaheeXF}
Map Maker
Map Maker
Posts: 171
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: How to edit the english.dat file?

Post by {RaheeXF} »

Also check out my new single player map in the forums! (Stream my map if you want).
*RaheeXF*
User avatar
{RaheeXF}
Map Maker
Map Maker
Posts: 171
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: How to edit the english.dat file?

Post by {RaheeXF} »

Hellow, Tommy! I have just 1 question for you, how can we make a copy of a part of a map? Just go to 8ally and take a look. It is designed like, every part has the same terrain and colors. Is that possible to do or how did they do it? Thanks a lot. Anyway, you should play my map today or tomorrow, if you don't, I will crash your game. LOL, bye! :GAME: :D :ROCK: :PB :W
*RaheeXF*
User avatar
TommyCD1
Moderator
Moderator
Posts: 1155
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: How to edit the english.dat file?

Post by TommyCD1 »

There isn't really a way to do this. The best I can suggest is to make a heightmap like this using a paint program that has such a tool, and then importing that heightmap.
I may not make the best maps, or be the best player, but I put a lot of time, effort, and care into my stuff. That counts for something, right? No.
Image
"Can we order a pizza?"
GameRanger ID: 913974
User avatar
{RaheeXF}
Map Maker
Map Maker
Posts: 171
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: How to edit the english.dat file?

Post by {RaheeXF} »

Okie Dokie. 😐
*RaheeXF*
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest