Page 1 of 1

Prototype User Data

Posted: Tue Jul 12, 2016 2:50 pm
by Ranakastrasz
Suggest adding an optional entry to all prototypes, Userdata (Or some other name, based on Wc3 equivilent). Essentially, its a table, which can be setup however you want, and can be accessed via script. This would allow custom information to be attached to any prototype, which scripts can use.

Re: Prototype User Data

Posted: Tue Jul 12, 2016 5:00 pm
by Rseding91
What's the use case?

Re: Prototype User Data

Posted: Wed Jul 13, 2016 12:52 am
by DaveMcW
Allowing data.lua and control.lua to communicate with each other.

Re: Prototype User Data

Posted: Wed Jul 13, 2016 1:00 am
by Rseding91
DaveMcW wrote:Allowing data.lua and control.lua to communicate with each other.
But why?

Re: Prototype User Data

Posted: Wed Jul 13, 2016 1:24 am
by DaveMcW
As a workaround to this.

Re: Prototype User Data

Posted: Wed Jul 13, 2016 9:06 am
by Rseding91
DaveMcW wrote:As a workaround to this.
No, that's a garbage solution.

We do a ton of post-processing of the data.raw data so even if it was available runtime it would be mostly wrong.

Re: Prototype User Data

Posted: Wed Jul 13, 2016 12:47 pm
by Ranakastrasz
How hard could it be to transfer a single table over? I mean, how different is that from the basically unchanged Max Health stat?

Re: Prototype User Data

Posted: Wed Jul 13, 2016 12:48 pm
by Ranakastrasz
How hard could it be to transfer a single table over? I mean, how different is that from the basically unchanged Max Health stat?
I can understand that you take the original table and convert it into something far more compact without excessive information, so the game can use it without as much computation cost.. Or something, but that is why I made something that would be entirely out of the way.