I suppose if you could standardize your description strings, ie, have some sort of preset format where you can just fill in the blanks, you could create a custom stringbuilder to build the strings for you based on specific inputs. This way you would just have to store the presets for the blanks and fill them in based on the functions input.
For example if your description was standardized as:
A B C by D, E
Aggression increases attackspeed by 15/20/25/30%
Shield decreases damage taken by 10/15/20/25
Aggression and Shield are both elements of A
increases and decreases are both B
E is your custom flavortext, which would certainly be shorter than storing the entire description.
An Int value and a Bool value (for example) in the same key will override each other if I'm not mistaken.
Why DataTable doesn't use up galaxy memory:
It seems DataTable entries are stored outside galaxy and inside Sc2's memory. So it hardly burdens the galaxy memory.
The DataTable doesn't have to be created. Just use it.
Just an idea - if you use texts you can also dynamically change them to a certain degree. Look at the Ghost's EMP tooltip for example. The mana consumption per second changes depending on the Ghost's regeneration rate.
Using that you CAN modify texts. However, you'll need a bunch of dummy units/spells/upgrades for it where the texts take their info from.
I may just simplify my descriptions like instead of "Increases the %C's strength by %R1/2/3/4/5/%", just use "Strength +%R1/2/3/4/5/%" I don't have to mention the class of the character etc, it just looks nicer having longer descriptions imo.
Edit: So this is how I decided to define trait tree:
First number is class identifier second is count of traits and then its the actual traits, it actually cuts down a HUGE amount of script code. Thanks to everyone who responded I think I'll try to use this plus some of the other things to cut down my script size and hopefully be able to get an alpha of my map(s) going soon.
I have a new question is it possible to retrieve strings from a catalog entry? Like could I store a string in a tooltip for a random button I create and retrieve it as a string? Or is this another one of those text only things?
I believe tooltips are stored as a reference to a text.
Ex:
"Unit/Name/Marine" would be the string tooltip for a marine, which tels you to StringExternal() that.
Having said that, I suppose you COULD use it for storage somehow.
@Sneakervek: Go
I suppose if you could standardize your description strings, ie, have some sort of preset format where you can just fill in the blanks, you could create a custom stringbuilder to build the strings for you based on specific inputs. This way you would just have to store the presets for the blanks and fill them in based on the functions input.
For example if your description was standardized as:
And so on, I believe you get the idea :)
@FuzzYD: Go
An Int value and a Bool value (for example) in the same key will override each other if I'm not mistaken.
Why DataTable doesn't use up galaxy memory:
It seems DataTable entries are stored outside galaxy and inside Sc2's memory. So it hardly burdens the galaxy memory.
The DataTable doesn't have to be created. Just use it.
Just an idea - if you use texts you can also dynamically change them to a certain degree. Look at the Ghost's EMP tooltip for example. The mana consumption per second changes depending on the Ghost's regeneration rate.
Using that you CAN modify texts. However, you'll need a bunch of dummy units/spells/upgrades for it where the texts take their info from.
I may just simplify my descriptions like instead of "Increases the %C's strength by %R1/2/3/4/5/%", just use "Strength +%R1/2/3/4/5/%" I don't have to mention the class of the character etc, it just looks nicer having longer descriptions imo.
Edit: So this is how I decided to define trait tree:
1 15 4020 1003 1005 1001 2003 2001 2005 2016 3002 5001 5002 5003 3001 4001 4002 4003
First number is class identifier second is count of traits and then its the actual traits, it actually cuts down a HUGE amount of script code. Thanks to everyone who responded I think I'll try to use this plus some of the other things to cut down my script size and hopefully be able to get an alpha of my map(s) going soon.
I have a new question is it possible to retrieve strings from a catalog entry? Like could I store a string in a tooltip for a random button I create and retrieve it as a string? Or is this another one of those text only things?
@Sneakervek: Go
I believe tooltips are stored as a reference to a text.
Ex:
"Unit/Name/Marine" would be the string tooltip for a marine, which tels you to StringExternal() that.
Having said that, I suppose you COULD use it for storage somehow.