• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

special symbols in rawcodes

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
Pretty much anything that is not a control character on the ASCII sheet (7 bits) should be safe. Anything using the most significant bit is not safe as that will be encoding dependant.

I am guessing the game internally treats them as a 32bit integer for performance reasons. As such technically any 8 bit sequence for any of the characters should be valid. However parts of the game might try to convert them into a string, and decoding anything that is not 7bit ASCII or is a control character might break such decoding.
 
Level 5
Joined
Jun 7, 2012
Messages
66
I am making "hero-builder" rpg with a lot of skills. All of my skills are Channel-based and I create 12 copies of eash skill for all slots on actionpanel, so players can freely choose skill layout for themselves. So I needed 12*skillcount free ids and I also like to take everything to extremes so I decided I need 3000+ ids in a row to be safe (who knows what crazy things I might think of in the future). Anyway I am generating skills in wurst so it's a question of changing 2-3 symbols and recompling.
For now I decided to use '!000-!ZZZ' range for my needs but thanks for help. Initially I planned to use 0-9,A-Z,a-z but found out that Widgetizer treats A-Z and a-z symbols as same when creating CampaignAbilityFunc.txt and CampaignAbilityStrings.txt so I wanted to try special symbols (I need Widgetizer since without it map can take ages to load or not load at all). I could just use 'E000-EZZZ' range or something similar but don't know I they are used for some hidden things like tilesets or lightning-ids.
 
Level 5
Joined
Jun 7, 2012
Messages
66
I would be slightly concerned with the potential load times and file sizes of a map containing 3,000 abilities. Warcraft III was certainly not designed for it.
I did some tests with generating 36k channel abilities and widgetizing map. Without Widgetizer map crashes in game and editor, but after Widgetizing it loads in 5-10 seconds.
Also I think I will never reach those numbers because it would require lots of dedication and work over several years.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
I did some tests with generating 36k channel abilities and widgetizing map. Without Widgetizer map crashes in game and editor, but after Widgetizing it loads in 5-10 seconds.
Also I think I will never reach those numbers because it would require lots of dedication and work over several years.

Was there not an 8k limit? Widgetizer converts them to slk as much as possible, so probably there were not much objMod leftovers. And as OP hinted, there are use cases to auto-generate them like in BonusMod, for instance, thus it's quite easy to reach thousands of objects. If you require Cartesian products of attributes, like freely setting the mana cost of an ability from 1 to 100 and cooldown from 1 to 10 independently and in steps of 1 each, that's already 100*10 combinations. Further attributes add more factors.

@topic: A friend of mine kept using arithmetics/arranged ids in patterns. I was not a friend of this as it kills static analysis (and lacked documentation) but I guess it can be pretty efficient performance-wise. Else you have to save them in variables or have the compiler make a translation function. Only mean to say if you have for example the aforementioned combinationatorial layout, then you may want to have a mapping mana x cooldown -> ability and modeling this as a 2/higher dimensional array by using arithmetics might be a more direct approach.
 
Last edited:
Status
Not open for further replies.
Top