#quick convert menu not appearing on trading post sometimes

78 messages · Page 1 of 1 (latest)

shy lotus
#

i'm not sure what to put here, just something I noticed. I'm not sure how to debug this game lol, but lmk if I can send anything like a log

last ruin
signal hearthBOT
#
Logfile location

%userprofile%\appdata\locallow\Fire Sword Studios\The Perfect Tower II
Current log: perfect.log
Previous log: perfect.1.log

shy lotus
#

yeah for sure, i had to go right after sending that

#

and no but i think i remember reporting the same thing years ago haha

halcyon garden
#

Wow this is a long standing issue lol

last ruin
severe sleet
# halcyon garden Wow this is a long standing issue lol

There was a bug related to that which happened when a trade was selected and a worker or AI performed the trade, it was stuck with an invalid trade preview which resulted in errors when right clicking one of the trades "+" symbols.
Is the issue happening on the main "+" symbol, on the trade "+" symbols or both?

manic scroll
severe sleet
manic scroll
#

have you checked my corner? I'm working on this too

severe sleet
severe sleet
#

It's just baffling because the conversion dial (the one next to the resources) is the exact same one that is used in any other building. The only special case are the two from the trade. So I have no idea how and why this is connected to the trading post at all

manic scroll
#

Actually, wait. We know that the button circled red fails... but do we know if the buttons circled in black work?

severe sleet
#

The black ones actually had a bug that I could fix years ago which was related to AI or workers trading a trade offer that was currently selected

#

but the red one is constant

#

it never changes during runtime just like the ones in the other buildings

manic scroll
#

Well yea, they all use the same component, the trading post just wants to be cursed and have the button fail sometimes

manic scroll
severe sleet
#

Okay I can't even reproduce it in the build

#

regardless of what I do 🙈

manic scroll
#

yea, it's never been reproducible. For all the time we've been trying to figure out why this happens, we never know what sequence of events lead to the bug

halcyon garden
halcyon garden
#

it just happened randomly and when I went back from Tower Testing and reinitialized it, it worked again

shy lotus
#

yeah idk this bug has been around for a while, sorry i can’t help narrow it down more

severe sleet
#

Okay, let's try to narrow it further down together:
The next time someone encounters please check the following things:

  • Did this happen in your first session since you started the game or did you load multiple saves? (Basically did you go back to the main menu at any point in time during this session?)
  • Was the AI or a worker interacting with the trading post while this happened?
  • Were the two other conversion dials affected as well?
  • Does closing and opening the building again fix the issue?
  • Did the bug disappear after leaving town and re-entering it? (For example by tower testing or doing a boss fight.)
shy lotus
#

i can answer the worker question already

#

(no workers were involved)

manic scroll
#

I can tell you that, when I got it to happen last year, I didn't have Facility AI on, nor did I have a worker on trading post (I still have the pdf) XD

Closing and opening the building didn't fix it.

upbeat laurel
#

As far as I remember, reloading the scene does fix it.

manic scroll
#

I doubt it's save persistent, so it just happened again

shy lotus
#

closing out of the building does not fix

#

first session

#

going to tower testing and back does fix it, however

upbeat laurel
#

AI/Workers?

shy lotus
#

none

severe sleet
weak rose
#

when I had this bug, it was only for the bottom dial

severe sleet
#

I FINALLY FOUND IT! The shipyard conversion dial had an invalid reference to the trading post dial (copy paste issue apparently). When you open the shipyard conversion dial as the first thing in town and then go to the trading post (make sure to not open it before visiting the shipyard) the conversion dial will not open and throw an exception

shy lotus
#

LETS GOOO

#

2 year bug (probably longer) fixed!

last ruin
halcyon garden
# severe sleet Okay, let's try to narrow it further down together: The next time someone encoun...
  • I only used one session at the time and don't remember loading any additional saves.

  • No AI or workers were involved as I had none of them performing trades

  • Can't really remember that the other conversion dials were affected cause I didn't check

  • Closing and opening the building did not fix the issue, but if I reloaded the town entirely from Tower Testing or going to the seasonal event it would work.

  • I think it just happened randomly when I was in town. I was doing other stuff like Factory and looking at Military Perks or something before the bug happened.

#

oh nvm he fixed it

#

😔

halcyon garden
#

Programming does the darndest things

#

No wonder it felt so random lol

severe sleet
#

Yeah, in this case its more a "Unity workflow" thing since Unity allows you to expose events to the inspector to basically drag & drop other scripts into them and execute stuff when the event happens. The pointer up event of the shipyard conversion dial called OnPointerUp of the trading post conversion dial due to the buildings usually being copy-pasted (because most of the core components are the same)

#

^^

halcyon garden
#

Couldn't this behavior be generalized with a class structure? Like a generic Building class that all of the other components inherit from, so that they can override the behavior of the OpenDial() function to point to the specific building resource and conversion rate?

#

I don't know how the game is laid out or if that is really hard to do in Unity, I've never worked in it before, but I work in C# pretty much daily. The workflow might not allow that to work like that.

severe sleet
# halcyon garden Couldn't this behavior be generalized with a class structure? Like a generic Bui...

That's exactly how it works on the code side. There is a UITownBuilding base class for all town building windows with each of them having their own subclass like UIFactory, UIMine, etc.

Unity encourages you to build modular components with its component based system so the pointer up/pointer down component is not aware of how it is being used. You basically put everything together inside the editor once you are done building the components (and this is usually where most of the bugs come from). A quick brain-afk moment and you are dragging in the wrong reference without noting (or you are copy pasting something because you want to build a new component that is based off of another one) and you might miss some references.

Since the conversion dials are part of the oldest components in the game (probably around 6 years old) they don't follow all of the guidelines we have set up in the meantime so they are especially vulnerable to such errors.

manic scroll
weak rose
#

I think AI might be not bad at detecting this kind of things, since it's like anomaly detection (though might raise a lot of false positives)

halcyon garden
halcyon garden
# weak rose I think AI might be not bad at detecting this kind of things, since it's like an...

To be honest, I really wouldn't like to leave AI to up to this type of thing because you can't really be sure that what it's saying is correct and could be applied in that context.

Even if it isn't AI, this is why I'm deathly afraid of Visual Studio "solution-wide" changes like Find+Replace because it could introduce unforeseen consequences that you have to revert back to the previous version to resolve.

weak rose
weak rose
#

I think it's how google searches security breaches

halcyon garden
#

That's really how AI could be more of a "coding assistant" than a full on replacement for software engineering. If it was a smarter version of Intellisense where it would be able to spot anomalous references and names that don't fit your schema, or catch errors that would cascade further down into the stack trace, I'd find things like that very valuable.

#

perhaps this discussion should be moved to #programming instead

#

lol

weak rose
#

yeah, one thing I have said it could be great for is deciding if you are just trying to reinvent a bicycle and offer already working code from libs installed on your PC or in some popular libs

manic scroll
fair mango
#

I have the same issue. Have the developers figured out a way to fix this in the next patch? It's a bit annoying, to be honest.

upbeat laurel
#

It still happens on v1.0.7?

#

(You can check your version in the bottom right corner of settings or in the bottom left corner of the Debug Overlay [F2].)

fair mango
#

I have 1.0.6, I haven't logged in for over a day, if they fixed it in 1.0.7, this probably won't happen.

upbeat laurel
#

Should be fixed in v1.0.7.

shy lotus
#

they just fixed it lmao

#

me when i don’t see the changelogs 😔

#

or read this chat where they say it’s fixed 💔