Staredit Network > Forums > Modding Assistance > Topic: Strafing and Decel Distance
Strafing and Decel Distance
Apr 12 2009, 4:56 pm
By: IskatuMesk  

Apr 12 2009, 4:56 pm IskatuMesk Post #1

Lord of the Locker Room

I'm trying to create a bomber that strafes its target. As interceptor AI is well-knowingly hardcoded, I attempted to improvise.

With a slow acceleration (which also handle deceleration), and a high top speed, with a slow turning radius, my bomber works wonderfully if it reaches its target at an already high speed. It will continue to shoot the target as it passes by because of a 360-degree firing arc.

The big problem is that the bomber begins to decelerate from a massive distance away. I haven't attempted something like this before, but I presumed setting a low (tried 1 and 0) values for the Decel distance in flingy.dat would make it only decel when it hit weapon range.

Wrong. It decels by about double to triple weapon distance and this decel is significant enough that it stops by the time it reaches it.

So I tried the 50k decel distance my weapons use.

Exact same distance, or close to it, anyway.

Tried giving it weapon movement - stops instantly instead of slowly, at weapon range.

I presume that this is simply not doable?

I would love to make it so that it's physically impossible for the bomber to stop.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Apr 12 2009, 5:41 pm Sand Wraith Post #2

she/her

Have you tried editing the iscript to use a very high flingy speed? "setflspeed" is the opcode, I think (IceCCv1.3). Or something along the lines of that.

You can use setflspeed to substitute [something] in the flingy.dat file, whereas the substituted [something] can be used to help further the effect of strafing.
I can't think at the moment, so [something] could by any one of the flingy.dat fields. You'll have to do a bit of reasoning and experimenting.




Apr 12 2009, 5:55 pm Biophysicist Post #3



Quote
I would love to make it so that it's physically impossible for the bomber to stop.
I assume you mean for it to stop quickly... If it can't ever stop it would hit the edge of the map, not to mention be very annoying.

Anyway. The only way I could see doing this is with a plugin. I could probably write it for you but it would take a while (I'm going to Florida for a week soon). Or you could ask poiuy.

Oh: This for AO? Or something else? :O



None.

Apr 12 2009, 6:38 pm IskatuMesk Post #4

Lord of the Locker Room

Setflspeed just changes the top speed and doesn't change acceleration or deceleration. It already has a very high top speed.

This is for AO.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Apr 12 2009, 6:48 pm Sand Wraith Post #5

she/her

Quote from name:TassadarZeratul
Anyway. The only way I could see doing this is with a plugin. I could probably write it for you but it would take a while (I'm going to Florida for a week soon). Or you could ask poiuy.

I think you're going overboard on the plug-ins, :P

However, it might not be too hard to do a plug-in for this anyway. Maybe use the interceptors as an example?

It might be hard finding the offsets though. Hmmm...




Apr 12 2009, 6:59 pm IskatuMesk Post #6

Lord of the Locker Room

According DoA you can't screw with interceptor AI without breaking the interceptors themselves which is obviously not acceptable.

I don't know what you are planning to do with a plugin, though.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Apr 12 2009, 7:36 pm Biophysicist Post #7



It's complicated... But I'm not going to even touch anything related to the Interceptors, so it wouldn't mess them up.

What exactly should the bombers do? Just keep flying and never stop? Or what? (I'll need exact details or it might not work the way you wanted it to.)

@Hydro: Well now that I know how to do them they're really easy.



None.

Apr 12 2009, 7:49 pm Sand Wraith Post #8

she/her

Get to work on that tutorial about plug-ins, TZ. Few people know how to do the plug-ins, and for some reason, no one else is willing to make a tutorial.

If you don't make that article/tutorial TZ, I'll hope you die in the most extreme, violent, and painful manner possible.




Apr 12 2009, 9:43 pm A_of-s_t Post #9

aka idmontie

The reason no one makes a tutorial about making plugins is because all you need to do is learn C++. That's pretty much it. No tutorial needed.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Apr 13 2009, 4:42 am poiuy_qwert Post #10

PyMS and ProTRG developer

Quote from A_of-s_t
The reason no one makes a tutorial about making plugins is because all you need to do is learn C++. That's pretty much it. No tutorial needed.
This. The only "tutorial" that you might need other then learning C++ would be an example, which is already provided (LocUnlock).




Apr 13 2009, 4:53 am IskatuMesk Post #11

Lord of the Locker Room

I can't learn C++. Problem solved.

The way the bomber works is a clever play on Hold Position micro.

This works best with vultures, corsairs, mutalisks ect. Anyone who's watched progaming knows what I'm talking about. Control+H and then attack or Amove. Allows the unit to fire while moving.

The play on this is to give the unit a really, really slow acceleration (that also determines deceleration). The weapon has a 360 degree firing arc in weapons.dat. Then it has a super slow turning radius. So, when the unit reaches its target at high speed, it actually enters attack phase and begins to attack. But it's so slow to stop that it flies overhead, while attacking. Then it turns around a distance away, rinse and repeat. You have a strafing bomber.

Except it doesn't work and I don't know how you're going to make it work.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Apr 13 2009, 7:45 pm Biophysicist Post #12



Quote
Except it doesn't work and I don't know how you're going to make it work.
What I was going to do is trick the bomber into thinking it's target is farther away than it is. Would that work?

@Mango, poiuy: But how are you supposed to do anything with C++? You can't refer to things by address in C++, can you? (Wait... Can you? :O )



None.

Apr 13 2009, 7:47 pm IskatuMesk Post #13

Lord of the Locker Room

I dunno. I can't make plugins, I don't know anything about ASM hacking in the least so I have no idea what would work or what wouldn't.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Apr 13 2009, 7:49 pm Biophysicist Post #14



Nononono. I meant "Would that create the effect you wanted?"

As in, you want bombers to keep flying even after they attack, right? That's what the plugin would do.



None.

Apr 13 2009, 7:51 pm IskatuMesk Post #15

Lord of the Locker Room

Yeah. Just that specific unit.

It's the duke siege turret. It uses the spire flingy.

Although honestly with the way the XB-42 is right now, it might be unnecessary to bother screwing around with it anymore.

/edit

Okay, nevermind. Produce tangible results and let's work from there. The flail thing doesn't really work very well, anyway...

Post has been edited 2 time(s), last time on Apr 13 2009, 9:59 pm by IskatuMesk.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Apr 14 2009, 3:55 am A_of-s_t Post #16

aka idmontie

Quote from name:TassadarZeratul
@Mango, poiuy: But how are you supposed to do anything with C++? You can't refer to things by address in C++, can you? (Wait... Can you? :O )
...

Look up dereferencing.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Apr 14 2009, 5:06 am ShadowFlare Post #17



In most languages, you can't directly reference things from an arbitrary memory address without the help of external code, as far as I know. In C/C++ it is extremely simple (as far as for memory in the same process) -- just use a type cast to change the number to a pointer type and you can directly access the data at that location through the pointer variable. For example:

Code
long *data = (long *) 0x00428404;
*data = 100;


That could change a value with a length of 4 bytes at an address of 0x00428404 to a value of 100.

Or if you know the address of a function and how to call it, you could do something like:

Code
bool (WINAPI * SomeFunction)(long param1, char *param2);
*(FARPROC *) &SomeFunction = (FARPROC) 0x00415320;
SomeFunction(34, "qweiopwqjaraew");


I do some of each of those in SCMLoader, though with real values and parameters, unlike the examples here. Of course if using things like this, it is a good idea to make sure your program is using it on the right version of the code, because otherwise it could make the program crash.

Post has been edited 1 time(s), last time on Apr 14 2009, 5:12 am by ShadowFlare.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:56 am]
Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[2024-4-19. : 1:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[2024-4-18. : 10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: 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
hey cut it out I'm getting all the minerals
[2024-4-18. : 10:11 pm]
Ultraviolet -- :P
[2024-4-18. : 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
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
Please log in to shout.


Members Online: MetalGear