Micro Management Mac

KKyleKKyle Michigan Join Date: 2005-07-01 Member: 55067Members
edited February 2015 in Modding
Features 4 new buttons on the mac which are:

Enable/Disable Construction Welding (does not apply to powernodes)
8lj1sm2.png
Slul6jM.png


Enable/Disable Construction Building (does not apply to powernodes)
Z1Ddk1k.png
7w6kPG6.png

Enable/Disable Player Welding
PTxrpoQ.png
e5r66H9.png

Enable/Disable Power Nodes Welding/Constructing.
UgKyDA1.png
NAUZzuc.png

Comments

  • KKyleKKyle Michigan Join Date: 2005-07-01 Member: 55067Members
    edited February 2015
    Here's a portion of the magic in MAC.lua (No mentions of other macs because this was written for siegemod which just has one giant mac as powerful as 5)
    //SiegeMod by Kyle Abent
    local function QualificationsForConstruct(self, target)
       return target ~= nil and HasMixin(target, "Construct") and not target:GetIsBuilt() and GetAreFriends(self, target)
    end
    local function QualificationsForWeldable(self, target)
    if HasMixin(target, "Construct") and not target:isa("PowerPoint") then return target ~= nil and target:GetWeldPercentage() < 1 and target:GetIsBuilt() and not self.ignorestructurewelds and GetAreFriends(self, target) end
    if HasMixin(target, "Construct") and target:isa("PowerPoint") then return target ~= nil and target:GetWeldPercentage() < 1 and target:GetIsBuilt() and not self.ignorepowernodes and GetAreFriends(self, target) end
    if target:isa("Player") then return target ~= nil and target:GetWeldPercentage() < 1 and not self.ignoreplayerwelds and GetAreFriends(self, target) end
    end
    local function GetAutomaticOrder(self)
        Shared.Message("LOG - MAC - Getting automatic order")
        local target = nil
        local orderType = nil
    if self.timeOfLastFindSomethingTime == nil or Shared.GetTime() > self.timeOfLastFindSomethingTime + 1 then
    //Shared.Message("LOG - MAC - Time between checks verifies, now scanning for weld or construct")
            local currentOrder = self:GetCurrentOrder()
            local primaryTarget = nil
             local constructables = GetEntitiesWithMixinForTeamWithinRange("Weldable", self:GetTeamNumber(), self:GetOrigin(), MAC.kOrderScanRadius)
               for c = 1, #constructables do 
              local constructable = constructables[c]
             //Constructing
             if QualificationsForConstruct(self, constructable) and not QualificationsForWeldable(self, constructable) then
             //Shared.Message("LOG - MAC - Qualified for constructa not weld, determining next step")
                  if constructable:isa("PowerPoint") and self.ignorepowernodes then Shared.Message("LOG - MAC - Spam Log!") end
                  if constructable:isa("PowerPoint") and not self.ignorepowernodes then 
                  //Shared.Message("LOG - MAC - is a power node construct, but is not ignoring powernodes, setting powernode construct")
                  target = constructable  
                  orderType = kTechId.Construct 
                  self.timeOfLastFindSomethingTime = Shared.GetTime()
                 return target, orderType 
                 end
                 if not constructable:isa("PowerPoint") and not self.ignoreconstructing then 
                 //Shared.Message("LOG - MAC - is not a powerpoint and not ignore constructing")
                  target = constructable
                  orderType = kTechId.Construct 
                  self.timeOfLastFindSomethingTime = Shared.GetTime()
                 return target, orderType  
                 end
             end
            //Shared.Message("LOG - MAC - Not valid target or order from construct, nothing eligable, so lets see if we can weld")
         if not target or not orderType then
             if QualificationsForWeldable(self, constructable) and not QualificationsForConstruct(self, constructable) then 
                 //Shared.Message("LOG - MAC - Scanned for entities and found none available toconstruct, but something eligable to weld")
                  self.timeOfLastFindSomethingTime = Shared.GetTime()
                  target = constructable
                     if target:isa("Player") then
                         //Shared.Message("LOG - MAC - Found a player with eligable to weld")
                      orderType = kTechId.FollowAndWeld
                      orderType = kTechId.AutoWeld
                      return target, orderType 
                      end
                      if not target:isa("Player") then
                          //Shared.Message("LOG - MAC - found a structure eligable to weld, not player")
                      orderType = kTechId.AutoWeld
                     return target, orderType 
                     end
                         //Shared.Message("LOG - MAC - very end of file returning stuff ?")
              return target, orderType 
             end
         end    
     end   
     end    
        //Shared.Message("LOG - MAC - very very end of line right before end")           
    end
    
  • KKyleKKyle Michigan Join Date: 2005-07-01 Member: 55067Members
    So if you're new to SiegeMod, well, it has a Giant Mac, as powerful as 5 with health, speed, size, build/construct rates rather than having 50 tiny macs. So excuse that portion. (I would export Micro Management Mac(the button toggles) into Vanilla ns2, but I really don't feel like modifying
    everything in a way that does not overwrite/override, for the sake of working with other mods


  • d4rkAlfd4rkAlf Sweden Join Date: 2013-11-12 Member: 189309Members, Squad Five Blue, Reinforced - Shadow
    I'm not a big fan of the siege mod, but this is really cool!
  • 2cough2cough Rocky Mountain High Join Date: 2013-03-14 Member: 183952Members, Reinforced - Shadow, WC 2013 - Supporter
    That big mac reminds of king boo in super mario 64
Sign In or Register to comment.