Like the title says. I used to work with triggers quite a lot a long time ago, but then I quit StarCraft 2 modding around mid-2012. I reinstalled the game recently because I want to get Heart of the Swarm as well, and who knows maybe I'll come back and resume work on my old campaign Terran Tactics.
However, I haven't checked the modding scene at all so I don't know of any recent developments. I don't know of any new methods that might make making singleplayer-campaign making easier. So for old time's sake, how about you help an old man to become up to spec, please?
Basically, I'm asking if singleplayer-campaign making has become easier overall. Has the add-on a proper campaign-file support, like The Frozen Throne did for WarCraft III? (it's just a few weeks away, so info on that should be available by now).
To be more specific: Have we finally reached a point where one can transfer values and call triggers in an easier fashion expect the rather troublesome bank system? Like, can I create a big trigger and save it somewhere and just call it in the current map without the need of copying it in manually? Because for some reason, last time I tried it, triggers saved in the bank files wouldn't work. If it does work, what tricks did you do make it work?
Nope, there is still no campaign support in HotS. And if you want to use the same triggers in multiple maps, then I suggest creating a function out of it and put them in a library.
Since you are probably using a lot of the same assets from map-to-map I suggest you do as Exaken suggested and make a library, then save that library and other imported assets as a mod. Publish the mod on bnet (you can do it privately) and load it as a dependency in each map. This will save you both time and space for your map files. TIME. AND. SPEEEEEEEEHHHHSSSSS.
For a singleplayer campaign I don't think you need or want to publish your main campaign mod on battlenet, playing the campaign missions through battlenet prevents you from jumping automatically to the next level and adds lag (at least 0.125sec last I checked?) to the game.
You can still add the mod as a local dependency in that case. You would just need to package the mod with your map files and instruct the player to place it in the mods folder when they download your campaign.
What exactly are you trying to save you are having so much trouble with? Sorry, I'm not so familiar with the TFT editor. I find almost anything can be saved and recalled with integers in sc2 though.
It's not about being able to save it at all, more like the amount varablies I have to save, and the same type if triggers that are required to be present in every map.
You see, in my campaign the player can create groups that consist of a maximum of 20 unit each, and there are six groups in total. Each unit can be defined, so you can have 20 Marines, 20 Thors and everything in-between per group.
I order to save all of these individual groups, I have to do it the hard way: creating a trigger that defines a variable for each unit in each group - that's 120 unique variables. What's more, when creating the triggers I have to define what unit is saved, so I basically create a trigger set for one group, copy&paste it and change every single variable for the other groups. These triggers would check the value of the variable and create the unit. So I do a trigger for each unit type and check the value manually – then I copy the trigger and redefine the variable for the other groups.
Yes, that is a lot of tedious work. Probably could do it easier nowadays now that I know how to handle code. Just replace the stuff in Notepad would make things a lot easier than selecting each variable in the editor.
And no, there is no better way other than defining every single variable, the bank system doesn't allow it otherwise – I only got numbers to work, unit type or specific units wouldn't work at all with the bank system.
So Ihave to save the value which is a number, save it in the bank and then create a trigger that loads the right unit type depending on the value - and that for each of the 120 units. There is no other way of doing this atm, which is why I'm asking if carrying-over triggers and values have become easier since my last approach.
Funnily enough I had it all done back in 2011 (), however I lost my motivation for the project when I couldn't find help. I can't do everything myself, I need mappers because my one big weakness is map design. But I wasted, like, 4 individual mappers who would become unavailable after a month or so.
So I said to myself “Wait for the add-on, include all the new units and stuff and start again”. Well, and here I am now. I'm now busier than I was two years ago, so unless I can cut down work on the trigger work considerably, I have a hard time finding motivation to do all the trigger work all over again.
(Sorry for my off-topic ranting about my project's failure, I promise this will be the last time).
When the player is fiddling with the group deployment UI, you just constantly save each individual unit's counter to the bank. You can get the internal name of a unit with the Name Of Unit Type trigger function.
Like the title says. I used to work with triggers quite a lot a long time ago, but then I quit StarCraft 2 modding around mid-2012. I reinstalled the game recently because I want to get Heart of the Swarm as well, and who knows maybe I'll come back and resume work on my old campaign Terran Tactics.
However, I haven't checked the modding scene at all so I don't know of any recent developments. I don't know of any new methods that might make making singleplayer-campaign making easier. So for old time's sake, how about you help an old man to become up to spec, please?
Basically, I'm asking if singleplayer-campaign making has become easier overall. Has the add-on a proper campaign-file support, like The Frozen Throne did for WarCraft III? (it's just a few weeks away, so info on that should be available by now).
To be more specific: Have we finally reached a point where one can transfer values and call triggers in an easier fashion expect the rather troublesome bank system? Like, can I create a big trigger and save it somewhere and just call it in the current map without the need of copying it in manually? Because for some reason, last time I tried it, triggers saved in the bank files wouldn't work. If it does work, what tricks did you do make it work?
Nope, there is still no campaign support in HotS. And if you want to use the same triggers in multiple maps, then I suggest creating a function out of it and put them in a library.
Since you are probably using a lot of the same assets from map-to-map I suggest you do as Exaken suggested and make a library, then save that library and other imported assets as a mod. Publish the mod on bnet (you can do it privately) and load it as a dependency in each map. This will save you both time and space for your map files. TIME. AND. SPEEEEEEEEHHHHSSSSS.
For a singleplayer campaign I don't think you need or want to publish your main campaign mod on battlenet, playing the campaign missions through battlenet prevents you from jumping automatically to the next level and adds lag (at least 0.125sec last I checked?) to the game.
@zorbotron: Go
D: I had not considered that!
You can still add the mod as a local dependency in that case. You would just need to package the mod with your map files and instruct the player to place it in the mods folder when they download your campaign.
@TheAzureguy: Go
What exactly are you trying to save you are having so much trouble with? Sorry, I'm not so familiar with the TFT editor. I find almost anything can be saved and recalled with integers in sc2 though.
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
@Bilxor: Go
It's not about being able to save it at all, more like the amount varablies I have to save, and the same type if triggers that are required to be present in every map.
You see, in my campaign the player can create groups that consist of a maximum of 20 unit each, and there are six groups in total. Each unit can be defined, so you can have 20 Marines, 20 Thors and everything in-between per group. I order to save all of these individual groups, I have to do it the hard way: creating a trigger that defines a variable for each unit in each group - that's 120 unique variables. What's more, when creating the triggers I have to define what unit is saved, so I basically create a trigger set for one group, copy&paste it and change every single variable for the other groups. These triggers would check the value of the variable and create the unit. So I do a trigger for each unit type and check the value manually – then I copy the trigger and redefine the variable for the other groups.
Yes, that is a lot of tedious work. Probably could do it easier nowadays now that I know how to handle code. Just replace the stuff in Notepad would make things a lot easier than selecting each variable in the editor. And no, there is no better way other than defining every single variable, the bank system doesn't allow it otherwise – I only got numbers to work, unit type or specific units wouldn't work at all with the bank system. So Ihave to save the value which is a number, save it in the bank and then create a trigger that loads the right unit type depending on the value - and that for each of the 120 units. There is no other way of doing this atm, which is why I'm asking if carrying-over triggers and values have become easier since my last approach.
Funnily enough I had it all done back in 2011 (), however I lost my motivation for the project when I couldn't find help. I can't do everything myself, I need mappers because my one big weakness is map design. But I wasted, like, 4 individual mappers who would become unavailable after a month or so. So I said to myself “Wait for the add-on, include all the new units and stuff and start again”. Well, and here I am now. I'm now busier than I was two years ago, so unless I can cut down work on the trigger work considerably, I have a hard time finding motivation to do all the trigger work all over again. (Sorry for my off-topic ranting about my project's failure, I promise this will be the last time).
I can guarantee there's an easier way, because I tested something similar.
What you save in the bank is:
Section: Group name here
Key: Unit type here
Value: Unit count here
Example bank:
Section - Group1
Marine (key) = 15 (value, integer type)
Thor = 5
Section - Group2
Marine = 18
Thor = 1
Siegetank = 1
When the player is fiddling with the group deployment UI, you just constantly save each individual unit's counter to the bank. You can get the internal name of a unit with the Name Of Unit Type trigger function.