• 🏆 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!

ObjectMerger and Umlaute/encoding problems

Status
Not open for further replies.
Level 25
Joined
Feb 2, 2006
Messages
1,689
hey,
recently I've used the ObjectMerger on my map. Something like:
JASS:
//! externalblock extension=lua ObjectMerger $FILENAME$
		//! i function createFavoriteAbility(name, class, abilityId, spellAbilityId, icon)
		//! i setobjecttype("abilities")
		//! i createobject("Aspb", abilityId)
		//! i makechange(current, "anam", name)
		//! i makechange(current, "ansf", "(Favoritenfähigkeit - "..class..")")
		//! i makechange(current, "spb5", "1", "spellbook")
		//! i makechange(current, "spb2", "1", "0")
		//! i makechange(current, "spb4", "1", "1")
		//! i makechange(current, "spb3", "1", "1")
		//! i makechange(current, "spb1", "1", spellAbilityId)
		//! i makechange(current, "aite", "0")
		//! i makechange(current, "arac", "human")
		//! i makechange(current, "aart", icon)
		//! i end
	
		//! i function createGrimoireAbilityPair(name, tooltip, class, level, baseId, abilityId, grimoireAbilityId, icon )
		//! i setobjecttype("abilities")
		
		//! i createobject("ANcl", abilityId)
		//! i makechange(current, "anam", name.." - Stufe "..level)
		//! i makechange(current, "ansf", "(Zauberbuch - "..class..")")
		//! i makechange(current, "atp1", "1", name.."[|cffffcc00Stufe "..level.."|r]")
		//! i makechange(current, "aub1", "1", tooltip)
		//! i makechange(current, "Ncl6", "1", baseId)
		//! i makechange(current, "Ncl5", "1", 0)
		//! i makechange(current, "Ncl1", "1", 0.0)
		//! i makechange(current, "Ncl4", "1", 0.0)
		//! i makechange(current, "Ncl3", "1", 1)
		//! i makechange(current, "abpx", 0)
		//! i makechange(current, "aani", "")
		//! i makechange(current, "ahky", "")
		//! i makechange(current, "aeat", "")
		//! i makechange(current, "acat", "")
		//! i makechange(current, "acap", "")
		//! i makechange(current, "atat", "")
		//! i makechange(current, "ata0", "")
		//! i makechange(current, "achd", 0)
		//! i makechange(current, "aord", 0)
		//! i makechange(current, "aher", "0")
		//! i makechange(current, "alev", "1")
		//! i makechange(current, "arac", "human")
		//! i makechange(current, "aran", "1", "0.00")
		//! i makechange(current, "aart", icon)
		
		//! i createobject("Aspb", grimoireAbilityId)
		//! i makechange(current, "anam", name.." - Stufe "..level)
		//! i makechange(current, "ansf", "(Zauberbuchfähigkeit - "..class..")")
		//! i makechange(current, "spb5", "1", "absorb")
		//! i makechange(current, "spb2", "1", "0")
		//! i makechange(current, "spb4", "1", "1")
		//! i makechange(current, "spb3", "1", "1")
		//! i makechange(current, "spb1", "1", abilityId)
		//! i makechange(current, "aart", icon)
		//! i makechange(current, "aite", "0")
		//! i makechange(current, "arac", "human")
		//! i end
		
		//! i function createGrimoireSpell(name, tooltip, icon, class, levels, abilityId, baseId, startId)
			//! i createFavoriteAbility(name, class, startId, abilityId, icon)
			////! i for i=1, levels do
			//	//! i createGrimoireAbilityPair(name, tooltip, class, i, baseId, tonumber(startId) + 1 + i, tonumber(startId) + 2 + i, icon)
			////! i end
		//! i end
		
		//! i createGrimoireSpell("Testzauber", "Dieser Zauber besitzt einen tollen Effekt", "", "Kleriker", 5, "A000", "windwalk", "AY00")
	//! endexternalblock
and after the JassHelper had run it I got a strange problem. For many abilities which started with an Umlaut I think the first letter has been removed.

Is there any known bug?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Any string field. I did not know about this problem before but I can reconstruct it. Well, mutations are not in the standard ascii, when you write them, it uses UTF-8 and 2 bytes to maintain the representation. ObjectMerger probably does some conversion mistake when reading the data in. Also it inlines all strings in the objMod file.

But that's what I wrote in postproc, operating with tools on the original map file can mess it up if the tool is not 100% safe (or your input for the tool).
 
Status
Not open for further replies.
Top