1. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  2. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice
  3. Melee Mapping Contest #3 - Results are out! Congratulate the winners and check plenty of new 4v4 melee maps designed for this competition!
    Dismiss Notice
  4. The winners of our cinematic soundtrack competition have been decided! Step by the Music Contest #11 - Results to check the entries and congratulate the winners!
    Dismiss Notice

Custom Team Colors Tutorial

Discussion in 'Miscellaneous Tutorials' started by A Void, Mar 6, 2016.

  1. A Void

    A Void

    Joined:
    Mar 29, 2011
    Messages:
    2,480
    Resources:
    10
    Models:
    2
    Spells:
    1
    Tutorials:
    7
    Resources:
    10
    [​IMG]


    This is a tutorial about creating and using custom team colors based on the replaceable textures method using War Club ability. You can find more information about this method here. This method basically involves using modified replaceable material id's to change texture of the model via in-game ability called War Club.

    First of all to be able to change team color we need to edit replaceable id of your model that will be using custom team color.

    Start Magos Model Editor, open up your model and do as showed:


    Step 1

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]


    Now import the model into the map and save it. The second part involves triggering, but you don't need to worry about that. I've taken care of that by creating a system which you can download and edit. It's GUI and very simple to understand.

    Currently it's not possible to change more than one material with War Club ability, thus you can't change Team Glows. Alternative option would be to create a custom team glow texture and apply it to your custom team glow model and then attach it to a unit.

    This method is very useful for campaigns that don't have file size limit.


    Screenshots


    Team colors are 1x1 pixel .tga images to keep file size lowest. Converting them to .blp increases the size, so I kept it like that.

    Furthermore, any questions will be answered in the comments.
     

    Attached Files:

    Last edited: Sep 30, 2016
  2. Warseeker

    Warseeker

    Joined:
    Feb 18, 2014
    Messages:
    2,291
    Resources:
    1
    Maps:
    1
    Resources:
    1
    The White, Aqua and Midnight blue team color remaind the same as they look, no difference except the black and green. So if I understand correct this isn't a total change of existing team color but making them more shading or alpha...etc.
     
  3. A Void

    A Void

    Joined:
    Mar 29, 2011
    Messages:
    2,480
    Resources:
    10
    Models:
    2
    Spells:
    1
    Tutorials:
    7
    Resources:
    10
    What do you mean? They don't look the same, White is similar to gray, Aqua is similar to teal and Midnight Blue is similar to purple but they have completely different tones.

    You can add your own custom team colors, these were just my examples.
     
  4. RED BARON

    RED BARON

    Joined:
    Oct 9, 2006
    Messages:
    5,111
    Resources:
    42
    Models:
    37
    Icons:
    3
    Packs:
    1
    Skins:
    1
    Resources:
    42
    That's just the examples. When you change the blp it makes it much more obvious.

    I would however given the above comment suggest to Void to make some radically different colors as examples so it would be very obvious that they changed.

    Also you should mention that the editor requires something? At least mine crashes due to an unknown custom trigger.
     
  5. A Void

    A Void

    Joined:
    Mar 29, 2011
    Messages:
    2,480
    Resources:
    10
    Models:
    2
    Spells:
    1
    Tutorials:
    7
    Resources:
    10
    It's not .blp, it's .tga.

    I will eventually update this tutorial, I kinda rushed it a bit.
     
  6. MasterHaosis

    MasterHaosis

    Joined:
    Sep 18, 2007
    Messages:
    1,112
    Resources:
    30
    Models:
    15
    Icons:
    13
    Maps:
    2
    Resources:
    30
    A Void, you got rep from me for trying. Although not finished, this can mimic new colors to some extend with some drawbacks of course, but still, we are one more step closer to it! :cgrin:

    Cool thing is that it can really give some new effect in game, even chat messages are in that new color. Also you can change your color in second. I can imagine few human players doing that all time haha.

    But serious disadvantage is that you need to extract every single unit you want to change and import back which can make map very big especially if there are custom races. This works for maps with lesser units.
    A Void, man I think you are closer to success. Keep researching maybe you will find way how to directly avoid this stuff with import/export of every unit. Maybe somehow it could directly affect main texture without editing it.
     
  7. RED BARON

    RED BARON

    Joined:
    Oct 9, 2006
    Messages:
    5,111
    Resources:
    42
    Models:
    37
    Icons:
    3
    Packs:
    1
    Skins:
    1
    Resources:
    42
    Yea, I noticed. I was actually going to make some updates pictures with this.. but it crashes. I guess you used a jass version of the editor?

    EDIT: Okay, so one cannot edit the triggers in any way, nor save the map. I have now tried both a fully updated regular editor and the newest newgen, nothing works. So what should the "unknown" script be? Just clicking the unknown crashes the editor.
     
  8. MasterHaosis

    MasterHaosis

    Joined:
    Sep 18, 2007
    Messages:
    1,112
    Resources:
    30
    Models:
    15
    Icons:
    13
    Maps:
    2
    Resources:
    30
    Oh, and if you are Undead or got Black Ranger and posses/charm enemy unit they will still be original color, in this case red. I totally forgot about that
     
  9. A Void

    A Void

    Joined:
    Mar 29, 2011
    Messages:
    2,480
    Resources:
    10
    Models:
    2
    Spells:
    1
    Tutorials:
    7
    Resources:
    10
    I tried everything already, changing team color path in War3Skins.txt, replacing one of the team colors with another, using team color id for destructibles and units. Nothing worked. This is the method I came up which actually is a solution.

    You can change computer players to use custom color, you can disable changing team color for players. This system is free to be edited, you can make your own changes.

    I used Jass New Gen World Editor. I'll convert the map for normal world editor, thanks for notifying.

    I will update the map with a fix to that problem. :)
     
  10. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,418
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    This seems like a nice alternative to the other tutorial, granted the author has enough file space within their map. You should write down within your tutorial that you have to edit the material for every model that you want to support custom team colors on.

    Also, I haven't looked at the code within the map, but it appears to crash when I switch to a custom color and then back to a standard color (e.g. -Fuchsia to -Gray).

    Other than that, it looks ready to be approved!
     
  11. A Void

    A Void

    Joined:
    Mar 29, 2011
    Messages:
    2,480
    Resources:
    10
    Models:
    2
    Spells:
    1
    Tutorials:
    7
    Resources:
    10
    It probably crashes because I used a method to hide War Club aka change texture ability, it doesn't work with mac. But hiding it is not necessary as it is a temporary ability. I'll eventually update that. :)
     
  12. RED BARON

    RED BARON

    Joined:
    Oct 9, 2006
    Messages:
    5,111
    Resources:
    42
    Models:
    37
    Icons:
    3
    Packs:
    1
    Skins:
    1
    Resources:
    42
    Sounds good. :wink: I'll check it again when time.
     
  13. Warseeker

    Warseeker

    Joined:
    Feb 18, 2014
    Messages:
    2,291
    Resources:
    1
    Maps:
    1
    Resources:
    1
    So, is it possible to create till 256 color from 12 team color with that?
    I thought that depend on the contrast color as this model, the team color of it is quite different tho...
     
  14. MasterHaosis

    MasterHaosis

    Joined:
    Sep 18, 2007
    Messages:
    1,112
    Resources:
    30
    Models:
    15
    Icons:
    13
    Maps:
    2
    Resources:
    30
    Yeah, but there must be something. Shar Dundred and I are talking much regarding this. He believes that there is some order somewhere to tell game to look at mpq first instead of map file regarding colors.

    How? I think that it also applies to those possessed units as well, they must be exported/edited/imported too
     
  15. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,495
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    Nifty. Seems quite size heavy which is quite the downside though.

    Still, likely something I will use in the future.
     
  16. JesusHipster

    JesusHipster

    Joined:
    Sep 19, 2011
    Messages:
    2,038
    Resources:
    55
    Models:
    48
    Icons:
    7
    Resources:
    55
    Or you could just replace the needed TC texture (ex. ReplaceableTextures\TeamColor\TeamColor00.blp, 01, 02... etc) with a colour of your choice. Or is there a sort of limitation regarding this method?
     
  17. RED BARON

    RED BARON

    Joined:
    Oct 9, 2006
    Messages:
    5,111
    Resources:
    42
    Models:
    37
    Icons:
    3
    Packs:
    1
    Skins:
    1
    Resources:
    42
    According to what I understand, it takes the color directly from the mpq, thus importing a changed texture to replace team colors has no effect.
     
  18. RED BARON

    RED BARON

    Joined:
    Oct 9, 2006
    Messages:
    5,111
    Resources:
    42
    Models:
    37
    Icons:
    3
    Packs:
    1
    Skins:
    1
    Resources:
    42
    Doesn't look like the map has been updated yet, still that "unknown" custom function that crashes the editor. Looking forward to testing it when it works.
     
  19. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,418
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    That method is discussed in this tutorial. However, team colors are loaded when Warcraft III is started up, not upon map-loading, so you can't replace it individually for a map. The players have to use a modified MPQ.
     
  20. A Void

    A Void

    Joined:
    Mar 29, 2011
    Messages:
    2,480
    Resources:
    10
    Models:
    2
    Spells:
    1
    Tutorials:
    7
    Resources:
    10
    Ok, I finished this system. The map has been completely redone. You can download and test it out now.

    If you have any questions or suggestions, please comment.