Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Hero spawn replacement
Hero spawn replacement
This topic is locked. You can no longer write replies here.
Mar 30 2010, 7:40 pm
By: Queen-Gambit  

Mar 30 2010, 7:40 pm Queen-Gambit Post #1



I am working on a map called Diplomacy: Fantasia. Players are randomly given a small Terran base and must expand and conquer the rest of the map. Every city/captial controlled brings in a small fortune of income every few minutes. Each base is given a hero unit that replaces a certain Terran unit. For example if a player starts with the nation named: Pacific Nautilus, that players' BattleCruisers will turn into Jim's BC named Captain Nemo. Forty preplaced bases are set all around the map each has their own unique unit.


This pic is the Pacific Nautilus' Capital. Each nation has that same Doodad, CC, Invincible Silo and a Neutral Invincible unit to display what special unit you have.

I'd like some UMS assistance in getting through this obstacle: I would like players to choose between building between Jim's BC or normal ones and keeping both in the battlefield. I use the Neutral invincible silo to toggle between building normal BC/Jim BC however, I cannot find a way to keep the normal BCs from turning into heroes should I choose to build them once again.



None.

Mar 30 2010, 9:09 pm Kaaysel Post #2



I might be able to help you out.

You could use a switch. When it's set, turn every BC in the field into Jim BC. When it's cleared, simply don't do anything. I think this should do it. The way i see it, it will only turn BC into Jim BC when the switch is set, but once it's cleared, since there's nothing it's told to do, and yet it's not set, which is what makes BC transform, it won't do anything and BCs will come out normally.

I hope this helped. Also, if i'm wrong, tell me, since i could use the information, :D.



None.

Mar 30 2010, 9:42 pm Queen-Gambit Post #3



I don't think I can use that method because I DON'T want to turn every BC in the field into Jim BC. I want to have some normal BCs in the field. This is what i have so far but its not working right:

Quote from My failed triggers
Trigger("Sovereign States"){
Conditions:
Bring("Current Player", "Terran Ghost", "Anywhere", At least, 1);
Bring("Current Player", "Terran Nuclear Silo", "041", At least, 1);

Actions:
Preserve Trigger();
Move Location("Current Player", "Terran Ghost", "Anywhere", "112");
}

//-----------------------------------------------------------------//

Trigger("Sovereign States"){
Conditions:
Bring("Current Player", "Terran Ghost", "112", At least, 1);
Bring("Current Player", "Terran Barracks", "112", At least, 1);

Actions:
Remove Unit At Location("Current Player", "Terran Ghost", 1, "112");
Create Unit with Properties("Current Player", "Infested Kerrigan (Infested Terran)", 1, "112", 3);
Preserve Trigger();
}

//-----------------------------------------------------------------//

This trigger will move a location to a ghost. When that locations has a ghost and a barracks underneath it, it will turn the ghost into an infested kerri. The problem is the trigger doesn't work consistently when i lift/move barracks around and attach/detach silo.

Another problem I am running into is a player having multiple capitals that spawn ghost heroes or any hero that comes from that same Terran unit build. Should I just simply auto-prioritize which hero should come out or should i have an area with a beacon off to the side to let players toggle between heroes?



None.

Mar 30 2010, 9:48 pm Kaaysel Post #4



Well, if you mean having some normal BC in the battlefield while building JIM BC, then no, you can't really use that method. I hadn't thought about that. But it's really the best method i can think of, so i can't help you further in this aspect. Sorry.

Now, regarding your other problem, i think you should auto-prioritize them. This would sort of encourage diplomacy at least with people like me and my bnet friends. What i mean is, the other day we were playing some diplo, and i was like "Hey, i don't want these hero wraiths, i'd rather get scouts, anyone wanna buy this cap?", then everybody started negotiating specials xD.



None.

Mar 30 2010, 10:13 pm CecilSunkure Post #5



If the bases are stationary, you could have a "Warp" location in which to bring BCs too. This could be just a couple doodads with a few sprites. Every BC taken there turns into a Jim. Basically you take the changing mechanism of BCs from anywhere on the map, to a specific location (which you can center on a specific building, or stay on the doodads, whatever you want), that way the player has more control over the numbers of each type of unit.



None.

Mar 30 2010, 10:41 pm Queen-Gambit Post #6



That is a good idea cecil but unfortunately the bases aren't stationary. I had a similar idea too whereas i would just simply add beacons to the capital



None.

Mar 30 2010, 11:46 pm Leeroy_Jenkins Post #7



Not really sure how the BC is being built, but I'm sure you can tweak the below to make more sense. The below triggers are assuming that they are normal BCs being built from a starport.

REQUIREMENTS
  • A second or two of build time for BC
  • BC cost <any> ore and 1 gas
  • No other use for gas besides this system
  • A trigger to replenish gas to 1 when transformation is not in effect




Players
  • Player 1
Conditions
  • Accumulate exactly 0 gas
  • Player 1 has suffered exactly 0 deaths of Warp-Gate
Actions
  • Give all Terran Battlecruiser owned by Player 1 at Anywhere to Player 8
  • Set Deaths for Player 1, Set Warp-Gate to 1
  • Preserve Trigger



Players
  • Player 1
Conditions
  • Player 1 has suffered at least 1 deaths of Warp-Gate
  • Player 1 commands at least 1 Terran Battlecruiser
Actions
  • Set Deaths for Player 1, Set Warp-Gate to 0
  • Move Location Labelled "TRANSFORM" on Terran Battlecruiser owned by Player 1 at "Anywhere"
  • Remove all Terran Battlecruiser owned by Player 1 at "TRANSFORM"
  • Create one (hero battlecruiser) at "TRANSFORM" for Player 1
  • Set Resources for Player 1, Set to 1 Gas
  • Give all Terran Battlecruiser owned by Player 8 at Anywhere to Player 1

The whole idea of this system is to detect when the BC is being built via gas detection, temporarily give all BCs to a computer player, transform the BC once it is built, and then give all BCs back to the player. You could also throw in a trigger that gives all players "0 gas" while the transformation is taking place, because multiple players giving their BCs to p8 simultaneously would be a problem.

Post has been edited 5 time(s), last time on Mar 31 2010, 12:17 am by Leeroy_Jenkins.



None.

Mar 31 2010, 12:11 am Chia-Tyrant Post #8



The triggers you mentioned previously aren't working because the location you're centering will always stay on the same ghost.

You could, however, cycle through all your units whenever a new unit is created by using the unit score (when it's at least 1, cycle through all your units by giving them to a certain player, then give them back to the original player and set the unit score to 0). Also, I think each unit has its own unit value in score (like kills, but I'm really not sure about that). If that's the case, then you could know whenever a ghost(or whatever you're looking for) was created.

On the other hand, you could make a special "evolving building" that, when units are brought to it, automatically evolve into whatever you want them to evolve.



None.

Mar 31 2010, 1:16 am Queen-Gambit Post #9



@Chia yah your right, that location will stay on the same ghost my bad. Also, I might be using the Beacon idea whereas I just simply have a toss beacon next to the capital cities and just make players move the units there. It would be frustrating during middle/end game when a player expands very far and they must tediously move their hero units from the initial base to wherever they want. Map is gonna be 256x256.

@Leeroy That is a great system however I just noticed now - players will be building more than one hero simultaneously and so giving them just one gas won't be enough.

The challenge im facing basically is detecting a unit in hanger and put a location over it and when unit pops out hero replaces it. Location has to be big enough to fit both structure and a unit. And if I had BCs initially, i don't want them to turn into Jim BC watsoever. Another challenge is when a player has multple Starports having few BCs in hangar.



None.

Mar 31 2010, 2:07 am Burgled Post #10



Ok, I set to work at this problem.

My solution changes every starport into a unit morphing location by creating and cycling a unit over them (observers in this case)
You can create new starports and they will acquire the morphing ability with a certain delay, starports destroyed or moved away will lose
the morphing ability (moved ones will re-aquire later).

uhh I can explain the triggers in depth later but first I'll just throw up the map, it isn't perfect at the moment but it is
along the lines of what you are looking for methinks.

Note: Siege the tank to build heros, unsiege to go back to normal BCs
feel free to make additional starports, you'll see when the system aquire's them.

Attachments:
Hero Spawning.scm
Hits: 3 Size: 52.72kb



None.

Mar 31 2010, 3:11 am Queen-Gambit Post #11



Edit: It does work but it takes a bit to cycle through all them.

I want to be able to have a mix of both Hero and non hero units altogether. The map above seems like the only way to do that. Does anyone have other alternatives?

Post has been edited 1 time(s), last time on Mar 31 2010, 3:23 am by Queen-Gambit.



None.

Mar 31 2010, 4:53 am rockz Post #12

ᴄʜᴇᴇsᴇ ɪᴛ!

It's not to hard to optimize that to work faster.
Use a burrowed unit as a tracker rather than an observer, and set a maximum number of starports you can have (100 isn't hard with trigger duplicator) with 100 copies of the trigger set placed properly after the center locations.

For added accuracy, keep track of the number of battlecuisers too (command exactly X bcs up to 200 and send that number to a DC) then if it increases while you have the switch for heroes set, make a hero BC at any starport. This will fuck up if you have normal BCs over a separate starport to the left of the one being built.

I think the best bet is to have the capital building have to technology to make hero units FROM normal units, allowing you to upgrade them. If you want to build your BCs far away from the capital, so be it, they'll be normal bcs. If you build your bcs close to the capital, set a rally point for them to go into capital to be upgraded. This way you can CHOOSE whether or not to use the unit, while still getting the money from the building. Nothing is more annoying than killing moscow's buildings to get rid of the kerrigan ghosts in diplo 7.7 so you get the (much better) normal ghost.

You say you have a unit over/around the capital city to say which unit it is, so simply make a location center on those units.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Mar 31 2010, 6:34 pm Burgled Post #13



Hmm well I've kept working on making the example better, now uses burrowed lings and gives the starports rather than removing them
(was having trouble with that originally for some reason) It does disrupt production when it aquire's starports but at least it refunds the cost.

This is going to be quite a hassle if you want it for ever unit-producing building and hero, I suggest perhaps a compromise, you could make it so
there is one type of building that when you bring units near it, it turns them into the hero varient (any type of unit, all the time)
you could build this near your production facilities wherever they are and hotkey to it whenever you want the hero version, this would be much
simpler since it is just one kind of building.

Anyway here's the updated map.

Attachments:
Hero Spawning 1.1.scm
Hits: 4 Size: 52.84kb



None.

Mar 31 2010, 8:51 pm Queen-Gambit Post #14



Yes thank you Bur, this map will work for me. Topic done



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
Please log in to shout.


Members Online: Roy, Oh_Man