Page 1 of 1

are unit tag are changed ?

Posted: 30 Dec 2017, 20:15
by albator
I understood all unit tag (eg armstump for "arm stumpy") have been renamed for "better understanding them" or whatever. Can you guys provide a mapping between the old and the new one ? For all player who have to reconfigure scripts (e.g. autogroup), it is a mess. Python would be best but any format would do it.

Or you guys have something similar to http://modinfo.adune.nl/ ?

Re: are unit tag are changed ?

Posted: 30 Dec 2017, 22:09
by Floris
(that link is dead btw)

armshock - armvang
csubpen - coramsub
hllt - corhllt
cafus - corafus
aafus - armafus
cmgeo - corageo
amgeo - armageo
cjuno - corjuno
ajuno - armjuno
asubpen - armamsub
mercury - armmercury
screamer - corscreamer
packo - armpacko
madsam - cormadsam
tawf114 - corban
tawf009 - armserp
armcybr - armliche
corgripn - armstil
blade - armblade
marauder - armmar
aseadragon - armepoch
decade - armdecade
consul - armconsul
bladew - corbw
shiva - corshiva
gorg - corjugg
armraven - corcat
nsaclash - corhal
commando - cormando
intruder - corintr
trem - cortrem
armsl - corseah
tawf013 - armart
tawf001 - armbeamer

Re: are unit tag are changed ?

Posted: 30 Dec 2017, 23:00
by Ares
This change breaks almost every widget in existence, pretty sad.

Re: are unit tag are changed ?

Posted: 31 Dec 2017, 00:45
by albator
Floris wrote:(that link is dead btw)

armshock - armvang
csubpen - coramsub
hllt - corhllt
cafus - corafus
aafus - armafus
cmgeo - corageo
amgeo - armageo
cjuno - corjuno
ajuno - armjuno
asubpen - armamsub
mercury - armmercury
screamer - corscreamer
packo - armpacko
madsam - cormadsam
tawf114 - armban
tawf009 - armserp
armcybr - armliche
corgripn - armstil
blade - armblade
marauder - armmar
aseadragon - armepoch
decade - armdecade
consul - armconsul
bladew - corbw
shiva - corshiva
gorg - corjugg
armraven - corcat
nsaclash - corhal
commando - cormando
intruder - corintr
trem - cortrem
armsl - corseah
tawf013 - armart
tawf001 - armbeamer
Great ! thanks

Re: are unit tag are changed ?

Posted: 31 Dec 2017, 01:31
by albator
The script that does the job for who need it...

Code: Select all


#!/bin/python 

def main()  :
  names =  {}
  names["armshock"] = "armvang"
  names["csubpen"] = "coramsub"
  names["hllt"] = "corhllt"
  names["cafus"] = "corafus"
  names["aafus"] = "armafus"
  names["cmgeo"] = "corageo"
  names["amgeo"] = "armageo"
  names["cjuno"] = "corjuno"
  names["ajuno"] = "armjuno"
  names["asubpen"] = "armamsub"
  names["mercury"] = "armmercury"
  names["screamer"] = "corscreamer"
  names["packo"] = "armpacko"
  names["madsam"] = "cormadsam"
  names["tawf114"] = "armban"
  names["tawf009"] = "armserp"
  names["armcybr"] = "armliche"
  names["corgripn"] = "armstil"
  names["blade"] = "armblade"
  names["marauder"] = "armmar"
  names["aseadragon"] = "armepoch"
  names["decade"] = "armdecade"
  names["consul"] = "armconsul"
  names["bladew"] = "corbw"
  names["shiva"] = "corshiva"
  names["gorg"] = "corjugg"
  names["armraven"] = "corcat"
  names["nsaclash"] = "corhal"
  names["commando"] = "cormando"
  names["intruder"] = "corintr"
  names["trem"] = "cortrem"
  names["armsl"] = "corseah"
  names["tawf013"] = "armart"
  names["tawf001"] = "armbeamer"
  
  
   
  filename = "BA.lua"
  filenameOut = filename.replace("lua","out.lua")
   
  fin = open(filename,"r")
  lines = fin.readlines()
  fin.close() 
 
  fout = open(filenameOut,"w")
  for line in lines : 
    for name in names.keys(): 
      line = line.replace(name, names[name])
    fout.write(line)
  fout.close() 
  
  
main() 



Re: are unit tag are changed ?

Posted: 31 Dec 2017, 03:25
by PtaQ
Ares wrote:This change breaks almost every widget in existence, pretty sad.
I recommend using dnGREP tool. it performs a global find and replace cycle. You can fix all widgets that depend on these ids this way.
http://dngrep.github.io/

Re: are unit tag are changed ?

Posted: 05 Jan 2018, 18:38
by klapmongool
Lots of widgets are no longer maintained, this change makes that worse :x

Re: are unit tag are changed ?

Posted: 12 Jan 2018, 15:40
by [Fx]Doo
User widgets aren't maintained by BA devs, and we have very little control over them.
We are not discouraging their use, but their maintenance is to be performed by their authors/users.

There is a wide set of widgets that are provided with BA, which are being maintained. You might want to check for duplicates in your own user widgets, since they will override the ones packed with BA, and not benefit from the updates.

Alternatively, PtaQ mentionned dngrep which is efficient at replacing unitnames with the new ones in your user widgets.

Re: are unit tag are changed ?

Posted: 19 Feb 2018, 23:51
by Floris
did an edit cause made mistake in the list btw armban -> corban

Re: are unit tag are changed ?

Posted: 20 Feb 2018, 09:10
by PicassoCT
Ares wrote:This change breaks almost every widget in existence, pretty sad.
You are right- lets make a regEx-Converter widget, which rewrites all names in widgets on gameload. Why does nobody ever go for the easy solutions?