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

Creating new Armor classes

Post by Arisen »

I was poking around with the files of units after extracting my map and I noticed something I thought was strange when I was editing the heroes.

I noticed they have the same armor class as regular infantry units. I'm fresh off of company of heroes, and in that game different types of infantry have different types of armor values that reduce incoming damage. The higher tier the soldier (or higher veterancy the soldier has) usually the better armor they have.

quick example.

Riflemen do 100% damage to infantry class units

60% damage to soldier unit type

and 75% damage to Heroic unit type.

so each type of armor reduces the damage dealt by a specific weapon, and it applies to most weapons.

So I got to thinking... could this be done in this game? and lo and behold, it can!

all you have to do is change the armor class of the unit you want to whatever you want it to be!

but know that you have to afterwards add that damage class to the weapon damage table for every unit or else the units that dont have the new armor type in there weapon table will not be able to shoot at them.



Image



Image



I did this partly because I felt that heroes like Riff and Thick were too weak and needed to be buffed. I see now a possible way to create a lot more dynamic gameplay.
User avatar
E]x[F-Sniper
Admin
Admin
Posts: 1275
Joined: Wed Jul 16, 2008 2:21 am
Location: stfu noob
Contact:
Mexico

Re: Creating new Armor classes

Post by E]x[F-Sniper »

Good stuff man. :SWEET:
Image
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 »

Thanks :D. I'll keep you guys updates on anything more I find.


I'm wondering if there is a way to simulate the shielded units from Dark reign 2? I'd assume it was removed from the game but if it's still in the code there might be a way to get something like it working.

I also noticed that in some lines of code there's a strange line that seems to make reference to an armor value, like a separate health bar or something. :-w



CreateObject("resource.chewtoy", 47)
{
MapObj()
{
Armour(0.000000);
HitPoints(0.000000);

Position()
{
Pos(484.000000, 9.999999, 100.000000);
Right(-1.000000, 0.000000, 0.000000);
Up(0.000000, 1.000000, 0.000000);
Front(0.000000, 0.000000, -1.000000);
}


I'll keep looking into it and see what I find :PB




---------------EDIT---------------------------

Just tested out my new theory and I found something interesting. When I added the Armour value under the Hp of the character the game did not crash like I assumed it would. But it also didn't have any real effect that I could tell So I think it's safe to infer that Armour values are still in the games hardcode, but the functionality was removed after DR2. If anyone knows anything else about this please let me know.
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 »

Armour was removed, Yes.
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: Sat Feb 25, 2017 11:37 am Armour was removed, Yes.
ok then, well glad to know for sure.
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 »

Side note on this however, while Armour was removed from the game, ammunition wasn't. This you can give a unit limited ammo like so:

Code: Select all

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

  MaxRange(64);

  Ammunition(120);

  Delay(1);

  Damage()
  {
    Amount(51);

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

  FirePoints()
  {
    Add("HP-FIRE");
  }
}
As you can see, Sarge can now only fire his pistol 120 times. Once these shots are used up, he can fire away all he wants, the gun will do nothing. This goes for projectiles too. But something to keep in mind and to further complicate things, while ammunition wasn't removed, restoring ammo was. So there is no way to ever recover spent bullets. So I guess if you want to make something akin to a disc-one nuke that can only be used so many times, this is how you do it.
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 »

:C neat! I've tried to find a workaround to restoring the ammo but have come up short so far. I had the idea that I could use the weapon bonuses to give sarge a new gun instead of giving him more bullets. So like you would walk over the pickup and it would execute the "createweapontype" command and give sarge the same weapon but with full bullets.



unfortunately thus far I get the "expected } but found end of file" error when trying to do this. :W


Code: Select all

#include "fx_bonus_speed.cfg"

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

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

  MaxRange(45);

 Ammunition (120);

  Delay(0.7);

  Damage()
  {
    Amount(42);

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

  FirePoints()
  {
    Add("HP-FIRE");
  }
  
  
  // WEAPON
CreateWeaponType("army.weapon.sarge")
{
  Style("Instant");

  MaxRange(45);

 Ammunition (20);

  Delay(0.7);

  Damage()
  {
    Amount(42);

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

  FirePoints()
  {
    Add("HP-FIRE");
  
  MapObj()
  {
    GodFile("prop_bonus_speed.god");
    GenericFX()
    {
      Add("MapObj::Smoke", "bonus.speed.effect");
      Add("Bonus::Triggered", "bonus.speed.triggered");
    }
  }

  BonusObj()
  {
    Mode("Speed");
    Modifier(0.5);
    TriggerRange(8);
    ControlName("Client::Bonus::Speed");
    Message("Client::Bonus::Speed");
  }
}
User avatar
E]x[F-Sniper
Admin
Admin
Posts: 1275
Joined: Wed Jul 16, 2008 2:21 am
Location: stfu noob
Contact:
Mexico

Re: Creating new Armor classes

Post by E]x[F-Sniper »

Arisen wrote: Sun Mar 12, 2017 11:30 am
unfortunately thus far I get the "expected } but found end of file" error when trying to do this. :W
That just means the block of code is missing a curly bracket }
It's missing at the end btw. CreateWeaponType opens but it does not close.
Image
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 »

Sniper wrote: Sun Mar 12, 2017 4:44 pm
Arisen wrote: Sun Mar 12, 2017 11:30 am
unfortunately thus far I get the "expected } but found end of file" error when trying to do this. :W
That just means the block of code is missing a curly bracket }
It's missing at the end btw. CreateWeaponType opens but it does not close.


Thanks for the heads up! I did manage to make some progress with this idea, I now close the bracket and when I load the map the game no longer crashes, but when I walk over the powerup There is seemingly no effect on sarges weapon, I think I am missing part of the entry needed to give a weapon to a character.

Code: Select all

#include "fx_bonus_speed.cfg"

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

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

  MaxRange(95);

 Ammunition (20);

  Delay(0.1);

  Damage()
  {
    Amount(500);

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

  FirePoints()
  {
    Add("HP-FIRE");
  }
   }
  MapObj()
  {
    GodFile("prop_bonus_speed.god");
    GenericFX()
    {
      Add("MapObj::Smoke", "bonus.speed.effect");
      Add("Bonus::Triggered", "bonus.speed.triggered");
    }
  }

  BonusObj()
  {
    Mode("Speed");
    Modifier(0.5);
    TriggerRange(8);
    ControlName("Client::Bonus::Speed");
    Message("Client::Bonus::Speed");
  }
}
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 »

: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:
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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests