• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Import] Program to auto name imported icons?

Status
Not open for further replies.
Level 6
Joined
Jan 8, 2009
Messages
140
Is there any program or macro or something to automatically rename large numbers of icon imports, or do I just have to keep renaming them manually?
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Do you mean import path?

If import path, I fear that there's none. The fastest way that I can think of is by Copy and Pasting the path manually if given on the Zip file or in the page you have downloaded it. A bit faster than manually typing it. That's about it so next time, I suggest you to rename path as soon as you have imported them.
 

Deleted member 238589

D

Deleted member 238589

Yes, It's better to just copy it. You might make a mistake if you type it manually. And It's not that time consuming at all.
 
Level 6
Joined
Jan 8, 2009
Messages
140
Do you mean import path?

If import path, I fear that there's none. The fastest way that I can think of is by Copy and Pasting the path manually

yeah that's what I meant and what I've been doing, just thought somebody may have made something as it seems like a pretty repetitive task that could maybe be automated. that being said I have no idea about coding that stuff. thanks anyway
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
You can use the FileImporter of Grimex shipped with JNGP. Read JNGP\grimext\GrimexManual.html. And a little script to iterate over the files in a folder really is not that hard. Infact, Ladiks MPQ Editor for example can be controlled via command line and the specs for the war3map.imp (import information) is not complicated.

@Chaosy: Do you mean ReplaceableTextures\CommandButtonsDisabled\DISBTNName.blp? Because only disabled buttons get auto-searched by a global prefix.
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
Is there any program or macro or something to automatically rename large numbers of icon imports, or do I just have to keep renaming them manually?

If I understand correctly, you want to automate importing files into WC3.

As WaterKnight mentioned, you will probably need to use FileImporter.

Here's a sample line which imports a file.

//! external FileImporter C:\Imports\\units\\Gryphon\GryphonHero.mdx GryphonHero.mdx

So it consists of two arguments:

//! external FileImporter A B

where A = the path to the file on your computer
and B = where to import the file to in the wc3 map / the imported file's name

How can you automate this task? One way to do this is to write a script that builds your FileImporter lines by being passed a directory that contains all your imported files. This will then make a file that looks like this (it's long be warned):

JASS:
//*************************************
//***** Meat Icons ********************
//*************************************

//filet
//! external FileImporter C:\Imports\\items\\Meat\BTNFilet.blp BTNFilet.blp
//! external FileImporter C:\Imports\\items\\Meat\DISBTNFilet.blp ReplaceableTextures\CommandButtonsDisabled\DISBTNFilet.blp

//food
//! external FileImporter C:\Imports\\items\\Meat\BTNFood.blp BTNFood.blp
//! external FileImporter C:\Imports\\items\\Meat\DISBTNFood.blp ReplaceableTextures\CommandButtonsDisabled\DISBTNFood.blp

//nuggets
//! external FileImporter C:\Imports\\items\\Meat\BTNNuggets.blp BTNNuggets.blp
//! external FileImporter C:\Imports\\items\\Meat\DISBTNNuggets.blp ReplaceableTextures\CommandButtonsDisabled\DISBTNNuggets.blp

//ham
//! external FileImporter C:\Imports\\items\\Meat\BTNHam.blp BTNHam.blp
//! external FileImporter C:\Imports\\items\\Meat\DISBTNHam.blp ReplaceableTextures\CommandButtonsDisabled\DISBTNHam.blp

//*************************************
//***** MeatItem **********************
//*************************************

//meat item
//! external FileImporter C:\Imports\\items\\MeatItem\Meat.mdx Meat.mdx

//*************************************
//***** ItemMove **********************
//*************************************

//item move
//! external FileImporter C:\Imports\\items\\ItemMove\BTNItemMove.blp BTNItemMove.blp
//! external FileImporter C:\Imports\\items\\ItemMove\DISBTNItemMove.blp ReplaceableTextures\CommandButtonsDisabled\DISBTNItemMove.blp

//*************************************
//***** ItemPotionGreen ***************
//*************************************
//! external FileImporter C:\Imports\\items\\ItemPotionTinyGreen\Item_Potion_TinyGreen_v2.mdx Item_Potion_TinyGreen_v2.mdx
//! external FileImporter C:\Imports\\items\\ItemPotionSmallGreen\Item_Potion_SmallGreen_v2.mdx Item_Potion_SmallGreen_v2.mdx
//! external FileImporter C:\Imports\\items\\ItemPotionBigGreen\Item_Potion_BigGreen_v2.mdx Item_Potion_BigGreen_v2.mdx
//! external FileImporter C:\Imports\\items\\ItemPotionLargeGreen\Item_Potion_LargeGreen_v2.mdx Item_Potion_LargeGreen_v2.mdx
//bttns - big green
//! external FileImporter C:\Imports\\items\\BTN_Potion\BTN_Potion_GreenBig.blp BTN_Potion_BigGreen.blp
//! external FileImporter C:\Imports\\items\\BTN_Potion\DISBTN_Potion_GreenBig.blp DISBTN_Potion_GreenBig.blp
//bttns - small green
//! external FileImporter C:\Imports\\items\\BTN_Potion\BTNPotionBlueSmall2.blp BTNPotionBlueSmall2.blp
//! external FileImporter C:\Imports\\items\\BTN_Potion\DISBTNPotionBlueSmall2.blp ReplaceableTextures\CommandButtonsDisabled\DISBTNPotionBlueSmall2.blp

//*************************************
//***** ItemPotionBlue ****************
//*************************************
//! external FileImporter C:\Imports\\items\\ItemPotionTinyBlue\Item_Potion_TinyBlue_v2.mdx Item_Potion_TinyBlue_v2.mdx
//! external FileImporter C:\Imports\\items\\ItemPotionSmallBlue\Item_Potion_SmallBlue_v2.mdx Item_Potion_SmallBlue_v2.mdx
//! external FileImporter C:\Imports\\items\\ItemPotionBigBlue\Item_Potion_BigBlue_v2.mdx Item_Potion_BigBlue_v2.mdx
//! external FileImporter C:\Imports\\items\\ItemPotionLargeBlue\Item_Potion_LargeBlue_v2.mdx Item_Potion_LargeBlue_v2.mdx
//bttns - tiny blue
//! external FileImporter C:\Imports\\items\\BTN_Potion\BTNPotionGreenSmall2.blp BTNPotionGreenSmall2.blp
//! external FileImporter C:\Imports\\items\\BTN_Potion\DISBTNPotionGreenSmall2.blp ReplaceableTextures\CommandButtonsDisabled\DISBTNPotionGreenSmall2.blp

//*************************************
//***** ItemPotionPurple **************
//*************************************
//! external FileImporter C:\Imports\\items\\ItemPotionTinyPurple\Item_Potion_TinyPurple_v2.mdx Item_Potion_TinyPurple_v2.mdx
//! external FileImporter C:\Imports\\items\\ItemPotionSmallPurple\Item_Potion_SmallPurple_v2.mdx Item_Potion_SmallPurple_v2.mdx
//! external FileImporter C:\Imports\\items\\ItemPotionBigPurple\Item_Potion_BigPurple_v2.mdx Item_Potion_BigPurple_v2.mdx
//! external FileImporter C:\Imports\\items\\ItemPotionLargePurple\Item_Potion_LargePurple_v2.mdx Item_Potion_LargePurple_v2.mdx


//*************************************
//***** WarpStaff *********************
//*************************************
//! external FileImporter C:\Imports\\items\\ItemStaff\AlleriasFlute_v2.mdx AlleriasFlute_v2.mdx

//*************************************
//***** Sword *************************
//*************************************
//! external FileImporter C:\Imports\\items\\xgm\SteelMelee_v2.mdx SteelMelee_v2.mdx

//*************************************
//***** Leather Armor *****************
//*************************************
//! external FileImporter C:\Imports\\items\\xgm\LeatherUpgradeOne_v2.mdx LeatherUpgradeOne_v2.mdx

//*************************************
//***** Brilliance (staff) ************
//*************************************
//! external FileImporter C:\Imports\\items\\xgm\Brilliance_v2.mdx Brilliance_v2.mdx

//*************************************
//***** Circlet ***********************
//*************************************
//! external FileImporter C:\Imports\\items\\xgm\Circlet_v2.mdx Circlet_v2.mdx

//*************************************
//***** Axe ***************************
//*************************************
//! external FileImporter C:\Imports\\items\\xgm\OrcMeleeUpOne_v2.mdx OrcMeleeUpOne_v2.mdx

//*************************************
//***** Boots of Speed ****************
//*************************************
//! external FileImporter C:\Imports\\items\\BootsOfSpeed\BootsofSpeed_v2.mdx BootsofSpeed_v2.mdx

//*************************************
//***** Boots of Quelthalas ***********
//*************************************
//! external FileImporter C:\Imports\\items\\BootsOfQuelthalas\ElvenBoots_v2.mdx ElvenBoots_v2.mdx


//*************************************
//***** Dagger ************************
//*************************************
//! external FileImporter C:\Imports\\items\\xgm\DaggerOfEscape_v2.mdx DaggerOfEscape_v2.mdx

//*************************************
//***** Periapt ***********************
//*************************************
//! external FileImporter C:\Imports\\items\\xgm\Periapt_v2.mdx Periapt_v2.mdx

//*************************************
//***** HealthStone *******************
//*************************************
//! external FileImporter C:\Imports\\items\\xgm\HealthStone_v2.mdx HealthStone_v2.mdx

//*************************************
//***** ManaStone *********************
//*************************************
//! external FileImporter C:\Imports\\items\\xgm\ManaStone_v2.mdx ManaStone_v2.mdx

//*************************************
//***** Pendant of Energy *************
//*************************************
//! external FileImporter C:\Imports\\items\\xgm\PendantOfEnergy_v2.mdx PendantOfEnergy_v2.mdx

//*************************************
//***** Silver Coin *******************
//*************************************
//! external FileImporter C:\Imports\items\ItemSilverCoin\SilverCoin_v2.mdx SilverCoin.mdx
//texture
//! external FileImporter C:\Imports\items\ItemSilverCoin\SilverCoin.blp SilverCoin.blp

//*************************************
//***** Orb of Seas *******************
//*************************************
//bttn
//! external FileImporter C:\Imports\items\BTNWaterOrb\BTNWaterOrb.blp BTNWaterOrb.blp 
//! external FileImporter C:\Imports\items\BTNWaterOrb\DISBTNWaterOrb.blp ReplaceableTextures\CommandButtonsDisabled\DISBTNWaterOrb.blp
//model (projectile)
//! external FileImporter C:\Imports\items\OrbOfSeas\OrbOfSeas_v2.mdx OrbOfSeas.mdx
//model (attachment)
//! external FileImporter C:\Imports\items\WaterOrb\WaterOrb_v2.mdx WaterOrb.mdx

Then you can just copy + paste it into your map to import the files.
 
Status
Not open for further replies.
Top