Preserver Glow

DonMushroom

Member
Reaction score
4
Hi again :)

I was wondering if it is possible to change the color of the preserver glow from blue ti player colored :)
 

Dave312

Censored for your safe viewing
Reaction score
269
That 'glow' is built into the model. You would need to edit the model/model skin and change it that way.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293

DonMushroom

Member
Reaction score
4
That is exactly what i need but the file just seems to be a load of random text and there is no instructions of what to do. :(

Am i missing something?
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
It is a test map file. It should have the .SC2Map extension. Try opening it in the editor.

There are several things to do to get this to work.

1. Export all the textures from the import editor and import them back into your own map.
2. Go back into the test map, open up the data editor and go to the "Edit Art and Sound Data>Textures"
3. Set the data source to "Preserver_TeamColor.SC2Map"(so you only see modified objects)
4. Copy all of custom textures over to your map.
5. Go to the PreserverA model and copy the ":Texture Declarations + field to your own map's PreserverA model. (If you select the field, press ctrl + c, change to your map and select the field again and press ctrl + v, you'll copy it)
6. When you create your Preservers, use the "Send Actor Message To Unit" action to send the "Texture Select by Id" message with the parameter "TeamColor_PlayerX"(where X is the player you created the preserver for. Send the actor message to the newly created preserver.
7. (Optional - if you want to remove a lot of the glow) Do the same thing as 6) but with the "NoGlow" parameter instead of "TeamColor_PlayerX"
8. Do the same thing as 6) but with the "Preserver_TeamColor" parameter.
9. (Optional - if you want more glow) Do the same thing as 6) but send the message "Set Tint Color". In the color parameter, set HDR multiplier to 2.

What you're actually doing is changing the texture of the unit. This is a rather complicated process that is explained in more detail here.
 

DonMushroom

Member
Reaction score
4
Ok so now i have loads of different colored preservers :)

I need to find a way to set the glow color at the start of the game to be the same as the players. Does anyone have any idea about how i should go about this? :)
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Ok so now i have loads of different colored preservers :)

I need to find a way to set the glow color at the start of the game to be the same as the players. Does anyone have any idea about how i should go about this? :)


6. When you create your Preservers, use the "Send Actor Message To Unit" action to send the "Texture Select by Id" message with the parameter "TeamColor_PlayerX"(where X is the player you created the preserver for. Send the actor message to the newly created preserver.
7. (Optional - if you want to remove a lot of the glow) Do the same thing as 6) but with the "NoGlow" parameter instead of "TeamColor_PlayerX"
8. Do the same thing as 6) but with the "Preserver_TeamColor" parameter.
9. (Optional - if you want more glow) Do the same thing as 6) but send the message "Set Tint Color". In the color parameter, set HDR multiplier to 2.


Basically, you just do what I just quoted but for all the preservers. Here's a trigger that should do that. It would be easier to do it with custom script(there is an example custom script in the map), but for GUI, I would create a - Game Link - Texture variable array where you store all the different "TeamColor_PlayerX" textures. So the texture at index 1 is "TeamColor_Player1".

Trigger:
  • Create Preservers
    • Events
      • Game - Map initialization
    • Local Variables
    • Conditions
    • Actions
      • Player Group - Pick each player in (Active Players) and do (Actions)
        • Actions
          • Unit - Create 1 Preserver (A) for player (Picked player) at Point using default facing (No Options)
          • Actor - Send actor message (TextureSelectById team_textures[(Picked Player)]) to main actor of unit (Last created unit)
          • Actor - Send actor message (TextureSelectById No Glow) to main actor of unit (Last created unit)
          • Actor - Send actor message (TextureSelectById Preserver_TeamColor) to main actor of unit (Last created unit)
          • Actor - Send actor message "SetTintColor {255,255,255 2.000000}" to main actor of unit (Last created unit)
 

DonMushroom

Member
Reaction score
4
I think im in over my head. This is my first map and the preserver thin is pretty much all its needs to be complete :(

I cant get my head around the process your teaching me as this is the first time i have tried anything like this. I dont see why there has to be so may preservers made with so many colors.

My map runs like a normal melee game really. Can someone write me a custom script so if the player chooses to be Protoss there preservers are the same color as the player.

Sorry about this. :(

(Preserver is the starting unit on my map if your protoss)
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Okay, I'll do a more detailed explanation.

First of all, you need a global variable of the type "- Game Link" and the Link type "Texture. Make it an array and set the size to something that fits all your players, like 12. I called my variable "PreserverTexture". First of all, you have to save all textures in that variable when the game starts. If you already have a trigger that runs when the map starts, you can add it to that one, otherwise you'll have to do a new one.

Trigger:
  • Initialize textures
    • Events
      • Game - Map initialization
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set PreserverTexture[1] = TeamColor_Player1
      • Variable - Set PreserverTexture[2] = TeamColor_Player2
      • Variable - Set PreserverTexture[3] = TeamColor_Player3
      • Variable - Set PreserverTexture[4] = TeamColor_Player4


Next up, you need a trigger to color the preservers when they enter the map.

Trigger:
  • Preserver Texture Change
    • Events
      • Unit - Any Unit Enters (Entire map)
    • Local Variables
    • Conditions
      • (Unit type of (Triggering unit)) == Preserver (A)
    • Actions
      • Actor - Send actor message (TextureSelectById PreserverTexture[(Triggering player)]) to main actor of unit (Triggering unit) ****
      • Actor - Send actor message (TextureSelectById No Glow) to main actor of unit (Triggering unit)
      • Actor - Send actor message (TextureSelectById Preserver_TeamColor) to main actor of unit (Triggering unit)
      • Actor - Send actor message "SetTintColor {255,255,255 2.000000}" to main actor of unit (Triggering unit)


**** Note that to send that message, when you select the message, switch from value to function and find "Texture Select By ID". You should then get a Texture parameter below it that you can set to your variable.
 

Kyuft

Member
Reaction score
11
If the glow is a texture, couldn't he have just edited the texture and made the blue, white, and colored white to alpha?

-Kyuft:shades:
 

DonMushroom

Member
Reaction score
4
Ok so all the triggers work :D Thanks you. How would i go about editing them so they are the color the player chooses instead of having a color preset for each player number?) :)
 

Kyuft

Member
Reaction score
11
Most likely, you will use a lot of If player color is...'s in the triggers, but it could work. However, I still believe you could change the texture so it does that automatically.

-Kyuft:shades:
 

Kyuft

Member
Reaction score
11
I am almost positive that there is a "Player color =" field that you caan input under an 'If' statement. You could do something like:
Trigger:
  • If
    • Player Color = Red
    • Then
      • Set preservercolor preserverred


-Kyuft:shades:
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
If the glow is a texture, couldn't he have just edited the texture and made the blue, white, and colored white to alpha?

-Kyuft:shades:
I'm not sure I'm following what you're saying. If you made the preserver have a transparent glow, he wouldn't have any color at all. As far as I know, there is no hidden team color underneath the glow. Kueken531 already modified the textures however to give them a player colored glow.

Ok so all the triggers work :D Thanks you. How would i go about editing them so they are the color the player chooses instead of having a color preset for each player number?) :)

It depends on how you want the player to choose their color. Basically have an integer array that saves the color a person wants. So a player gets to choose between colors 1-12. The number of the color he chooses is saved in the array at his index(at index 1 for player, index 2 for player 2).

You can then use the exact same triggers, you just have to change "(Triggering Player)" in the first action to YourIntegerArray[(Triggering Player)]. So it's "Actor - Send actor message (TextureSelectById PreserverTexture[YourIntegerArray[(Triggering player)]]) to main actor of unit (Triggering unit)"
 

Kyuft

Member
Reaction score
11
I'm not sure I'm following what you're saying. If you made the preserver have a transparent glow, he wouldn't have any color at all. As far as I know, there is no hidden team color underneath the glow. Kueken531 already modified the textures however to give them a player colored glow.

If you make set the glow to alpha (transparent) then the editor automatically fills that in with team color. If you look at the textures of units, they have transparent areas where their team color goes.

-Kyuft:shades:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top