TommyCD1 wrote: ↑Sun Mar 12, 2017 9:15 pmAlright 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: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"); } }
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.
- Mode("Weapon");
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.
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.
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);
}
}
}