Ciuine Posted February 24, 2011 Share Posted February 24, 2011 Just need some strings compiled for ship device names, so that I can localize ShipHUD. If someone could run this in an add-on on their ship and give me the mods.txt; that'd be swell. Code: local trans = unit.GetTransport(avatar.GetId()) local devs = transport.GetDevices(trans) for i, v in devs do local name = object.GetName(v) common.LogInfo( "Blah", "Name = "..userMods.FromWString(name)) end Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted February 24, 2011 Share Posted February 24, 2011 Here from my own litte ship: Info: addon MasterLoot: Name = Goblinmechaniker (repair) Info: addon MasterLoot: Name = Goblintechniker Info: addon MasterLoot: Name = Schatzkammer Info: addon MasterLoot: Name = Seltener modernisierter Antrieb (engine) Info: addon MasterLoot: Name = Scanner (scanner) Info: addon MasterLoot: Name = Astralschild (shield) Info: addon MasterLoot: Name = Astralschild Info: addon MasterLoot: Name = Astralschild Info: addon MasterLoot: Name = Astralschild Info: addon MasterLoot: Name = Steuerrad Info: addon MasterLoot: Name = Antrieb Info: addon MasterLoot: Name = Turbine (up and down device) Info: addon MasterLoot: Name = Turbine Info: addon MasterLoot: Name = Steuerrad (rudders) Info: addon MasterLoot: Name = Seltener Reaktor (reactor) Info: addon MasterLoot: Name = Visier des Ausgleichs (navigator) Info: addon MasterLoot: Name = Kanone (cannon) Info: addon MasterLoot: Name = Kanone Info: addon MasterLoot: Name = Kanone Info: addon MasterLoot: Name = Kanone Info: addon MasterLoot: Name = Kanone Info: addon MasterLoot: Name = Kanone Info: addon MasterLoot: Name = Kanone Info: addon MasterLoot: Name = Kanone Info: addon MasterLoot: Name = Artillerie (torpedo) Info: addon MasterLoot: Name = Artillerie Info: addon MasterLoot: Name = Krankenstube Info: addon MasterLoot: Name = Verlängerte Kanone Info: addon MasterLoot: Name = Verkürzte multifunktionale Kanone Info: addon MasterLoot: Name = Großkalibrige mulitfunktionale Kanone Info: addon MasterLoot: Name = Massive verkürzte Rumpfkanone (cannon 2nd version) Info: addon MasterLoot: Name = Verlängerte Kanone Info: addon MasterLoot: Name = Verkürzte multifunktionale Kanone Info: addon MasterLoot: Name = Verkürzte multifunktionale Kanone Info: addon MasterLoot: Name = Beständige Kanone Info: addon MasterLoot: Name = Seltener schillernder Astralschild (shield) Info: addon MasterLoot: Name = Goblinbastler (repair) But why you need the names of my specific devices? If I changed a device to a better one the name will be different! Or do you need the order of the items? Quote Link to comment Share on other sites More sharing options...
Ciuine Posted February 24, 2011 Author Share Posted February 24, 2011 Do not the better devices have similar names? IE Kanone for cannons. I do string compares based on the standard normal name. The devices are oddly slotted. The Motor/Turbine/Helm are all at the same position; so collecting data by position alone would prove un-resourceful. I do not collect shield names just the shield data of the ships. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted February 24, 2011 Share Posted February 24, 2011 ok, thix could work, but do not only search e.g. after "Blablabla Antrieb" but also after "Blablabla Blablaantrieb" Quote Link to comment Share on other sites More sharing options...
Ciuine Posted February 24, 2011 Author Share Posted February 24, 2011 I'll just lowercase the strings before running the check. Quote Link to comment Share on other sites More sharing options...
Setras Posted February 24, 2011 Share Posted February 24, 2011 In russia we have (OMFG) Пищаль, Бомбарда, Пушка for low-caliber-far-range-weapon(650), big-caliber-low-range-weapon(250) and standart (450 meters) canons. So that's like "wtf" or "omfg". Info: addon GuildAnnounce: Name = Трус-мастер с зубилом I (fast weak repair man) Info: addon GuildAnnounce: Name = Трус-эксперт I Info: addon GuildAnnounce: Name = Сокровищница (Treasury) Info: addon GuildAnnounce: Name = Экспериментальный двигатель "Молния" (Engine) Info: addon GuildAnnounce: Name = Модифицированный сканер "Часовой" I (visor/scanner/navigator, astral one) Info: addon GuildAnnounce: Name = Улучшенный щит "Эгида" II (Shit Shield) Info: addon GuildAnnounce: Name = Заказной щит "Заслон" Info: addon GuildAnnounce: Name = Модифицированный щит "Эгида" III Info: addon GuildAnnounce: Name = Заказной щит "Заслон" Info: addon GuildAnnounce: Name = Штурвал (Rudder itself) Info: addon GuildAnnounce: Name = Рычаг переключения скоростей (Lever ... of speeds) Info: addon GuildAnnounce: Name = Рычаг изменения высоты полёта (Lever ... of height) Info: addon GuildAnnounce: Name = Улучшенный руль высоты "Метеор" I (Mechanisms of height engine(up and down device)) Info: addon GuildAnnounce: Name = Улучшенный руль направления "Вага" I (Mechanisms of steering wheel) Info: addon GuildAnnounce: Name = Улучшенный реактор "Пульс" III (Reactor) Info: addon GuildAnnounce: Name = Улучшенный визор "Жар" II (visor/scanner/navigator, pvp one, we have some bullshit in naming these, see below) Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Canon Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Xerox Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Hewlett Packard Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Info: addon GuildAnnounce: Name = Модифицированная универсальная пушка I Info: addon GuildAnnounce: Name = Модифицированная универсальная пушка I Info: addon GuildAnnounce: Name = Модифицированная универсальная пушка I Info: addon GuildAnnounce: Name = Модифицированная универсальная пушка I Info: addon GuildAnnounce: Name = Улучшенный лучемёт "Игла" II (Beam cannon aka torpedo) Info: addon GuildAnnounce: Name = Улучшенный лучемёт "Игла" I Info: addon GuildAnnounce: Name = Корабельный лазарет (where dead ones arise) Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Info: addon GuildAnnounce: Name = Заказная модифицированная пушка Info: addon GuildAnnounce: Name = Модифицированный щит "Эгида" III Info: addon GuildAnnounce: Name = Заказной щит "Заслон" Info: addon GuildAnnounce: Name = Трус I So basically in russia we have: Prefixes: Типовой - Typical - Green Модифицированный - Modified - Blue Улучшенный - Improved - Violet Postfixes: I - generation 1, first layer of astral II - 2 and 2-nd respectiveley III - 3, 3. And in general we have problems in naming: Visor/Scanner/Navigator. But players call PVP one in front "Visor" and Back one - other 2 words. Hub/Sector - this really differs and there were talks on this site about it, butdon't be confused if someone says something wrong. Quote Link to comment Share on other sites More sharing options...
Ciuine Posted February 24, 2011 Author Share Posted February 24, 2011 My ShipHUD only cares about cannons/artillery and the reactor/turbine/motor/helm. So the naming problems with the other things won't matter. So my string checks will be lower case forms of двигатель (Motor), руль (Turbine), реактор (Reactor), Штурвал (Helm), лучемёт (Artillery), and пушка (Cannon). About the other cannons you mention do they not have named suffixes similar to these? Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted February 24, 2011 Share Posted February 24, 2011 As I understand, there are 3 different names for the cannons in Russia and you have to check if a item contains one of these 3 and if so its a cannon: There are Пищаль, Бомбарда, Пушка for the 3 different cannon types (low, mid and highranged) Quote Link to comment Share on other sites More sharing options...
Ciuine Posted February 25, 2011 Author Share Posted February 25, 2011 Can the two of you test this for me? Just need a standing on ship test, don't need to do anything or what have you. Anything that isn't detected properly (if it exists) will show up gray. File: ShipHUD_v1.1.1.zip Quote Link to comment Share on other sites More sharing options...
Setras Posted February 25, 2011 Share Posted February 25, 2011 Пищаль = Sniper (big range, low dmg) cannon Пушка = Standart (medium range, medium dmg) cannon Бомбарда = Bombard (low range, big dmg) cannon Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted February 25, 2011 Share Posted February 25, 2011 ok, all items are blue except one gray cannon, but these canon is buggy because this canon isn't shown in the visor to and has the same name as another canon which is detected successfully. Quote Link to comment Share on other sites More sharing options...
Setras Posted February 25, 2011 Share Posted February 25, 2011 двигатель (Motor) = CORRECT руль (Turbine) = NOT CORRECT Turbine = руль высоты (rudder of heigth, in RU) реактор (Reactor) = CORRECT Штурвал (Helm) = CORRECT (Rudder, isn't it?) лучемёт (Artillery) = CORRECT (It's not artillery, rly, it's beam cannon, laser etc. Former "torpedoes") пушка (Cannon) = CORRECT (but see above 2 other cannons) As for suffixes and prefixes - they are here to determine the generation and rarity of equipment. So by reading names of them you can now if they are green, blue or violet and of 1-st second or third generation. So you can display enemy's ship's quality more user-friendly, but i don't know what are you ding, so i'll not comment this anymore to not confuse you. Quote Link to comment Share on other sites More sharing options...
Ciuine Posted February 26, 2011 Author Share Posted February 26, 2011 Test out the file in the post below, I'm pretty sure everything is correct. Quote Link to comment Share on other sites More sharing options...
Ciuine Posted February 26, 2011 Author Share Posted February 26, 2011 Huh, odd. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted February 26, 2011 Share Posted February 26, 2011 I'm sure it's not, because you check only after one type of cannons and not after the other 2 types. BTW: some time ago I found a function which returns the object, which is under your mouse-pointer, can someone name this function, so that I can find this lost function^^ Quote Link to comment Share on other sites More sharing options...
Ciuine Posted February 26, 2011 Author Share Posted February 26, 2011 I do name all three cannons for the Russian localization... And only one turbine/motor/helm matter the second listed version is actually near the reactor where it demonstrates the health of these things easily not meant to be an actual device. The Event you're looking for is EVENT_INGAME_UNDER_CURSOR_CHANGED. Quote Link to comment Share on other sites More sharing options...
ramirez Posted February 26, 2011 Share Posted February 26, 2011 Using localized strings as table indices is very bad idea. Why don't you use this: Code: device.GetUsableDeviceType( deviceId ) returns enum value (uint): USDEV_NOT_USABLE_DEVICE USDEV_USABLE_DEVICE USDEV_REACTOR USDEV_ENGINE_HORIZONTAL USDEV_ENGINE_VERTICAL USDEV_RUDDER USDEV_CANNON USDEV_BEAM_CANNON USDEV_TORPEDO USDEV_SHIELD USDEV_NAVIGATOR USDEV_REPAIR USDEV_TELEPORT USDEV_LAZARETH USDEV_TREASURE USDEV_REMOTE_RUDDER USDEV_REMOTE_ENGINE USDEV_REMOTE_ENGINE_HORIZONTAL USDEV_REMOTE_ENGINE_VERTICAL USDEV_BOARDING USDEV_SCANER USDEV_DECOR_SAILS USDEV_DECOR_NAME USDEV_DECOR_FLAG USDEV_DECOR_STERN USDEV_DECOR_LIGHTHOUSE USDEV_DECOR_STATUE USDEV_DECOR_FIGUREHEAD Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted February 26, 2011 Share Posted February 26, 2011 this would be to easy Ramirez ;-) BTW: Do you know the difference between USDEV_CANNON and USDEV_BEAM_CANNON ? Quote Link to comment Share on other sites More sharing options...
ramirez Posted February 26, 2011 Share Posted February 26, 2011 Quote: BTW: Do you know the difference between USDEV_CANNON and USDEV_BEAM_CANNON ? Surre, lads! =)USDEV_CANNON - it's a.... voila, cannon!USDEV_BEAM_CANNON - artillery or lightning rod or pew-pew-lazorr! also a.k.a лучемет a.k.a torpedo launcher. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted February 26, 2011 Share Posted February 26, 2011 if USDEV_BEAM_CANNON is the torpedo, what is than USDEV_TORPEDO? xD Quote Link to comment Share on other sites More sharing options...
Setras Posted February 26, 2011 Share Posted February 26, 2011 Deprecated code part. Quote Link to comment Share on other sites More sharing options...
Ciuine Posted February 27, 2011 Author Share Posted February 27, 2011 Thanks for the tip Ramirez, I'll make the necessary changes tomorrowish; just finished another add-on. This one just for fun. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted February 28, 2011 Share Posted February 28, 2011 yes, your minigames are more important for us all than this addon xD Quote Link to comment Share on other sites More sharing options...
Ciuine Posted February 28, 2011 Author Share Posted February 28, 2011 Ha! I made these changes before posting the minigames though. Just haven't gotten around to posting up ShipHUD to UI9. I'll localize the MiniGame add-on too, if y'all want that. Not like you need to be able to read it though. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted March 1, 2011 Share Posted March 1, 2011 btw: wtf is your ship hud shown after the second boss in the darkblood citadel? (when you damage the shield of the last boss) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.