LocUnlock v1

Post Reply
User avatar
poiuy_qwert
Terran Goliath Dome Polisher
Terran Goliath Dome Polisher
Posts: 116
Joined: Sun Jun 15, 2008 5:06 pm
Contact:

LocUnlock v1

Post by poiuy_qwert »

LocUnlock is an MPQDraft and FireGraft v0.93 plugin supporting SC:BW versions 1.15.1 to 1.15.3 (1.15.2 and 1.15.3 are currently not supported by FireGraft v0.93), designed to allow modders the use of locations in game types other then Use Map Settings. The two things you can do with this plugin is make the Anywhere location cover the whole map with all elevation levels, or set one or more values (top left x/y, bottom right x/y, and elevation flags) of any location you want.


MPQDraft Installation/Application:
1) Extract LocUnlock.qdp to your MPQDraft folder
2) When creating a SEMPQ or loading an MPQ patch, make sure the "LocUnlock v1" plugin checkbox is checked


FireGraft v0.93 Installation/Application:
1) Extract LocUnlock.qdp to your FireGraft folder
2) When editing your project, go to the Plugins tab
3) Click tha add Add button under MPQDraft plugin, and select LocUnlock.qdp


Usage:
LocUnlock uses the EnableDebugMode (which is currently only supported by PyTRG) action to edit locations, and takes its parameters from the Start Locations (unit 214) death count of different players:
Player 2: Location number
Player 3: Values to change (bitmask: 1 = top left X, 2 = top left Y, 4 = bottom right X, 8 = bottom right Y, 16 = flags)
Player 4: Top left X
Player 5: Top left Y
Player 6: Bottom right X
Player 7: Bottom right Y
Player 8: Elevation flags (bitmask: 1 = Low Elevation, 2 = Medium Elevation, 4 = High Elevation, 8 = Low Air, 16 = Medium Air, 32 = High Air)

If the Location number or Values to change is 0, then the Anywhere location is automatically set to cover the whole map with all flags set (like how it starts for UMS maps).


Examples:
Make Anywhere cover the whole map at the start of the game:

Code: Select all

Trigger(All Players):
	Conditions:
		Always()
	Actions:
		EnableDebugMode()
Cover 2x2 square of tiles in the top left with location 1 when switch 1 is set:

Code: Select all

Trigger(All Players):
	Conditions:
		Switch(1, Set)
	Actions:
		SetDeaths(Player 2, Start Location, Set To, 1)
		SetDeaths(Player 3, Start Location, Set To, 31)
		SetDeaths(Player 4, Start Location, Set To, 0)
		SetDeaths(Player 5, Start Location, Set To, 0)
		SetDeaths(Player 6, Start Location, Set To, 64)
		SetDeaths(Player 7, Start Location, Set To, 64)
		SetDeaths(Player 8, Start Location, Set To, 63)
		EnableDebugMode()

Credits:
bajadulce: Giving me the idea to make this and for hosting!
Doodle: Some code I used to learn from
A_of-s_t: Helping, and being cool
DiscipleOfAdun: Supplied function to get the SC version and for mucho grande help!

Download: LocUnlock.zip
Last edited by poiuy_qwert on Mon Sep 15, 2008 2:45 pm, edited 1 time in total.
[align=center][url=http://www.modcrafters.com][imgwh 400x75]http://www.modcrafters.com/images/sig_logo.png[/imgwh][/url]
[url=http://www.modcrafters.com/wiki/index.php?title=PyMS]PyMS[/url] ([url=http://www.broodwarai.com/forums/index.php?showforum=40]Forums[/url]/[url=http://www.campaigncreations.org/forum/index.php?topic=877.0]Local[/url]) | [url=http://www.broodwarai.com/forums/index.php?showtopic=709&view=getnewpost]ProTRG[/url] ([url=http://www.campaigncreations.org/forum/index.php?topic=2214.0]Local[/url]) | [url=http://www.staredit.net/topic/4540/]LocUnlock[/url][/align]
User avatar
Ricky_Honejasi
Xel'naga Solar Moderator
Xel'naga Solar Moderator
Posts: 2011
Joined: Wed Aug 16, 2006 3:50 pm

Re: LocUnlock v1

Post by Ricky_Honejasi »

I might not have much interest in playing Starcraft nor followed much the SC Modding scene but ...

What is the use of being able to use locations in melee maps?

Since in all honesty, if you use locations it's pretty much assured you use it in a non-melee map (along with triggers to spawn units at that location or something that also makes the map non-melee) unless somehow the triggers are modified to be usable in melee maps.
User avatar
IskatuMesk
Xel'naga World Shaper
Xel'naga World Shaper
Posts: 8332
Joined: Sat Feb 07, 2009 1:40 pm
Location: M͈̙̞͍͞ͅE̹H̨͇̰͈͕͇̫Ì̩̳CO̼̩̤͖͘ జ్ఞ‌ా
Contact:

Re: LocUnlock v1

Post by IskatuMesk »

You can have triggers run in melee maps but to my knowledge you cannot accurately place locations within a melee map in real-time.
Gameproc
Though we stand alone, stand we shall.
User avatar
Whiplash!
Xel'naga World Shaper
Xel'naga World Shaper
Posts: 963
Joined: Wed Sep 13, 2006 4:21 pm
Location: Florida
Contact:

Re: LocUnlock v1

Post by Whiplash! »

I'm confused... what exactly will this enable for modders, what is the use?
¯\_(ツ)_/¯
User avatar
Lavarinth
Xel'naga Administrator
Xel'naga Administrator
Posts: 6539
Joined: Wed Aug 16, 2006 5:21 pm
Location: His Ashworld Planet

Re: LocUnlock v1

Post by Lavarinth »

I'm assuming this will/has the possibility to also work with locations placed in the map already?
- - Lavarinth
Campaign Creations Administrator
User avatar
poiuy_qwert
Terran Goliath Dome Polisher
Terran Goliath Dome Polisher
Posts: 116
Joined: Sun Jun 15, 2008 5:06 pm
Contact:

Re: LocUnlock v1

Post by poiuy_qwert »

designed to allow modders the use of locations in game types other then Use Map Settings.
This is meant to be used with GOT triggers. When you are in melee all the locations are in the top left corner, with widths and heights set to 0, which means you cant use them at all (no way to move them out of the top left corner, no way to change the size). This changes that, the first function of the plugin sets Anywhere to cover the map with all elevations so you can center other locations and other triggers that required it. The second function lets you change anything about any location, so size, position, and elevation flags. In short, it enables you to do anything a UMS map can in the the melee game type, and some new cooler things like moving locations with dc math for example.
Last edited by poiuy_qwert on Mon Sep 15, 2008 7:26 pm, edited 1 time in total.
[align=center][url=http://www.modcrafters.com][imgwh 400x75]http://www.modcrafters.com/images/sig_logo.png[/imgwh][/url]
[url=http://www.modcrafters.com/wiki/index.php?title=PyMS]PyMS[/url] ([url=http://www.broodwarai.com/forums/index.php?showforum=40]Forums[/url]/[url=http://www.campaigncreations.org/forum/index.php?topic=877.0]Local[/url]) | [url=http://www.broodwarai.com/forums/index.php?showtopic=709&view=getnewpost]ProTRG[/url] ([url=http://www.campaigncreations.org/forum/index.php?topic=2214.0]Local[/url]) | [url=http://www.staredit.net/topic/4540/]LocUnlock[/url][/align]
Post Reply