Mods Questions

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

Re: How to make new models?

Post by {RaheeXF} »

I have some questions. 1. How can I add my AMRTS map to DR2 Studio for the terrain render? 2. What does this line of code mean, "Add("personality.default.bulldozer", 1, 10, 0);". Thank you. Please answer everything you can or give me a link of AI Coding manual. :ROCK:
*RaheeXF*
User avatar
{RaheeXF}
Map Maker
Map Maker
Posts: 169
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: How to make new models?

Post by {RaheeXF} »

Are you even here, Tommy? I need help and answers of these questions, please. Thank you.
*RaheeXF*
User avatar
TommyCD1
Moderator
Moderator
Posts: 1146
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: How to make new models?

Post by TommyCD1 »

{RaheeXF} wrote: Mon Jul 19, 2021 8:42 amAnyway, that means if I edit a reply or post, it doesn't notify you? And also, I have a another question, how can I add a terrain to a map? Like my custom grass or sand, etc.
  • No, editing a post does not notify me when it happens. It also doesn't leave a trace at all if it is the latest post in a thread. It will appear to have always been like that.
  • The easiest way to do this is to copy the relevant textures into your map's directory, and then edit them using an image editor.
{RaheeXF} wrote: Tue Jul 20, 2021 12:41 amHow are they playing smoothly using 200 or 300 units per player? Can you please answer this? I am giving a link of the video. Just watch it from start to end and explain.
  • Because he's playing offline with bots.
{RaheeXF} wrote: Tue Jul 20, 2021 5:04 amI have some questions. 1. How can I add my AMRTS map to DR2 Studio for the terrain render? 2. What does this line of code mean, "Add("personality.default.bulldozer", 1, 10, 0);". Thank you. Please answer everything you can or give me a link of AI Coding manual. :ROCK:
  1. Copy over the relevant folder to your DR2 game. Then, edit the game.cfg file like so:
    • Update relevant ruleset code.

      Code: Select all

      RuleSet("protect");
      

      Code: Select all

      DefaultRule("protecthq");
      FixedRule(1);
      RequiredAddons();
      
      Add a Time() module to the Light() module

      Code: Select all

      Environment()
      {
        Rain();
      
        Light()
        {
          CycleTime(600.000000);
          CurrentTime(0.771429);
          LastTime(0.771429);
          StartTime(0.771429);
          DayStartTime(0.250000);
          DayEndTime(0.750000);
          SunriseStartTime(0.200000);
          SunriseEndTime(0.300000);
          SunsetStartTime(0.700000);
          SunsetEndTime(0.800000);
          Season(45.000000);
      
          Colors()
          {
            Add()
            {
              Fraction(0.500000);
              Ambient(90, 90, 90, 255);
              Sun(255, 255, 255, 255);
              Fog(0, 0, 0, 255);
            }
          }
        }
      
        Time()
        {
          Day(1);
          Month(1);
          Year(2000);
        }
      }
    • Update the World to the TerrainGroup

      Code: Select all

      World("attic");
      Camera();
      
      Physics()
      {
        Gravity(9.800000);
      }
      
      MissionVar();

      Code: Select all

      TerrainGroup("attic");
      Camera();
      
      Physics()
      {
        Gravity(9.800000);
      }
      
      MissionVar();
  2. Add("personality.default.bulldozer", 1, 10, 0);
    • Add an orderer to the queue.
    • Name of the orderer to queue (in this case, the orderer that contains the bulldozer)
    • Currently unknown what this does. Manual says this defines the "resource weighting" of an orderer.
    • Priority of the orderer. Orderes with lower priorities will be built first.
    • Unknow what this does. Manual does not say anything.
  3. The same manual that I have already linked contains the relevant coding for AI as well. Please read through it carefully.https://pandemic.bzscrap.org/dr2/tools/ ... ai/ai.html
{RaheeXF} wrote: Wed Jul 21, 2021 4:44 amAre you even here, Tommy? I need help and answers of these questions, please. Thank you.
  • I have a schedule for my day that I like to keep to. It includes very important things like eating and sleeping. I also like to spend some of my time working on Army Men projects, or miscellaneous things of my life such as for my stream. Please just be patient and I will get to your questions eventually. I do not have time nor patience to baby-sit you.
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: 169
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: How to make new models?

Post by {RaheeXF} »

Thank you very much for answering my questions and sorry for not having patience! Anyway, when I play with bots, it still lags, why? Thanks and bye.
*RaheeXF*
User avatar
{RaheeXF}
Map Maker
Map Maker
Posts: 169
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: How to make new models?

Post by {RaheeXF} »

I have some questions. Please answer whenever you can.
1. What does CanBuild(1); and Random(1); mean? The CanBuild(1); is not available in the DR2 AI Manual.
2. What does ReserveMinimum(600); or ReserveMaximum(800); mean? Also, not available in the DR2 AI Manual.
3. What is FirstResource(0); and LastResource(0); and Manage(2); and Recycle(1); ? Not available in the DR2 AI Manual.
4. I told the AI to build some units, Snipers or Bazookas (Random = 1 and CanBuild = 1) but it just upgrades the barracks and skips the second step where I told the AI to build the units and goes to third step where I told the AI to upgrade the HQ and it did but didn't make the Snipers or Bazookas, why? Here are the codes:-

Code: Select all

  
  CreateBase::Orderer("defense2")
  {
    Manifest("Level")
    {
      Types()
      {
        Add("army.unit.sniper",5);
        Add("army.unit.bazooka",5);
      }
      CanBuild(1);
      Random(1);
    }
  }

Code: Select all

        Add("defense2", 1, 100, 0);
5.

Code: Select all

    Rule("Distance", 1.0)
    {
      Distance(0);
    }
In the code above, what is Rule("Distance", 1.0) and Distance(0); ? What are the differences?

So, these are the questions. I hope you can answer all of these or give me a link or a playlist of tutorials of making AI. Thank you. Have a nice day, bye! :ROCK: :C :blah: :W
*RaheeXF*
User avatar
TommyCD1
Moderator
Moderator
Posts: 1146
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: Mods Questions

Post by TommyCD1 »

Please understand also that when it comes to most of the AI stuff, most if not all of the coding has been changed slightly or even completely overhauled when compared to Dark Reign 2. This means that most of what we understand about AI might not be corrrectly, and was all learned simply through "trial and error" i.e. changing it around and seeing what happens. To that extent, I can try to answer what I can, but most questions simply don't have an answer in this field. That's also why there's no real "tutorial" around either. Not to mention, most of this stuff is far more complicated than simple objective or map scripting, and so answering these isn't the easiest of tasks either.
  1. CanBuild(1); is not currently understood. I haven't noticed any changes when modifying it or leaving it out completely.
  2. ReserveMinimum and ReserveMaximum were two functions that helped the AI manage resources in DR2. They would tell the AI to wait to build something until they had the specified resource amount. AMRTS works with two distinct resourse types. And as far as I know, this code is pretty much defunct, or has no visible change on gameplay.
    • FirstResource, LastResource, and Manage are all configs that pertain to the "Resource" manifest type. First and Last resource define what range of resources the AI will build this orderer to starting from 0. At the start of a game, the AI will find all resource groups (grouped by proximity) and then put them into a list. The start of this list, 0, should be your starting resources. (Assuming your custom map is made properly). First and LastResource defines what range of the list to build to. So, typically, the "permanent" depot is defined to only be built to the first resource 0, while the "roaming" depot is set to the next resource onward.
    • Manage is how many depots are allowed to be active from the same orderer. In this case, Manage(2) means it will only allow itself to have two depots. If it wants a third depot, it will have to wait until one of the previous depots is recycled.
    • Recycle, if 1, tells the AI to recycle the depot (plus any defense) when the resource group is exhausted. If this is set to 0, or if the resource group is endless (such as a garden lamp) this depot will never be recyled.
  3. Likely one of two things happened. 1. You forgot to add the orderer that has the units. 2. The AI simply upgraded its HQ because it could. Keep in mind that if two orderes come from different constructors, the AI will NOT wait for one to complete. Similarly, priority does not mean waiting for previous orderers to complete. Rather, it simply refers to: If I have to build both at once, which should I focus on first?
As I've said, everything I know and understand about how AI functions comes entirely from tweaking code and seeing what effects it has. I recommend you try similar. It's much faster to test and you may even discover something new.
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: 169
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: Mods Questions

Post by {RaheeXF} »

Thank you very much for helping. Thanks a lot. Anyway, could you please tell me what does NoBeyondWeighting(1); and NoPreqStall(1); means? Thanks again. :GAME:
*RaheeXF*
User avatar
{RaheeXF}
Map Maker
Map Maker
Posts: 169
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: Mods Questions

Post by {RaheeXF} »

What should I write if I want the AI to build one of them, Bazooka or Sniper, what should I use? Random(1); or CanBuild(1); or something else? I am confused about this one. Please help. Thanks!
*RaheeXF*
User avatar
{RaheeXF}
Map Maker
Map Maker
Posts: 169
Joined: Tue Jun 15, 2021 6:45 am
Virgin Islands (USA)

Re: Mods Questions

Post by {RaheeXF} »

How can I tell the AI to make a group of units again after the group of units die by fighting? What is the code or does it do it automatically? Also, what is the default Unit Limit of the game? Thanks.
*RaheeXF*
User avatar
TommyCD1
Moderator
Moderator
Posts: 1146
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: Mods Questions

Post by TommyCD1 »

{RaheeXF} wrote: Thu Jul 22, 2021 7:55 amAnyway, could you please tell me what does NoBeyondWeighting(1); and NoPreqStall(1); means?
  • NoBeyondWeighting - Unknown entirely what this does. The manual says it has to do with willingness to spend surpurflous resources on an orderer, but in practice nothing seems to happen regardless.
  • NoPrereqStall - According to the manual, this means that the persona will attempt to build this orderer even if the prerequirements for it are not yet owned. Again, in practice this doesn't seem to do anything, but anecdotally I've found it might help slightly with something that isn't being built in a speedy manner.
{RaheeXF} wrote: Thu Jul 22, 2021 8:09 amWhat should I write if I want the AI to build one of them, Bazooka or Sniper, what should I use? Random(1); or CanBuild(1); or something else? I am confused about this one.
  • This one is, again, far too complex to simply go over in a single forum post or paragraph. You need to
    1. Have a constructor that can build the units
    2. Add an orderer that requests said units

      Code: Select all

            Orderers()
            {
              Add("personality.example.units", 1, 80, 0);
            }
    3. Make sure said orderer's priority aligns properly in that it is not overshadowed or skipped by other oderers

      Code: Select all

              Add("personality.example.units1", 1, 80, 0);
              Add("personality.example.units2", 1, 50, 0);
    4. Use an appropriate manifest for the orderer (OrdererLevel is recommended)

      Code: Select all

        CreateBase::Orderer("personality.example.units")
        {
          Manifest("OrdererLevel")
          {
            Script("offense.units");
            Types()
            {
              Add("army.unit.sniper", 5);
              Add("army.unit.bazooka", 5);
            }
            CanBuild(1);
            Random(1);
          }
        }
    5. Include the correct unit types in said orderer (Make sure they exist and are not spelled incorrectly)
    The best I can offer you right now is to open default.x and see how the original devs wrote their code.
{RaheeXF} wrote: Fri Jul 23, 2021 1:24 amHow can I tell the AI to make a group of units again after the group of units die by fighting? What is the code or does it do it automatically? Also, what is the default Unit Limit of the game? Thanks.
  • This is automatically done by a persona. Orderers are constantly in demand, meaning that when the units assigned to it are lost, they are attempted to be rebuilt, assuming suffecient resources. There are some exceptions, such as Depots that recycle, and base states, but they are not important in the context of offensive squads.
  • The game's default unit limit is 70.
Secondly, I would recommend that you create topics for your questions, rather than replying to a single thread. Similar questions of the same material can then be posted in a reply instead. This helps keep the forum tidy and also helps future users who might have these issues and are looking for a solution. It would be far better for users and helpers such as myself to be able to have answers already available rather than asking a new question each time.
For example: You could create a single topic for persona related questions such as:
  • How do I order units?
  • What are the manifest types?
  • How can I find enemy locations?
These are all fine questions that can be in the same topic. However, questions otherwise, such as
  • What is the game's unit limit?
  • How do I make a region for the computer to start?
  • How do I use blah blah in the studio?
  • What mod is this person using?
These questions can be considered as off topic, and can be placed into their own relevant topics.
Of course, I don't have a way to enforce this, so I can only suggest for you to make this effort. I'll leave it to your own discretion.

And lastly, I understand you are an up and coming map maker. But if you want people to play, review, or even find your maps, then you will need to post them into the proper forum. Keep in mind that when posting a new map, you MUST include the following:
  1. A direct link to download the map (Third party hosts such as MediaFire and Google Drive are OK)
  2. Media of the map, either in the form of videos or screenshots
  3. A description of the map: What will players find in it? How do you win? How many players does it support? Even a sentence or two is better than nothing.
You've already posted your maps here, so I'll go ahead and create topics for them for you later this time. You can look them over to better understand what I mean as well for your next upload.
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
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests