PDA

View Full Version : unit icons


chris10
11-13-2012, 03:52 PM
Hello,

How can I add new unit icons?
this unit icon: http://imageshack.us/photo/my-images/594/unita.png/ (the one with the empty thing)
and this one: http://imageshack.us/photo/my-images/145/unit2.png/ (the icon with the russian on it)

greets

KnightFandragon
11-14-2012, 06:54 PM
Well,

THe unit icons, the first link you have there

They are located in

Resource/interface/scene/unit_icon

You will probably need like paintdotNET or some simple editing program like such.

In there will be 4 files,

for example, one of my icons is

cole_00
cole_01
cole_02
cole_03

The different numbers indicate whether the unit is selected or unselected...or w/e...I dont quite get it yet either.

You simply create the icon, decorating it however you see fit and then saving them as (name)_00, (name)_01, (name)_02, (name)_03.

Make sure when you save them, it is as a .dds file, its how the game reads them

im bad with explaining......so if this makes no sense, ill try to clarify later .

KnightFandragon
11-14-2012, 06:58 PM
Now, the second image you showed is the "Portrait" of the unit.

That is located in

Resource/interface/scene/portrait

Its best if you find an already created portrait from the game and simply edit over it to make sure you do not make it to big and what not.

The unit portraits must be saved as .tga files for the game to read them.

TO then get the portrait and icon to work, refer to the unit's breed file and in there you will see

{portrait "***"}

Then for the Unit icon, also in the breed file you should see something like

{icons "***"}

You simply name the portrait the same as the file name in the portrait folder.

For unit icons you name it only the first part of whatever you saved the icon as..

So, if you saved the icons as

cole_00

in the unit icons, you would simply put

"cole"

chris10
11-15-2012, 05:05 PM
Thanks im going to try that!
What about tanks for the unit_icon?
How do i add it?

chris10
11-15-2012, 05:58 PM
i tried it for a soldier but it dont work.
I still get the empty thing.
i maybe thought it has something to do with the nationality
if i change the nationality to gr, then i get a error also if i dont even set a nationality. im making a mod and i dont want russian or another language voices.

KnightFandragon
11-15-2012, 10:19 PM
yes, in my haste to post that, didnt have alot of time to really clarify things.

Yes, you must include the (ger) in the icon name, both in the uniticon name and in the breed

so for me it reads like

cole(can)_00 (can) because I added in a "Canadian" army.

So you you, itd be like

smg(ger)_00

in the soldier breed file it would simply read

{icon "smg(ger)"}
{portrait "portrait_name"}

Yes, you can do the same for tanks, just that vehicles do not need the nationality.

The vehicle icon name must match the name of the vehicle's entity file name

so if in the name of the vehicle's entity file reads(in my case)

KV7D_Bladefire

I must name my unit_icon

KV7D_Bladefire_00 and on down the list 01, 02, 03

its best if you make a short name for your unit_icon, it simply makes it faster...

chris10
11-18-2012, 10:39 AM
Thanks. about the portrait, there are some empty holes in my portrait:
http://imageshack.us/photo/my-images/713/36641452.png/

this is maybe a little of topic but if i add a nationality in /set/breed/single/gr/(file).set
and if do as nationailty "gr" and i go to editor, click on the unit in editor i crash then and if i do as nationality a existed one like rus or ger then it dont crash. what is here the problem?
sorry for my bad english

greets

KnightFandragon
11-19-2012, 12:40 AM
Its because the game has a few other files you have to change for the game to accept your new nationality. Is "gr" the new nation you are creating?

I made "can" for canadians...I will have to look through and see everything I changed to get that to work.

For starters, in your "localization/desc.lng file, have you added in your new nation there?

Follow the pattern in there and add your new nation.

Here is my .lng file with my new nation.

{"rifle2" "rifleman"}
{"rifle3" "rifleman"}
{"smg2" "SMG infantry"}
{"smg3" "SMG infantry"}
{"sturmovik2" "assault infantry"}
{"sturmovik3" "assault infantry"}
{"elite3" "commando"}
{"at_rifle" "AT infantry"}
}
{"can"
{"smg" "Canadian Submachinegunner"}
{"smg2" "Canadian Submachinegunner"}
{"smg3" "Canadian Submachinegunner"}
{"bazooker" "Canadian Anti-Tankman"}
{"sniper" "Canadian Sniper"}
{"sturmovik" "Assault Marine"}
{"sturmovik2" "Assault Marine"}
{"sturmovik3" "Assault Marine"}
{"rifle" "Canadian Rifleman"}
{"rifle2" "Canadian Rifleman"}
{"rifle3" "Canadian Rifleman"}
{"mgun" "Canadian Machinegunner"}
{"tankman" "Canadian Tanker"}
{"tankman2" "Canadian Tanker"}
{"tankman3" "Canadian Tanker"}
{"oficer" "Officer"}
}
{"jap"
{"antipersonel_miner" "combat engineer (AP mines)"}
{"antitank_miner" "combat engineer (AT mines)"}
{"at_rifle" "AT infantry"}
{"bazooker" "rocket-launcher infantry"}
{"engineer" "engineer"}
{"flamer" "flamethrower infantry"}
{"kamikaze" "kamikaze"}
{"mgun" "machine gunner"}
{"oficer" "officer"}
{"rifle" "rifleman"}

In your case, if "gr" is your new nation, in the spot where "can" is, you would instead put "gr".

KnightFandragon
11-19-2012, 12:45 AM
Also, in the Localization/#dlg_mp.lng file, in there you will find a section

{"groundcontrol" "Ground Control"}
{"groundcontrol"
{"objective" "To win, capture and hold more than a half of all the terrain."}
}
}
{"army"
{"ger" "Germany"}
{"rus" "Soviet Union"}
{"usa" "USA"}
{"jap" "Japan"}
{"can" "72nd Canadian"}
{"eng" "United Kingdom"}
}
{"stage"
{"lobby" "In lobby"}
{"session" "Starting the game"}
{"game" "Playing the game"}
{"zone" "In lobby"}
{"gslobby" "Main room"}
{"gssession" "Game room"}

you will have to add your nation into the "army" section

"gr" for the first part and then the 2nd "72nd Canadian", that part is whatever you wish the name to be displayed as in Multiplayer.

KnightFandragon
11-19-2012, 01:01 AM
Also, if you notice your new soldiers? To the right of the portrait, but above the guy's name? YOu see like

"Smg/desc/.... and what not?

If you look back to my nation file and the list of the names under the nation?

There you would put the breed file name and then whatever you wish to call it

for me its like

"can_smg" "Canadian Marine"

chris10
11-19-2012, 03:42 PM
I dont know what I am doing wrong, It still gives a error . I made a desc.ing file in:
localization/desc.ing

inside I have:

{tags
{"human"
{"single"
{"gr"
{"rifle" "Rifleman"}
{"rifle2" "Rifleman"}
{"smg" "SMG Infantry"}
{"smg2" "SMG Infantry"}
{"smg3" "SMG Infantry"}
{"squad_leader" "Squadleader"}

In my "breed folder"
breed/single/gr/rifle.set

inside there:

{breed
{behaviour soldier}
{skin "greek_shooter"}
{portrait "greek_rifle"}
{icon "greekrifleman"}
{icon_priority 0}
{nationality gr}
{armors
{head fieldcap_greek}
}
{perks
{"health" "200%"
}
{"power" "150%"
}
{"vision" mp_soldier
}
{"speed" 0.9
}
{"pistol" none
}
{"smg" none
}
{"mgun" none
}
{"rifle" basic
}
{"rocketlauncher" none
}
{"melee" advanced
}
}
{inventory
{item "ammo rifle" 44}
{item "bandage" 4}
{item "sandbag_kit"}
{item "lebel_m1886" filling "rifle ammo" 5}
{item "mk1 grenade"}
{in_hands 3}
}
}

what am I doing wrong?

chris10
11-19-2012, 05:13 PM
Can you maybe give me the whole desc.ing from you?
So I cant make any faults. if it is possible send it in pm.

KnightFandragon
11-19-2012, 06:18 PM
Ok, first, is your .lng file .ing? Its a desc.LNG(lowercase), not . ING.

Take this

{"gr"
{"rifle" "Rifleman"}
{"rifle2" "Rifleman"}
{"smg" "SMG Infantry"}
{"smg2" "SMG Infantry"}
{"smg3" "SMG Infantry"}
{"squad_leader" "Squadleader"}

and add it below
}
}
{"single"
{"eng"
{"bazuker" "Rocket-launcher infantry"}
{"bazuker_w" "Rocket-launcher infantry"}
{"flamer" "Flamethrower infantry"}
{"infantry.smg" "SMG infantry"}
{"mgun" "Machine gunner"}
{"mgun_w" "Machine gunner"}
{"oficer" "Officer"}
{"oficer_w" "Officer"}
{"commando_rifle" "British Commando"}
{"commando_smg" "British Commando"}
{"rifle" "Rifleman"}
{"rifle_w" "Rifleman"}
{"smg_spez" "SMG infantry"}
{"smg_spez_w" "SMG infantry"}
{"smg_w" "SMG infantry"}
{"sniper" "Sniper"}
{"sniper_w" "Sniper"}
{"tankman" "Tank crew"}
{"oficer_afr" "officer"}
{"rifle_afr" "rifleman"}
{"tankman_afr" "tankman"}
{"corporal" "Corporal Robinson"}
{"corporal_sp" "Corporal Robinson"}
{"palmer" "Terry Palmer"}
{"palmer_sp" "Terry Palmer"}
{"consul" "American consul"}
{"consul_sp" "American consul"}
{"rifle_red" "Rifleman"}
{"rifle_black" "Rifleman"}
}
{"gr"
{"rifle" "Rifleman"}
{"rifle2" "Rifleman"}
{"smg" "SMG Infantry"}
{"smg2" "SMG Infantry"}
{"smg3" "SMG Infantry"}
{"squad_leader" "Squadleader"}
}
{"ger"

It should then look like the above text..

Also, add a third letter to your "gr", this game is finicky sometimes and maybe it only accepts 3 letter or more...I know it only accepts lowercase letters in the breed file, so you have the text correct with rifle, rifle1 and what not.

So maybe make your "gr" "grk"? They are greek soldiers?


What error are you still getting?

chris10
11-19-2012, 08:17 PM
One part is fixed, I did ING not LNG.
But now I get this error: http://imageshack.us/photo/my-images/132/95462351.png/

You are saying it should now look like this:


}
}
{"single"
{"eng"
{"bazuker" "Rocket-launcher infantry"}
{"bazuker_w" "Rocket-launcher infantry"}
{"flamer" "Flamethrower infantry"}
{"infantry.smg" "SMG infantry"}
{"mgun" "Machine gunner"}
{"mgun_w" "Machine gunner"}
{"oficer" "Officer"}
{"oficer_w" "Officer"}
{"commando_rifle" "British Commando"}
{"commando_smg" "British Commando"}
{"rifle" "Rifleman"}
{"rifle_w" "Rifleman"}
{"smg_spez" "SMG infantry"}
{"smg_spez_w" "SMG infantry"}
{"smg_w" "SMG infantry"}
{"sniper" "Sniper"}
{"sniper_w" "Sniper"}
{"tankman" "Tank crew"}
{"oficer_afr" "officer"}
{"rifle_afr" "rifleman"}
{"tankman_afr" "tankman"}
{"corporal" "Corporal Robinson"}
{"corporal_sp" "Corporal Robinson"}
{"palmer" "Terry Palmer"}
{"palmer_sp" "Terry Palmer"}
{"consul" "American consul"}
{"consul_sp" "American consul"}
{"rifle_red" "Rifleman"}
{"rifle_black" "Rifleman"}
}
{"gr"
{"rifle" "Rifleman"}
{"rifle2" "Rifleman"}
{"smg" "SMG Infantry"}
{"smg2" "SMG Infantry"}
{"smg3" "SMG Infantry"}
{"squad_leader" "Squadleader"}
}
{"ger"


Do I also have to add the vanilla units? (so the units who were already in the main game of men of war)
I think I have to do that, what ive to add then?
Where can I find the Vanilla desc file?

Thats why I need someones other desc file because otherwise i make much faults.

KnightFandragon
11-20-2012, 12:19 AM
Oh, ok, I see now.

Alright, to get the base game's localization files, look in your

1c/Men of War/ folder

In there you should find

Localization.pak

Using like winrar or 7zip, unzip that. In there you will find the desc.lng file.....you then just take the unzipped localization file and put that in

mods/<yourmod>/(put localization file here)

Then, you will need to right click, go into properties and uncheck read only...you will need to uncheck read only for every file you copy from the base game files.

Then, once you do that, you can edit the desc.lng file as you need to. Once that is done, your changes should work.

chris10
11-20-2012, 03:08 PM
Damnit, still I get the error from before if i click on the unit in editor: http://imageshack.us/photo/my-images/831/95100462.png/

Are the breed/<unit>.set and localization/desc file the only files you need to create a new nationality?

I will send you my breed files and the desc file with a pm

KnightFandragon
11-21-2012, 02:24 AM
Everything looks right with your desc and breed files, but looking in your dlg_mp.lng file, you need to go down to the section



{"army"
{"ger" "Germany"}
{"rus" "Soviet Union"}
{"usa" "USA"}
{"jap" "Japan"}
{"eng" "United Kingdom"}
}

and in there add

{"gr" "Greek Army"}

THen see what happens. Or what ever you wish to put there, but

chris10
11-21-2012, 06:12 AM
Excatly im only making a singleplayer mod not multiplayer, so I can delete it I think?
By the way, the desc files are good because i did nationality "rus" to test it and i saw a greek rifleman called Rifleman and not desc/.../...
but if i do nationality "gr" i crash then if i click on the unit in editor.
Do I maybe have to add more? like names.ing and talk.set?

And can you test the breed and desc files? so give the breed file another skin to test it and look if it crash too by you.

chris10
11-21-2012, 03:23 PM
YEEEEEES ITS FIXED.
You need to have a #names.ing too with greek names in it.
Now it works :grin:

and also KnightFandragon really really thanks for your help :D
You helped me so much.

Greets

KnightFandragon
11-21-2012, 04:46 PM
Ahh, yes, names. I had so many errors when I did it, that I forgot everything I did to make it work...there is alot of trial and error when modding this game.

Your welcome man.

chris10
11-21-2012, 07:38 PM
I dont open a topic again but how do I add sounds for humans and script it then?
Or you can you just put it in "sound/human" and you are done?

KnightFandragon
11-21-2012, 10:54 PM
I do not know how to add sounds for humans......I have tried to edit files, but nothing, didnt look into it any further...