Does anyone know if its possible to create a second supply resource? Like have 2 different types of supply?
Sure. Supply is nothing more than a number the game uses to calculate. so on that aspect you can have 10 different such values. The standard 3 are Minerals, gas, supply - as you know, but there is also Terrazine and Custom Resource already built in to the data editor. any more and you have to use triggers. Such as a supply depot GIVES you a supply count and a scv takes it away. Could make a structure that Gives Custom Resource and a unit that takes that away also.
Field Supply Depot (Basic) Cost: Custom Resource 10 Field Medic (Basic) Cost: Custom Resource -1
I believe supply is not a standard resource. Fractional supply exists where as fractional minerals do not. It also tallies both provided and in use supply, instead of a total.
Best option would be a trigger system with custom UI to display the supply. When a unit starts training/building test custom supply. If its custom supply used would cause current custom supply used to exceed current maximum custom supply then pause the progress (training) and add to a "custom supply blocked" group or cancel (build). Otherwise add its custom supply used value to current custom supply used. When a unit finishes training or building finishes construction then add its maximum custom supply provided to current maximum custom supply and then iterate through units inside the custom supply blocked group resuming progress until the group is empty or once again current custom supply used exceeds current maximum custom supply. On unit death you do the opposite and remove both current custom supply used and current maximum custom supply appropriate for the unit type.
A simple UI element can be positioned anywhere on the screen to show both current custom supply used and current maximum custom supply. I believe this is made simply by concatenating a string representation of the values with a / between. Do not forget to add a hover over tooltip that is appropriate and localized.
I recommend using the real (fixed) type to represent custom supply values. This will allow the system to support units that provide or require fractional custom supply amounts similar to how Zerglings and Banelings work in melee. Even if you do not plan on using such values, it makes the system more generic and hence more reusable (other people might find it useful).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Does anyone know if its possible to create a second supply resource? Like have 2 different types of supply?
You could utilise the additional resource types or use triggers to add/remove a technology if supply vs demand does not match.
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
Field Supply Depot
(Basic) Cost: Custom Resource 10
Field Medic
(Basic) Cost: Custom Resource -1
I believe supply is not a standard resource. Fractional supply exists where as fractional minerals do not. It also tallies both provided and in use supply, instead of a total.
Best option would be a trigger system with custom UI to display the supply. When a unit starts training/building test custom supply. If its custom supply used would cause current custom supply used to exceed current maximum custom supply then pause the progress (training) and add to a "custom supply blocked" group or cancel (build). Otherwise add its custom supply used value to current custom supply used. When a unit finishes training or building finishes construction then add its maximum custom supply provided to current maximum custom supply and then iterate through units inside the custom supply blocked group resuming progress until the group is empty or once again current custom supply used exceeds current maximum custom supply. On unit death you do the opposite and remove both current custom supply used and current maximum custom supply appropriate for the unit type.
A simple UI element can be positioned anywhere on the screen to show both current custom supply used and current maximum custom supply. I believe this is made simply by concatenating a string representation of the values with a / between. Do not forget to add a hover over tooltip that is appropriate and localized.
I recommend using the real (fixed) type to represent custom supply values. This will allow the system to support units that provide or require fractional custom supply amounts similar to how Zerglings and Banelings work in melee. Even if you do not plan on using such values, it makes the system more generic and hence more reusable (other people might find it useful).