Armor scripts

Discussion in 'Coding' started by Nickierv, Jan 13, 2010.

  1. Nickierv

    Nickierv Member

    Messages:
    510
    Likes Received:
    0
    Trophy Points:
    0
    Couple of questions:
    First, with this code:
    Code:
    "Command Vehicle"
        {
            "Name"            "Titanium 6AL-4V"
            "Description"        "Military Grade Alloy, designed specifically for Command Vehicles"
            "Icon"            "vehicles/gui/armor/armor_small"
            "HUD Icon"        ""
            "Size"            "1"
            "Type"            "11"
            "Weight"        "10"
            "Cost"            "40"
            "Research"        ""
    
            "Health"            "90"
            "Regeneration"            "0.01"
            "Angle Modifier"        "0.2"
            "Speed To Damage Modifier"    "0.002"
            "Damage Modifier"        "0.25"
            "Damage To Heat Absorbed"    "0.04"
            "Bioweapon Damage Modifier"    "1"
    
            "Sound Impact"            ""
            "Sound Repair"            ""
            
        //Resists
            "GeneralPhysicsResist"        "0.0"        //General Physics Tree Damage 
            "GeneralChemistryResist    "     "0.0"          //General Chemistry Tree Damage
            "GeneralMechanicalResist"     "0.0"        //General Mechanic Tree Damage
            "GeneralElectricResist"      "0.0"        //General Electric Tree Damage
            "GeneralBiologicalResist"    "0.0"         //General Biological Tree Damage
            "KineticResist"         "0.0"         //Railguns, Standard Cannons, Anything that is just force
            "ExplosiveResist"         "0.0"        //HE, Nukes, anything that explodes
            "BioResist"             "0.0"        //Has the bio effect
    
            "BulletResist"             "1"        //Non Armor damaging
            "APBulletResist"        "0.0"         //Armor Damaging
            "BulletExplosiveResist"     "0.0"       //Bullets that Explode
    
            "MissileResist"         "0.0"        //Generic Missle type of damage
            "MissileExplosiveResist"     "0.0"         //Explosive type.
            "MissileBioResist"         "0.0"        //Bio Missiles.  Different then Bio?
    
            "KineticArtResist"         "0.0"         //Kinetic Artillery
            "ExplosiveArtResist"         "0.0"         //Explosive Artillery
            "BioArtResist"             "0.0"       //Bio Artillery
    
            "AircraftMissileResist"     "0.0"         //Aircraft Missiles
            "AircraftGroundMissleResist"     "0.0"         //Aircraft Missiles to hit ground targets
            "AircraftBulletResist"         "0.0"       //Aircraft to Aircraft bullets
            "AircraftAPBulletResist"     "0.0"          //Aircraft Bullets to hit ground targets
            "AircraftBombResist"         "0.0"        //Bombs
            "AircraftBombBioResist"     "0.0"          //Bio Bombs?
    
            "InfantryGrenadeResist"     "0.0"         //Player Thrown Grenades
            "InfantryMineResist"         "0.5"        //Player Tossed Mines
            "InfantryMissileResist"     "0.0"         //Gren Missles
            "InfantryMortarResist"         "0.0"         //Gren Mortars
            "InfantryStickyResist"         "0.0"        //Sticky Grenades
            "InfantrySeismicResist"     "0.95"        //Siesmic Grenades
            "InfantryBulletResist"         "1"        //Just In Case
    
            "ExtraType1Resist"         "0.95"         //Building Damage
            "ExtraType2Resist"         "0.0"         //Again
            "ExtraType3Resist"         "0.0"         //and a third
    
        }
    
    I get the following bug with the armor (see photo). As far as I know, the armor behaves as intended, its just not showing right.

    The other question is the order that resists and modifiers are used in the calculation.
     

    Attached Files:

  2. Brutos

    Brutos Administrator Staff Member Moderator

    Messages:
    3,385
    Likes Received:
    0
    Trophy Points:
    0
    The resists code is not enabled in 2.24d, the scripts were not finished when the version was released. The resist code is enabled i think in the svn version, but i messed up the default value i think. It might take double dmg by default :D

    If you add an armor make sure that the commander armor does remain at the 6th position ( slot 6, i'm not totally sure if the scripts count for 0 or from 1).

    I will change that for the next version, so you can define one armor that will be used as the commander armor (also for the engine, atm it always uses the 1st engine in the scripts.
     
  3. Drag

    Drag Member

    Messages:
    748
    Likes Received:
    0
    Trophy Points:
    0
    scripts count from 0 up, afaik code checks for last index it finds and makes it comm armor. Atleast thats how its supposed to work.
     
  4. Brutos

    Brutos Administrator Staff Member Moderator

    Messages:
    3,385
    Likes Received:
    0
    Trophy Points:
    0
    Nope, its slot 6. Will change soon however.
     

Share This Page