Botpack.Bot.bViewTarget

Discussions about Coding and Scripting
Post Reply
User avatar
OjitroC
Godlike
Posts: 3613
Joined: Sat Sep 12, 2015 8:46 pm

Botpack.Bot.bViewTarget

Post by OjitroC »

Playing in 469c RC-4 I've noticed that I sometimes get this in the log

Code: Select all

Log: Failed import: ArrayProperty ArrayProperty Botpack.Bot.bViewTarget (file ../System/Botpack.u)
Most recently I had it when summoning a uef461a.m16sniper but have also had when using MBot_C bots and one or two other things (like bots/meshes from mods such as Rampancy).

I see that bViewTarget is no longer in the list of var (AI Flags) declared at the beginning of Botpack.Bot - anyone have any idea why it is no longer there?
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Botpack.Bot.bViewTarget

Post by sektor2111 »

Go to GitHub and ask there politely to stop this activity of removing functions and variables without any constructive improvement.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Botpack.Bot.bViewTarget

Post by Barbie »

Have a look at class'Pawn': var bool bViewTarget;
If it is defined in class'Bot' again, it shadows the variable in the parent Pawn class. Maybe that was the reason why it was removed from class'Bot'.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
OjitroC
Godlike
Posts: 3613
Joined: Sat Sep 12, 2015 8:46 pm

Re: Botpack.Bot.bViewTarget

Post by OjitroC »

Barbie wrote: Thu Oct 20, 2022 8:34 pm Have a look at class'Pawn': var bool bViewTarget;
If it is defined in class'Bot' again, it shadows the variable in the parent Pawn class. Maybe that was the reason why it was removed from class'Bot'.
I see - thanks for that - it certainly looks like the only var bool/AI Flag that appears in the list of vars at the beginning of Engine.Pawn and of Botpack.Bot. So I'm sure you're right about the reason.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Botpack.Bot.bViewTarget

Post by Barbie »

I wouldn't have removed that. Backward compability is not given, because there may be code that explicit accesses class'Bot'.bViewTarget while class'Pawn'.bViewTarget implicit or explicit might be accessed at another code statement.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: Botpack.Bot.bViewTarget

Post by Higor »

I removed it because obscuring variables is an extremely ugly thing to do, especially when you're obscuring a parent class' variable with the intention of using it for the same purpose.
The Core Linker class should redirect imports from mods and other packages, in any case it's the linker that could use a fix here.

Google was not my friend when I searched "uef461a.u", any way I can get my hands on the package and dependencies?
User avatar
OjitroC
Godlike
Posts: 3613
Joined: Sat Sep 12, 2015 8:46 pm

Re: Botpack.Bot.bViewTarget

Post by OjitroC »

Higor wrote: Sat Oct 22, 2022 1:30 am Google was not my friend when I searched "uef461a.u", any way I can get my hands on the package and dependencies?
The package can be found here http://medor.no-ip.org/ToStore/uef-mod_v461.zip.

As noted above, I also get the Failed Import log message with MBot_C and a few other things but I've forgotten what they were.
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Botpack.Bot.bViewTarget

Post by sektor2111 »

Higor wrote: Sat Oct 22, 2022 1:30 am I removed it because obscuring variables is an extremely ugly thing to do,
And solution would be a different deal instead of removal, UT has already duplicated classes and this doesn't means that removing them is the solution - is not, all it does is to break things.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: Botpack.Bot.bViewTarget

Post by Higor »

Turns out it was only a message.
I caused this when made the game probe the linker a second time as a possible dynamic array (which is how we were able to change Touching[4] into array<> Touching;)

This should explain all:

Code: Select all

Log: VerifyImport 771 (1): BoolProperty BoolProperty Botpack.Bot.bViewTarget (bViewTarget)
Log: VerifyImport 771 (1): ArrayProperty ArrayProperty Botpack.Bot.bViewTarget (bViewTarget)
Log: Failed import: ArrayProperty ArrayProperty Botpack.Bot.bViewTarget (file ../System469/Botpack.u)
Log: VerifyImport 771 (2): BoolProperty BoolProperty Engine.Pawn.bViewTarget (bViewTarget)
Import verification succeeds when checking it against Bot's superclass (Pawn).
Post Reply