Title ^, and i can't figure out why that is. I'm tired of making minor changes, publishing to SC2 and test in melee that none of the mineral fields are affected. I am able to select my mod when starting the game, and version number matches the published one. When i add the same library to some other custom made map, it works well. But that's obviously not a solution, i want it to work as mod in all maps, not just that 1.
I have other trigger library i want to add as well, not looking to change this from data behaviors or something.
And first thing i thought was that i'm comparing specifically "Mineral Field" object, when it's possible that map has them customized under other internal name. But that doesn't explain why my Zombie script didn't work either, when it doesn't rely on any specific value from map. Just revives units based on unit data it gets in the death event, which also works in custom map, not as mod.
Did you increase the maximum amount of resources a mineral patch can hold in the data editor? It's in a behavior I believe. Triggers can't go above the maximum that is stated there.
I didn't edit anything in data editor, they should be defaults. The 524287 was maximum that the trigger editor allowed me to type. I tested it in the custom map, using the test document from SC2 editor. Not sure if it's ingame feature now, but i wasn't able to see how much minerals was left in the field. I forfeit and watched replay and then i saw the modded value was applied right, also to vespene.
I can't find any data about mineral fields or vespene default or max values. They have max and starting life 10000 but i don't think that's the value we are looking for, and it's invulnerable anyway. Minerals generally start at around 1500 or so.
I hope that explains. Either that or you have hit a maximum as described by Imposter.
Also, did you enable triggers for your mod?
How do i enable triggers? They are only enabled as shown in the screenshot. In the Mod Properties window i have "Disable Trigger Preloading" not toggled. I don't have a clue what it means, but my mod has to load only after game is ready to be played, not pre-anything.
What I meant by preplaced units are the units that have already been placed in the Terrain Editor, such as, I'am assuming your mineral field and vespene geyser units. Mods generally do not keep track to changes in the map unless you are converting from a mod to a map. The purpose for a mod is so that it can be played in over numerous maps.
Let's also see the other corresponding triggers (assuming that you have) in case there is something amiss.
Also, try changing Any Player to Player 0 because map resources are owned by the neutral player, player 0.
"Disable Trigger Preloading" simply means disabling triggers. Do not check that one.
In case if it fails again, it means your trigger actions do not correspond to the trigger event. Hereby, -> Add Unit Group to Unit Group action. As I have suggested, you should have an event -> Unit Enters Entire Map upon Map Initialization. Then set the Unit Type Of (Triggering Unit) == Mineral Field/Vespene Geyser as the above.
I don't think my triggers are loading at all. I tried even the UI - Error Message, but nothing showed up, and i also did changes you suggested with Unit Enters event.
For zombies script i tried adding Game attributes, with idea being that i wanted to make sure there is a player 15. That turned out quite different, now in start loggy every player and AI had zombies attribute to them... That doesn't mean anything, other than that game does load "something" about my mod, or everything else but triggers.
I mean how about just something simple that shows a text on screen? I'm using wrong command for that too or it's disabled for mods... I don't get it, why would they go as far as disable mod features, when they allow drastic unit changes like making zerglings unkillable.
I think this has got to do with the condition of the units being resources instead of actual units, hence why Unit Enters Region and Unit Type Of Unit Condition does not work.
Try this code to see if it works:-
Event: Elapsed Time is 2.0 Game Time seconds,
Actions: Pick Each Unit In Unit Group (Units In Region Matching Condition)
-> Any Units in Entire Map owned by player Any Player matching Required: Resource (Harvestable) with at most Any Amount and do Actions
Set (Picked Unit) Resources to "Any Amount You Desire"
Pick Each Unit In Unit Group (Units In Region Matching Condition)
-> Any Units in Entire Map owned by player Any Player matching Required: Resource (Raw) with at most Any Amount and do Actions
Set (Picked Unit) Resources to "Any Amount You Desire"
Hope this works out. It has to do with the required condition not being set to resources in my opinion.
Feel free to test. This is super simple trigger, and it works in the map (not as mod). Also note that after 2 seconds the trigger will be destroyed by other trigger to not cause performance issues during game:
Resource_Enters
Events
Unit -Any Unit Enters (Entire map)
Local Variables
Conditions
Or
Conditions
(Unit type of (Triggering unit)) == Mineral Field
(Unit type of (Triggering unit)) == Mineral Field (900)
(Unit type of (Triggering unit)) == Rich Mineral Field
(Unit type of (Triggering unit)) == Rich Mineral Field (900)
(Unit type of (Triggering unit)) == Vespene Geyser
(Unit type of (Triggering unit)) == Rich Vespene Geyser
Actions
Unit -Set (Triggering unit) Resources to 10000.0
In data their max resources are on a behavior that's on the unit. Not on the unit itself.
I did suspect that but i still don't know how to dig up the behavior details. I tried it too earlier.
And it doesn't answer the other question on why triggers of any sort aren't working with mods. Or if you know of a single one that works, let me see and try it.
Triggers can't bring the resources of a unit beyond their max capacity specified in the unit's behavior. So it wouldn't work whether it's a mod or map... In the sample map in link below, you'll see I set he max capacity to 2500. So when I tell the mineral in triggers to hold 8000, it only holds 2500.
So the behaviors tab was hidden deep under the + . Your screenshot revealed that there is such a thing. But yes i could use that to increase resources to 90000 or more.
It doesn't solve the problem though that triggers aren't working at all. I don't really care if it's a trigger that sets all minerals to 1 or create 1 mutalisk above one or all of the players start locations, any signs that triggers work in mods would be welcome. A "Hello world!" example. The topic isn't only about setting amount of resources.
I doublechecked that "Disable trigger preloading" is not enabled.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Title ^, and i can't figure out why that is. I'm tired of making minor changes, publishing to SC2 and test in melee that none of the mineral fields are affected. I am able to select my mod when starting the game, and version number matches the published one. When i add the same library to some other custom made map, it works well. But that's obviously not a solution, i want it to work as mod in all maps, not just that 1.
I have other trigger library i want to add as well, not looking to change this from data behaviors or something.
And first thing i thought was that i'm comparing specifically "Mineral Field" object, when it's possible that map has them customized under other internal name. But that doesn't explain why my Zombie script didn't work either, when it doesn't rely on any specific value from map. Just revives units based on unit data it gets in the death event, which also works in custom map, not as mod.
Did you increase the maximum amount of resources a mineral patch can hold in the data editor? It's in a behavior I believe. Triggers can't go above the maximum that is stated there.
In reply to Forge_User_77061351:
I believed that the mineral fields and vespene geyser units are preplaced in your map, and any preplaced units/resources do not work in mods.
To get the resources units in your mod, you might need to change the trigger to the following:-
Event: Unit Enters Region (Any Unit Enters Entire Map)
Condition: Unit Type Of (Triggering Unit) == Minerals (Resources)
Actions: Add Unit to Unit Group -> Add (Triggering Unit) to grpMinerals
: Pick Each Unit In grpMinerals
Set (Picked Unit) Resources to "whatever amount you desire".
Do the same for the vespene geyser resources:-
Event: Unit Enters Region (Any Unit Enters Entire Map)
Condition: Unit Type Of (Triggering Unit) == Vespene Geyser (Resources)
Actions: Add Unit to Unit Group -> Add (Triggering Unit) to grpVespene
: Pick Each Unit In grpVespene
Set (Picked Unit) Resources to "whatever amount you desire".
I hope that explains. Either that or you have hit a maximum as described by Imposter.
Also, did you enable triggers for your mod?
I didn't edit anything in data editor, they should be defaults. The 524287 was maximum that the trigger editor allowed me to type. I tested it in the custom map, using the test document from SC2 editor. Not sure if it's ingame feature now, but i wasn't able to see how much minerals was left in the field. I forfeit and watched replay and then i saw the modded value was applied right, also to vespene.
I can't find any data about mineral fields or vespene default or max values. They have max and starting life 10000 but i don't think that's the value we are looking for, and it's invulnerable anyway. Minerals generally start at around 1500 or so.
In reply to Forge_User_77061351:
What I meant by preplaced units are the units that have already been placed in the Terrain Editor, such as, I'am assuming your mineral field and vespene geyser units. Mods generally do not keep track to changes in the map unless you are converting from a mod to a map. The purpose for a mod is so that it can be played in over numerous maps.
Let's also see the other corresponding triggers (assuming that you have) in case there is something amiss.
Also, try changing Any Player to Player 0 because map resources are owned by the neutral player, player 0.
"Disable Trigger Preloading" simply means disabling triggers. Do not check that one.
In case if it fails again, it means your trigger actions do not correspond to the trigger event. Hereby, -> Add Unit Group to Unit Group action. As I have suggested, you should have an event -> Unit Enters Entire Map upon Map Initialization. Then set the Unit Type Of (Triggering Unit) == Mineral Field/Vespene Geyser as the above.
I don't think my triggers are loading at all. I tried even the UI - Error Message, but nothing showed up, and i also did changes you suggested with Unit Enters event.
For zombies script i tried adding Game attributes, with idea being that i wanted to make sure there is a player 15. That turned out quite different, now in start loggy every player and AI had zombies attribute to them... That doesn't mean anything, other than that game does load "something" about my mod, or everything else but triggers.
I mean how about just something simple that shows a text on screen? I'm using wrong command for that too or it's disabled for mods... I don't get it, why would they go as far as disable mod features, when they allow drastic unit changes like making zerglings unkillable.
In reply to Forge_User_77061351:
I think this has got to do with the condition of the units being resources instead of actual units, hence why Unit Enters Region and Unit Type Of Unit Condition does not work.
Try this code to see if it works:-
Event: Elapsed Time is 2.0 Game Time seconds,
Actions: Pick Each Unit In Unit Group (Units In Region Matching Condition)
-> Any Units in Entire Map owned by player Any Player matching Required: Resource (Harvestable) with at most Any Amount and do Actions
Set (Picked Unit) Resources to "Any Amount You Desire"
Pick Each Unit In Unit Group (Units In Region Matching Condition)
-> Any Units in Entire Map owned by player Any Player matching Required: Resource (Raw) with at most Any Amount and do Actions
Set (Picked Unit) Resources to "Any Amount You Desire"
Hope this works out. It has to do with the required condition not being set to resources in my opinion.
It has to be something else wrong, something basic maybe... Here's just to show that it still works in custom saved map:
Also the map file with scripts included:
https://www.dropbox.com/s/gcnvfw9h5eat6e1/HighPlates_test.zip?dl=0
Feel free to test. This is super simple trigger, and it works in the map (not as mod). Also note that after 2 seconds the trigger will be destroyed by other trigger to not cause performance issues during game:
In data their max resources are on a behavior that's on the unit. Not on the unit itself.
Triggers can't bring the resources of a unit beyond their max capacity specified in the unit's behavior. So it wouldn't work whether it's a mod or map... In the sample map in link below, you'll see I set he max capacity to 2500. So when I tell the mineral in triggers to hold 8000, it only holds 2500.
https://drive.google.com/open?id=1t14LFZdK4rBryLePWB8FmQhx7Q1q0K03
So the behaviors tab was hidden deep under the + . Your screenshot revealed that there is such a thing. But yes i could use that to increase resources to 90000 or more.
It doesn't solve the problem though that triggers aren't working at all. I don't really care if it's a trigger that sets all minerals to 1 or create 1 mutalisk above one or all of the players start locations, any signs that triggers work in mods would be welcome. A "Hello world!" example. The topic isn't only about setting amount of resources.
I doublechecked that "Disable trigger preloading" is not enabled.