Thang attributes problem


#1

Hello,

when translating to Polish I’ve got problem with some text variables not rendering correctly to corresponding thang’s attribute value. I’m sure it is not specific to particular language. Here’s example:

Cleave function description used in Long Sword:
“Cleaves a target and anything around the #{spriteName} within #{cleaveRange}m for #{cleaveDamage} damage.”

In inventory selection dialog:


In cleave method description:

Digging deeper I’ve spotted something in Thang Editor:

I believe that component attributes marked by darker color have set flag which allows reaching their value by string parser used in inventory screen. Same flag is ignored by pop-up method description parser. Looks like there’s no way to change that flag from thang editor.

So there are few questions for developers:

  1. If my understanding of cause of described above problem is correct, is any other reason for protecting some attributes that way? If not, global change in database should be easier than spotting all checks for that flag in code.
  2. Is it possible to add “Toggle Preview” function in all translation tools as in Thang Editor (Main tab/Description field) with ability to render string variables?
  3. When there’s no available translation for particular part of game first proposed translation is committed instantly and we could see it online. Any further must wait for confirmation (by automatic or semi-automatic process) preventing ability to check our work. For example when translated string is too long and breaks site’s layout we cannot tune it to fit. Could changes submitted by same user be automatically committed instantly if there’s no other person’s updates in queue? For now there’s no way to deal with tricky parts in one translating session.
  4. Is it possible to reach all thangs and translated strings database by URL in similar way as level definition text dump? It will be great help when finding inconsistencies in already translated parts. As far as I know locale files on GitHub aren’t covering all translatable content.
  5. Strictly in-game related: “cleaveFriendlyFire=false” means that cleave gives no damage to weapon’s wielder or any friendly unit in cleaveRange?

regards,
Bartholomew Melnicki

PS.
I have to say that your approach for creating educational coding-based game is one of the best I’ve ever seen. I’ll be proud if my humble contribution will help Polish users get grasp of concepts your product is intended to teach.


#2

Wow, great investigation here! I’ve opened up issue #2885 to track progress on the main problem.

  1. They aren’t so much protected attributes as they are defaulted attributes; and yes, we want the defaulting, so that if we change the way something works at the Component level, then we don’t have go and edit every item using that to match it.
  2. It might be doable in some places. Where are the most useful places to have a toggle preview button?
  3. The patch system is already tricky enough. In order to make that work, we’d have to load your modified versions of each object instead of the stable versions, which tends to cause problems when we aren’t very careful about when you’re working with a modified document. So while not impossible, it would probably be many, many hours of bugfixing to get right.
  4. Not sure I understand; can you explain a bit more about the problem you are trying to solve and how you propose it would work?
  5. cleave will never hit the cleaver, but cleaveFriendlyFire: false means that it doesn’t hit teammates. All the cleave stuff we have done so far has friendly fire set to false.

Thank you for your help spreading the game’s reach to more Polish players!