SC2Mapster Forums

Resources > Tutorials

[Data - Actor][Events+ Message] Texture Select By ID

    #1 Apr 16, 2011 at 18:32 UTC - 9 likes

    Many many thanks and major credit goes to DrSuperEvil, he's the one who started the ball rolling.

    Here's the original thread, and how some of this was discovered.
    http://forums.sc2mapster.com/development/data/18456-how-do-i-use-texture-select-by-id/


    Tutorial Start

    Basics

    • You will only be required to modify 3 data types, they are Actors, Models, and Textures.
    • You will also need to use the Previewer, which can be opened with Ctrl + Shift + V, or by going to the menu Data -> Preview Model.
    • Setup the following buttons(seen in the picture) all pushed in. It will allow you to see the proper fields. fields

    For all intents and purposes, I am going to be modifying the PrisonZealot to look like a regular Zealot(sort of) with blue Dreadlocks!

    Now let's get started shall we?

    First, open up the previewer, and find/load the PrisonZealot into the previewer. Afterwards, you will need to make sure that the little button with 2 green and 2 black squares is pressed(in the red circle).
    Previewer - Materials
    This displays the Materials folder of the model, which is where we are going to find our Prefix and Substrings.

    We are looking to modify the Hair and the entirety of the Prison Zealot, and taking a look at the material folders, we will need to reference [3: Dredlocks] and [5: Standard_14] folders.

    MAIN REFERENCE
    Main

    HAIR REFERENCE
    Hair

    Now it's time to modify our Model!

    Models Tab

    Look up the Prisoner Zealot model, and head on in! You will want to scroll down and find the field
    Texture Declarations+ which you will notice is empty. Open it up and right click in the first box Texture Declarations, and select Add Value, OR you can just click on the green X to the right.

    All that happens, is that you get a new Index at 0, and you can now modify the Adaptions box below it(if you have Index 0 selected), so do that(select Index 0) and again right-click Add Value or Green X in the Adaptions section. Do that 4 times, so you get Indexes 0 through 3. Here is where we will be modifying the PrisonZealot's main textures.

    WARNING: If you have multiple indexes like the above, 0 through 3, and you attempt to delete 0, 1 or 2, it will crash your editor. You MUST delete Index 3 first, then 2, then 1, or as stated, the editor will crash!

    Select Index 0 of Adaptions and using Main Reference from above [5: Standard_14], first thing we will want to do is add our Prefix, which you might notice from the picture, is PrisonZealot, so write PrisonZealot_ in the Prefix box. (Through testing, in many cases it is REQUIRED that the _ be included in the Prefix as well as the Substring, else it MAY NOT function in-game.)

    NOTE: you only need to input the Prefix once per Texture Declaration Index.

    • Now write main in the Slot box, and write _Diffuse in the Trigger on Substring box.
    • Select Index 1 and write main in the Slot box, and write _Specular in the Trigger on Substring box.
    • Select Index 2 and write main in the Slot box, and write _Emissive in the Trigger on Substring box.
    • Select Index 3 and write main in the Slot box, and write _Normal in the Trigger on Substring box.

    Now, add a new Index to Texture Declarations, this will be Index 1. And add a new Index to Adaptions under Index 1.

    Select Index 0 of Adaptions and using Hair Reference from above [3: Dredlocks], first thing we will want to do is add our Prefix, which you might notice from the picture, is ZealotDreads, so write ZealotDreads_ in the Prefix box.

    • Now write hair in the Slot box, and write _Diffuse in the Trigger on Substring box.

    Now our Prison Zealot's main textures are ready and able to be modified to our hearts content!

    Here's what it should look like. Click on the picture to view better detail.

    http://i43.tinypic.com/537mvp.jpg

    The Prefix (and possibly the Substring) seem to be case sensitive. In the case of the Prison Zealot, it's main Prefix is PrisonZealot, and the Colossus' main Prefix is colossus, not Colossus.

    Textures Tab

    Head over to the textures tab, and right click, Add Texture, Name along the line of PrisonZealot_Diffuse, click on Suggest, leave Based ON as CTexture.

    • Modify the Slot field, write/input main.diffuse
    • Modify the File field, file path Assets\Textures\Zealot_Diffuse.dds

    Add Texture, PrisonZealot_Emissive.

    • Modify the Slot field, write/input main.emissive
    • Modify the File field, file path Assets\Textures\Zealot_Emissive.dds

    Add Texture, PrisonZealot_Specular.

    • Modify the Slot field, write/input main.specular
    • Modify the File field, file path Assets\Textures\Zealot_Specular.dds

    Add Texture, PrisonZealot_Normal.

    • Modify the Slot field, write/input main.normal
    • Modify the File field, file path Assets\Textures\Zealot_normal.dds

    Add Texture, PrisonZealotHair_Diffuse.

    • Modify the Slot field, write/input hair.diffuse
    • Modify the File field, file path Assets\Textures\twilightcouncil_diffuse_holo.dds

    We're all done in the Textures Tab now.

    ADDENDUM: There is no way to use 1 file for multiple texture slots, besides re-importing the file. However, you can use 1 texture object on multiple units easily, just make sure you always use the same slot.

    Actors Tab

    Find Prison Zealot, and modify Events - Events+ field. Scroll down to the bottom, select the last entry, right click, Add Event then modify the Event to look like the following

    • Actor Creation
      • TextureSelectById PrisonZealot_Diffuse.

    Add a few new events, should look like this when you are done.
    Events+

    ADDENDUM: You are able to view textures within the map editor by slightly modifying when the Texture Select By ID occurs. The tutorial creates it on Actor Creation, and can only be viewed and tested in-game. By using a TimerSet into a Timer Expired event (example below), you are able to preview some changes directly in the editor.

    • ActorCreation
      • TimerSet Timer 0.1
    • TimerExpired
      • TimerName Timer
      • TextureSelectByID texture1

    We are now Finished!!

    Please read the Note below about Slots. Should remove some confusion.

    Extra Information

    Also, You might get some errors in the editor from time to time something along the line of "Cannot load blah blah Expression 1". This is either an Editor "Thing", or you are linking the improper Texture in the Actor Event. If it works fine in game, no worries about the editor.

    Here are some of the SLOTS you might use. Don't know if it's the full list, but it might be.

    Slots

    • Decal
    • Main
    • Reflection
    • Video
    • Campaign
    • Terran
    • Zerg
    • Protoss
    • Merc
    • Body
    • Head
    • Hair
    • Generic 01
    • Generic 02
    • Generic 03
    • Generic 04
    • Generic 05

    Note: Specific textures DO NOT have to be placed in specific slots. You can use the Main slot to change a Smoke Trail, and you can use the Decal slot to change the primary texture of a unit. Slots are Interchangeable, use whichever slot you like.

    Pictures


    Tutorial, Before http://static.sc2mapster.com/content/attachments/15/229/Regulars.jpg Tutorial, After http://static.sc2mapster.com/content/attachments/15/223/Screenshot2011-04-16_14_35_49.jpg Firebat -> Kueken http://static.sc2mapster.com/content/attachments/15/678/Firebat.jpg Thors, Custom Textures -> Kueken
    http://static.sc2mapster.com/content/attachments/15/723/Thors.jpg
    Queen -> Kueken
    http://static.sc2mapster.com/content/attachments/16/270/2.jpg
    Hybrid -> Kueken
    http://static.sc2mapster.com/content/attachments/16/275/7.jpg
    Medivac -> Seraphlio
    http://static.sc2mapster.com/content/attachments/18/48/LioShot-2011-06-29-_12-03-53_.jpg
    Leviathan, Kerrigan, Reaver Hybrid, Siege Tank -> DrSuperEvil
    http://static.sc2mapster.com/content/attachments/15/252/Screenshot2011-04-17_09_16_21.jpg

    Last edited Apr 26, 2012 by BorgDragon
    Name Size MD5
    TEXTURE_SWAP.SC2Map 36.9 KiB 7ea7e12c7b4c...
    • Screenshot2011-04-16_14_35_49.jpg
      Final Screen
    • Regulars.jpg
    #2 Apr 16, 2011 at 19:03 UTC - 1 like

    Info in this post was no longer relevant or correct... placeholder for now?

    Last edited Aug 03, 2011 by BorgDragon
    #3 Apr 16, 2011 at 19:19 UTC - 0 likes

    Right after Uberlisk, Fractalisk and Carrier-Carrier: The Cactus-Zealot :D

    GJ on the tutorial, format looks good. Clean and readable for me.

    http://img577.imageshack.us/img577/4226/blaj.jpg

    #4 Apr 16, 2011 at 19:20 UTC - 1 like

    Ok, I cannot edit my second post because apparently the forum believes it to be Post 6, and there is no post 6.

    Little update...

    Using a Double Diffuse does not matter. It seems that the Higher Numbered Index overwrites the Lower Numbered Index if they both modify the same Slot and Substring. I could have sworn that some of Index1's Diffuse could be seen through Index 5's Diffuse, but apparently it was just wishful thinking :P

    EDIT: Thanks Kueken! I appreciate your feedback on my post.

    The picture of the Cactus Zealot doesn't do it justice.

    When the Zealot folds his arm over, you can see it much better and it looks so good. The "spiky" part or whatnot is only on the Arm Bracers and Legs... it's like the textures just KNOW where to line up and stop perfectly. Everything lines up really nicely. I've seen this lining up with several textures that have multiple "regions" you could say.

    EDIT 2: Modifying the Blades glow IS possible, because I've done it. But I was screwing around and it looked terrible, so I pretty much deleted that edit, and now I cannot seem to modify them. If only I could find out how again.

    Last edited Apr 16, 2011 by BorgDragon
    #5 Apr 17, 2011 at 09:39 UTC - 0 likes

    Some Textures are just easy to coordinate with units.

    • Screenshot2011-04-17_10_31_02.jpg
    • Screenshot2011-04-17_09_16_21.jpg
    • Screenshot2011-04-17_10_43_34.jpg
    #6 Apr 17, 2011 at 12:35 UTC - 1 like

    @DrSuperEvil: Go

    1. The Matrix, anyone?? heheh
    2. Holy Hell ! Wait, I meant Hellish!
    3. Good old sludge!
    #7 Apr 17, 2011 at 12:38 UTC - 0 likes

    This is extremely amazing and I shall have a lot of fun with it! =D

    Also, if you could find out how to adress the blades of the zealot that would be even better.

    15/20 :-)

    2

    Looking for testers in EU: Thread on SC2Mapster, Project Page

    #8 Apr 17, 2011 at 12:54 UTC - 0 likes

    Awesome =D Thank god you found this, I wanted to make one of my heroes have the Dark Templar Placement model texture for ages now...

    Projects: Starmon - RuneCraft
    http://i.imgur.com/G4EszBx.png

    #9 Apr 17, 2011 at 13:43 UTC - 1 like

    @Obatztrara: Go

    I'm working on it :)

    Also managed to modify the Stone Zealot. for some reason, I wasn't able to modify the Stone Zealot before but now everything seems to be working great. I tried modifying the 'glow lines' but I can't seem to modify them? Unless of course, it's Player Color dependant.. hrmm..

    EDIT: Indeed the glow lines on Stone Zealots are 'team colors', bah... that sux!

    Last edited Apr 17, 2011 by BorgDragon
    #10 Apr 17, 2011 at 13:49 UTC - 0 likes

    :/ Alright, I tried modifying the Dark Templar model to use the textures of the placement models (And yes, i did put the prefix as "DarkTemplarSilver" and named textures right), i get errors in the trigger debugger and the model uses default textures :( Can you try and see whether something is wrong with the model itself and/or what I mightve possibly done wrong? I triple checked everything... I also removed the variations btw.

    #11 Apr 17, 2011 at 13:53 UTC - 1 like

    @TheAlmaity: Go

    Oooooh, you are lucky mister! I'll take a quick look right now. After that, off to bed for me.

    #12 Apr 17, 2011 at 13:59 UTC - 0 likes

    The hero pheonix texture looks good on vikings. Gives them a nice mask face.

    Aciddeath2, redstonelavafall and tychus05_briefing_xelnagaworldship_emissive seem to fit most models and look good. Also I thought it looked more Tron than Matrix.

    The Zakuldasobelisk diffuse makes aberations look very zen with the paint on the head and their bound legs.

    The Omegalisk Skin looks interesting on vikings.

    Last edited Apr 20, 2011 by DrSuperEvil
    #13 Apr 17, 2011 at 14:18 UTC - 1 like

    @TheAlmaity: Go

    Well, it's not your imagination. I tried to change the diffuse to Silver_Placement.dds and I got expression 1 error in game, and no skin change. I changed it from Silver_Placement.dds to assimilator_holo and it worked fine.

    I tried Silver_Placement.dds on the StoneZealot and it worked fine for it.

    It seems there are some textures you can't (at least not yet??) place on certain models. Like for instance, you can put Sludgewater.dds on most units, but not on Colossus. You get "expression 1" error in game. Same thing is happening to the Dark Templar and silver_placement.

    However, if you are going for the actual 'see through' glowy effect, I think you might be out of luck, maybe.

    For now, possibly apply a Protoss_holo texture to your unit, apply an Opacity and white HDR multiplier on unit birth?

    Anyways, bed time for me, I'll check back in about 8ish hours.

    Last edited Apr 17, 2011 by BorgDragon
    #14 Apr 17, 2011 at 14:20 UTC - 0 likes

    I propose you do the sludgewater test on it see if that also does not work on the dt. Also try some texture with diffuse in it name like the redstonelavafall diffuse. see if those work. Since colossus can use any texture with diffuse in its name.

    Last edited Apr 17, 2011 by DrSuperEvil
    #15 Apr 17, 2011 at 22:14 UTC - 1 like

    Some info here.

    http://forums.sc2mapster.com/development/artist-tavern/20178-modifying-textures-for-existing-unit/#p13

    Basically you just want to have the path to the dds with either the prefix or substring. underscores in the path via previewer are what indicate a substring. If there is no substrings you just write out the complete file path name.

    #16 Apr 17, 2011 at 22:25 UTC - 1 like

    I tried using DarkTemplarSilver_Placement on the colossus... when I placed the Colossus in the map, when I was choosing a place to drop him, he was blue... I placed him, he was normal, but I got no error. I tested the map out, colossus was normal, and I got multiple errors(some for the dark templar).

    So I deleted the DarkTemplar_Specular texture I tried using, and removed that from the DT Events+... reload the game, BAM! Colossus was blue.

    WHY?

    Sludgewater works on the Dark Templar.

    You are indeed going to have to do a White HDR / Opacity event on your unit to make it look anywhere near like the Placement ingame. It must be an m3 property for placement.

    Here's a pic of Silver_Placement colossus with white 10hdr / .25 opacity, white 5hdr Sludgewater DT.

    • Screenshot2011-04-17_18_21_53.jpg
    #17 Apr 17, 2011 at 22:32 UTC - 0 likes

    @BorgDragon: Go

    @DrSuperEvil: Go

    Thx for the help guys, I'll try a holo texture then :)

    Also, could you post screenies of the textures you said look good on certain units? I need to make some more heroes for my map and I could sure use some awesome looking stuff...

    Ah, you posted while I was writing... Kewl :) I'll check out other textures first, I just want anything that makes him look sort of transparent and blue, the placement model being the best I could think of.

    #18 Apr 17, 2011 at 22:49 UTC - 1 like

    @TheAlmaity: Go

    Here's another texture you might want to try on your heroes for a blue glow-effect. Xelnagaturret_spec. Here it is below, white 5hdr / .5 opacity. 2scale Marauder Kill Squad. Compared to the Holo Colossus... it's much brighter and I think much more along the lines of what you want :)

    • Screenshot2011-04-17_18_47_57.jpg
    #19 Apr 18, 2011 at 02:25 UTC - 1 like
    Quote from BorgDragon: Go

    I tried using DarkTemplarSilver_Placement on the colossus... when I placed the Colossus in the map, when I was choosing a place to drop him, he was blue... I placed him, he was normal, but I got no error. I tested the map out, colossus was normal, and I got multiple errors(some for the dark templar).

    So I deleted the DarkTemplar_Specular texture I tried using, and removed that from the DT Events+... reload the game, BAM! Colossus was blue. WHY?

    Sludgewater works on the Dark Templar.

    You are indeed going to have to do a White HDR / Opacity event on your unit to make it look anywhere near like the Placement ingame. It must be an m3 property for placement.

    Here's a pic of Silver_Placement colossus with white 10hdr / .25 opacity, white 5hdr Sludgewater DT.

    It was blue because all models have teamcolor, undernearth all textures. So you got the default teamcolor when replacing the texture with an invalid texture.

    Last edited Apr 18, 2011 by PSGMud
    #20 Apr 18, 2011 at 12:15 UTC - 0 likes

    Actually that is incorrect. If there is an invalid texture then nothing happens and the unit uses it's original texture.

You must login to post a comment. Don't have an account? Register to get one!