STEAM GROUP
Potato's Custom MvM Servers potatomvm
STEAM GROUP
Potato's Custom MvM Servers potatomvm
1,883
IN-GAME
8,686
ONLINE
Founded
March 31, 2017
Language
English
Location
United States 
[FH]L0RDR0B Jun 15, 2018 @ 3:38pm
ItemAttributes error and conflicting/merged HUD icons issues?
Hi there! I decided to hop on the bandwagon of making my own submission for the Canteen Crasher event a few weeks ago, and over the past couple of days have turned my focus towards the missions to go with the map I have planned.

I just finished the advanced mission with the help of Hydrogen's very useful guide on making pop files, and having imported the missions over to mvm_example for testing I've managed to prune out most of the errors I could find. However, there were two key issues that I still have been unable to solve, which I was hoping someone here could guide me in the right direction.

The first problem is the console reports the following for nearly every robot I have in the pop file:

TFBotSpawner: attribute error: 'Context 'ItemAttributes': Attribute "item" in "attributes" did not match any attribute definitions' TFBotSpawner: need to specify ItemName in ItemAttributes.

The mission works and runs as expected despite this error, but I'm not sure how to fix it. Any custom robots I included were modified from Valve's official code from robot_standard.pop and robot_giant.pop, and loading one of the official Valve MvM missions into mvm_example does not yield this error either, so presumably I have done something wrong here.

Here's an example of a custom robot I'm using - a Extended Buff Banner Soldier who uses the Black Box instead of the stock Rocket Launcher, combining the two codes into one:

T_TFBot_Soldier_Buff_Blackbox { Class Soldier ClassIcon soldier_buff Item "The Black Box" Item "The Buff Banner" Name "Extended Buff Soldier" Skill Expert Attributes HoldFireUntilFullReload Attributes SpawnWithFullCharge ItemAttributes { ItemName "The Black Box" "damage bonus" 0.33 "fire rate bonus" 0.001 "clip size upgrade atomic" 0 "faster reload rate" 0.9 "blast radius increased" 1.25 "Projectile speed increased" 0.4 "projectile spread angle penalty" 2 "heal on hit for rapidfire" 60 } ItemAttributes { Item "The Buff Banner" "increase buff duration" 8 } }

The code works as expected - the Soldiers use their Buff Banner, then fire off all their rockets in one burst and slowly reload them all. The killcam even shows their stats as expected. And yet the error message still shows.

Does the error message mean anything important? Is there a way to get rid of it easily? Would I be penalised by the CC judges for leaving it in, even though it seems to be completely harmless to the gameplay?

The second problem I have is that sometimes the icons used for the robots end up getting shared, or conflict with one another. One example would be 5 squads of a Giant Shotgun Heavy with 4 regular Shotgun Heavies being displayed as 25 Giants, rather than 5 Giants and 20 regulars. Another example would be having a wavespawn of 15 crit Shortstop Scouts, followed by a Support wavespawn of infinite crit Shortstop Scouts taking over when all 15 are dead, with the original 15 being counted under as Support instead of along the main waves.

I'm aware that Hydrogen's guide touches upon this problem briefly (at the very bottom of page 31) with the example of 35 small Pyros and 3 giant Pyros displaying as '38 Giant Pyros', but unless I'm missing something obvious here I don't think the guide explains how to solve that issue. I couldn't find any existing solutions on Google or these forums either, so I'm rather at a loss here. I'm not using any custom HUD icons either, just the official ones already in the game.

Thank you for taking the time to read my queries and help get a newcomer like myself on the right track. I might post any other questions or problems that come up in the future, but for now I eagerly await any answers you have to offer.
< >
Showing 1-4 of 4 comments
Jakapoa Jun 15, 2018 @ 4:28pm 
For your first issue, look at how you did the code for the black box attributes and the buff banner attributes.
T_TFBot_Soldier_Buff_Blackbox { Class Soldier ClassIcon soldier_buff Item "The Black Box" Item "The Buff Banner" Name "Extended Buff Soldier" Skill Expert Attributes HoldFireUntilFullReload Attributes SpawnWithFullCharge ItemAttributes { ItemName "The Black Box" "damage bonus" 0.33 "fire rate bonus" 0.001 "clip size upgrade atomic" 0 "faster reload rate" 0.9 "blast radius increased" 1.25 "Projectile speed increased" 0.4 "projectile spread angle penalty" 2 "heal on hit for rapidfire" 60 } ItemAttributes { Item "The Buff Banner" "increase buff duration" 8 } }
You used ItemName for the black box, and only used item for the buff banner. You need to use ItemName for it to work properly.

As for issue two, you need to use different icon names to prevent icon stacking (pyro, pyro_crit, pyro_giant). I don't know what you mean with the support issue.
[FH]L0RDR0B Jun 16, 2018 @ 2:20pm 
Originally posted by ATG Jakapoa:
For your first issue, look at how you did the code for the black box attributes and the buff banner attributes.
T_TFBot_Soldier_Buff_Blackbox { Class Soldier ClassIcon soldier_buff Item "The Black Box" Item "The Buff Banner" Name "Extended Buff Soldier" Skill Expert Attributes HoldFireUntilFullReload Attributes SpawnWithFullCharge ItemAttributes { ItemName "The Black Box" "damage bonus" 0.33 "fire rate bonus" 0.001 "clip size upgrade atomic" 0 "faster reload rate" 0.9 "blast radius increased" 1.25 "Projectile speed increased" 0.4 "projectile spread angle penalty" 2 "heal on hit for rapidfire" 60 } ItemAttributes { Item "The Buff Banner" "increase buff duration" 8 } }
You used ItemName for the black box, and only used item for the buff banner. You need to use ItemName for it to work properly.

As for issue two, you need to use different icon names to prevent icon stacking (pyro, pyro_crit, pyro_giant). I don't know what you mean with the support issue.


Thanks for the first issue. I've got it to work properly now, it seems to be only the Banner units that were having this problem, everything else worked as intended.

As for the second, the problem I had was that if I tried spawning the same type of robot in two different WaveSpawns - one as a regular wave, one as a support wave - the HUD would ignore any instances of those robots in the regular wave and say that the robots were only spawning as Support. So rather than saying "all of these robots are support", I want it to say "you can expect to defeat X amount of robots, and then any more that spawn are support".

I've tried naming the ClassIcons differently (e.g. scout_shortstop and scout_shortstop_crit), but curiously for a few cases (notably, for demoknight_crit and scout_shortstop_crit) I'm now getting the purple/black chequered box for no existing icon. Which is weird because they were working fine otherwise.

This is the Template that I'm using for the regular wave Shortstop Scouts:

T_TFBot_Scout_Shortstop { Class Scout Skill Normal ClassIcon scout_shortstop Item "The Shortstop" Item "The Milkman" Name "Shortstop Scout" Health 650 Scale 1.4 CharacterAttributes { "head scale" 0.7 "move speed bonus" 1.25 } }

And then this is where I try to call the Support Shortstop Scouts, which only starts after all of the Shortstop Scouts in the main wave are dead:

WaveSpawn { WaitForAllSpawned "wave06d" Where spawnbot TotalCount 5 MaxActive 5 SpawnCount 5 WaitBeforeStarting 5 WaitBetweenSpawns 30 TotalCurrency 50 Support 1 TFBot { Template T_TFBot_Scout_Shortstop ClassIcon scout_shortstop_crit Attributes AlwaysCrit } }

The Demoknight problem is very similar - I've got a Giant Demoman with a squad of 3 Demoknights following him, which then leads to an endless Support wave of 4 Demoknights. The 3 initial Demoknights do not display on the HUD, so presumably they get stacked with the Demoknights that are listed as being part of the Support. Any idea how to fix this?

One last thing that's now cropped up, in addition to the above - I've been trying to get some Vaccinator Medics to spawn, but I get this weird visual glitch where their tubes extend to a point in the sky. Here's some screenshots of it happening:

https://steamcommunity.com/id/L0RDR0B/screenshot/927060754654367616

https://steamcommunity.com/id/L0RDR0B/screenshot/927060754654369225

T_TFBot_Medic_Vaccinator_Bullet { Class Medic Name "Bullet Vaccinator Medic" Skill Expert Item "The Vaccinator" Item "Platinum Pickelhaube" Item "Mecha-Medes" Attributes SpawnWithFullCharge Attributes VaccinatorBullets CharacterAttributes { "ubercharge rate bonus" 25 "heal rate bonus" 1 "uber duration bonus" 100 "medigun bullet resist passive" 1 "medigun bullet resist deployed" 1 } ItemAttributes { ItemName "TF_WEAPON_SYRINGEGUN_MEDIC" "damage penalty" 0.1 } }

I've seen other custom missions use them with their item set to "The Vaccinator MVM", yet when I change their Medigun to that they spawn with no weapon visible. How do I fix this?

Thanks again for your help!
Jakapoa Jun 17, 2018 @ 2:26am 
Originally posted by FHLord R.O.B.:
Thanks for the first issue. I've got it to work properly now, it seems to be only the Banner units that were having this problem, everything else worked as intended.

As for the second, the problem I had was that if I tried spawning the same type of robot in two different WaveSpawns - one as a regular wave, one as a support wave - the HUD would ignore any instances of those robots in the regular wave and say that the robots were only spawning as Support. So rather than saying "all of these robots are support", I want it to say "you can expect to defeat X amount of robots, and then any more that spawn are support".

-snip-

The Demoknight problem is very similar - I've got a Giant Demoman with a squad of 3 Demoknights following him, which then leads to an endless Support wave of 4 Demoknights. The 3 initial Demoknights do not display on the HUD, so presumably they get stacked with the Demoknights that are listed as being part of the Support. Any idea how to fix this?
That's strange, because that's not normally supposed to happen (regardless of similar icons). What does the previous wavespawn look like (the non-support one)?

Originally posted by FHLord R.O.B.:
I've tried naming the ClassIcons differently (e.g. scout_shortstop and scout_shortstop_crit), but curiously for a few cases (notably, for demoknight_crit and scout_shortstop_crit) I'm now getting the purple/black chequered box for no existing icon. Which is weird because they were working fine otherwise.
Only certain icons exist in tf2 (by default).
scout scout_bat scout_bonk scout_bonk_giant scout_d scout_fan scout_fan_giant scout_giant scout_giant_fast scout_jumping scout_jumping_g scout_shortstop scout_stun scout_stun_armored scout_stun_giant scout_stun_giant_armored soldier soldier_backup soldier_backup_giant soldier_barrage soldier_blackbox soldier_blackbox_giant soldier_buff soldier_buff_giant soldier_burstfire soldier_conch soldier_conch_giant soldier_crit soldier_d soldier_giant soldier_libertylauncher soldier_libertylauncher_giant soldier_major_crits soldier_sergeant_crits soldier_spammer soldier_spammer_crit pyro pyro_d pyro_flare pyro_flare_giant pyro_giant demo demo_bomber demo_burst demo_burst_crit demo_burst_giant demo_d demo_giant demoknight demoknight_giant demoknight_samurai heavy heavy_champ heavy_champ_giant heavy_chief heavy_crit heavy_d heavy_deflector heavy_deflector_healonkill heavy_deflector_healonkill_crit heavy_deflector_push heavy_giant heavy_gru heavy_gru_giant heavy_heater heavy_heater_giant heavy_mittens heavy_shotgun heavy_shotgun_giant heavy_steelfist heavy_urgent engineer engineer_d medic medic_d medic_giant medic_uber sniper sniper_bow sniper_bow_multi sniper_d sniper_jarate sniper_sydneysleeper spy spy_d tank special_blimp teleporter sentry_buster
Anything not on that list will generate the missing textures (purple & black mess). I'd have included that earlier, but I didn't have the list on-hand. Anything else will require custom icons.

Originally posted by FHLord R.O.B.:
One last thing that's now cropped up, in addition to the above - I've been trying to get some Vaccinator Medics to spawn, but I get this weird visual glitch where their tubes extend to a point in the sky. Here's some screenshots of it happening:
https://steamcommunity.com/id/L0RDR0B/screenshot/927060754654367616
https://steamcommunity.com/id/L0RDR0B/screenshot/927060754654369225
It's a visual glitch due to the fact that medic robot model don't have the same bones as the regular human model. In particular, the bone that the vaccinator backpack would attatch to does not exist on the robot model. This causes the vaccinator's backpack to stay at wherever the map's origin is.

Originally posted by FHLord R.O.B.:
I've seen other custom missions use them with their item set to "The Vaccinator MVM", yet when I change their Medigun to that they spawn with no weapon visible. How do I fix this?
"The Vaccinator MVM" used to exist in the game's code, but was removed a couple updates/years ago. Just use "The Vaccinator" for now.
[FH]L0RDR0B Jun 24, 2018 @ 2:12pm 
Apologies for the late delay, I wanted to make sure that the map itself was near completion. I've managed to get to the point where I can run the mission on the intended map correctly, rather than having to use mvm_example all the time, as well as being able to install necessary .vtf and .vmf files for the robots to have the correct icons. With any luck, I should be able to make a submission and get it judged within the next few days, so I can spend the rest of the time hopefully getting it near the release candidate stages.

I thought it would be polite to let you know this, and respond to what you had to say previously.

Originally posted by ATG Jakapoa:
That's strange, because that's not normally supposed to happen (regardless of similar icons). What does the previous wavespawn look like (the non-support one)?

Here's the original wavespawn. I've worked around it by making a duplicate .vmf called scout_shortstop_crit that points to the same .vtf as scout_shortstop.vmf does (same with demoknight.vmf and demoknight_crit.vmf), but perhaps you could find a way that the workaround isn't required.

WaveSpawn { Name "wave06d" WaitForAllDead "wave06b" Where spawnbot TotalCount 15 MaxActive 10 SpawnCount 5 WaitBeforeStarting 5 WaitBetweenSpawns 10 TotalCurrency 150 TFBot { Template T_TFBot_Scout_Shortstop Attributes AlwaysCrit } }

WaveSpawn { Name "wave01c" WaitForAllSpawned "wave01b" Where spawnbot TotalCount 8 MaxActive 4 SpawnCount 4 WaitBeforeStarting 5 WaitBetweenSpawns 10 TotalCurrency 100 Squad { TFBot { Template T_TFBot_Giant_Demoman Tag giant } TFBot { Template T_TFBot_Demoman_Knight Attributes AlwaysCrit } TFBot { Template T_TFBot_Demoman_Knight Attributes AlwaysCrit } TFBot { Template T_TFBot_Demoman_Knight Attributes AlwaysCrit } } }

Originally posted by ATG Jakapoa:
It's a visual glitch due to the fact that medic robot model don't have the same bones as the regular human model. In particular, the bone that the vaccinator backpack would attatch to does not exist on the robot model. This causes the vaccinator's backpack to stay at wherever the map's origin is.

"The Vaccinator MVM" used to exist in the game's code, but was removed a couple updates/years ago. Just use "The Vaccinator" for now.

I've set the Vaccinator as such (and even gave them their custom icons that Hydrogen and the Iron Gauntlet team posted on tf2maps.net), but I do have one followup question. I don't remember any of the Titanium Tank tours that featured Vaccinator Medics having this problem - is the visual glitch fixed when the official community servers run them, or did I not pay attention to them properly?

Either way, thanks again for your help. Hopefully that should be all the issues I've encountered wrapped up, and I'll make another post in the submission forum in the next few days with my map. Take care!
< >
Showing 1-4 of 4 comments
Per page: 1530 50