Transport Bug when carrying Total Mayhem units.

Moderators: Uveso, burnie222

Transport Bug when carrying Total Mayhem units.

Postby Goldy3 » 30 Oct 2016, 21:01

Hi, just want to say thanks for bringing back total mayhem!

Here's a step by step.

1. Load TM units in a vanilla air transport (doesn't matter if it's T1, T2, or T3 Air Transport)
2. Disembark TM units from vanilla air transport.
3. Lose control of TM units, TM units act on their own without any player input (I.E will attack-move without player input). The A.I takes control of them.

This only affects TM units, other units (FA and Blackops) are unaffected.

Hope that helps.
Goldy3
Avatar-of-War
 
Posts: 69
Joined: 08 Feb 2014, 01:28
Has liked: 1 time
Been liked: 8 times
FAF User Name: Goldy3

Re: Transport Bug when carrying Total Mayhem units.

Postby Uveso » 30 Oct 2016, 22:15

hello Goldy3,

Units from Total Mayhem are attacking enemy units in a way bigger radius then normal units.
This is caused by manipulating/adding a dummy weapon to the unit with huge weaponrange:

Code: Select all
ProjectileId = '/mods/TotalMayhem/projectiles/NULLWEAPON/NULLWEAPON_proj.bp',
PrefersPrimaryWeaponTarget = true,
MaxRadius = 200,

This is a special feature not a bug :)


Did you know, there is a subforum only for Total Mayhem:
viewforum.php?f=47
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Transport Bug when carrying Total Mayhem units.

Postby Goldy3 » 31 Oct 2016, 05:54

Well, can I make a feature request to have it where the TM units don't do that? :)
Goldy3
Avatar-of-War
 
Posts: 69
Joined: 08 Feb 2014, 01:28
Has liked: 1 time
Been liked: 8 times
FAF User Name: Goldy3

Re: Transport Bug when carrying Total Mayhem units.

Postby Uveso » 31 Oct 2016, 07:25

I am sorry, but not in this case :(
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Transport Bug when carrying Total Mayhem units.

Postby Goldy3 » 31 Oct 2016, 19:42

Ok well, I'm sorry we're gonna have to agree to disagree. I'm pretty positive this is a bug due to the fact that the TM unit behavior that were discussing only happens when under very, VERY specific circumstances I.E disembarking from a transport. Maybe I'm reading what you said wrong but would the code suggest that this unit behavior would only activate upon disembarking from a transport? Cos' in any other circumstance this TM unit behavior doesn't occur at all. Though I'm guessing by your statement:

Uveso wrote:hello Goldy3,

Units from Total Mayhem are attacking enemy units in a way bigger radius then normal units.
This is caused by manipulating/adding a dummy weapon to the unit with huge weaponrange:

Code: Select all
ProjectileId = '/mods/TotalMayhem/projectiles/NULLWEAPON/NULLWEAPON_proj.bp',
PrefersPrimaryWeaponTarget = true,
MaxRadius = 200,

This is a special feature not a bug :)


Did you know, there is a subforum only for Total Mayhem:
viewforum.php?f=47


That this unit behavior should be occurring all the time regardless wither or not the unit has disembarked from an transport?
Goldy3
Avatar-of-War
 
Posts: 69
Joined: 08 Feb 2014, 01:28
Has liked: 1 time
Been liked: 8 times
FAF User Name: Goldy3

Re: Transport Bug when carrying Total Mayhem units.

Postby Uveso » 01 Nov 2016, 02:15

Yes this is a bug. Well, its more a glitch...

...Auto-attacking should only occour if an AI is plaing the unit.
If we take a look inside the unitscript we see clearly:
Code: Select all
if self:GetAIBrain().BrainType == 'Human' and IsUnit(self) then
    self:SetWeaponEnabledByLabel('autoattack', false)
else
    self:SetWeaponEnabledByLabel('autoattack', true)
end     

"autoattack" is the name of the weapon with "range = 200"
So, only if the controlbrain of the unit is not a human player we are using the autoattack weapon.

I don't now why the unit is using the AI weapon when we de-attach it from a transporter.
There is no script to tell the Unit to use the weapon.
Also unitcalls depending on transport like OnTransportDetach and OnDetachedFromTransport are not hooked or modified.

Sure we can add to every unit script a OnTransportDetach to make sure the weapon is set right.

But instead of changing every unit we should compleatly remove the AI stuff from all units, and let the real AI control them.
We can easily add a new platoonbuilder to the normal AI to move the units like before.
This will also speed up the simspeed because not every unit is using his own targetting script.

We also need some AI scripts to handle the special Tech1-Tech3 Experimentals.

I already changed some AI scripts with Total Mayhem to force the AI to build more experimentals.

On the other side i like it, that Total Mayhem units are acting different then in other mods. I use the Transport->autoattack glitch quite often :)
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Transport Bug when carrying Total Mayhem units.

Postby Sprouto » 01 Nov 2016, 17:13

The described behavior is not really a bug, and will only appear when a unit is dropped from a transport.

Despite being initialized by the unit script to be disabled if used by a Human player, the weapon will be re-enabled by the standard OnTransportDetach function call. That function calls another (MarkWeaponsOnTransport) that will call the final, third function (SetOnTransport) that will re-enable ALL weapons not marked as CanFireFromTransport.

As Uveso rightly points out, each Total Mayhem unit that uses this would have to have it's own custom hooked function call -- not very practical.
Sprouto
Priest
 
Posts: 366
Joined: 08 Sep 2012, 05:40
Has liked: 54 times
Been liked: 74 times
FAF User Name: Sprouto

Re: Transport Bug when carrying Total Mayhem units.

Postby Uveso » 03 Nov 2016, 01:50

@Sprouto:

thanks for explaining this!

@Goldy3:

Thanks to Sprouto i know now, where i have to look at.
I'll check, if we can fix this "feature".
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Transport Bug when carrying Total Mayhem units.

Postby Goldy3 » 05 Nov 2016, 21:37

Yay! the feature/bug might be removed/fixed! :lol:
Goldy3
Avatar-of-War
 
Posts: 69
Joined: 08 Feb 2014, 01:28
Has liked: 1 time
Been liked: 8 times
FAF User Name: Goldy3

Re: Transport Bug when carrying Total Mayhem units.

Postby Uveso » 06 Nov 2016, 08:44

Well, i fixed the "feature" on the following units:

brnt2htt3 - Heavy Armored Tank
brpt3bt - Battle Tank
brot1mt - Medium Tank
brot2mt - Medium Tank
brpat2figbo - Fighter
brnt2potshot - Medium Artillery
brmt2medm - Advanced Riot Bot
brot2exm2 - Advanced Battle Tank
brmt2abt - Advanced Battle Tank
brnt1advbot - Advanced Battle Bot
brmt1at - Assault Tank
brmt1ht - Heavy Tank
brnt3advbtbot - Advanced Battlemech
brpt1asta - Assault Tank
brnt2ht - Heavy Armored Tank
brot3aa - Mobile Anti-Air
brpt1extank2 - Advanced Assault Tank
brnt2bt - Battle Tank
brmt1mt - Medium Tank
brnt3bt - Battle Tank
brnt2exlm - Advanced Light Assault Mech
brot1mtt3 - Medium Tank
brmt3advbtbot - Advanced Battle Bot
brnt1btt2 - Battle Tank
brnt2bm - Advanced Gatling Mech
brot1mtt2 - Medium Tank
brnt3aa - Mobile Anti-Air
brmt1btt2 - Battle Tank
brmt3ml - Rocket Battery
brmt3ht - Medium Tank
brot1btt2a - Battle Tank
brnat1advfig - Advanced FighterBomber
brmt3aa - Mobile Anti-Air
brot3exm1 - Advanced Support Tank
brmt2bm - Battle Mech
brnt2exm1 - Advanced Assault Bot
brot2ht - Heavy Hover Tank
brmt1bm2 - Light Battle Mech
brmt1bt - Battle Tank
brmt1btt3 - Battle Tank
brnt3bat - Experimental Mobile Artillery
brmt3rap - Assault Mech
brnt1mtt3 - Medium Tank
brmt2st - Stealth Tank
brmt2abtt3 - Advanced Battle Tank
brpat1advbomb - Advanced Bomber
brot3ml - Plasma Battery
brmt1exm1 - Advanced Light Mech
brot1btt2 - Advanced Battle Tank
brot3bt2 - Battle Tank
brnt1htt2 - Heavy Tank
brmt2ht - Heavy Armored Tank
brpt1bt - Battle Tank
brmat2advbomber - Advanced Stealth Bomber
brmt1extank - Advanced Battle Tank
brmt3lzt - Laser Tank
brnt3ml - Rocket Battery
brmt1bm - Light Rocket Mech
brpt1ht - Heavy Tank
brnt3doomsday - Prototype Mobile Fortress
brnt1htt3 - Heavy Tank
brot2exth - Advanced Tank Hunter
brnt2exmdf - Advanced Mobile Defense System
brnt1exm1 - Advanced Assault Tank
brpt1exm1 - Heavy Battle Bot
brnt3abb - Armored Battle Bot
brot1bt - Advanced Battle Tank
brot1btt3 - Battle Tank
brnt1mt - Medium Tank
brnat2fighter - Fighter
brmt2htt3 - Heavy Armored Tank
brnt1bt - Battle Tank
brnt1ht - Heavy Tank
brnt3ht - Heavy Tank
brot1exm2 - Advanced Assault Tank
brmt3bt - Battle Tank
brpt3ml - Thau Battery
brnt1mtt2 - Medium Tank
brot1exm1 - Advanced Assault Bot
brot3bt - Battle Tank
brot3abb - Armored Battle Bot

Did i miss one ? :)

New version of TM is here:
viewtopic.php?f=47&t=12248
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Next

Return to Total Mayhem

Who is online

Users browsing this forum: No registered users and 1 guest