Staredit Network

Staredit Network -> Concepts -> Creating locations
Report, edit, etc...Posted by TheNomad on 2006-11-26 at 08:24:11
Hey there!

I wanted my first post in this section to be really extravagant (so I hope it wasn't asked before), but is it possible to create a location ?

Something in the style of HSizexVSize and HCoordxVCoord. I assume (if it is at all possible) that these would be 3 (or 5 ?) separate actions, such as one for creating and 1 (and maybe the second) for resizing and the last for coords.

Although it might not be possible, the thought of the abilities it would give mappers did cross my mind biggrin.gif
Report, edit, etc...Posted by spinesheath on 2006-11-26 at 08:40:57
It was possible back when EUD actions were not disabled, and was done already.

But to make that clear: You can't create locations; there always are 64/255 locations, just their coordinates are/were modifiable.
Report, edit, etc...Posted by TheNomad on 2006-11-26 at 09:27:39
Yeah, well I was interested in creating as many as you have headquarters... so if you had 1 main + 3 expos, you had 3 locations... so I wouldn't go over 64 (heck, I don't think I'd go even 15, cos I wouldn't do 3 locations x 8 players...).

Ah I see, thanks.
Well, I know EUDs were disabled, but I saw some things were kept in the MemCalcs (LW's is offline btw) so I was just hoping happy.gif
Ah well... I can understand why resizing maps (heard it was possy back then) or researching was disabled, but I don't know why this wouldn't be included... it'd be a nice trigger sad.gif

Ah well, back to the drawing board...
Report, edit, etc...Posted by Heimdal on 2006-11-26 at 11:59:31
If you've got a specific problem you want to solve by creating new locations, it sounds like you might be able to get away with just one location and an iteration system. Care to explain more about what you need?
Report, edit, etc...Posted by TheNomad on 2006-11-26 at 17:35:32
To use GOTRGs (trg files in got files). The problem is they don't allow the use of locations because as you now, locations must exist first (which is why importing triggers disable the location itself and you have to reset it). So what I wanted was to create 2 "virtual" locations and use them in such trgs.
Report, edit, etc...Posted by Heimdal on 2006-11-26 at 18:13:43
As Spine said, the locations always exist, it's just a matter of them having a name and being referred to by triggers. Note that they don't actually have to have a name in order for you to use them.

I have no idea if the melee map loading process is any different than the UMS one - i.e. whether or not it will load the locations in the map. I have no reason to believe that they are different - but it is a possibility. You should test this - create a location and a trigger that creates a unit in it, and run it with the GOTRGs. If the unit gets created at that location, then you're in luck.

I don't know anything about running triggers through GOT files, but from what you described the process seems similar to importing trg files in staredit. If this is the case then you just have to re-enable that trigger and make sure the location index is still set correctly. You might have to do this through hex editing...

Let me know if you need any help with all that.
Report, edit, etc...Posted by TheNomad on 2006-11-26 at 19:09:01
Well, I'll describe them in a summary, since I don't know details either.
As you know SE or SEx (aka SCEx) allow you to save and load triggers. You will also remember that when you do NEW you ahve the 3 default triggers: 50 minerals, Defeat and Victory. As you know, they are the SAME as in a Melee game.

This was achieved by saving the 3 defaults as a trigger file, creating a GOT file, then adding the trigger in the GOT and stripping the header (thus the trg format will be changed and unloadable by the editors, but the triggers themselvesare still there but "protected" more or less).

Next, you put the got file in the mpq in the "Templates\" folder and the newly stripped (not the one saved, but the edited one by the got editor program) in the "Triggers\" folder. As you know there is a Melee.trg file there which can't be opened in SE or SCEx, but the trigers are the same, I assure you. Anyhow... I tried doing "create 1 <whatever> at Anywhere" and it did work. As you know, "Anywhere" is a location as big as the map itself, with all height bits set to 1 (or True). Therefore, as you also know, the creation process starts from (0,0) of the location (don't confuse with (0,0) of the map) and continues to the right, by "Last Coord + Last Unit.Size" as calculus iirc. Anyway, long story short, it did create a <whatever> on a normal square map and resulted in "not placeable" on hunters (due to the cliffs around the corners). I did try to center it on the start location, but the problem is that the location is too big so...

Anyway, the problem is I had a theory similar to this (I won't lie, not quite THIS one) that the locations somehow exist, but my guess is that they exist in the map itself, not in triggers and triggers only have pointers to them. So the map would contain the names (this I know for sure since they show up as strings, in any map string editing tool), the Size (HxW) and Coords (HxV). And because of this, having 64 locations, all as big as the map won't help me too much sad.gif

If I knew FOR SURE that the locations (I mean the sizes and coords) are saved in the TRGs, then I wouldn't mind hax0ring the files a bit... but my guess is that they are in the map. but if I could manage to get this going it'd be great tbh. Since they are nameless, I assume they all have the default names "Location X" where X is the index (although that is irrelevant, since renaming them on the map renames them in the TRG as well, which seems a lot like a query reply).
Report, edit, etc...Posted by Heimdal on 2006-11-26 at 19:35:41
Alright, cool. Using Anywhere as the test location is a bit suspicious, since I believe that on any failure the center of the map is used instead.

You're right that locations exist in the map, and the triggers reference them (not by pointer, but by index). The locations reference a string for a name (again, by index). The unused locations, though, should have dimensions 0x0 and be positioned at 0,0.

OH! I finally understand your problem. You want this to be a game template that you can play on ANY map, not just the ones you create these locations on. In that case...I don't think there's any way you can change the size of the locations. You CAN change their position using the CenterLocation action. I'm pretty sure that CenterLocation doesn't work when the target is the start location - try a mineral patch or something else.

Also...if you're doing this in a mod, it would be possible to mod the SC engine and add the triggers to manipulate locations the way you originally asked =P.
Report, edit, etc...Posted by scwizard on 2006-11-26 at 20:06:43
This is starting to sound pretty cool.

However I don't really understand what your talking about.

Before your most recent post I almost thought you were a n00b and had no idea what you were talking about. Then I realized I had no idea what you were talking about.

Don't bother to try and explain that stuff to me, I'll figure it out myself in a few minutes.

ADDITION:
Ohh, your trying to create a new map style for a mod. Kind of like melee but far more complex.

Well, you can create units at start locations somehow with GOT files, like how flag beacons are created at your start location for CTF.
Report, edit, etc...Posted by TheNomad on 2006-11-26 at 20:11:17
QUOTE(Heimdal @ Nov 27 2006, 03:35 AM)
You're right that locations exist in the map, and the triggers reference them (not by pointer, but by index).  The locations reference a string for a name (again, by index). 

That is what I meant smile.gif

QUOTE(Heimdal @ Nov 27 2006, 03:35 AM)
The unused locations, though, should have dimensions 0x0 and be positioned at 0,0.

Hmm... interesting...

QUOTE(Heimdal @ Nov 27 2006, 03:35 AM)
OH!  I finally understand your problem.  You want this to be a game template that you can play on ANY map, not just the ones you create these locations on.  In that case...I don't think there's any way you can change the size of the locations.  You CAN change their position using the CenterLocation action.  I'm pretty sure that CenterLocation doesn't work when the target is the start location - try a mineral patch or something else.

That is why I wanted EUDs if push came to shove (which apparently did, but Blizz hates me so they removed this tongue.gif). Well I can point the Start Location with and advanced editor. Or maybe a factory, since at the start you can only have 1... (for example), assuming I don't use Preserve Triggers.

QUOTE(Heimdal @ Nov 27 2006, 03:35 AM)
Also...if you're doing this in a mod, it would be possible to mod the SC engine and add the triggers to manipulate locations the way you originally asked =P.
[right][snapback]595290[/snapback][/right]

HAHA!! Actually I play to do some asm-ing later on to add some extra spells and extra effects. But later after I learn a bit more about the engine. This is my first mod ever and it is ambitious, but I gathered a lot of knowledge of the engine in a very short time and found quite a lot of unknowns in the dat filesfor DatEdit in a few weeks which many didn't in 8 years wink.gif

Still if what you say is true (and it is tongue.gif), I guess I could be an mean person and abuse the 0x0 locations, since if there isn't enough space, I might just be lucky enough to have the unit build next to it IF I position the location well enough to avoid direct obstructions (or use air units as pointers for moving the location if it gets too difficult).

Still, thanks Heimdal, as you confirmed a lot of things I theorized so far... I'll try to do what you suggested (which I didn't think of doing) and I might need help a bit on haxoring the files, so I hope it is OK to bug you then. IF this works out as planned, you'll have a very nice place in 2 sections: "Credits" and "Special Thanks" smile.gif
And if you are into modding, you could even help if you want to, of course...

QUOTE(scwizard @ Nov 27 2006, 04:06 AM)
Before your most recent post I almost thought you were a n00b and had no idea what you were talking about.


I get that a lot biggrin.gif

QUOTE(scwizard @ Nov 27 2006, 04:06 AM)
Ohh, your trying to create a new map style for a mod. Kind of like melee but far more complex.

Well, you can create units at start locations somehow with GOT files, like how flag beacons are created at your start location for CTF.
[right][snapback]595294[/snapback][/right]


GOOD IDEA !! There's only one problem... the TRGs are protected sad.gif
If I knew the TRG format I think I might be able to recover them... perhaps a little experimentation after this week's test.
Report, edit, etc...Posted by Heimdal on 2006-11-26 at 23:14:13
I know the TRG format...there aren't any docs on it, at least not to my knowledge. It's very similar to the TRIG section of the CHK, but with a file header and some extra bits for strings and unit properties thrown in between the triggers.

I really don't know much about modding, but I have played around quite a bit with injecting code and whatnot. I have actually successfully added triggers in the past, so if you want to go that route I could probably help you out.
Report, edit, etc...Posted by Kookster on 2006-11-26 at 23:49:52
Wow you guys got off topic lol, but really interesting. You guys should make a new topic, Ill help if possible, tho I know didly when it comes to programing.
Report, edit, etc...Posted by Heimdal on 2006-11-27 at 00:01:55
Not really...we're just attacking the same problem from a different angle =)
Report, edit, etc...Posted by TheNomad on 2006-11-27 at 01:43:38
QUOTE(Heimdal @ Nov 27 2006, 08:01 AM)
Not really...we're just attacking the same problem from a different angle =)
[right][snapback]595426[/snapback][/right]


Couldn't have said it better myself wink.gif
Report, edit, etc...Posted by scwizard on 2006-11-27 at 23:50:43
So Heim, if you know the TRG format, and it's not documented, could you document it?

Please angel.gif
Report, edit, etc...Posted by spinesheath on 2006-11-28 at 16:05:23
QUOTE(scwizard @ Nov 28 2006, 12:50 AM)
So Heim, if you know the TRG format, and it's not documented, could you document it?

Please angel.gif
[right][snapback]595973[/snapback][/right]


second that closedeyes.gif

About the "unused locations"... Locations are never "unused", they just have some default coordiantes/flags. There always are all 64/255 locations depending on the map version. Location63 (63 is the 0-based index) is "anywhere", with the size of the map as default size. But those defaults are editor-specific.
(hmm, I wonder if SC technically allows you to move "anywhere" around... Certainly not if it is at the size of the map, since locations can't be moved outside the map borders, but who says that I can't modify the values of loaction63? happy.gif )

The location names are completely irrelevant, SC itself does not care about them at all; it's an SE only thing.

What exactly do you want to do with those locations? If you want to create some units (men) there, try centering location0 (or whatever, just not "anywhere") on the CC/hatch/nex of the player and creating a unit. Dunno if SC does accept it if you create a unit on a 0x0 location.
If you want to create a building, it's gonna be tough... I have no idea how you could do that...
Report, edit, etc...Posted by Heimdal on 2006-11-28 at 16:44:57
About 'anywhere' - I'm pretty sure SC doesn't make any special distinctions for it, so it you make it smaller than the map it's certainly possible to move it.
Report, edit, etc...Posted by scwizard on 2006-11-28 at 17:05:41
QUOTE
About 'anywhere' - I'm pretty sure SC doesn't make any special distinctions for it, so it you make it smaller than the map it's certainly possible to move it.


That ruins the whole point. What we're trying to get here is a template that you don't need to prepare for. A template that would work on the maps that come with SC (where anywhere is most certainly the size of the map).
Report, edit, etc...Posted by Heimdal on 2006-11-28 at 17:33:59
QUOTE(scwizard @ Nov 28 2006, 05:05 PM)
That ruins the whole point. What we're trying to get here is a template that you don't need to prepare for. A template that would work on the maps that come with SC (where anywhere is most certainly the size of the map).
[right][snapback]596214[/snapback][/right]
I know - I was responding to one of spinesheath's comments smile.gif
Report, edit, etc...Posted by TheNomad on 2006-11-28 at 22:50:48
OK I did the thing. I did change all 04 bytes to 06 (which is the disabled, respectively enabled state if I am right ?!), but to no avail.

Would you be so kind as to attach a trg that has the 3 Melee conditions + 1 that centers Location 0 only on command center (therefore, the condition would be "Current Player commands exactly 1 CC" - no hypertriggers wink.gif ) and then to create a Marine, say to have the effect of 4 SCVs + 1 Marine, please Heimdal ?

Maybe I did something wrong oO
Anyway, the result was still the game ignoring the location. It's not that it was so small that it couldn't create, but it was still at the 0x0 coords (well... considering some placement on hutners and Marine sizes, he said coords were 8x9 which is kinda the same) instead of being even close to my start CC sad.gif

I am starting to think that EVEN IF you do it right, he might ignore locations cos it's hard-coded for SC to do that... but still, if you could help, I'd appreciate it...

ADDITION:
QUOTE(TheNomad @ Nov 27 2006, 04:11 AM)
QUOTE(scwizard @ Nov 27 2006, 04:06 AM)

Well, you can create units at start locations somehow with GOT files, like how flag beacons are created at your start location for CTF.
[right][snapback]595294[/snapback][/right]


GOOD IDEA !! There's only one problem... the TRGs are protected sad.gif
If I knew the TRG format I think I might be able to recover them... perhaps a little experimentation after this week's test.
[right][snapback]595304[/snapback][/right]


Bad news... I "unprotected" the triggers and opened them, but it seems the whole CTF units (beacons, flags etc.) is controlled either by the got, either by the EXE. Whichever case, it's not controlled by triggers sad.gif
Report, edit, etc...Posted by scwizard on 2006-11-29 at 16:46:39
Well if it's controled by the GOT then everything it fine, but if it's controled by the EXE then wallbash.gif
Report, edit, etc...Posted by DiscipleOfAdun on 2006-11-29 at 18:45:00
Yeah, the CTF stuff is exe controlled.

Heim, if you edit the location information(size mainly) to be valid to be used by triggers when a map starts, would that work the way I'm thinking it should?
Report, edit, etc...Posted by Heimdal on 2006-11-29 at 19:33:26
As far as I know, yeah. But then you're relying on code injection (but you knew that).

Oh, I think I might have misread what you said - did you mean use triggers to edit the location? Or do you mean changing the location dimensions in the CHK? Both should work, but nomad can't get away with doing the latter because he wants to do this on any melee map.
Report, edit, etc...Posted by TheNomad on 2006-12-01 at 10:35:40
Heimdal see if you can make the same triggers I tried in post 20 if you have time. And if they succeed, attach them here.

This is kinda pissing me off tongue.gif But I can understand why it is so limited.
Report, edit, etc...Posted by Heimdal on 2006-12-01 at 12:26:49
This should do the trick. However - the triggers weren't disabled when I exported them from SE! They must get disabled at import time.
Next Page (1)