Jump to content


Photo

Unit select?


  • Please log in to reply
12 replies to this topic

#1 HARBiNG3R

HARBiNG3R
  • Members
  • 49 posts

Posted 24 November 2014 - 03:51 AM

Hello, I got a sort of simple question. When you select a unit you notice how they get your faction color wrap around the unit horde? how do you add that? I have a unit that I can't tell if I have them selected or not.

 

EDIT: Also, how do you make the unit icons and where are they placed?


Edited by HARBiNG3R, 24 November 2014 - 04:24 AM.


#2 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 24 November 2014 - 04:33 AM

For the decal to show up so you can see your selected units, make sure you add both the unit and the horde to experiencelevels. If you only add the horde then the decal won't show up.

                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#3 HARBiNG3R

HARBiNG3R
  • Members
  • 49 posts

Posted 27 November 2014 - 02:56 AM

Thanks, I added them but for some reason it still does not show up. Also, where is the cleanup text located? Basically, I want to change the name of a unit and also the description for another. Can't seem to find it.


Edited by HARBiNG3R, 27 November 2014 - 04:39 AM.


#4 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 27 November 2014 - 04:59 AM

I believe what you are looking for is the lotr.str file. It is a simple notepad editable file like an ini, and is standard for BFME2. It works also in BFME1, but is not default. However I believe every mod uses a lotr.str to edit in game text. It's in the data folder usually.


                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#5 HARBiNG3R

HARBiNG3R
  • Members
  • 49 posts

Posted 27 November 2014 - 01:32 PM

Thanks, that worked perfectly! Ok one more; How do I go about creating a unit icon and where are they supposed to be stored? Dimensions? Thanks

 

 

 

EDIT: Is there a file that the AI uses as a build order or sort of a guideline for structures? I know skirmishaidata.ini is for the hordes.


Edited by HARBiNG3R, 27 November 2014 - 02:52 PM.


#6 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 27 November 2014 - 02:57 PM

Well it works like this; For units, the building portrait texture normally contains the art for each individual unit button. Then, the unit portrait also has a portrait texture.

 

I will give more detail:

 

Note: I used BFME1 as a reference... But the concept is exactly the same in BFME2 and RotWK.

 

Let's say for example, Mordor Orcs.. The button for recruitment is held here in this texture:

 

wjL2fKW.jpg

 

And the portrait is this texture:

 

HqeEfuz.jpg

 

Now, the way the game reads them is through a line of code. The Orc button is defined in the buildingradialbuttons.ini located in data/ini/mappedimages/handcreated. The line of code is;

MappedImage BMOrcPit_Horde
  Texture = BuildingRadialButtons_065.tga
  TextureWidth = 256
  TextureHeight = 256
  Coords = Left:192 Top:64 Right:256 Bottom:128
  Status = NONE
End
 
The Orc portrait is defined in unitportraits.ini located in data/mappedimages/aptimages. The line of code is;
 

MappedImage UPMordor_OrcHorde
Texture = UPMordor_OrcHorde.tga
TextureWidth = 256
TextureHeight = 256
Coords = Left:0 Top:0 Right:191 Bottom:191
Status = NONE
End
 
The Coordinates are used to tell the game what part of the texture to use, since by default it is a 256x256 texture, the game is only supposed to read a certain part of it. So take example the portrait, it is saying only use 191x191 of the texture, from the top left. The 0 values means don't extend past this point. So 0 left 191 right, means use only 191 pixels of the texture from the left side. Same goes for 0 top, 191 bottom. Only use the bottom 191 pixels. Which essentially in game turns the 256x256 texture into a 191x191 texture for the game to show.
 
You can actually put these code segments in any ini you wish, the point is this is how you define a specific texture to represent a unit button/portrait. Then you simply reference the correct MappedImage line to your desired unit and bingo, you've got new art for your unit.

 

See the CommandButton for MordorOrcs:

CommandButton Command_ConstructMordorOrcFighterHorde
Command = UNIT_BUILD
Object = MordorFighterHorde
Options = CANCELABLE
TextLabel = CONTROLBAR:ConstructMordorOrcFighterHorde
ButtonImage = BMOrcPit_Horde
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipBuildMordorOrcFighterHorde
Radial = Yes
InPalantir     =  Yes
ShowProductionCount = Yes
;    UnitSpecificSound   = GondorArcherVoiceBuy      
End

Edited by Kwen, 27 November 2014 - 03:00 PM.

                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#7 HARBiNG3R

HARBiNG3R
  • Members
  • 49 posts

Posted 28 November 2014 - 02:49 AM

Ok, so where do I need to place this texture at and does it have to have be .tga file for it to read it? i see some .dds files is this where the art/textrure is supposed to be stored? If so what do you use to open them? Sorry, I guess this just generated more questions but I did understand what you said. Thanks for all your help.


Edited by HARBiNG3R, 28 November 2014 - 02:50 AM.


#8 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 28 November 2014 - 04:15 AM

The texture file would be placed in the correct subfolder that matches the first two letters of the filename. Just like any other BFME2 texture. The texture does not need to be in .tga format. .dds is functionally exactly the same but has better size compression. So a .dds texture in the compiledtextures folders will be read in the code just fine, except the code will say .tga.  


                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#9 HARBiNG3R

HARBiNG3R
  • Members
  • 49 posts

Posted 04 December 2014 - 03:14 AM

Ok, I seem to be having some issues getting a portrait to show up. I downloaded this image Stokstaartje95 made and turned it into a 191x191 then pasted it from the top left into a 256x256 black background and proceeded to convert it to a .DDS file using photoshop. I saved it as UPGaladhrim_Warrior.DDS in the UP folder in compiledtextures, then I created this code in unitportraits.ini:


MappedImage UPGaladhrim_Warrior

Texture = UPGaladhrim_Warrior.tga

TextureWidth = 256

TextureHeight = 256

Coords = Left:0 Top:0 Right:191 Bottom:191

Status = NONE

End

and I added this to my unit:

SelectPortrait = UPGaladhrim_Warrior

But the unit's portrait shows up pink. What did I do wrong?


Edited by HARBiNG3R, 04 December 2014 - 03:16 AM.


#10 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 04 December 2014 - 05:09 AM

You didn't compile an asset.dat with the new portrait added. Everything else you have done correctly.

                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#11 HARBiNG3R

HARBiNG3R
  • Members
  • 49 posts

Posted 05 December 2014 - 01:58 AM

I seem to be having issues compiling a new asset.dat. I looked through the site and found this but I can't seem to be able to generate an asset.dat. I am working off of RJ Mod and thus I am trying to compile his Art folder with my textures which is 469 MB together. However, when I go to generate the file it just gets stuck on an endless loop trying to generate it. I put the folder in the desktop and didn't capitalize the file as stated. Is there an easier way generate one? Can I compile one with just my files? Ideas? I've tried it several times for a few hours at a time, its doing nothing.


Edited by HARBiNG3R, 05 December 2014 - 02:04 AM.


#12 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 05 December 2014 - 02:54 AM

It's easier (in my opinion) to use the assetcachebuilder.exe provided with the BFME2 mod SDK. What you do is put the assetcachebuilder.exe in the main directory of your mod, then only in BFME2/RotWK you have to rename compiledtextures to simply textures. Then run the assetcachebuilder and it should generate an asset.dat using only the art in the mod. Then rename textures back to compiledtextures.

                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#13 HARBiNG3R

HARBiNG3R
  • Members
  • 49 posts

Posted 05 December 2014 - 08:20 PM

That worked, thank you! Now i might even try to make some Palantir videos:thumbsuphappy:






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users