There is a number of issues that I've been trying to get resolved that are trigger related and I hoping to gain an understanding of how to do these things properly. I am mostly familiar with creating dialogs and many basic functions of triggers. There is a number of questions to ask, but I am going to start with some of the most important ones.
*Most Important*
1. Faction Randomization
I am making a mod with multiple factions, but what I would like is to understand how to setup randomization between factions should someone forget to pick a faction and possibly eventually allow players to pick a random one. For now though, my main concern is making sure that every active player gets a base should they forget to pick a faction.
2. Setting up the win conditions properly.
Currently the win conditions are broken in the mod I am making. Nobody can win, but the game ultimately results in a tie. I wanted to get to the bottom of this. Here is how I have it set up currently:
1. I have a trigger called cleardefaultmelee units.
This trigger runs at the start of the game and disables the melee options as seen in the picture.
2. I have a timer that adds enables the melee options when it reaches 0
The game also starts when the timer reaches zero. The faction structures are created prior to the timer finishing.
For some reason, this setup is not working. This is being done on a mod and not a map for the record.
3. Fixing Bug: Extra bases and starting workers sometimes spawning
The way I have my factions selected is that a player clicks on a dialog and then the starting units have a custom race are created as seen in the picture. I have made absolutely sure that each race is only set to spawn one base and a certain amount of working, but very occasionally players will sometimes start with an extra base and starting workers. For obviously reasons, this can present a lot of problems so it needs to be resolved.
4. How to properly set the music up. Unexpected bug.
The way I have the music for each faction set up is that music will is set to start for the player picking the faction, but immediately paused if the timer has not hit 0. It is supposed to unpaused once the timer hits zero, but for some reason this doesn't always happen. Some games the music won't play at all, some games the music takes up 2 minutes to start playing and some it starts immediately. I want to know what would be the proper way to get it working. The picture of the music setup is in 3. Here is a picture of when it is unpaused.
This is done soon as the timer hits zero for all players.
5. How to set a trigger to be off by default till activated?
I felt this might be very important to know. Certain triggers may need to be off by default till ready to be activated. I wanted to know how to do this.
1. I assume you are using player attributes to pick factions or are you using dialogs? Either way you will have some sort of variable set to determine what factions a player has or has not chosen. Just before the start you have an If Then Else switch below the For Each Player In Player Group action used to create your starting units that switches based on if the faction variable for the player has no value assigned in which case it then sets a value (default or random) and then runs the rest of your faction setup actions. For the random you use a Random Integer function in a Switch action and based on the integer outcome you pick a faction (unless your factions are already stored based on an integer).
2.1. Melee victory only applies if you have some trigger using the Set Default Melee Options For All Players action somewhere. You confirmed this trigger is running correctly? You tried using a Turn Trigger On/Off action to disable the Melee Initialization trigger?
2.2. going to need more details as to how it is not working. Your Timer trigger has no events so will not run. Use a Timer Expired event for a timer set up by a Start Timer action.
3. Are you sure this is not a side effect of the trigger shown in 2.1. not clearing everything since it is not set to clear stuff in the area around the starting location (like workers)? Why you using a separate dialog for each faction and not just different dialog items that can be hidden by hiding a single dialog. Else make an Action Definitions for hide all and have all your dialogs in that list to save you repeating it every time.
You using a different race for each faction? Debugging wise I would suggest adding a Text Message action that states just the player number integer to see if the action is being fired twice.
4. Try forcing it to play a new track after unpausing?
5. In the left window panels right click it and set the Enabled flag to off. You then use a Turn Trigger On/Off action to switch it back on. If you want it turned off mid game then use the trigger action to turn it off.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Okay. After hours of experimenting, trial and error and careful thinking, I've managed to solve 3, 2, 2.2 and 4. 4 and 3 are infact side effects of the win condition not working right. It also turns out veterancy was not working for that same reason. I thank you for the advice on 5. As for 3. The reason I for that is because when I started this, I did not know the trigger editor as well and I was trying what I knew worked. If I was to redo it now, it would be different. That is almost certainly going to prove useful in the future. 1. Right now I am still working on. SC2brood2 sent me an example map so I am studying it and trying to see what I might be able to figure out. Before I ask further about this one. I want to study things more first so I can bridge the gap between what I understand and don't understand a bit more. I do have another question for now.
1. This question is about some sort of error with icons that started happening recently. For some reason icons started appearing like this in game, but only for the published version. This doesn't happen on the test map for whatever reason and this wasn't always happening. The icons were working fine in the past. I've double checked to make absolutely sure that the icons are infact correctly input into the buttons. Unfortunately, its still not working.
This is only happening with icons that came from this location. The one seen in this picture is apart of icon pack 20. I wonder if I should speak to Soulfincher about this. More than likely though, I've probably messed up something here.
2. How to add bases in game that function like teammates?
I should probably know this already. On the test map, I would like to be able to do some game testing with other bases marked as on the same team, but not owned by me. I need to learn how to do this so I can test the win condition without having to upload and find people to test it with each time I want to test it. On the test map I want there to be maybe another ai on the same team as mine that starts the game like a player.
/Textures/assets is where it was sent alone with other similar icons. Many similar icons though are working. I've just tried 1. Reloading all the icons. 1. Creating a new button. Problem is still persisting. Do you have an ideas why it might be happening besides that?
2. Going to be trying this today as well as some other tests.
As you can see in this picture, the help panel is kind of messy. I want know how to change the details in, controls, gameplay and the race related sections as well as create new race tabs so that people can go here to check in case they are confused about how to play. Another questions is that in some mods I've seen, they will at the start of the game have a notification that directs the player to the help panel from the side of the screen. How does one make something like this? If this is a bit to generic, I can add specifics.
2. How to exclude certain types of units from this cleardefaultmeleeunits trigger in a similar way to a validator?
I use this trigger to remove default melee units so that new ones can be selected as well as disable the win conditions. It gets the job done a little too well. Its removing all critters, map hazards and also infested colonist compounds needed for zombie mods. What I wanted to know is if there was a validator like way of preventing it from removing certain units. Or what might be the best way of going about doing this if that way might not be as good?
3. A UI Message that stats the player's name?
What I would like in game, is to have a UI message saying"Such and such player picked a factions". So its known who has and has not picked a faction yet. The part I am confused about is what sort of UI message to indicate the player's name.
1. Under the UI category are several actions for the creation and destruction of help list items. You can also modify the layout of the HelpPanel in the UI editor. You probably will want to destroy all default help tips and then create your modified ones. The thing at the side of the screen is the result of the Create Tip trigger action.
2. I would throw in an Or condition with Unit Type Of Unit (Triggering Unit) = (Nexus, Probe, Command Center, SCV, Drone, Hatchery)
3. Use a Text Message action using a Combine String (Multiple) function. There is a Name Of Player function, your middle would be "has picked" and the third part would be some conversion function to change how you are doing the faction picking (probably a variable) to a string.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
1. I am just now starting to get a bit of a grasp of how to do things in the UI editor. Now I understand the help list item creation and the create tip trigger action. I am going to keep note of this. Once I resolve the majority of trigger related issues that don't involve the ui editor and xml, I am going to try to understand that part.
2. Very very helpful! Worked perfectly and learning this allows me to apply it to other situations. I didn't realize this is how the or comparison worked.
3. Very helpful also. I also noticed a number of other useful options while checking the combine string multiple function. No doubt this will be extremely useful in the future.
_____________________________________
I have another question that I forgot to ask before. This question is similar to number 2 in some ways as it involves some complications with cleardefaultmeleeunits.
4. How to specify "All players" under player melee options.
Currently the enable melee unit options say "Melee - enable melee option for player (Triggering player)". I want to have the melee option enabled for "All players" when the timer hits zero. It simply is not working for triggering player because no one player is triggering it. I don't see an all players function for this. What I wanted to know is how one could specify this action to fire for all players when the timer hits zero?
I am very lost, but I made an attempt at this none the less. Notice the part that says player group. The viable I used was a local variable called player_var set to integer>array>number of players constant type. When I tried this, absolutely nothing happened. I wondered what I might be doing wrong here?
Another thing I meant to ask about is the error with the icons.
The highlighted image is one of the icons that is experiencing problems, but I is clearly located under assets/textures that you'll notice. I wondered what else might be causing this problem. It should be noted that this problem started happening after I began clearing out a number of files to reduce storage space.
Okay. I it is finally working after lots and lots of trial and error. Thank God. So happy that issue is resolved now. There is so old issues that I would like to try and revisit now.
1. Bugs when setting custom races
There are 12 races in this mod and I have an actual new race created under the races section.
However when I for example try to set the player race via triggers to a race like Purifier Protoss, it shows up with Terran race ui and is not displaying supply count although the supply is working. I am absolutely certain that I copied purifier Protoss from the basic Protoss race. What I would like to know is how I can get the race Ui working for these custom races.
2. How do I know what layouts to use?
For one of my races, I want it to look like the warcraft undead ui, but I don't know where to find this ui nor am I sure entirely how to replace this with all the default race ui. In that data megathread, you gave me a link to a thread about this, but when I had a look, the person who posted did not explain exactly how to do it. She had links and an example map there. Sadly neither were working. I was hoping since you said that you know more about triggers now that you might be able to help me understand this better at this time.
3. What am I doing wrong here?
This is an attempt to create a co-op like command panel for primal. I feel like this should be working, but it isn't. The dialog shows up, but nothing on the command panel. I doubled checked to make absolutely sure that the unit is indeed getting created and does have the abilities listed under it. Despite this, the buttons are not being created.
I created this based on this advice I read on this forum:
1. The console panel models are decided by affixes in the file path for the model. This means for your protoss factions you must set the player race to protoss and then spawn units based on the faction race. If there is no racial file path it defaults to the bnet terran. The racial resource icons are set using a similar approach but can be set manually using triggers if you hook up the Image frames from the UI layout for the resourcepanel.
2. The WC3 Undead UI models are in the WC3 art mod. Under the Attribute Id field of the Races data type is the 4 letter string used to automatically identify art assets for the race to be used for the console panel models and resource icons from the file paths. In short it all is down to the import path used. To mess with the resource panel icons you hookup existing dialog item resource panel made from a template (Hookup Standard Dialog Item) in the GameUI layout. So You hookup GameUI/UIContainer/FullscreenUpperContainer/ResourcePanel/ResourceFrame/SupplyIcon (or ResourceIcon0-3) and then use the Set Dialog Item Image to change the stuff.
I thank you for that example in number 3. That example has been extremely helpful and was just wanted I needed to begin understanding UI frames properly as well as how this whole thing is set up. There is a whole bunch of questions I have pertaining to this and other things. It is as follows:
1 and 2. How to search and find for a desired UI frame?
I know about how to enter the UI editor, but what I am not sure about is how to find a specific UI frame that I have seen in game. How would I know how to identify this? When I check the UI editor, I am seeing XML code despite not being in XML mode so I am unsure how to know if what I am looking at is the desired UI frame.
3. Understanding what is a model and is not
I've seen console models under the models tab that clearly serve to be apart of the UI. What I wanted to know was if that overhanging panel in the demo map you gave me is a model or an image. Of course if its a model, it would include images, but I am not sure exactly what.
4. Where can I find the models and/or images for the overhanging co-op panels.
I have been looking for these using multiple search entries, but have yet to find them.
5. How does one find the string for this highlighted action?
Its in XML clearly. I am very new to this XML of course, but trying to learn. I want to see if I can understand how these strings are created.
6. What does this do?
Specifically the part that says::global.1testname::self. What is the purpose that this serves? I have not used such actions before so I am wondering. It does seem important though.
7. Talking Portraits(Lips)
So I've come a long way to understanding portraits since I last spoke to you about this. I am now able to create dialog item portraits with talking animations(almost). The problem I am facing is that using the "Talk animation" to be sent to the actor is not working. This is not working on portraits like nova, ray nor and stukov, but is working with zagara and alarak. I would like to know how to get a portrait like those to use talking animations. None of the portraits that involve lips moving are working by the talk animation.
Going to leave it at this for now, but I have many more questions to come about this.
Any file ending with .dds is a texture. Any file ending with .m3 is a model. I think models reference textures at a specific file path within the StarCraft II file system. The hard coded texture paths can be swapped out with an arbitrary texture to some extent.
5. How does one find the string for this highlighted action?
UI editor allows one to browse the XML of the UI elements. The string is created based on what various XML elements are named.
6. What does this do?
Sets a global reference named "1testname" to the actor which executes the message. Another message can use this global reference to interact with that actor from another actor. Since the reference is global only 1 actor can be assigned to it at a time, however this is still useful if one only needs a reference to the actor immediately, eg for accompanying actor to connect to it. I think various targeting UI from WoL such as Raynor's Penetrating Rounds used global references. I also recall the heal beams from medic/medivac also using it.
7. Talking Portraits(Lips)
I think one needs to attach the appropriate lip sync file to the voice over that one orders the portrait to play. I am not familiar with how to load lip sync files to a portrait without a voice over, but possible they are animation extension files. Alarak and Zagara likely do not support lip sync (they have no human like mouth) so instead they use generic talking animations similar to how Warcraft III worked.
1/2. Go to the UI editor you will see a list of layouts to the left. Most are templates but the big one used for the game UI is called GameUI. You can only modify the UI using XML. Under GameUI is the UIContainer frame that has the ConsolePanel frame which is based off the template from the ConsolePanel layout. Frames that are not based off a template state their type followed by their name in the XML. As the Model type frames for the console panel are automatically set and resist all dialog item actions except hiding and scale when hooked up you need to adjust the file paths of the models used. Use CascView on the SC2 folder to be able to look at the file paths for the game assets.
Most frames have logical names and are split into the fullscreen upper and lower containers. Best way to confirm if you are looking at the right frame is to hook it up and use triggers to hide it. The path you need to enter to hookup the frame is in the order that the frames are nested in the UI editor representing which is a parent/child frame relative to each other. When you get to frames that are based on templates you then need to look at that template layout and use the nesting path to your desired frame excluding the top level (usually have the template affix).
3. Technically it is a Portrait type frame (like the dialog item) onto which I have hosted a Model type actor. Like all portraits the 3d is rendered as 2d. Most calldown panels made by blizzard use Cutscene frames that play a cutscene from the Cutscenes Editor as an overlay.
4. Most begin with the prefix UI_Screens_Mission_ but blizzard mostly uses the models to make cutscenes that are then used by the UI layout. The cutscenes are usually named UI_xxxCastingPanel.
5. You look at your UI layout and see the names of the Button type frames you are using and since they all are named to end in a number you can use a string made of the constant part which is shared between the names of all the frames and the variable number that can be replaced with an integer variable. It is just a way to automate button allocation instead of a long list of hookup actions going to the separate buttons.
6. With portraits you can send messages to the actor for the portrait but with actors hosted on that actor there is no way to reference the actor (unlike those hosted on actors for units) using triggers so on creation I set a global reference to the actor using actor events which can then be identified by triggers allowing me to store the actor as a variable for later modification. A global reference can be any string that begins with the ::global. prefix while the ::Self is the reference for the sending actor (as seen in the missile actors for tentacles). Like all global references it can be used by any other actor and triggers but only one can exist at a time. I use a similar trick here: https://www.sc2mapster.com/projects/the-assets-of-evil/files/2497484 .
7. No clue about that one.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Alright. Going to follow up with some questions about what has been posted:
1. Complications with Allied Commanders
So I've found those Layoutfiles that you are talking about in the Allied Commanders data file. However I face a major issue though. Downloading this mod is almost complete overwriting all of the work done on infested, swarm, Khala and Raynor's Raiders factions. This is why I have been reluctant to get that file downloaded for a while as there is so many changes and days of work put into each of those factions. Redoing all of the work that would be overwritten would take quite a long time. I was wondering if there was a way to curtail this or maybe only get certain parts of the allied commanders data? I noticed that the XML code of the layout files the Co-op ui can be copy and pasted, but I am just not sure if I will need something else to copy from the cutscene editor or any other important data. If I copy all that XML and create new layouts in the same order, would it be able to work? Although I am still debating whether I should just try to add allied commanders and redo all that work since more and more content is gonna be gradually added to that anyway and I am just packing on file space by copying it instead.
1.2-3. No way to preview a UI?
So I am aware that for imagines and models, you can click to preview that image of model to see what it looks like, but with UIs? Does one basically need to implement a working Layout see what it looks like? This is not exactly the most ideal of ways, but if its the only way I will try to learn how.
4. Race Consoles
Okay I understand this now and this made things a lot clearer. What would the place to look for the race consoles as well as those from the new warchest and co-op?
5. Experimenting Results
While I was experimenting with the demo you sent I noticed that the panel would simply stop working whenever I deleted:
1. Dialog -Create a Panel for dialog (Last created dialog) using the template 1test/Mainframe
2. Dialog -Hook up an existing Portrait called Portrait in dialog item Dialog Item 1
3. Anything having to do with the actor.
And the model dialog was a given. So fundamentally I am trying to learn to get this part to work first. Did you create all the XML code for that mainframe file yourself or did it come from another source?
6. Informative
I think I get this. I remember seeing the medic beam doing something like this, but had no idea why. This just takes a bit of time for me to grasp I think. Like many once confusing things in the editor, I'll probably come to understand this as I need to use it.
7. Might need something else
I know its possible, but I am not sure exactly how, but I've seen arcade games using dialog portraits with moving lips. I am going to a bit of experimentation first.
8. What about hero ui panels with boss bars?
I've wanted to have these added for a very long time, but I have not been sure how to do this. These I assume wouldn't have a command panel, but I am not sure if they would have a portrait either.
1. You can export and import cutscenes (file menu in the cutscenes editor). With the UI editor each layout is its own XML file so you just create a new one and then copy and paste the XML. In the end it depends how different you want your factions from the coop interpretations.
1.2 Due to how many crashes it caused that feature of the UI editor was removed with the last patch. There is an in game way of debugging the UI using CTL+ALT+F12. Otherwise you need to use triggers to set it up and fidget with it.
4. The Console Skins data type which feeds into the Commanders data type however the trigger action for setting the commander is blizzard only so you need to use the file path method of exporting them and then importing them under a specific file path. Hopefully in the future there will be a way for other map makers to use it.
5.1. Well it is sort of expected to not work if you delete the action the creates that dialog item using the UI layout.
5.2. Well the model behind the buttons is hosted on the actor for the portrait so it needs to be hooked up to get the actor messages to create the Model type actor for the visuals.
5.3. Due to the poor camera placement for portraits I use a Model type actor for my visual. It is created as an attachment on the origin point of the portrait actor and rotated to face at the camera. Just host any other visuals on that actor.
5.4. I took inspiration from other layouts under Coop_GlobalCastingTemplates especially DehakaGlobalCommandPanelTemplate and just learning what the other UI layout files did. The anchor animation was a great find. As I have no skills with the cutscenes editor I decided to use a Portrait frame for the visuals. Finally I removed any frames that were not needed.
6. Most aliases and references only affect the actors stemming from a common parent so you cannot get actors getting supporters from another unit unless an effect is involved or a query response is used. Global references always exist and for only one actor so are good for map wide and transient stuff but are bad for multicasting (as the raynor snipe beam was infamous for).
8. Under the UI category or triggers in the Boss Bar folder. The Display Boss Bar action definitions allow you to specify a portrait and title. You can make custom ones using UI if you want. Custom UI layouts can be used but how to make them is not something I know off the top of my head.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Okay. That is a relief. My plan was to have them very similar the ones in co-op however it occurred to that there could be many other available panels I don't know about like that Protoss looking one you have in the demo. My next question would be, where might be a good place to check for more similar types of frames like that one which aren't in co-op. I might find there are some I like better. Also, if you don't mind my asking, what sort of data in the cutscene editor would I need to copy? Or would just copying the xml suffice?
1.2 Ha. I am not surprised.
Well, if it was causing problems like that, it was probably for the better. It would nice to have a worker ui previewer. At any rate, if it was too easy to get build UI frames in SC2, then it wouldn't be as impressive.
4. More information
Would you mind going into detail about this method? I would absolutely love to get these new console skins working properly on certain factions as well as certain Warcraft ones. That would really help out with providing distinction between the factions.
5.1. Simply testing is all.
I was deleting stuff to see what happens if stuff and such part is deleted to learn the demo.
5.2-5.3 Okay. I am going to study these more.
5.4 Brilliant
It is a really satisfying feeling to learn something you've been walking to learn for a while and effectively apply it in a way that helps you. This is exactly how I felt when I finally got the faction screen working and learned how to effectively make all kinds of missile weapons with varied effects. Hopefully, I'll be able to understand UI frames and apply this stuff to something that works well.
6. Noted
8. Very helpful.
Its still gonna be kinda difficult, but hopefully once I very clearly understand how to apply and adapt that demo you showed me, I can do this.
________________________
I do have just one more question for now. This question is one I asked a while ago, but this time I think I have sufficient knowledge to step further into it.
9. Understanding how to set displayable models within dialogs.
A while ago I asked you about how I could set up displayable models like this. You sent me a demo map and told me that I needed a dialog item portrait. I was having some complications with dialog item portraits and ultimately did not figure it out, but now I know how this is done. This time I won't give up until I understand how it is done, but I cannot find the original thread we discussed this on and the demo map you sent me. Lets keep it simple at first though before getting into multi threading to reduce render time. Fundamentally what would I need to do to have a model displayed that is not a standard portrait model, but maybe something like a marine or zergling for starters. Here is a picture of my current dialog item portrait setup for Fenix.
So far this seems to work nicely and is getting a model to be displayed for Fenix as should be although I wonder if the repeating to keep it existing is really the best way to keep it up.
1. It is actually a model for a bridge that units are able to walk over. I just thought it would make a nice simple calldown visual. My advice is go to the Models data type and click browse and then let your imagination run wild. Remember since in my demo map I use a portrait with an attachment you could attach any number of models to make a good calldown panel. Frame type wise you are pretty much limited to Portrait, Cutscene, Image and Unit Model type frames. The data in the UI editor is all XML. The stuff I use I'm my demo map is pretty much the minimal you need except for the Portrait frame used for the visual.
4. I am the wrong person to ask but it has something to do with the @ and @@ functionality of the game engine when using file paths. With one of those two when the engine encounters a suffix in the file that matches the Attribute Id of the race from the Races data type it will automatically use it when that race is used. Same works for cursors.
8. If you are confident at working with model attachment for actors it should be straight forward.
9. You mean the demo map I linked to in post #15 again? Firstly you need to use Set Dialog Item Model to specify a model. Maybe using a different actor might solve camera issues. Use a Wait For Portrait To Load action followed by a Send Actor Message action telling it to use an Animation Play actor event action.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
In regards to 1, that was really smart thinking. I didn't even realize it was a bridge model when looking at it for the first time. Very good choice of model. Here are the new questions I have.
1 and 9. What exactly needed to be changed in the XML code, to change the model?
I was actually talking about an earlier thread that I asked about how to make dialog portraits. I realized something now though that wasn't clear immediately. The ui layout that you specified is basically a portrait with a model animation that is playing not counting the buttons. So its no wonder. That demo map basically explains how do what I asked you about, but except with ui layouts. The question I have though. What exactly needs to be done in XML code to change the model? I am new to the XML code so lots of this is hard to understand, but I am trying to make sense of it.
4. Any references?
Do you know someone that you could refer me to who might know how this is done. Even though it is quite complicated(mainly since I don't know how its done) I would really like to figure this out if possible, since it would really add to the experience. One thing I was noticing that might make things extra complicated is the races. If doing something like this requires getting custom races to work at a fully functional level, that will make things much harder since I will also have to fix the voices and resource icon along with the console.
5. Portait Complications
So I am basically trying to make a model of Sylvanas Windrunner appear as a button. When I had set up the portrait, only her feet can be seen in the picture and I wondered what would be the right way to set it up so her full model could be seen.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
There is a number of issues that I've been trying to get resolved that are trigger related and I hoping to gain an understanding of how to do these things properly. I am mostly familiar with creating dialogs and many basic functions of triggers. There is a number of questions to ask, but I am going to start with some of the most important ones.
*Most Important*
1. Faction Randomization
I am making a mod with multiple factions, but what I would like is to understand how to setup randomization between factions should someone forget to pick a faction and possibly eventually allow players to pick a random one. For now though, my main concern is making sure that every active player gets a base should they forget to pick a faction.
2. Setting up the win conditions properly.
Currently the win conditions are broken in the mod I am making. Nobody can win, but the game ultimately results in a tie. I wanted to get to the bottom of this. Here is how I have it set up currently:
1. I have a trigger called cleardefaultmelee units.
This trigger runs at the start of the game and disables the melee options as seen in the picture.
2. I have a timer that adds enables the melee options when it reaches 0
The game also starts when the timer reaches zero. The faction structures are created prior to the timer finishing.
For some reason, this setup is not working. This is being done on a mod and not a map for the record.
3. Fixing Bug: Extra bases and starting workers sometimes spawning
The way I have my factions selected is that a player clicks on a dialog and then the starting units have a custom race are created as seen in the picture. I have made absolutely sure that each race is only set to spawn one base and a certain amount of working, but very occasionally players will sometimes start with an extra base and starting workers. For obviously reasons, this can present a lot of problems so it needs to be resolved.
4. How to properly set the music up. Unexpected bug.
The way I have the music for each faction set up is that music will is set to start for the player picking the faction, but immediately paused if the timer has not hit 0. It is supposed to unpaused once the timer hits zero, but for some reason this doesn't always happen. Some games the music won't play at all, some games the music takes up 2 minutes to start playing and some it starts immediately. I want to know what would be the proper way to get it working. The picture of the music setup is in 3. Here is a picture of when it is unpaused.
This is done soon as the timer hits zero for all players.
5. How to set a trigger to be off by default till activated?
I felt this might be very important to know. Certain triggers may need to be off by default till ready to be activated. I wanted to know how to do this.
1. I assume you are using player attributes to pick factions or are you using dialogs? Either way you will have some sort of variable set to determine what factions a player has or has not chosen. Just before the start you have an If Then Else switch below the For Each Player In Player Group action used to create your starting units that switches based on if the faction variable for the player has no value assigned in which case it then sets a value (default or random) and then runs the rest of your faction setup actions. For the random you use a Random Integer function in a Switch action and based on the integer outcome you pick a faction (unless your factions are already stored based on an integer).
2.1. Melee victory only applies if you have some trigger using the Set Default Melee Options For All Players action somewhere. You confirmed this trigger is running correctly? You tried using a Turn Trigger On/Off action to disable the Melee Initialization trigger?
2.2. going to need more details as to how it is not working. Your Timer trigger has no events so will not run. Use a Timer Expired event for a timer set up by a Start Timer action.
3. Are you sure this is not a side effect of the trigger shown in 2.1. not clearing everything since it is not set to clear stuff in the area around the starting location (like workers)? Why you using a separate dialog for each faction and not just different dialog items that can be hidden by hiding a single dialog. Else make an Action Definitions for hide all and have all your dialogs in that list to save you repeating it every time.
You using a different race for each faction? Debugging wise I would suggest adding a Text Message action that states just the player number integer to see if the action is being fired twice.
4. Try forcing it to play a new track after unpausing?
5. In the left window panels right click it and set the Enabled flag to off. You then use a Turn Trigger On/Off action to switch it back on. If you want it turned off mid game then use the trigger action to turn it off.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
Okay. After hours of experimenting, trial and error and careful thinking, I've managed to solve 3, 2, 2.2 and 4. 4 and 3 are infact side effects of the win condition not working right. It also turns out veterancy was not working for that same reason. I thank you for the advice on 5. As for 3. The reason I for that is because when I started this, I did not know the trigger editor as well and I was trying what I knew worked. If I was to redo it now, it would be different. That is almost certainly going to prove useful in the future. 1. Right now I am still working on. SC2brood2 sent me an example map so I am studying it and trying to see what I might be able to figure out. Before I ask further about this one. I want to study things more first so I can bridge the gap between what I understand and don't understand a bit more. I do have another question for now.
1. This question is about some sort of error with icons that started happening recently. For some reason icons started appearing like this in game, but only for the published version. This doesn't happen on the test map for whatever reason and this wasn't always happening. The icons were working fine in the past. I've double checked to make absolutely sure that the icons are infact correctly input into the buttons. Unfortunately, its still not working.
https://www.sc2mapster.com/projects/abilities-and-upgrades-icon-pack/images
This is only happening with icons that came from this location. The one seen in this picture is apart of icon pack 20. I wonder if I should speak to Soulfincher about this. More than likely though, I've probably messed up something here.
2. How to add bases in game that function like teammates?
I should probably know this already. On the test map, I would like to be able to do some game testing with other bases marked as on the same team, but not owned by me. I need to learn how to do this so I can test the win condition without having to upload and find people to test it with each time I want to test it. On the test map I want there to be maybe another ai on the same team as mine that starts the game like a player.
1. Sure you imported then along the correct file path?
2.Tried setting the player to computer under the map options?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
1. Under the UI category are several actions for the creation and destruction of help list items. You can also modify the layout of the HelpPanel in the UI editor. You probably will want to destroy all default help tips and then create your modified ones. The thing at the side of the screen is the result of the Create Tip trigger action.
2. I would throw in an Or condition with Unit Type Of Unit (Triggering Unit) = (Nexus, Probe, Command Center, SCV, Drone, Hatchery)
3. Use a Text Message action using a Combine String (Multiple) function. There is a Name Of Player function, your middle would be "has picked" and the third part would be some conversion function to change how you are doing the faction picking (probably a variable) to a string.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
1. I am just now starting to get a bit of a grasp of how to do things in the UI editor. Now I understand the help list item creation and the create tip trigger action. I am going to keep note of this. Once I resolve the majority of trigger related issues that don't involve the ui editor and xml, I am going to try to understand that part.
2. It is just like the Combine validator set to Or.
3. It is surprisingly useful for debugging by printing out a message so you know how many times your trigger/action is firing and with what values.
4. Use a For Each Player loop. This requires a local variable or the integer type.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
About 4. Here is my attempt.
I am very lost, but I made an attempt at this none the less. Notice the part that says player group. The viable I used was a local variable called player_var set to integer>array>number of players constant type. When I tried this, absolutely nothing happened. I wondered what I might be doing wrong here?
Another thing I meant to ask about is the error with the icons.
The highlighted image is one of the icons that is experiencing problems, but I is clearly located under assets/textures that you'll notice. I wondered what else might be causing this problem. It should be noted that this problem started happening after I began clearing out a number of files to reduce storage space.
Instead of picked player just use your variable. Also you do not need to use an array since it is the integer of the player number to cycle through.
Try asking about the texture in the artist tavern forum.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
Okay. I it is finally working after lots and lots of trial and error. Thank God. So happy that issue is resolved now. There is so old issues that I would like to try and revisit now.
1. Bugs when setting custom races
There are 12 races in this mod and I have an actual new race created under the races section.
However when I for example try to set the player race via triggers to a race like Purifier Protoss, it shows up with Terran race ui and is not displaying supply count although the supply is working. I am absolutely certain that I copied purifier Protoss from the basic Protoss race. What I would like to know is how I can get the race Ui working for these custom races.
2. How do I know what layouts to use?
For one of my races, I want it to look like the warcraft undead ui, but I don't know where to find this ui nor am I sure entirely how to replace this with all the default race ui. In that data megathread, you gave me a link to a thread about this, but when I had a look, the person who posted did not explain exactly how to do it. She had links and an example map there. Sadly neither were working. I was hoping since you said that you know more about triggers now that you might be able to help me understand this better at this time.
3. What am I doing wrong here?
This is an attempt to create a co-op like command panel for primal. I feel like this should be working, but it isn't. The dialog shows up, but nothing on the command panel. I doubled checked to make absolutely sure that the unit is indeed getting created and does have the abilities listed under it. Despite this, the buttons are not being created.
I created this based on this advice I read on this forum:
https://us.battle.net/forums/en/sc2/topic/20752465731
1. The console panel models are decided by affixes in the file path for the model. This means for your protoss factions you must set the player race to protoss and then spawn units based on the faction race. If there is no racial file path it defaults to the bnet terran. The racial resource icons are set using a similar approach but can be set manually using triggers if you hook up the Image frames from the UI layout for the resourcepanel.
2. The WC3 Undead UI models are in the WC3 art mod. Under the Attribute Id field of the Races data type is the 4 letter string used to automatically identify art assets for the race to be used for the console panel models and resource icons from the file paths. In short it all is down to the import path used. To mess with the resource panel icons you hookup existing dialog item resource panel made from a template (Hookup Standard Dialog Item) in the GameUI layout. So You hookup GameUI/UIContainer/FullscreenUpperContainer/ResourcePanel/ResourceFrame/SupplyIcon (or ResourceIcon0-3) and then use the Set Dialog Item Image to change the stuff.
3. I prefer to use UI layouts for my calldown panels. I believe with the triggers made command panels you then need to specify the individual buttons within the command panel. Here is how I made one: https://www.sc2mapster.com/projects/the-assets-of-evil/files/2497486
Here is an alternative demo map doing it the way you are wanting to: https://www.sc2mapster.com/forums/development/triggers/151379-how-to-use-the-spear-of-adun-in-multiplayer-maps?page=3
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
Any file ending with .dds is a texture. Any file ending with .m3 is a model. I think models reference textures at a specific file path within the StarCraft II file system. The hard coded texture paths can be swapped out with an arbitrary texture to some extent.
UI editor allows one to browse the XML of the UI elements. The string is created based on what various XML elements are named.
Sets a global reference named "1testname" to the actor which executes the message. Another message can use this global reference to interact with that actor from another actor. Since the reference is global only 1 actor can be assigned to it at a time, however this is still useful if one only needs a reference to the actor immediately, eg for accompanying actor to connect to it. I think various targeting UI from WoL such as Raynor's Penetrating Rounds used global references. I also recall the heal beams from medic/medivac also using it.
I think one needs to attach the appropriate lip sync file to the voice over that one orders the portrait to play. I am not familiar with how to load lip sync files to a portrait without a voice over, but possible they are animation extension files. Alarak and Zagara likely do not support lip sync (they have no human like mouth) so instead they use generic talking animations similar to how Warcraft III worked.
1/2. Go to the UI editor you will see a list of layouts to the left. Most are templates but the big one used for the game UI is called GameUI. You can only modify the UI using XML. Under GameUI is the UIContainer frame that has the ConsolePanel frame which is based off the template from the ConsolePanel layout. Frames that are not based off a template state their type followed by their name in the XML. As the Model type frames for the console panel are automatically set and resist all dialog item actions except hiding and scale when hooked up you need to adjust the file paths of the models used. Use CascView on the SC2 folder to be able to look at the file paths for the game assets.
Most frames have logical names and are split into the fullscreen upper and lower containers. Best way to confirm if you are looking at the right frame is to hook it up and use triggers to hide it. The path you need to enter to hookup the frame is in the order that the frames are nested in the UI editor representing which is a parent/child frame relative to each other. When you get to frames that are based on templates you then need to look at that template layout and use the nesting path to your desired frame excluding the top level (usually have the template affix).
3. Technically it is a Portrait type frame (like the dialog item) onto which I have hosted a Model type actor. Like all portraits the 3d is rendered as 2d. Most calldown panels made by blizzard use Cutscene frames that play a cutscene from the Cutscenes Editor as an overlay.
4. Most begin with the prefix UI_Screens_Mission_ but blizzard mostly uses the models to make cutscenes that are then used by the UI layout. The cutscenes are usually named UI_xxxCastingPanel.
5. You look at your UI layout and see the names of the Button type frames you are using and since they all are named to end in a number you can use a string made of the constant part which is shared between the names of all the frames and the variable number that can be replaced with an integer variable. It is just a way to automate button allocation instead of a long list of hookup actions going to the separate buttons.
6. With portraits you can send messages to the actor for the portrait but with actors hosted on that actor there is no way to reference the actor (unlike those hosted on actors for units) using triggers so on creation I set a global reference to the actor using actor events which can then be identified by triggers allowing me to store the actor as a variable for later modification. A global reference can be any string that begins with the ::global. prefix while the ::Self is the reference for the sending actor (as seen in the missile actors for tentacles). Like all global references it can be used by any other actor and triggers but only one can exist at a time. I use a similar trick here: https://www.sc2mapster.com/projects/the-assets-of-evil/files/2497484 .
7. No clue about that one.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Alright. Going to follow up with some questions about what has been posted:
1. Complications with Allied Commanders
So I've found those Layoutfiles that you are talking about in the Allied Commanders data file. However I face a major issue though. Downloading this mod is almost complete overwriting all of the work done on infested, swarm, Khala and Raynor's Raiders factions. This is why I have been reluctant to get that file downloaded for a while as there is so many changes and days of work put into each of those factions. Redoing all of the work that would be overwritten would take quite a long time. I was wondering if there was a way to curtail this or maybe only get certain parts of the allied commanders data? I noticed that the XML code of the layout files the Co-op ui can be copy and pasted, but I am just not sure if I will need something else to copy from the cutscene editor or any other important data. If I copy all that XML and create new layouts in the same order, would it be able to work? Although I am still debating whether I should just try to add allied commanders and redo all that work since more and more content is gonna be gradually added to that anyway and I am just packing on file space by copying it instead.
1.2-3. No way to preview a UI?
So I am aware that for imagines and models, you can click to preview that image of model to see what it looks like, but with UIs? Does one basically need to implement a working Layout see what it looks like? This is not exactly the most ideal of ways, but if its the only way I will try to learn how.
4. Race Consoles
Okay I understand this now and this made things a lot clearer. What would the place to look for the race consoles as well as those from the new warchest and co-op?
5. Experimenting Results
While I was experimenting with the demo you sent I noticed that the panel would simply stop working whenever I deleted:
1. Dialog -Create a Panel for dialog (Last created dialog) using the template 1test/Mainframe
2. Dialog -Hook up an existing Portrait called Portrait in dialog item Dialog Item 1
3. Anything having to do with the actor.
And the model dialog was a given. So fundamentally I am trying to learn to get this part to work first. Did you create all the XML code for that mainframe file yourself or did it come from another source?
6. Informative
I think I get this. I remember seeing the medic beam doing something like this, but had no idea why. This just takes a bit of time for me to grasp I think. Like many once confusing things in the editor, I'll probably come to understand this as I need to use it.
7. Might need something else
I know its possible, but I am not sure exactly how, but I've seen arcade games using dialog portraits with moving lips. I am going to a bit of experimentation first.
8. What about hero ui panels with boss bars?
I've wanted to have these added for a very long time, but I have not been sure how to do this. These I assume wouldn't have a command panel, but I am not sure if they would have a portrait either.
1. You can export and import cutscenes (file menu in the cutscenes editor). With the UI editor each layout is its own XML file so you just create a new one and then copy and paste the XML. In the end it depends how different you want your factions from the coop interpretations.
1.2 Due to how many crashes it caused that feature of the UI editor was removed with the last patch. There is an in game way of debugging the UI using CTL+ALT+F12. Otherwise you need to use triggers to set it up and fidget with it.
4. The Console Skins data type which feeds into the Commanders data type however the trigger action for setting the commander is blizzard only so you need to use the file path method of exporting them and then importing them under a specific file path. Hopefully in the future there will be a way for other map makers to use it.
5.1. Well it is sort of expected to not work if you delete the action the creates that dialog item using the UI layout.
5.2. Well the model behind the buttons is hosted on the actor for the portrait so it needs to be hooked up to get the actor messages to create the Model type actor for the visuals.
5.3. Due to the poor camera placement for portraits I use a Model type actor for my visual. It is created as an attachment on the origin point of the portrait actor and rotated to face at the camera. Just host any other visuals on that actor.
5.4. I took inspiration from other layouts under Coop_GlobalCastingTemplates especially DehakaGlobalCommandPanelTemplate and just learning what the other UI layout files did. The anchor animation was a great find. As I have no skills with the cutscenes editor I decided to use a Portrait frame for the visuals. Finally I removed any frames that were not needed.
6. Most aliases and references only affect the actors stemming from a common parent so you cannot get actors getting supporters from another unit unless an effect is involved or a query response is used. Global references always exist and for only one actor so are good for map wide and transient stuff but are bad for multicasting (as the raynor snipe beam was infamous for).
8. Under the UI category or triggers in the Boss Bar folder. The Display Boss Bar action definitions allow you to specify a portrait and title. You can make custom ones using UI if you want. Custom UI layouts can be used but how to make them is not something I know off the top of my head.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
1. It is actually a model for a bridge that units are able to walk over. I just thought it would make a nice simple calldown visual. My advice is go to the Models data type and click browse and then let your imagination run wild. Remember since in my demo map I use a portrait with an attachment you could attach any number of models to make a good calldown panel. Frame type wise you are pretty much limited to Portrait, Cutscene, Image and Unit Model type frames. The data in the UI editor is all XML. The stuff I use I'm my demo map is pretty much the minimal you need except for the Portrait frame used for the visual.
4. I am the wrong person to ask but it has something to do with the @ and @@ functionality of the game engine when using file paths. With one of those two when the engine encounters a suffix in the file that matches the Attribute Id of the race from the Races data type it will automatically use it when that race is used. Same works for cursors.
8. If you are confident at working with model attachment for actors it should be straight forward.
9. You mean the demo map I linked to in post #15 again? Firstly you need to use Set Dialog Item Model to specify a model. Maybe using a different actor might solve camera issues. Use a Wait For Portrait To Load action followed by a Send Actor Message action telling it to use an Animation Play actor event action.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DrSuperEvil:
In regards to 1, that was really smart thinking. I didn't even realize it was a bridge model when looking at it for the first time. Very good choice of model. Here are the new questions I have.
1 and 9. What exactly needed to be changed in the XML code, to change the model?
I was actually talking about an earlier thread that I asked about how to make dialog portraits. I realized something now though that wasn't clear immediately. The ui layout that you specified is basically a portrait with a model animation that is playing not counting the buttons. So its no wonder. That demo map basically explains how do what I asked you about, but except with ui layouts. The question I have though. What exactly needs to be done in XML code to change the model? I am new to the XML code so lots of this is hard to understand, but I am trying to make sense of it.
4. Any references?
Do you know someone that you could refer me to who might know how this is done. Even though it is quite complicated(mainly since I don't know how its done) I would really like to figure this out if possible, since it would really add to the experience. One thing I was noticing that might make things extra complicated is the races. If doing something like this requires getting custom races to work at a fully functional level, that will make things much harder since I will also have to fix the voices and resource icon along with the console.
5. Portait Complications
So I am basically trying to make a model of Sylvanas Windrunner appear as a button. When I had set up the portrait, only her feet can be seen in the picture and I wondered what would be the right way to set it up so her full model could be seen.