Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: override_class acting up  (Read 1737 times)

0 Members and 1 Guest are viewing this topic.

Offline Troggy Hordesman

  • *
  • +3% chance to make useful post
  • Troggy Hordesman has no influence.
override_class acting up
« on: September 17, 2013, 06:14:26 PM »
I have been messing around with override_class lately but seem to have run into a problem.

This works fine:

Code: [Select]
"item_healthkit" {
"item_healthkit"    "90"
"weapon_custom29" "9"
"weapon_soy"    "1"
}
"item_healthvial" {
"item_healthvial" "90"
"weapon_custom29" "3"
"food_sankaba"  "3"
"food_cornedbeef"  "4"
}
"item_battery" {
"item_battery"  "99""
"item_ammo_ar2_altfire" "1"
}
"item_ammo_ar2_altfire" {
"item_ammo_ar2_altfire" "55"
"item_ammo_smg1_grenade" "45"
}

But right below it is:

Code: [Select]
"item_ammo_pistol" {
"item_ammo_pistol" "94"
"weapon_pistol" "1"
"weapon_alyxgun" "1"
"weapon_custom2" "1"
"weapon_custom7" "1"
"weapon_custom18" "1"
"weapon_custom28" "1"
}
"item_ammo_357" {
"item_ammo_357" "97"
"weapon_357"    "1"
"weapon_custom23" "1"
"weapon_custom24" "1"
}

Which refuses to work. The strange thing is, I tested this yesterday and it worked fine, and only modified the working ones today by making the rare stuff a bit more common.
My behind is behind me, always watching.

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: override_class acting up
« Reply #1 on: September 17, 2013, 06:52:50 PM »
Could you post the whole script by any chance?

Offline Troggy Hordesman

  • *
  • +3% chance to make useful post
  • Troggy Hordesman has no influence.
Re: override_class acting up
« Reply #2 on: September 17, 2013, 06:55:49 PM »
Code: [Select]
OverrideClasses
{
"default_map" {
"info_player_rebel" {
"info_player_allies" "100"
}
"info_player_combine" {
"info_player_axis" "100"
}
"item_healthkit" {
"item_healthkit"    "90"
"weapon_custom29" "9"
"weapon_soy"    "1"
}
"item_healthvial" {
"item_healthvial" "90"
"weapon_custom29" "3"
"food_sankaba"  "3"
"food_cornedbeef"  "4"
}
"item_battery" {
"item_battery"  "99""
"item_ammo_ar2_altfire" "1"
}
"item_ammo_ar2_altfire" {
"item_ammo_ar2_altfire" "55"
"item_ammo_smg1_grenade" "45"
}
"item_ammo_pistol" {
"item_ammo_pistol" "94"
"weapon_pistol" "1"
"weapon_alyxgun" "1"
"weapon_custom2" "1"
"weapon_custom7" "1"
"weapon_custom18" "1"
"weapon_custom28" "1"
}
"item_ammo_357" {
"item_ammo_357" "97"
"weapon_357"    "1"
"weapon_custom23" "1"
"weapon_custom24" "1"
}
"weapon_jackhammer" {
"weapon_custom5" "100"
}
"weapon_sawedoff" {
"weapon_custom6" "100"
}
"weapon_cz52" {
"weapon_custom10" "100"
}
"weapon_pulsemg" {
"weapon_custom12" "100"
}
"weapon_oicw" {
"weapon_custom16" "100"
}
"weapon_a35" {
"weapon_custom20" "70"
}
"weapon_minigun" {
"weapon_custom26" "80"
}
"weapon_sword" {
"weapon_custom27" "70"
}
"item_ammo_sniper" {
"item_ammo_custom1" "100"
}
"item_ammo_gauss" {
"item_ammo_ar2 " "100"
}
"item_ammo_flare" {
"item_box_buckshot" "100"
}
"weapon_slam" {
"item_ammo_smg1_grenade" "100"
}
"weapon_deagle" {
"weapon_custom24" "100"
}
"weapon_m4a1" {
"weapon_custom3" "100"
}
"weapon_p90" {
"weapon_custom13" "100"
}
"weapon_m249" {
"weapon_custom15" "100"
}
}
}

It's a modified version of the redux script, if parts seem familiar. Knowing how replacement scripts usually work, why everything above item_pistol_ammo works usually means that item_pistol_ammo is doing something wrong. The case could be different here though.
« Last Edit: September 17, 2013, 06:58:07 PM by Troggy Hordesman »
My behind is behind me, always watching.

Offline Onemanshow

  • JuanMan
  • *
  • *
  • +67% chance to make useful post
  • Onemanshow is awe-inspiring!Onemanshow is awe-inspiring!Onemanshow is awe-inspiring!Onemanshow is awe-inspiring!Onemanshow is awe-inspiring!Onemanshow is awe-inspiring!Onemanshow is awe-inspiring!Onemanshow is awe-inspiring!Onemanshow is awe-inspiring!Onemanshow is awe-inspiring!Onemanshow is awe-inspiring!Onemanshow is awe-inspiring!
Re: override_class acting up
« Reply #3 on: September 17, 2013, 07:01:48 PM »
You've got an extra " on item_battery.

         "item_battery"     "99"" <--this right here.

Offline Troggy Hordesman

  • *
  • +3% chance to make useful post
  • Troggy Hordesman has no influence.
Re: override_class acting up
« Reply #4 on: September 17, 2013, 07:13:17 PM »
Woops! Thank you so much! I looked at this script over and over again and never noticed that. It's those little lines... those bloody little things...

Thanks again, I needed an extra set of eyes on this one.
My behind is behind me, always watching.

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: override_class acting up
« Reply #5 on: September 17, 2013, 07:39:18 PM »
Woops! Thank you so much! I looked at this script over and over again and never noticed that. It's those little lines... those bloody little things...

Thanks again, I needed an extra set of eyes on this one.

I can remember I spend 2 bloody days finding some freaking bug in my script, when I was just about to give up, I saw a " too much in the middle of the script. I was braindead after this.

Offline Troggy Hordesman

  • *
  • +3% chance to make useful post
  • Troggy Hordesman has no influence.
Re: override_class acting up
« Reply #6 on: September 19, 2013, 11:46:29 AM »
It seems like adding non-custom weapons to the lists may cause the weapons to act bugged, and the same happens if you make a custom weapon have chance to spawn on the list of default weapons. It's pretty weird but wield some interesting albeit probably useless, results:

Adding non-custom weapon to an ammo list cause:
The weapon is added to the inventory but cannot be used. If it is encountered normally after this, they will become two separate entities but the useless entity overlaps the working one in the inventory.

Adding a custom weapon to a default weapon list cause:
Both entities become one. I added the Firehawk (successor to the deagle) to the 357 list and what I got was a left-handed 357 with the Firehawk's name and icon, but the stats of the 357. Pretty funny stuff.

I am by no doubt not the first to discover this, just thought it would be fun to tell the story of the gun that was two.
My behind is behind me, always watching.

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: override_class acting up
« Reply #7 on: September 19, 2013, 12:57:02 PM »
It seems like adding non-custom weapons to the lists may cause the weapons to act bugged, and the same happens if you make a custom weapon have chance to spawn on the list of default weapons. It's pretty weird but wield some interesting albeit probably useless, results:

Adding non-custom weapon to an ammo list cause:
The weapon is added to the inventory but cannot be used. If it is encountered normally after this, they will become two separate entities but the useless entity overlaps the working one in the inventory.

Adding a custom weapon to a default weapon list cause:
Both entities become one. I added the Firehawk (successor to the deagle) to the 357 list and what I got was a left-handed 357 with the Firehawk's name and icon, but the stats of the 357. Pretty funny stuff.

I am by no doubt not the first to discover this, just thought it would be fun to tell the story of the gun that was two.

Yeah i had this too, once I had a custom MP5 with SMG1 stats.