• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Login
FAForever Forums
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Login

Allow AI to use specific units, disable same units for players.

Scheduled Pinned Locked Moved Modding & Tools
5 Posts 3 Posters 434 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Online
    TankenAbard
    last edited by 2 May 2024, 13:39

    I posted this elsewhere, but is this possible? The goal is to allow an AI of a select faction to use new units from another mod, while disabling the players from using those same units. Is this possible?

    1 Reply Last reply Reply Quote 0
    • D Offline
      DDDX
      last edited by 2 May 2024, 14:10

      if that mod has those units in build platoons, then the AI will build them.
      You would need a script, either in a map script, or as a mod, where you can choose which players can or cannot build stuff, deciding by many factors - which army it is, is it an ally or an enemy, is it human...
      You could disable it just fpr all human type players, or also for AIs allied to humans as well.

      My map has a "detect active mod" part, where if a mod is (not) present, it does different stuff. So you could make it for several different mods, if they are present then set build conditions...Take a look at DDDX RPG survival script.lua file

      T 1 Reply Last reply 2 May 2024, 17:54 Reply Quote 0
      • R Offline
        Resin_Smoker
        last edited by Resin_Smoker 5 Feb 2024, 14:14 2 May 2024, 14:12

        Short answer: Yes

        Long answer: Look in the unit blueprints for "Selectable". Removing that one term, prevents the player from mouse selecting that given unit. There are other BP terms that allow for specific factions, and from what it's built.

        Kykhu Oss https://youtu.be/JUgyGTgeZb8
        Unit Thrower https://youtu.be/iV8YBXVxxeI
        Beam Tentacle https://youtu.be/le5SNwHvC4c
        Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
        Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

        1 Reply Last reply Reply Quote 0
        • T Online
          TankenAbard @DDDX
          last edited by 2 May 2024, 17:54

          @dddx I like the idea of a mod simply disabling the units for the players. I don't want to tie it to a map, so it can be used on any map.

          I'm absolutely new to any kind of modding. Is there anywhere you or anyone can point me to get started? I see a lot of old information, but I'm not sure how much applies.

          D 1 Reply Last reply 2 May 2024, 20:58 Reply Quote 0
          • D Offline
            DDDX @TankenAbard
            last edited by 2 May 2024, 20:58

            @tankenabard unfortunately no. The best advice I can give you is to look at others code.
            Get a couple of simple mods, the simpler the better, then see what it takes to get a simple mod going.
            Then find a mod or map that disables certain units - that will show you how it's done.
            Then all you need is to apply and tweak the code to your needs and wants <-- that's the part nobody can help you with 😕

            1 Reply Last reply Reply Quote 1
            4 out of 5
            • First post
              4/5
              Last post