Alright. The time has come to start addressing some trigger related issues again. I'll be coming back to the previous UI issues in the future. Not given up, but there is some more important issues at hand. Todays issue is one with a critical problem. First I need to explain something. In the mod I am making there is multiple factions. I use a faction select screen with a timer integer that is automatically reduced by using a repeat wait 1 second action. You can see it here:
Keep note of Timer =10 and player_int.
So its not a standard built in timer per say. You can see how I have time reduced here. This timer is also displayed as text in the faction screen and once the timer hits zero, melee conditions are enabled, sounds for each faction start and all of the important stuff is done. Now I am facing two core problems here as follows:
Problem 1: When at least 3 people at playing the game, the wrong music shows up for some players. Everyone is getting the proper bases, but not music. However when 1 or 2 people play the game the music always seems to work fine, but I will admit that more testing is needed to be certain.
Problem 2: When someone picks a race, all the buttons race selection buttons disabled for that player. Sometimes though the buttons seem to be getting disabled for different players. This almost always happens to the last person who tries to pick a race.
*It should be noted though that I am not certain yet if these glitches were caused by the map we were playing on and the main file I was using had ZombieFest(mod compatible) attached. Of course this could have lead to the problem, but I am still not sure yet. What I would like to know is if anyone may have an idea what could be causing the problem here based on these screenshots or if it should be working properly for all purposes.
This is the start of the action chain. You'll notice its a repeat action.
The part where the music is created. Covert ops, raiders etc are presets. Obviously this stuff can be hard to tell from an outsider perspective, but I am just hoping there is maybe something I can figure out here.
Ah yes. That was a mistake I discovered earlier and fixed. Its now disabled, but the music is still often playing for the wrong player. The music needs to be playing for each player that picked a faction. The way I have music selected for a player is by having a local variable called player_int.
Now I think I have this set up in the wrong way somehow. I am not sure.
Also I have one more question for today if possible. This one is simple I think to someone who would know which is why I am asking now.
1. How to avoid deleting ai with my clear default triggers trigger.
This is what the cleardefaulttriggers setup looks like. When you taught me about using or conditions I excluded a lot of stuff. Now basically what I need to know, is about how I would exclude a computer owned structure from getting deleted? If I can do this, then basic ai should be finally functional.
The time comes very soon that I will be returning to resolve this previous UI issues we were discussing earlier. First I want to see if I can resolve an issue that has been bugging for a while. I do have a question though for now. My question is about the supply count ui and resource count ui.
1. How to move and change the image of these?
For each faction, I want there to be a different supply ui image. I also wanted to know how to change the location of these should I decide to put it elsewhere. This is mainly cause I was thinking of putting a toolbar at the top of the screen.
This helped me out a lot. I now understand where I need to be looking and have a basic understanding of how the ui is normally change. The problem is though that I don't want to change the UI for everyone in the game so overwriting it like that I think wouldn't be the right move. I want to change the UI based on the faction that a person has picked with different icons. Keeping this mind, here is todays questions. I have a bunch today.
Problem 1: Directly trying to change the XML code doesn't seem to be working.
I tried to change the XML code. When I tried to type, it just wouldn't let me change anything. I don't know of this is a Mac specific issue, but I feel more like its something I don't know how to do yet. I recall you said that XML now allegedly compiles correctly? Would I need to use something like notepad then import it to overwrite the data? Otherwise, how would I edit the XML?
Problem 2: Complications creating a new layout.
In that tutorial, one of the first things it tells you to do is create a new layout. I tried to create a new layout the copy and past the code in the first part to the layout. At first, the name of the layout did not show up at all. When I tried to save it, the editor just crashed. I've been doing this on an experimental file for now just to be safe. My question basically is, what is possibly preventing the new layout from being created and what is needed to make a new layout that won't cause the game to crash?
3. Understanding the important triggers and how ui is overwritten for a specific player:
What I was noticing is that the calls-down panels for the console ui would not work when I removed the create a panel and hook up and existing portrait part. I assume that I need to do something similar to this to overwrite the console ui and resource panel ui since that is basically what I want to do for each. What I gather is that in the new layout created that how it is overwritten. Would this be correct for each of them? Also, what specifically would be done for overwriting existing ui in the case of changing it only for specific players.
4. Fixing Issues with the buttons
Right now the images on buttons are showing up like this:
I have it set up like this:
and the caster unit I am using looks like this:
the caster unit doesn't have a specified object type and it a base unit. No actors. However the moment I changed the unit to Alexei Stukov, it started looking like this:
The things I'd like to know about this:
4.1 How do I get the buttons to show up properly?
4.2 How do I limit control the amount of buttons that are set up there.
4.3 How do I change the offset of some of these buttons?
4.4 What should be the reason that the buttons aren't showing up at all for the test caster, but rather stukov?
You hookup the UI then you can change the texture used for the Image UI element for specific players.
You should be able to edit the XML directly in the UI editor. Otherwise save the map as a SC2Component folder and use Notepad++ or something similar.
2. If you Right click the list of layouts you should just be able to select Add layout and name it. The rest can be done using Notepad++.
3. You can show/hide specific dialogs for specific players. The console UI will be tricky but with the resource panel you just hook it up and then you can use the Set Dialog Item Image trigger action for specific players. The console panel models are automatically set based on the import file path https://sc2mapster.gamepedia.com/UI/Referencing gives some clues as to how to do it. You can also create a .txt file called Assets under the GameData folder of a SC2Component folder and use that to reroute textures for different races (eg. UI/ConsoleModelCommandPanel_Terr=Assets\UI\Console\Terran\ConsoleTerran\ConsoleTerran_02.m3). You can then link specific UIs to dummy races and set them based on the selected faction. Whole screen cutscenes could also work.
4.1. seems the default image is not being removed which indicates the individual buttons are not being hooked up correctly.
4.2. The buttons shown in the command panel are set based on the command card of the caster unit added to the group. The number and positioning is determined by the UI layout.
4.3. Again set by the anchors of the UI layout.
4.4. They did show up as can be seen by the hotkey letters just the image is not being shown. Again this indicates the hide animation for the EmptyImages of the UI layout are not working correctly. The lower Stukov buttons are showing because they are using unmodified command panel buttons.
I am still studying this carefully as well as looking over tutorials. I hope to understand this eventually. In regards to 2. This is working now. Turns out I just didn't notice the layouts getting created. For the meantime I have a few other trigger related questions. I'll start with the one that has to do with the our previous discussion.
1. What is the purpose of the modified buttons and are those buttons moved in the same way as the modified buttons?
Since I am not that knowledgable about this part, I wondered what the purpose of adding modified ui buttons is or if these are definitely needed?
2. Allowing players to change hotkeys in change and save a hotkeyprofile.
I wanted to set things up so that players could set up their own hotkey profile and save it so that it could be used over multiple games. Now I am not sure if this is possible or not. Since you have more experience than I do I thought I'd ask you. I was noticing these trigger actions:
1. The modified buttons are for positioning the command panel buttons used for the unit group that is shown for the calldown. You will notice that they have different anchoring and offsets compared to the command panel used in the lower right of the screen.
2. I am the wrong person to ask about that but I know you can set the hotkey for dialog items to you could have an integer array for the buttons allowing the bank to save the hotkeys.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
1. Good to know. I will be taking another crack at this once I get another list of issues out of the way. One way or another, I want to understand how this is done and do it right.
2. How would I set the integers for buttons?
I know how to create variables and set them as well as the difference between local and global variables. What I do wonder though is how I would indicate each specific button to set the integer to. I am assuming that I would need to get this information in the UI editor? If this is the case, what might be the place to find the proper ids of the buttons?
3. How to change the names and actions of the buttons in the game menu?
There has been people who've made drastic UI and menu changes like these, but I am not necessarily looking to make things this drastically different. I mainly want to know how to change those menu buttons that say save game, load, quit game, options etc except for multiplayer. I am assuming that to add new ones I'd probably need to do things in the UI editor.
4. How to detect when a player says a phrase or single word then do an action?
I want to add certain types of menus and features that can be opened by typing words into the chat bar. I've seen some mods detect what people say then do certain actions based on it. Would you happen to know how this is done?
2. Use a For Each Integer action to go through each variable index so you cans set them. Under the UI layout you will see the buttons are manually named CommandButton00, CommandButton01 etc. under the name of the frame.
2 and 3 I may figure out as I learn UIs better. 4 is solved. My new questions for today. I done a lot of studying of this tutorial by skunk so this time you aren't talking to someone who has no clue about how UIs work. I understand lots of the terms better.
The possible cause of the broken buttons is that I did no link the new models. I am going to try this.
2. How to change the size and offset off UI portraits?
Just as an experiment I tried to move the displayed call down panel models to the bottom of the screen. When I did this, they disappeared. I assume that it is because they need to be within portraits to be seen. My guess so far would be: <Width val="---"/> and <Height val="---"/>, but maybe it might be something done via triggers in this instance.
3. What causes the call down panel to move down?
So far my guess is that it might be be some sort of move command in the ui setup. I am unsure which yet. I looked at the animation and concluded it could not be the animation of the model itself since the model doesn't seem to move during animation.
4. Are the modified command panel buttons created from casters or are those simply created in the UI?
A quick breakdown of what I think I've learned so far in terms of UI:
A. How to hookup UI and then perform actions
B. How to link a caster unit to display buttons
C. How to use UI to display an image, label and button on the screen, but I have not tried models yet from scratch.
D. A somewhat vague idea of how to alter different things when linking command buttons like avoiding showing the cancel buttons, whether it has hotkeys or not, but I still have a lot to learn.
E. How to overwrite certain types of existing UI. So far I managed to create a UI layout that changes the offset of the minimap. This is a good start, but I am still not clear on how to do it for console skins. Which speaking of...
5. Made an attempt at changing the console skins. Nothing happened. I am wondering what I may have done wrong.
In an attempt to change the console skins, I went to the consoleskinselectionframe and tried changing the following parts you see in bold. This is new exact copied layout of the original with all the changes in bold.
When I did this, absolutely nothing happened, however I have a feeling that I may be looking in the wrong place though. If this is the wrong place, what would be the place I need to look at to change the consoles?
6. Is it possible to load models a little at a time as the game progresses?
The mod I have made has a very large file size. The file size is around 650 mb right now. Usually it takes people a while to load before they can join which is difficult for getting lobbies filled. I wondered if it could be possible to spread the loading time out as the game progress, making certain models load only at certain times and not all at once.
I gotta ask you something: have you considered making separate thread for every seperate issue you're dealing with? Because you're mixing various topics, that are often hardly related within a single thread. By a result you're limiting yourself to help from people who are capable of keeping up with it - apparently only DSE.
Not to mention in future other people might encounter same problems. When they'll attempt at looking up some info about it, they'll either not find it, as posts are not indexed as good as threads - title is always most important keyword. Or they'll have to crawle through all the irrelevant stuff before getting to the actual answer.
Although if goal of this thread is some kind exclusive mentorship between you and DSE, then I guess that's okayish - assuming he's fine with doing so.
(Also these are not even triggers questions, but Layouts / UI.)
It might be also in the Wiki, bout couldn't find it - this was provided by @rtschutter IIRC.
I don't know if there's anything special about Portraits - if you've some issue regarding it, just post snippet of your code.
What is that even..? ConsoleSkinCacheFrame is different thing. It appears to be used as a preview frame within BattleUI (game menu) - Collections/Consoles. It has no influence on actual ConsolePanel present in game.
Since introduction of custom Console skins from Blizzard there was small overhaul in regards to how Console panels are applied, but you can still change the default model the same way as it was done in the past - by modifying model links within Assets.txt.
All you need to do is create custom Assets.txt that would override pathes above and place it in Base.SC2Data/GameData in your map.
Nope. Models can indeed be loaded at any stage within game, without preloading. But regardless to that they do need to be actually downloaded.
This is something Blizzard can do, thanks to CASC, but that tech is not accessible to modders/arcade games.
And frankly 650 MB is madness - I wasn't aware you could even upload map as huge as this... I don't know what you're developing but I cannot thing of anything that could justify the size. Keep in mind that not everyone lives in places where high speed connections are easily accessible. Take me as an example, currently I'm stuck with ~6Mbit DL. Which means I need like 15 minutes to download something as big as this. I'd consider 100MB to be a borderline. Once you hit that limit, you need to take a closer look at your assets and how can you reduce the final size of an map.
There are of course some big projects such as Dead Zone ( http://www.moddb.com/mods/dead-zone-hope-lost ) with high amount of custom high quality textures and other assets - where it is inevitable to end up with largely sized maps.
But if you're not developing something like in case above, it's mostly likely effect of bad optimizations on your end. Disabled MPQ compression? Oversized textures? Soundtracks with too high bitrate? etc.
1. That frame is unrelated to the buttons and only affects the background model for the command panel.
2. Adjust the anchors. In the current setup the portrait is anchored to all sides of the parent frame (which is anchored to the top of the screen) so takes the size of that minus any offsets. If you only anchor from two perpendicular sides you can set the size using the <Width val="0"/> and <Height val="0"/> properties. To move the actors inside the portrait you need to use the SOp (Local offset) site operation under the Actors data type.
3. It is an Anchor type animation called Move used by the UI Layout. When it gets the Move string signal from the Dialog Item Send Animation Event trigger action it uses the Anchor controller to move the parent frame (Mainframe). The time is at what point of the animation it does things and over what time period and the value is how far it is offset by.
4. The command panel at the top of the screen is just like the one in the lower right of the UI except some of the buttons have been moved and there are some animated image frames to act as filler if there is not an ability on the unit group linked to it by the triggers.
5. The console panels are actually models and resist chance. The answer Talv gave is the only current way to change the models since console skins require trigger actions that are blizzard only. This method will require you to change the race of the faction to change the cursor/console models. Also the UI Layout with the console panel models is the Console Panel layout.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I can do this, but the main reason I asked questions in groups like this is because I have a lot of them and I didn't want it to seem like I was flooding the site with threads. You do have a point about something though. I did ask a number of ui questions in the trigger section.
2. About this question.
I asked this because I wasn't sure if it differed in this situation in a certain way. The editor is quite complex and when I was learning data a lot to begin with I found a lot of things weren't always so straightforward. I simply asked this because I wanted more clarity and to be more certain.
5. Going to give this a try.
6. About the 650 MB
It is taking up 650 MB right now, but I have still not fully optimized it yet. I may be able to cut the MB down to around 350 MB or so without cutting out important content from the mod. The mod I am making is basically a Melee mod with multiple factions to choose from and multiple factions consistent of nothing, but custom models. Despite that fact that it takes so long to load for many people, I have managed to get some games going with it at this file size. However there is another thing I've meaning to address. I have not been using MPQ compression. By this I am assuming that build in file size reduction option that there is in the editor? Also, there are hundreds of icons I made for units in this mod since its begun. A while ago, I didn't resize images thinking it was uneeded till I noticed that some of these icons were taking up around 1 mb each. So resizing these images is on the to do list.
Alright. I have a number of more questions for today, but first things first. Talv has made a very good point. Most of the discussion here has been UI discussion. I decided to create another thread in the UI section and move all the UI discussion there. You can find my UI questions here:
What I am going to do is make a table of contents at the first part of this thread and the data thread so it can help other people find useful information. I do have some trigger related questions so I will ask those here.
1. Linking Boss bars to units in mods?
I want to set things up so that a boss bar appears when a hero is spawned. Now the issue I am running into is that when I try to use the event" Unit is Created", it only allows a player to specify a unit that is located on a map. I need some sort of way to indicate that I want a boss bar to a appear when such and such unit spawns that will work with mods.
2. Setting up icons next to player names chat?
Now there is already a few ways and ideas I have about how to do this that could work, but I wanted to check with you since you have more experience about what may possibly be the most ideal way to go about it. There is a ranked mode in my mode. I wanted to display a small icon next players when they speak in chat showing their rank. I wondered what the most ideal way would be to setup an icon like this.
3. Using image numbers for my countdown timer?
For my countdown timer that starts the game, right now I am simply using an integer variable that repeatedly gets modified over time until it hits zero. I have action that sets it to display as text, but what method would I use if I want the integer to show actual image numbers as it counts down?
4. How to move a dialog to another location?
But not instantly. I want to know how to move a dialog to another location, preferably with adjustable acceleration. I tried using move dialog, but it moves the dialog to the target offset instantly and I would prefer it to be gradual.
1. You probably want to have a custom action definition for setting up the boss bar properly and use Catalog Field Value Get functions to get the info for your hero unit or use the Set Boss Bar Boss action. Have your trigger spawning the unit show the boss bar and then use the Last Created Unit function to link your unit to the boss bar and set it to a variable for later use. You can then have a unit dies event that uses the unit stored in the variable for a condition to hide the boss bar again.
2. Probably would involve modifying the Chat Panel UI Layout or something like that. Not sure on that one.
3. You are on the right track except you should look towards UI Layouts. I would advise looking at the CU_CustomMutatorStartGame trigger of the allied commanders mod and the associated CountdownContainer frame of the Coop_CustomMutatorSelection layout.
About 1. I forgot to mention before that the heroes are spawned entirely through data. Because of this, I need a condition that can specify a unit directly. Set Boss Bar, Last Created Unit, and Unit is Created will all ask for a unit that currently exists on the map.