Creating new Armor classes

Have modding questions or discovered something new? Post here.
User avatar
Arisen
Mortar Man
Mortar Man
Posts: 33
Joined: Fri Feb 17, 2017 6:16 am
American Samoa

Re: Creating new Armor classes

Post by Arisen »

TommyCD1 wrote: Sun Mar 12, 2017 9:15 pm :blah:

Code: Select all

#include "fx_bonus_weapondamage.cfg"

CreateObjectType("bonus.weapondamage", "Bonus")
{
  GameObj()
  {
    Properties()
    {
      Add("Filter::Bonus");
    }
  }

  MapObj()
  {
    GodFile("prop_bonus_weapon.god");
    GenericFX()
    {
      Add("MapObj::Smoke", "bonus.weapon.effect");
      Add("Bonus::Triggered", "bonus.weapon.triggered");
    }
  }

  BonusObj()
  {
    Mode("Weapon");
    Modifier(0.5);
    TriggerRange(8);
    ControlName("Client::Bonus::Weapon");
    Message("Client::Bonus::Weapon");
  }
}
Alright man, here's the rundown on what I know from my experience with this game and my attempts at this in the past. The reason your bonus does nothing is because you're not properly modifying it's effects. The code seen above is the config file for the weapon boost. You'll notice it has parameters for "BonusObj" similar to MapObj, UnitObj, and CollectorObj, to name a few. Under BonusObj, we can find this line:
  • Mode("Weapon");
This is what determines the bonus' effects. There are only three bonuses in AMRTS which use the following modes: Weapon, Health, and Speed. While I cannot find these modes in the game's .exe, nor it's PS2 disc, it leads me to believe it is somehow contained within the engine or the source code itself. That means there is no way to find out if these are the only three options, or if there are more. I can tell you that I've tried Ammo and Ammunition, but these did not work. You'll know because the game crashes. :**: So I guess the only way to find that setting is creativity, luck, and trial & error.

Something to keep in mind however. Ammunition was a left over aspect from Dark Reign 2. Bonuses, however, are completely unique to Army Men, which means it may not even be possible for them to associate with ammo, this is especially possible since ammunition does not even appear in AMRTS, not function correctly.

Finally, I see you've tried to add Add("Filter::Weapon"); to the Bonus' Properties. I'll say now that this has absolutely no affect on the bonus' functions. Properties are merely used by the game to sort objects. And placing army.weapon.sarge within the bonus' config files does nothing but conflict with the one that already is defined by Sarge's config.

Hopefully this helps you out some. :blah:



Allright, thanks for that Info, it is definitely some food for thought. I think you are right on the money here. In terms of not going about it in the right way, I've just found something that MAY answer part of the question. Essentially what I'm trying to do is the same thing you do when you upgrade a building, but instead of changing the model, just change the weapon properties. But when you Upgrade a building it calls to the next .god file in the line. So instead of Hq1 it goes to Hq2. I think in THEROY I could create a sarge2.god file and tell the script to call to it when walking over the powerup. if not, then construct the upgraded sarge through an upgrade path like normal buildings.



mmm



I've gotten somewhere with this. I simply copied sarges .god file and renamed it Army_Sarge2.god. It loads about halfway and then crashes saying that it can't read army_sarge2.god mesh file.




my idea is to have walking over the powerup trigger the upgrade, but I think my syntax is wrong also...


Code: Select all

andemic Studios
//

#include "fx_army_unit_sarge.cfg"
#includeonce "fx_grunt_damage.cfg"

// UNIT
CreateObjectType("army.unit.sarge", "Unit")
{
  GameObj()
  {
     ThinkInterval(1);
    IdleTask("Tasks::UnitConstructor");
    Properties()
    {
      Add("Filter::Army");
      Add("Filter::Biological");
      Add("Filter::Unit");
      Add("Filter::Weapon");
      Add("Filter::Heroes");
      Add("Filter::Transportable");
	  Add("Client::FacilityBar");
      Add("Client::ForceNameDisplay");
    }
  }

  MapObj()
  {
    GodFile("army_sarge.god");
    PhysicsModel("Walker");
    TractionType("ground");
    GrainSize(1);

    ArmourClass("vehicle");
    HitPoints(150);

    TypeDisplay()
    {
      Image()
      {
        Image("if_game_portraits.tga", 0, 84, 42, 42);
        Mode("Centre");
      }
    }
    GenericFX()
    {
      Add("Weapon::Fire", "weapon.sarge.fire");
      Add("MapObj::AddToMap", "damage.grunt");
      Add("MapObj::Death", "death.infantry");
      Add("Restore::Target::Process", "restore-small");
      Add("MapObj::AddToMap2", "restore-small-puff");
      Add("Wounded::Start", "herowound");
    }
    ShadowFile("army_grunt-shadow.tga");
    RotateShadow(0); // default is 1

  }

  UnitObj()
  {
    TopSpeed(45);
    TurnSpeed(1440);
    Wound(1);

    SeeingRange(40);

    ResponseEvents()
    {
      Add("Attack")
      {
        Add("army.unit.sarge_attack-0.wav");
        Add("army.unit.sarge_attack-1.wav");
      }
      Add("Attacked")
      {
        Add("army.unit.sarge_attacked-0.wav");
        Add("army.unit.sarge_attacked-1.wav");
      }
      Add("Move")
      {
        Add("army.unit.sarge_move-0.wav");
        Add("army.unit.sarge_move-1.wav");
        Add("army.unit.sarge_move-2.wav");
      }
      Add("Select")
      {
        Add("army.unit.sarge_select-0.wav");
        Add("army.unit.sarge_select-1.wav");
        Add("army.unit.sarge_select-2.wav");
        Add("army.unit.sarge_select-3.wav");
      }
      Add("Spotted")
      {
        Add("army.unit.sarge_spotted-0.wav");
      }
    }

           Constructor("army.building.hq1");
    ConstructionTime(2);
    CreateSource("resource.blob.infantry1");
    CommandCost(1);
    ResourceCost()
    {
      Add("Plastic", 50);
      Add("Electricity", 0);
    }
    Prereqs()
    {
      Add("army.building.hq1");
    }


    Weapon("army.weapon.sarge");
  }
}

// WEAPON
CreateWeaponType("army.weapon.sarge")
{
  Style("Instant");

  MaxRange(45);

  Delay(1.2);

  Damage()
  {
    Amount(42);

    Effective("infantry", 50%);
    Effective("vehicle", 68%);
    Effective("structure", 100%);
    Effective("flyer", 100%);
    Effective("mine", 100%);
	Effective("hero", 70%);
  }

  FirePoints()
  {
    Add("HP-FIRE");
  }
}


Upgrades()
    {
      Add("army.unit.sarge2");
    }
  }
}

CreateObjectType("army.unit.sarge2", "Unit")
{
  GameObj()
  {
    ThinkInterval(1);
    Properties()
    {
      Add("Filter::Studio::Hidden");
    }
  }

  MapObj()
  {
    GodFile("army_sarge2.god");
    RayTestFlags("Poly");
    PhysicsModel("walker");
    //MoveCamera(1);
    NearFadeFactor(0.3);

    GenericFX()
    {
      Add("Construct::Start", "upgrade.army");
      Add("Recycle::Start", "recycle.upgrade");
      Add("Restore::Target::Process", "restore-upgrade");
    }
    TypeDisplay()
    {
      Image()
      {
        Image("if_game_portraits.tga", 168, 210, 42, 42);
        Mode("Centre");
      }
    }
  }

  UnitObj()
  {
    SeeingRange(73);
    ConstructionTime(40);
    RecycleTime(0);
    ResourceCost()
    {
      Add("Plastic", 400);
      Add("Electricity", 0);
    }
  }
}


Code: Select all

#include "fx_army_unit_sarge.cfg"
#includeonce "fx_grunt_damage.cfg"

// UNIT
CreateObjectType("army.unit.sarge2", "Unit")
{
  GameObj()
  {
     ThinkInterval(1);
    IdleTask("Tasks::UnitConstructor");
    Properties()
    {
      Add("Filter::Army");
      Add("Filter::Biological");
      Add("Filter::Unit");
      Add("Filter::Weapon");
      Add("Filter::Heroes");
      Add("Filter::Transportable");
	  Add("Client::FacilityBar");
      Add("Client::ForceNameDisplay");
    }
  }

  MapObj()
  {
    GodFile("army_sarge2.god");
    PhysicsModel("Walker");
    TractionType("ground");
    GrainSize(1);

    ArmourClass("vehicle");
    HitPoints(150);

    TypeDisplay()
    {
      Image()
      {
        Image("if_game_portraits.tga", 0, 84, 42, 42);
        Mode("Centre");
      }
    }
    GenericFX()
    {
      Add("Weapon::Fire", "weapon.sarge.fire");
      Add("MapObj::AddToMap", "damage.grunt");
      Add("MapObj::Death", "death.infantry");
      Add("Restore::Target::Process", "restore-small");
      Add("MapObj::AddToMap2", "restore-small-puff");
      Add("Wounded::Start", "herowound");
    }
    ShadowFile("army_grunt-shadow.tga");
    RotateShadow(0); // default is 1

  }

  UnitObj()
  {
    TopSpeed(45);
    TurnSpeed(1440);
    Wound(1);

    SeeingRange(40);

    ResponseEvents()
    {
      Add("Attack")
      {
        Add("army.unit.sarge_attack-0.wav");
        Add("army.unit.sarge_attack-1.wav");
      }
      Add("Attacked")
      {
        Add("army.unit.sarge_attacked-0.wav");
        Add("army.unit.sarge_attacked-1.wav");
      }
      Add("Move")
      {
        Add("army.unit.sarge_move-0.wav");
        Add("army.unit.sarge_move-1.wav");
        Add("army.unit.sarge_move-2.wav");
      }
      Add("Select")
      {
        Add("army.unit.sarge_select-0.wav");
        Add("army.unit.sarge_select-1.wav");
        Add("army.unit.sarge_select-2.wav");
        Add("army.unit.sarge_select-3.wav");
      }
      Add("Spotted")
      {
        Add("army.unit.sarge_spotted-0.wav");
      }
    }

           Constructor("army.building.hq1");
    ConstructionTime(2);
    CreateSource("resource.blob.infantry1");
    CommandCost(1);
    ResourceCost()
    {
      Add("Plastic", 50);
      Add("Electricity", 0);
    }
    Prereqs()
    {
      Add("army.building.hq1");
    }


    Weapon("army.weapon.sarge");
  }
}

// WEAPON
CreateWeaponType("army.weapon.sarge")
{
  Style("Instant");

  MaxRange(45);

  Delay(0.2);

  Damage()
  {
    Amount(200);

    Effective("infantry", 50%);
    Effective("vehicle", 68%);
    Effective("structure", 100%);
    Effective("flyer", 100%);
    Effective("mine", 100%);
	Effective("hero", 70%);
  }

  FirePoints()
  {
    Add("HP-FIRE");
  }
}







Code: Select all

CreateObjectType("bonus.weapondamage", "Bonus")
{
  GameObj()
  {
    Properties()
    {
      Add("Filter::Bonus");
	  Add("Filter::Army");
      Add("Filter::Biological");
      Add("Filter::Unit");
      Add("Filter::Weapon");
      Add("Filter::Heroes");
      Add("Filter::Transportable");
	  Add("Client::FacilityBar");
      Add("Client::ForceNameDisplay");
    }
  }

  MapObj()
  {
    GodFile("prop_bonus_weapon.god");
    GenericFX()
    {
      Add("MapObj::Smoke", "bonus.weapon.effect");
      Add("Bonus::Triggered", "bonus.weapon.triggered");
    }
  }

 BonusObj()
  {
    Mode("Weapon");
    Modifier(0.5);
    TriggerRange(8);
    ControlName("Client::Bonus::Weapon");
    Message("Client::Bonus::Weapon");
  }
}

 GameObj()
  {
     ThinkInterval(1);
    IdleTask("Tasks::UnitConstructor");
    Properties()
    {
      Add("Filter::Army");
      Add("Filter::Biological");
      Add("Filter::Unit");
      Add("Filter::Weapon");
      Add("Filter::Heroes");
      Add("Filter::Transportable");
	  Add("Client::FacilityBar");
      Add("Client::ForceNameDisplay");
    }
  }

  MapObj()
  {
    GodFile("army_sarge2.god");
    PhysicsModel("Walker");
    TractionType("ground");
    GrainSize(1);

    ArmourClass("vehicle");
    HitPoints(150);

    TypeDisplay()
    {
      Image()
      {
        Image("if_game_portraits.tga", 0, 84, 42, 42);
        Mode("Centre");
      }
    }
    GenericFX()
    {
      Add("Weapon::Fire", "weapon.sarge.fire");
      Add("MapObj::AddToMap", "damage.grunt");
      Add("MapObj::Death", "death.infantry");
      Add("Restore::Target::Process", "restore-small");
      Add("MapObj::AddToMap2", "restore-small-puff");
      Add("Wounded::Start", "herowound");
    }
    ShadowFile("army_grunt-shadow.tga");
    RotateShadow(0); // default is 1

  }

  UnitObj()
  {
    TopSpeed(45);
    TurnSpeed(1440);
    Wound(1);

    SeeingRange(40);

    ResponseEvents()
    {
      Add("Attack")
      {
        Add("army.unit.sarge_attack-0.wav");
        Add("army.unit.sarge_attack-1.wav");
      }
      Add("Attacked")
      {
        Add("army.unit.sarge_attacked-0.wav");
        Add("army.unit.sarge_attacked-1.wav");
      }
      Add("Move")
      {
        Add("army.unit.sarge_move-0.wav");
        Add("army.unit.sarge_move-1.wav");
        Add("army.unit.sarge_move-2.wav");
      }
      Add("Select")
      {
        Add("army.unit.sarge_select-0.wav");
        Add("army.unit.sarge_select-1.wav");
        Add("army.unit.sarge_select-2.wav");
        Add("army.unit.sarge_select-3.wav");
      }
      Add("Spotted")
      {
        Add("army.unit.sarge_spotted-0.wav");
      }
    }

           Constructor("army.building.hq1");
    ConstructionTime(2);
    CreateSource("resource.blob.infantry1");
    CommandCost(1);
    ResourceCost()
    {
      Add("Plastic", 50);
      Add("Electricity", 0);
    }
    Prereqs()
    {
      Add("army.building.hq1");
    }


    Weapon("army.weapon.sarge");
  }
}

// WEAPON
CreateWeaponType("army.weapon.sarge")
{
  Style("Instant");

  MaxRange(45);


  Delay(0.1);

  Damage()
  {
    Amount(200);

    Effective("infantry", 100%);
    Effective("vehicle", 68%);
    Effective("structure", 100%);
    Effective("flyer", 100%);
    Effective("mine", 100%);
	Effective("hero", 70%);
  }

  FirePoints()
  {
    Add("HP-FIRE");
  }
}


Upgrades()
    {
      Add("army.unit.sarge2");
    }
  }
}

  MapObj()
  {
    GodFile("army_sarge2.god");
    RayTestFlags("Poly");
    PhysicsModel("walker");
    //MoveCamera(1);
    NearFadeFactor(0.3);

    GenericFX()
    {
      Add("Construct::Start", "upgrade.army");
      Add("Recycle::Start", "recycle.upgrade");
      Add("Restore::Target::Process", "restore-upgrade");
    }
    TypeDisplay()
    {
      Image()
      {
        Image("if_game_portraits.tga", 168, 210, 42, 42);
        Mode("Centre");
      }
    }
  }

  UnitObj()
  {
    SeeingRange(73);
    ConstructionTime(40);
    RecycleTime(0);
    ResourceCost()
    {
      Add("Plastic", 400);
      Add("Electricity", 0);
    }
  }
}
User avatar
TommyCD1
Moderator
Moderator
Posts: 1143
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: Creating new Armor classes

Post by TommyCD1 »

I'm sorry, but I'm not even sure where you're trying to go with this one. Building's don't upgrade by systematically searching for .god files. It's written specifically in the config what god file to use. In the case of the barracks, it doesn't even follow the pattern you described.

Code: Select all

  MapObj()
  {
    GodFile("army_barracks_mold_upgrade.god");
    RayTestFlags("Poly");
    PhysicsModel("building");

    GenericFX()
    {
      Add("Construct::Start", "upgrade.army");
      Add("Recycle::Start", "recycle.upgrade");
      Add("Restore::Target::Process", "restore-upgrade");
    }
    TypeDisplay()
    {
      Image()
      {
        Image("if_game_portraits.tga", 126, 210, 42, 42);
        Mode("Centre");
      }
    }
  }
Upgrading a unit wouldn't restore it's ammunition, as it doesn't restore armor nor health. And simply splicing two configs together, like the bonus and the sarge2 configs wouldn't make them work cooperatively. That's just gonna get a whole bunch of conflictions.

Also, when replying to the latest post without addressing a specific point, it's best to simply press 'Post Reply' as opposed to quoting the latest post. Unnecessary quoting really clutters the page.

I'm sorry if I sound harsh but I have trouble conveying myself and it's better to address this now. :D
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
Arisen
Mortar Man
Mortar Man
Posts: 33
Joined: Fri Feb 17, 2017 6:16 am
American Samoa

Re: Creating new Armor classes

Post by Arisen »

ok so if i were to use the upgrade system to create a new upgraded version of sarge, how would I do it?
User avatar
TommyCD1
Moderator
Moderator
Posts: 1143
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: Creating new Armor classes

Post by TommyCD1 »

The upgrading system in designed merely to allow more units to be bulit from buildings. The only possible benefits from upgrading a unit would be an increase in seeing range (while not increasing weapon range). And again, if a unit is enabled to upgrade, then it suffers from targeting issues and crashes the game if killed mid upgrade.
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
Arisen
Mortar Man
Mortar Man
Posts: 33
Joined: Fri Feb 17, 2017 6:16 am
American Samoa

Re: Creating new Armor classes

Post by Arisen »

TommyCD1 wrote: Mon Mar 13, 2017 9:13 am The upgrading system in designed merely to allow more units to be bulit from buildings. The only possible benefits from upgrading a unit would be an increase in seeing range (while not increasing weapon range). And again, if a unit is enabled to upgrade, then it suffers from targeting issues and crashes the game if killed mid upgrade.
:COFE: ok, with that in mind ill play around with it and see what i can do.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests