IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> LocUnlock v1, Modders finally get locations in melee!
poiuy_qwert    Canada
Sep 14 2008, 08:53 PM    Post #1
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.

Download: Attached File  LocUnlock.zip ( 35.02K ) Number of downloads: 375


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).




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

Examples:
Make Anywhere cover the whole map at the start of the game:
CODE
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
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!


 
Go to the top of the page +
A_of_s_t   
Sep 14 2008, 09:12 PM    Post #2
I dont know which forum to post on, so Ill just post here:

Good job biggrin.gif !


 
Go to the top of the page +
poiuy_qwert    Canada
Sep 15 2008, 05:35 PM    Post #3
smile.gif Im glad you like it. I have had so many ideas that would only be possible with locations, im just surprised it took me this long to make it tongue.gif


 
Go to the top of the page +
Hercanic   
Sep 30 2008, 06:36 PM    Post #4
Dear Poiuy Qwert:
I was just reading your post, and spontaneously thought of a solution to a balance problem I've been wrestling, the solution of which is only possible with your program. Once again, thank you for making it! =o)


 
Go to the top of the page +
poiuy_qwert    Canada
Sep 30 2008, 06:42 PM    Post #5
I'm just happy it can be put to use. I'm thinking of adding more functionality, as in being able to retrieve location settings, and supporting vanilla along with broodwar (Heinerman found something that might make this totally useless outside of broodwar, so i gotta check it out and add support if its true). Thanks!


 
Go to the top of the page +
bajadulce    Santa Cruz, California
Oct 2 2008, 02:26 PM    Post #6
I guess this is where Help/Discussion of this program should go? I gave this a tryout run today, but must have done something wrong. I'm posting my simple test as a means to supply the program with a very simplistic example of how this works. Later this could be turned into a small tutorial for our wiki. Unfortunately, I can't seem to be able to get this to work.

Here is my Test:
Attached File  LocUnlnock_Test_001.zip ( 201K ) Number of downloads: 120

Basically a simple test of the "Anywhere" function. Creation of a medic gives all SCV's on map to the player who created the medic. In the example kit are a UMS map that demonstrates the correct construction of the triggers + the PyTrg triggers with the added "enable debug" mode. + Firegraft 1.15.1.exe with the plugin added and melee.trg generated from PyTrg.

Here are my Triggers:
CODE
Trigger(All Players):
    Conditions:
        Always()
    Actions:
        EnableDebugMode()

Trigger(All Players):
    Conditions:
        Always()
    Actions:
        SetResources(Current Player, Set To, 500, Ore and Gas)
        PreserveTrigger()

Trigger(All Players):
    Conditions:
        Command(Current Player, At Least, 1, Terran Medic)
    Actions:
        GiveUnitstoPlayer(All Players, Player 1, All, Terran SCV, Anywhere)
        PreserveTrigger()


I think this very simple demonstration would be extremely beneficial to include or additional info for the package. I may try this in MPQDraft next as there is obviously no grafting involved. What gives?

EDIT:
hmm I tried to give this a try in MPQDraft but it crashes in the process of creation? I have MPQDraft v2008.8.21.1 btw. MPQDraft crashes as soon as hit the "finish" button after loading the locunlock plugin. The plugin is clearly visible with a checkmark etc. but MPQDraft crashes after that.. i.e (finish, back, configure plugin, or even just trying to uncheck the plugin).

EDIT 2:
Oct 6
Poiuy, I have to take this off the main page until the program can be fixed. We can put it back up when it gets updated. I just don't want to see users getting frustrated because they can't get this to work and then never trying it again.


 
Go to the top of the page +
poiuy_qwert    Canada
Oct 29 2008, 04:22 PM    Post #7
Ok well I finally get a chance to look at this again (sorry it was so long). I still do not get any crashes using MPQDraft and LocUnlock. I think there should be no way LocUnlock is making MPQDraft crash, maybe you are experiencing a crash unrelated to LocUnlock (MPQDraft likes to crash when I change the input/output paths and do other things). Also so far all my tests have shown that LocUnlock works fine, except the Giving of units in your example isn't working. If you SetResources(Player 1, Set To, 1000, Ore and Gas) right after the GiveUnitstoPlayer, you'll see the trigger does fire (meaning the Anywhere location is correctly set up to detect the medic), just the SCV's arn't being given. I don't know whats going on there, but its not LocUnlocks fault. Right now all i can think of is either PyTRG is compiling the GiveUnitstoPlayer trigger incorrect (the trigger works fine in staredit though, so i believe this is not the case), or there may be another melee based restriction on giving units.


 
Go to the top of the page +
bajadulce    Santa Cruz, California
Nov 4 2008, 04:45 PM    Post #8
Can you upload an example SEMPQ + the triggers used so we can see how this works. As you appear to be the only one who has a working example. I haven't seen anybody else attempt to build a sample test at any other forum.

The create medic = give all SCV to player was the first example I created just off the top of my head and so I would expect many other things won't work as well. Just based on odds.

Also, I am still getting an MPQDraft Error whenever I try to create the .exe. The plugin shows up, but MPQDraft crashes as soon as you try to finalize the .exe or do anything else for that matter. Maybe later I can upload my files again, but my example above pretty much has everything I can think of for a Firegraft mod, which would be the most likely candidate for this program.

Please upload
1. The MPQDraft you used. I am using v2008.8.21.1
2. The Triggers/Map
3. The MPQ if any.. I am using patch_rt.mpq for my tests btw. As I know this is a valid .mpq
4. Your plugin
5. Finally the SEMPQ.

Attached Imageclicking any button from here results in a crash.


 
Go to the top of the page +
poiuy_qwert    Canada
Nov 4 2008, 05:47 PM    Post #9
1) I've tested it on v2008.4.6.1 and v2008.8.21.1, the SEMPQ included is using the later
2) It can be tested on any map, but I included the one I used. These are the triggers I use to test both functions at the same time (included in zip):
CODE
Trigger(All Players):
    Conditions:
        Always()
    Actions:
        SetResources(All Players, Set To, 0, Ore and Gas)
        Wait(100) #This wait does not matter
        EnableDebugMode()
        SetDeaths(Player 2, Start Location, Set To, 10)
        SetDeaths(Player 3, Start Location, Set To, 31)
        SetDeaths(Player 4, Start Location, Set To, 320)
        SetDeaths(Player 5, Start Location, Set To, 320)
        SetDeaths(Player 6, Start Location, Set To, 352)
        SetDeaths(Player 7, Start Location, Set To, 352)
        SetDeaths(Player 8, Start Location, Set To, 63)
        EnableDebugMode()
        Wait(100)
        CreateUnit(All Players, 1, Terran Marine, Location 10)
        CreateUnit(All Players, 1, Terran Ghost, Location 10)
        CreateUnit(All Players, 1, Terran SCV, Anywhere)

4) I downloaded the attached plugin for my testing. I've included the one i used in the tests just in case, and the new v2 for you to try (tested and works for me also).
Attached File(s)
Attached File  LocUnlockTest.zip ( 260.52K ) Number of downloads: 91
 


 
Go to the top of the page +
bajadulce    Santa Cruz, California
Jan 7 2009, 10:18 PM    Post #10
For whatever reason, my MPQDraft still crashes every time I attempt this even with my computer reformatted and a new MPQDraft downloaded from the link on our tools page. sad.gif

However, your sample.zip includes an MPQDraft sempq, so users can simply skip the MPQDraft creation process and use your .exe to archive new triggers should their MPQDraft fail as well. smile.gif

The really good news to report is that I had no problem with the plugin in Firegraft and the sample you provided worked without a hitch. Now, your sample is limited to create unit, but it would be nice if some ppl started experimented with this as it appears some actions aren't usable such as the give unit to player action. I'm a little busy atm, but will try something soon now that I can utilize both grafted and non-grafted versions to work. Tho why would anyone choose to build a non-grafted .exe when they are strapped to a specific version? smile.gif

Come on ppl ... make shit with this already!

.... more to come.


 
Go to the top of the page +
Jan 8 2009, 03:08 PM    Post #11
I would make shit with this. In fact, it's an important part of my mod. But NO... the triggers never work.


 
Go to the top of the page +
poiuy_qwert    Canada
Jan 8 2009, 04:23 PM    Post #12
Well obviously you are doing something wrong, or the conditions/actions you used are not working in melee. If you actually provided info I might be able to help, but really your post is useless. You need to learn how to get help correctly. Did you try what I told you at SEN? You never told me the results if you even did the test. If you still want help please post/pm your test exe and steps you used to create it and I will see if you set it up correctly. You could also check out the tests posted above to see a working example. Worst comes to worst it would be simple for me to modify LocUnlock for your usage.


 
Go to the top of the page +
Jan 9 2009, 02:30 PM    Post #13
I did tell you the results of my test- it didn't work. The marine wasn't created. The trigger file is at SEN. The test exe you gave didn't work. It said MPQDraft couldn't load the plugins? So I recreated the exe and the triggers worked.

Results of my test:

1. Added triggers to .mpq.

2. Opened Firegraft.

3. Opened mod.

4. Added LocUnlock to list of MPQDraft plugins.

5. Saved.

6. Ran mod, triggers failed to work.


 
Go to the top of the page +
bajadulce    Santa Cruz, California
Jan 9 2009, 03:16 PM    Post #14
QUOTE(ForTheSwarm @ Jan 9 2009, 02:30 PM) *
The trigger file is at SEN.
SEN is a big place with thousands of posts. Post them here or at the least link to the file at SEN. How is anyone supposed to spot the trouble if there's nothing to look at?

You can also skip the .mpq creation process and just drop your trigger files directly into your FG.exe, but you knew that.

QUOTE
The test exe you gave didn't work. It said MPQDraft couldn't load the plugins?
If the test .exe was an sempq, then there's no need to load it through MPQDraft. Also, you should just drop your triggers into the sample .exe to test whether they work (provided the conditions for your triggers don't require special buttons i.e. grafting.)


 
Go to the top of the page +
Jan 9 2009, 07:38 PM    Post #15
QUOTE(bajadulce @ Jan 9 2009, 05:16 PM) *
SEN is a big place with thousands of posts. Post them here or at the least link to the file at SEN. How is anyone supposed to spot the trouble if there's nothing to look at?


poiuy_qwert, however, knows where I attached the file.

I couldn't just put it in the sempq because it required special conditions, a.k.a. my mod.

Is it possible that setting the shield % of units that don't normally have shields doesn't work?


 
Go to the top of the page +
bajadulce    Santa Cruz, California
Jan 9 2009, 08:22 PM    Post #16
Please don't waste our member's time by posting vague requests for help on this forum. This general cry for help without any pertinent details isn't helping this thread and our time is too valuable to waste trying to guess what could possibly be wrong with your mod.

I suggest you try and make a simple test to isolate the first potential problem and that is that you most likely aren't using the program correctly. To do this, I would take his sample trigger and try to add it to a new FGraft.exe. He has even included a .mpq + a map. The process would take about 2 minutes tops. If his triggers don't activate for you, then you aren't using this program correctly and there's no need to continue posting until you get his sample triggers to work for you. If they do work in your new FG.exe, then the triggers and/or type of conditions are suspect.


 
Go to the top of the page +
Jan 10 2009, 07:47 AM    Post #17
Sorry for being too vague. I will try to explain my problem as best as I can.

In the mod, many of the Terran units have shields. However, I want them to be set to 0% until a building ("Shield Generator") is built. When the building is built, the shields are set to 100%.

I am pretty sure that I am using the plugin correctly because when I tested the sample triggers included in the test zip, they worked.

Here are the two possible problems:

1. The Set Shield Percentage action does not work on units that did not previously have shields.

2. My triggers are messed up.

Can you check my triggers to see if I did something wrong?
Attached File(s)
Attached File  melee.txt ( 5.63K ) Number of downloads: 64
 


 
Go to the top of the page +
Jan 10 2009, 06:09 PM    Post #18
It seems that "Anywhere" doesnt work (at least in actions). Since the default deaths of start location is 0, wouldnt running EnableDebugMode() with no death settings create "Location 0"?

CODE
Trigger(All Players):
    Conditions:
        Command(Current Player, At Least, 2, Terran Civilian)
    Actions:
        RemoveUnitAtLocation(Current Player, 1, Terran Civilian, Anywhere)
        PreserveTrigger()


All of my other remove actions use RemoveUnit (which removes all). But this one was the only one that uses RemoveUnitAtLocation and the Anywhere location (I wanted to specify a specific amount of units to remove). And...Its the only remove that fails. Im associating it with the "Anywhere" location for now. Baja's problem with the giving units seems to me also to be caused by this "Anywhere" location.

Its supposed to remove excess commanders. When ur commander dies, you get the unit that the commander requires, so you can respawn him (Supposing you have lives left, which reminds me...My life reducer depends on this Anywhere location too). The build time was long, so ppl could queue multiple commanders.

EDIT: To fix the commander part, Ive decided to make the build time so short no one can click fast enough to make 2. Im going to try using location 0 and see if it works.

EDIT2: Location 0 fails. Could this be fixed? I think the ability to use "Anywhere" is useful. One last try: Making Location 0 cover the whole map.

EDIT3: Doesnt work. Im beginning to suspect the action isnt melee compatible. Also, I used v1

EDIT4: I cant center a location either! Its either "Anywhere" doesnt work. Or centering AND remove unit dont work. This time tested on V2. Im getting frustrated now...

Im using: SC BW 1.15.1 No-CD with FireGraft 0.93b and LocUnlock V2


 
Go to the top of the page +
bajadulce    Santa Cruz, California
Jan 10 2009, 09:54 PM    Post #19
@ Swarm, do your triggers for changing shields for players without starting shiedls work in a UMS? You might confirm that first.

@Modmaster, try some simple experiments for removing standard units like an scv when you create a marine or medic. You could be on to something with another action that won't work with the anywhere function. There could be a list of things the anywhere function can't do. We should start examining these/listing them at basic levels tho. I might get a chance to look at some more, but am a little busy atm. Eventually a list/reference of what the program is capable of and what it is not should be made.


 
Go to the top of the page +
Jan 10 2009, 10:38 PM    Post #20
Can you help me compile this? Its a modified LocUnlockV1 that puts a 16x16 centered on all command centers and a 2x2 over all flag captures. I dont have a version of VC++ that supports using the solution file you gave me.

This will provide all of the functionality I need for coding the AI triggers for my mod and AITaunt.

EDIT: Code update! Code edited to also find flags. Check implemented to only find players 1-8. Ill use gas for lives instead of these weird units that I cant even remove one at a time.

EDIT2: Solved!


 
Go to the top of the page +

2 Pages V   1 2 >
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 31st July 2010 - 09:23 PM