HeliControl

Manage CH47 & helicopter health, player damage, configure turrets/rockets, and more!

Total Downloads: 35,240 - First Release: Sep 18, 2015 - Last Update: Apr 19, 2018

5/5, 74 likes
  1. Reduce weapon damage? Can it go below 1.0?
     
  2. the helicopters on my server take no damage now
     
  3. Koenrad updated HeliControl with a new update entry:

    1.0.7

     
  4. Thx.
    Does LootConfig override the loot as well ?
     
  5. No I tested LootConfig and it did not affect it for me.
     
  6. What would be a good setting for a realistic good helicopter according to you ? ( to be destroyable by a team of 3 or 4 people ) ?

    Here is mine for the moment :

    Code:
    {
      "DisableHeli": false,
      "GlobalDamageMultiplier": 4.0,
      "HeliAccuracy": 3.0,
      "HeliBulletDamageAmount": 20.0,
      "HeliSpeed": 25.0,
      "MainHealth": 10000,
      "MainRotorHealth": 300,
      "MaxLootCratesToDrop": 4,
      "ModifyDamageToHeli": true,
      "pistol.eoka": 3.0,
      "pistol.revolver": 3.0,
      "pistol.semiauto": 3.0,
      "rifle.ak": 3.0,
      "rifle.bolt": 4.0,
      "smg.2": 3.0,
      "smg.thompson": 3.0,
      "TailRotorHealth": 150,
      "UseCustomLoot": false,
      "UseGlobalDamageModifier": true,
      "UsePermissions": false
    }
     
  7. I haven't really had time to play around with it as a legit player, I almost always am in god mode while testing, so I don't know. I also am not really that good at the game in general haha.
    [DOUBLEPOST=1442898053][/DOUBLEPOST]
    Not sure if you are aware, but since you have "UseGlobalDamageModifier" set to true, all the weapons will be multiplied by 4 (the GlobalDamageMultiplier value). Set that to false if you want them to be set individually.
    [DOUBLEPOST=1442898110][/DOUBLEPOST]
     
    Last edited by a moderator: Sep 22, 2015
  8. So, If we have betterloot - no need to configure loot config?
     
  9. cool mod. some questions:

    1. Can we have more then 1 Heli? like spawn 2 or 4 of them at same time? not sure on server load/lag.
    2. can we control what the Heli fires? instead of damaging missiles maybe smoke rockets? Would be fun!
    3. any way to send a Heli to a location like to my location?
    4. anyway to have a Heli ignore a person/steamID
     
  10. No, if you have betterloot, the drops will be handled by lootconfig and they will be like any other lootbox you find in a rad town.
    1. My server can handle 20 helicopters before it starts getting slow, but if your players don't have good PC's they will lag like crazy.
    2. I have not found the rocket logic yet, but it may be possible
    3. Yes.
    4. Not sure yet.
     
  11. Do you think it is possible to

    1) add a message when the helico is down ?
    2)get information about the direction it crashed in respect of your position
    3) a parametrable distance (500-800metres) it crashed from you,
    4) the number of people in the area ( including you )in respect of the distance you set up above
    5) a message when someone is looting a crate from the helico ?
     
  12. Feature request:
    1. any way to add optional messages like "Heli headed to Sphere..." or something like that so players can start chasing them?
     
  13. Hi, I'm getting this error:
    Code:
    [9/22/2015 11:14:03 PM] [Oxide] 11:14 PM [Debug]   at System.Collections.Generic.List`1[Oxide.Plugins.HeliControl+BoxInventory].get_Item (Int32 index) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HeliControl.OnEntitySpawned (.BaseNetworkable entity) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    [9/22/2015 11:14:03 PM] [Oxide] 11:14 PM [Debug]   at System.Collections.Generic.List`1[Oxide.Plugins.HeliControl+BoxInventory].get_Item (Int32 index) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HeliControl.OnEntitySpawned (.BaseNetworkable entity) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    [9/22/2015 11:14:03 PM] [Oxide] 11:14 PM [Debug]   at System.Collections.Generic.List`1[Oxide.Plugins.HeliControl+BoxInventory].get_Item (Int32 index) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HeliControl.OnEntitySpawned (.BaseNetworkable entity) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    [9/22/2015 11:14:03 PM] [Oxide] 11:14 PM [Debug]   at System.Collections.Generic.List`1[Oxide.Plugins.HeliControl+BoxInventory].get_Item (Int32 index) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HeliControl.OnEntitySpawned (.BaseNetworkable entity) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    
    [DOUBLEPOST=1442960703][/DOUBLEPOST]Ah is that because I have UseCustomLoot set True but no BetterLoot installed?
     
  14. Hello. Help pls with that theme:
    Get methods for PatrolHelicopterAI | Oxide
    I used reflection for edit heli count of rockets:
    Code:
    //this is heli motherfuckers!
                    typeof(PatrolHelicopterAI).GetField("timeBetweenRockets", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(heliAI, 0.0f);
                    typeof(PatrolHelicopterAI).GetField("numRocketsLeft", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(heliAI, 2147483647);
                    typeof(PatrolHelicopterAI).GetField("maxRockets", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(heliAI, 2147483647);
                    typeof(PatrolHelicopterAI).GetField("movementLockingAiming", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(heliAI, true);
                    typeof(PatrolHelicopterAI).GetField("hasAimTarget", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(heliAI, true);
                    typeof(PatrolHelicopterAI).GetField("_aimTarget", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(heliAI, target.transform.position);
                    heliAI._currentState = PatrolHelicopterAI.aiState.STRAFE; //Going attack
    [DOUBLEPOST=1442972273][/DOUBLEPOST]And probably this code more accurity to enemy than spawn at some loc. I want to hook all AI of heli to change it desire.
    Code:
    typeof(PatrolHelicopterAI).GetField("_aimTarget", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(heliAI, target.transform.position);
     
  15. Definitely not because of having BetterLoot. BetterLoot would override the drops (BetterLoot = WorseLoot LOL!). Have you set up the custom loot file in /oxide/data? I will look into these errors, I have not seen them myself yet.

    I'm not sure I can help you with this specific problem, but I can suggest you try using dotPeek, it is a very good .Net decompiler. Open up the rust assembly and search for whatever class you need.
    Free .NET decompiler :: JetBrains dotPeek
     
  16. I used it (now it IL spy). But in code no info about SetInitialDestination, what you use to add direction. I want to fix heli (use only rockets) to destroy any target.
     
  17. SetInitialDestination seems to just set location that the helicopter will go to when it first spawns. I have not figured out how to set the helicopter to only use rockets. I do know that it does not have infinite rockets though, by default it has a max of 12.
    [DOUBLEPOST=1442974392][/DOUBLEPOST]This is from the PatrolHelicopterAI class.
    Code:
    public void SetInitialDestination(Vector3 dest, float mapScaleDistance = 0.25f)
      {
        this.hasInterestZone = true;
        this.interestZoneOrigin = dest;
        float num1 = TerrainMeta.Size.x;
        float num2 = dest.y + 25f;
        Vector3 vector3_1 = Vector3Ex.Range(-1f, 1f);
        vector3_1.y = 0.0f;
        vector3_1.Normalize();
        Vector3 vector3_2 = vector3_1 * (num1 * mapScaleDistance);
        vector3_2.y = num2;
        if ((double) mapScaleDistance == 0.0)
          vector3_2 = this.interestZoneOrigin + new Vector3(0.0f, 10f, 0.0f);
        this.transform.position = vector3_2;
        this.ExitCurrentState();
        this.State_Move_Enter(dest);
      }
     
  18. I have only this:
    Code:
    // Decompiled with JetBrains decompiler
    // Type: PatrolHelicopterAI
    // Assembly: Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
    // MVID: 0B4C599C-2878-4825-B495-F96C7FA65906
    // Assembly location: F:\SteamLibrary\steamapps\common\Rust\RustClient_Data\Managed\Assembly-CSharp.dllusing System.Collections.Generic;
    using UnityEngine;public class PatrolHelicopterAI : MonoBehaviour
    {
      private float destination_min_dist = 2f;
      public Vector3 currentOrbitTarget = Vector3.zero;
      private float maxOrbitDuration = 30f;
      private float timeBetweenRockets = 0.2f;
      private int numRocketsLeft = 12;
      private int maxRockets = 12;
      private float strafe_approach_range = 175f;
      private float strafe_firing_range = 150f;
      public float waitAtPoint = 10f;
      public float maxSpeed = 25f;
      public float windForce = 5f;
      public float windFrequency = 1f;
      public float maxRotationSpeed = 90f;
      public float terrainPushForce = 100f;
      public float obstaclePushForce = 100f;
      public float courseAdjustLerpTime = 2f;
      public static PatrolHelicopterAI heliInstance;
      public BaseHelicopter helicopterBase;
      public Vector3 interestZoneOrigin;
      public bool hasInterestZone;
      public Vector3 destination;
      public Quaternion targetRotation;
      public int waypointIndex;
      public Transform[] waypoints;
      public float moveSpeed;
      public Vector3 windVec;
      public Vector3 targetWindVec;
      public float targetThrottleSpeed;
      public float throttleSpeed;
      public float rotationSpeed;
      private Vector3 _lastPos;
      private Vector3 _lastMoveDir;
      private bool movementLockingAiming;
      private bool hasAimTarget;
      private Vector3 _aimTarget;
      private bool aimDoorSide;
      public PatrolHelicopterAI.aiState _currentState;
      public HelicopterTurret leftGun;
      public HelicopterTurret rightGun;
      private bool isDead;
      private float spawnTime;
      private float lastDamageTime;
      private bool isRetiring;
      private float deathTimeout;
      private float currentOrbitDistance;
      private float currentOrbitTime;
      private bool hasEnteredOrbit;
      private float orbitStartTime;
      private bool breakingOrbit;
      public List<MonumentInfo> _visitedMonuments;
      public float arrivalTime;
      private bool leftTubeFiredLast;
      private float lastRocketTime;
      private Vector3 strafe_target_position;
      private bool puttingDistance;
      private float _lastThinkTime;  public enum aiState
      {
        IDLE,
        MOVE,
        ORBIT,
        STRAFE,
        PATROL,
        GUARD,
        DEATH,
      }
    }
    
    [DOUBLEPOST=1442974743][/DOUBLEPOST]Ohhh loool...I decompilied client version of file. Server version is ok. Thanks.
     
  19. Interesting.... Try re-decompiling. This is what I have decompiled:
    [C#] PatrolHelicopterAI - Pastebin.com

    From the path you have to your assembly file it looks like you are using the assembly from the client. Make sure you are using the assembly from the Rust Server.
     
  20. on my server they are immortal :-(