Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Shared vision question
Shared vision question
May 9 2021, 5:39 pm
By: swankish  

May 9 2021, 5:39 pm swankish Post #1



Hey all! Great to see there is still a community here!

I'm building a new TD map and I'm running into an issue with shared vision and lights on/off stacking - specifically how to retain vision of the light switch area. I know most maps solve this by sharing vision from the computer player with the players, but I don't want to do this because I want to be able to make use of enemy cloaking to make the map more challenging. To avoid sharing vision with the computer enemy player, I'm using a second neutral computer player to share vision of the map via units and map revealers, as well as handle some triggers and provide a unit legend for the levels and hero buying, etc. This is working fine right up to the point that I turn the lights off and lose vision of the light controls to turn them back on. As far as I can tell, I have a few different (+undesirable) options:

- Hotkey the firebat/lightswitch. I know it seems obvious but people have gotten used to not having to do this and they're gonna be bummed when they end the game for themselves by turning the lights off.
- Set a short timer, like 30 seconds, after which lights automatically come back on. Again, not ideal because many people like to leave the lights off for an extended period.
- Give up another player simply to provide vision at the light switch. No thanks.
- I can rework all of the neutral units and give them to the enemy player and spam map revealers for individual players all over the map, then turn all of these off for lights, but this just seems sloppy and would mess with the modularity I have built into the round spawn triggers.

Is there a way to provided vision to a limited area, or remove vision from a limited area, without giving up a whole other player slot?

Thanks!



None.

May 10 2021, 2:57 am DarkenedFantasies Post #2

Roy's Secret Service

Quote from swankish
To avoid sharing vision with the computer enemy player, I'm using a second neutral computer player to share vision of the map via units and map revealers, as well as handle some triggers and provide a unit legend for the levels and hero buying, etc. This is working fine right up to the point that I turn the lights off and lose vision of the light controls to turn them back on.
I don't understand why you can't get it working with the neutral computer player. Do you not keep sharing its vision with the human players? Or is it something like vision from some of his units reaching into areas you need to be unrevealed? In the latter case, since it's a neutral player, you could give the units that you don't need providing vision to player 12 instead.




May 10 2021, 3:45 am Ultraviolet Post #3



Quote from swankish
To avoid sharing vision with the computer enemy player, I'm using a second neutral computer player to share vision of the map via units and map revealers, as well as handle some triggers and provide a unit legend for the levels and hero buying, etc. This is working fine right up to the point that I turn the lights off and lose vision of the light controls to turn them back on.
I don't understand why you can't get it working with the neutral computer player. Do you not keep sharing its vision with the human players? Or is it something like vision from some of his units reaching into areas you need to be unrevealed? In the latter case, since it's a neutral player, you could give the units that you don't need providing vision to player 12 instead.


Took me a minute to understand, too. I think it's that since it's a turret defense map he has the map always revealed to the player but needs to be able to turn off the lights to have buildings stacked. Since the neutral player is used to reveal the map, he has to turn vision off for both the neutral player and the current player to allow the current player to stack.

Quote
Is there a way to provided vision to a limited area, or remove vision from a limited area, without giving up a whole other player slot?

Not that I can think of. Thinking about your problem, the only work around I can think of that you didn't mention is similar to your fourth one, but it comes with problems of its own. It would be to have Player 1 be required and use that player for your general map revealer needs for the team, I think if they have vision shared with an ally but not themselves, their ally can still see what their units can. I'm not actually certain about that though, and I don't know that that solution would help so much, except it would reduce the sloppiness of repeated revealers for multiple players while still potentially addressing your vision problem. If P1 left the game the team would be shafted though. You might be able to circumvent that issue by setting a trigger for Force 1 to detect if P12 commands any map revealers and if they do to give all map revealers for P12 to the current player. If that P12 map revealer solution does work that actually circumvents the P1 requirement altogether, you would just originally place the map revealers for P12 and have Force 1 always give all map revealers owned by P12 to the current player.. I always forget what you can and cannot do with map revealers, I know they have some special rules like that you can't remove them at a location, but you can remove all of them for a given player. I believe you can give map revealers from one player to another, but I'm not sure if you can detect them with bring or command, you could use always condition with a preserve trigger if bring/command doesn't work for revealers, it's a little sloppier, but I imagine for just one small trigger like that, you wouldn't cause any issues.




May 13 2021, 1:11 am swankish Post #4



Quote
Took me a minute to understand, too. I think it's that since it's a turret defense map he has the map always revealed to the player but needs to be able to turn off the lights to have buildings stacked. Since the neutral player is used to reveal the map, he has to turn vision off for both the neutral player and the current player to allow the current player to stack.

Quote
Is there a way to provided vision to a limited area, or remove vision from a limited area, without giving up a whole other player slot?

Not that I can think of. Thinking about your problem, the only work around I can think of that you didn't mention is similar to your fourth one, but it comes with problems of its own. It would be to have Player 1 be required and use that player for your general map revealer needs for the team, I think if they have vision shared with an ally but not themselves, their ally can still see what their units can. I'm not actually certain about that though, and I don't know that that solution would help so much, except it would reduce the sloppiness of repeated revealers for multiple players while still potentially addressing your vision problem. If P1 left the game the team would be shafted though. You might be able to circumvent that issue by setting a trigger for Force 1 to detect if P12 commands any map revealers and if they do to give all map revealers for P12 to the current player. If that P12 map revealer solution does work that actually circumvents the P1 requirement altogether, you would just originally place the map revealers for P12 and have Force 1 always give all map revealers owned by P12 to the current player.. I always forget what you can and cannot do with map revealers, I know they have some special rules like that you can't remove them at a location, but you can remove all of them for a given player. I believe you can give map revealers from one player to another, but I'm not sure if you can detect them with bring or command, you could use always condition with a preserve trigger if bring/command doesn't work for revealers, it's a little sloppier, but I imagine for just one small trigger like that, you wouldn't cause any issues.

Thanks for the detailed reply, and sorry if I didn't state my problem very clearly. I thought about just using player 1 for vision, but like you said, game over if player 1 leaves. It does actually look like you can give map revealers so that's a possibility as well. I was just hoping there was some nice clean solution I was overlooking but it sounds like it's just going to have to be one workaround or another.

Cheers!



None.

May 13 2021, 1:22 am swankish Post #5



'Nother question haha

Any idea why Arbiter recall might not work on a particular map? It is enabled and researched, and in testing I can use the recall ability, but it doesn't actually recall the units. I tested on a brand new map and it does work. Is there some sort of unit/building count that interferes with it?



None.

May 13 2021, 11:31 pm DarkenedFantasies Post #6

Roy's Secret Service

I'm aware of only two things that prevent an Arbiter for recalling units: 1) The Arbiter is given another order before the current recall order finished, including ordering another recall, or 2) The Arbiter is above unpathable terrain, if recalling ground units.

If there are no recall vortexes created by the Arbiter, make sure the Arbiter is owned by a computer player and the trigger running the cast recall script is owned by the same player; the script doesn't work for human and neutral players.




May 14 2021, 2:01 am Butch Post #7

PROFESSIONAL MAP MAKER

also it goes without saying but its easy to forget the arbiter needs energy to cast.



None.

May 14 2021, 5:28 am swankish Post #8



Thanks folks, I'm actually stumped here :lol:

I'm aware of only two things that prevent an Arbiter for recalling units: 1) The Arbiter is given another order before the current recall order finished, including ordering another recall, or 2) The Arbiter is above unpathable terrain, if recalling ground units.

If there are no recall vortexes created by the Arbiter, make sure the Arbiter is owned by a computer player and the trigger running the cast recall script is owned by the same player; the script doesn't work for human and neutral players.

I checked for that after you mentioned it but the arbiter is over free ground. I'm not even messing with scripts or anything, just a human player in game and it's somehow not working.

Quote from Butch
also it goes without saying but its easy to forget the arbiter needs energy to cast.

Much appreciated I've been known to overlook things like that :) I already set the energy requirement for Recall to 5 for testing



None.

May 14 2021, 5:35 am swankish Post #9



Is it proper to post SCMDraft2 maps here? I'd be happy to post the map here (pls no release public) but it's probably something silly I'm overlooking.

The arbiter thing is a minor issue, there are ways around it, it's just another issue that can be fixed with about 30 new triggers but I'd rather keep it neat.

Y'all are great!



None.

May 14 2021, 5:43 am swankish Post #10



In case anyone wants to laugh at the balancing spreadsheet I created:



Post has been edited 1 time(s), last time on May 14 2021, 5:17 pm by swankish.



None.

May 14 2021, 5:19 pm DarkenedFantasies Post #11

Roy's Secret Service

Quote from swankish
Is it proper to post SCMDraft2 maps here? I'd be happy to post the map here (pls no release public) but it's probably something silly I'm overlooking.
Yea, I can take a look at it if you'd like. Either post it here or send a PM.




May 15 2021, 5:36 pm swankish Post #12



Quote from swankish
Is it proper to post SCMDraft2 maps here? I'd be happy to post the map here (pls no release public) but it's probably something silly I'm overlooking.
Yea, I can take a look at it if you'd like. Either post it here or send a PM.

Sorry ignore my drunken postings :D

I figured it out, you can't recall invincible units. Units are set to invincible because it's a TD and I don't want the enemy attacking player units.



None.

May 15 2021, 7:50 pm DarkenedFantasies Post #13

Roy's Secret Service

O, I forgot about invincible units. Thanks for reminding me.




May 15 2021, 9:40 pm Ultraviolet Post #14



Interesting, never knew about that.




May 16 2021, 4:40 am swankish Post #15



Quote from Ultraviolet
Interesting, never knew about that.
Neither did I until I spent a couple hours pounding my head against a wall trying to figure it out :lol:

My latest nemesis is how to properly build a 'resources for kills' system - I've read over http://www.staredit.net/wiki/index.php?title=Kills_to_cash and just don't like any of those systems. I thought I cracked the code with my basic ass triggers but these go haywire when there's more than one player on the force for some reason:

Trigger("Force 1"){
Conditions:
Kill("Current Player", "Men", At least, 1);
Deaths("Player 8", "Men", At least, 1);

Actions:
Set Resources("Current Player", Add, 2, gas);
Set Score("Current Player", Subtract, 1, Kills);
Set Score("Current Player", Add, 1, Custom);
Set Deaths("Player 8", "Men", Subtract, 1);
Preserve Trigger();
Comment("Get Gas for Kill");
}

I'm guessing there's probably a EUD or whatever to solve this but those seem slightly terrifying to get into.

Post has been edited 1 time(s), last time on May 16 2021, 4:56 am by swankish.



None.

May 16 2021, 10:50 am DarkenedFantasies Post #16

Roy's Secret Service

The "Kills" condition isn't the same thing as Score Kills; killing 1 unit often gets you hundreds of kill score (different units are worth different amounts of kill points, there are lists floating around). Since you're technically not subtracting the actual kill count, that condition becomes irrelevant and the trigger runs whenever Player 8 has 1 death. It likely goes on without problem for a single player running the trigger, but when you add more players to Force 1, I guess your issues start when Player 8 gets 1 or more deaths within the same trigger cycle, giving money to the first [number equal to P8's deaths] players in the force as the trigger conditions are then true for all players in Force 1 (that have at least 1 kill).

There isn't a trigger action to modify a player's actual kill count, besides an EUD action. You'll either have to check for at least 1 kill score in the conditions and set the kill score to 0, and live with the case where multiple kills in a single trigger cycle will only count as 1. Otherwise you'll have to find a different method.




May 16 2021, 9:45 pm Ultraviolet Post #17



You can use kill score and have a progressive tiered system with higher kill score units valued higher up the trigger list. So for ghost at least 350 kill score and whatever award you want to give for that kill. Sometimes it messes up a little if you kill two units at the same time, but overall it's a more robust system than most workarounds. If you're into using EUDs, you can just set the kill score for all enemy units to 1 and then replace the kills in your trigger with kill score and it should work perfectly.




May 20 2021, 2:43 am swankish Post #18



I didn't want to but I finally broke down and did the "perfect score method", only ended up being 150 separate new triggers or so :crazy:

But it works great!



None.

May 20 2021, 2:57 am Ultraviolet Post #19



It's always worth it once you're done ;)




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
Please log in to shout.


Members Online: Ultraviolet, Roy, NudeRaider