Staredit Network > Forums > Modding Assistance > Topic: Plugin help
Plugin help
Mar 10 2009, 11:37 pm
By: Biophysicist  

Mar 10 2009, 11:37 pm Biophysicist Post #1



I need someone who knows how to make plugins to help me. I'm trying to set it up so that the following ASM code runs when a certain button is pressed. I was thinking of overwriting the Liftoff button (if that is possible and makes sense), but if there is a better way to do this, please tell me.

TZ's nooby asm crap


(Also, anyone who knows ASM: Are there any obvious errors? It's supposed to add the value in register CX to the value at offset +0xC1 if the value there is equal to 0, otherwise add the value in register CX to the value at offset +0xC2.)

Post has been edited 2 time(s), last time on Mar 11 2009, 3:39 am by James Buchanan.



None.

Mar 11 2009, 2:10 am Corbo Post #2

ALL PRAISE YOUR SUPREME LORD CORBO

Quote
mov ecx, 0068C134
Is that supposed to be a memory offset or a number?

Other than that the tutorial on campaign creations is rather useful. Basically the action variable of the button pressed is stored in CX. You'd need to compare when CX is your wanted action variable and execute your action =/



fuck you all

Mar 11 2009, 3:08 am Biophysicist Post #3



That's supposed to be the address for the currently selected unut in the unit table (or w/e), not a number... Should that be "mov ecx, [0068C134]"?

Anyway, what I really need help with is making a button excecute this code. If someone could explain how to do this, I'd really appreciate it... Keep in mind that TZ sux and doesn't understand smart people words, though. (The tutorial on Campaign Creations doesn't explain how to do this.)



None.

Mar 11 2009, 3:17 am Corbo Post #4

ALL PRAISE YOUR SUPREME LORD CORBO

yes it does.
and yes put it in []s


Let me quote it, give me a sec.

Quote
One Last Tid-Bit

For now, this is going to be it. There's a lot more, but its too unorganized to show to the public as of yet. :) The final note that I'll leave you with is this: when you call a stargraft action, recall that you can give SG an Act Var (action variable). When Starcraft calls your button code, this Act Var is actually on the CX register when your code starts. So you can use that variable to create some versatile actions. For example, this example will add X to a units' Hitpoints, where X is the Act Var that was input in that particular button:

PUSH EBX
MOV EBX,[68d310h]
ADD [EBX+09h],CX
POP EBX
RET

Since CX holds the value that was in the Act Var, we added that value to the current hitpoints. Simple.

The memory offset if for 1.07 so don't try to be clever and use it.

Post has been edited 1 time(s), last time on Mar 11 2009, 3:26 am by Corbo.



fuck you all

Mar 11 2009, 3:25 am Biophysicist Post #5



But... My problem is that I don't know how to make SC use my code when the button is pressed...



None.

Mar 11 2009, 3:31 am Corbo Post #6

ALL PRAISE YOUR SUPREME LORD CORBO

Make another word like AX a value of youractvar of the button then PUSH CX then compare them and if CX is the same as AX (where you inserted your act var for the pressed button) jump to your code. As simple as that. You should REALLY read the tutorial.
Don't lie. You haven't read it. If you had you'd know that there's a part on how to even run the code insert it in stargraft and even what compiler to use.



fuck you all

Mar 11 2009, 3:37 am Biophysicist Post #7



I have too read it. The problem is I can't get StarGraft to work, nor do I want to use it if I can avoid it.

(If you want proof that I have read it, at one point, he says "parasite status - I'll get back to you on this one" or something like that.)



None.

Mar 11 2009, 3:41 am Corbo Post #8

ALL PRAISE YOUR SUPREME LORD CORBO

You can always just make a stupid .dll in c++ that it's actually nothing but a line that goes like
ASM_ and then your asm code follows.

You'd have to check on this one cause I barely remember what was the actually function. Besides, you're better of believing someone that has actually made a plugin before *cough*iseeuherepoiuy*cough*



fuck you all

Mar 11 2009, 5:29 am Fyrinite Post #9



That will be a non-multiplayer action if you do that. Because that currently selected unit is only on the computer the button is pushed on, and only that computer knows the button is pushed.



None.

Mar 11 2009, 9:26 am Heinermann Post #10

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

Quote
I was thinking of overwriting the Liftoff button (if that is possible and makes sense), but if there is a better way to do this, please tell me.
You can add a new button. They're pointers to functions anyway.

Post has been edited 1 time(s), last time on Mar 11 2009, 9:31 am by Heinermann.




Mar 11 2009, 6:43 pm Biophysicist Post #11



@DoA: I know, but that doesn't actually matter... (Don't ask why, it would take a long time to explain.)

@above: More details on how to do that, please?

Oh, I might have a workaround that doesn't need button stuff, but I'd probably need to modify a trigger action to make it work. Is that easier than modifying a button?

EDIT: Actually, come to think of it, I'd probably need to do that either way...

Post has been edited 1 time(s), last time on Mar 11 2009, 6:59 pm by James Buchanan.



None.

Mar 11 2009, 7:39 pm poiuy_qwert Post #12

PyMS and ProTRG developer

Have fun: LocUnlock v2 Source




Mar 15 2009, 5:40 pm Doodle77 Post #13



Quote from name:DiscipleOfAdun
That will be a non-multiplayer action if you do that. Because that currently selected unit is only on the computer the button is pushed on, and only that computer knows the button is pushed.
Unit selections are shared between players (for example, play team melee, or devilesk's Egg Ball).



None.

Mar 15 2009, 6:26 pm Biophysicist Post #14



Yay! That is good news. So how would you tell what player x has selected? How could you find the address?



None.

Mar 15 2009, 8:22 pm poiuy_qwert Post #15

PyMS and ProTRG developer

The selection groups are shared, but the button being pressed isn't shared. You would have to make the button action send a packet or something to all the other players.




Mar 15 2009, 8:33 pm Biophysicist Post #16



Actually, I'll just make each spell have a unique gas cost to equip. :)



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:29 am]
DarkenedFantasies -- Probably just didn't care. For example, at some point before release, they've updated the graphics of some of the Protoss buildings (Forge, CyberCore, Citadel, Observatory, Arbiter Tribunal), but instead of properly re-rendering them with edited 3D models, they did crappy copy-paste jobs on the rendered graphics.
[08:35 pm]
Ultraviolet -- :wob:
[2026-6-21. : 11:38 pm]
Symmetry -- :wob:
[2026-6-21. : 4:56 am]
Ultraviolet -- I suppose we'll likely never know, but my guess would be that they already saw it operating successfully and there was no monetary incentive to finish the original work. And the dev cycle in old school Blizzard was so hectic, it's possible it just got forgotten about after the original game got released. Plus there's an element of existing MPQ files that were packaged with the original discs becoming outdated if they updated it. And it's not like they remade the original MPQs, they just made new ones for BW specifically
[2026-6-21. : 4:26 am]
Oh_Man -- so that makes me think maybe the theory they are unfinished is not true and its a deliberate design decision, coz why not finish them wen ur making brood war?
[2026-6-21. : 4:25 am]
Oh_Man -- the thing is thos buildings are from classic. that means they went ahead and made brood war without ever finishing the 'unfinished' buildings
[2026-6-20. : 6:15 pm]
Ultraviolet -- Yeah he's talked about a lot of that stuff in his casts before. It seems plausible. Especially knowing how Blizzard of yesteryear operated.
[2026-6-20. : 3:47 pm]
NudeRaider -- to clarify: couldn't recall the behavior for every single Protoss building but I was aware the disparity exists.
[2026-6-20. : 3:43 pm]
NudeRaider -- Contained nothing new for me. Didn't know all building's behavior, but very much all unit's. Also Terran balance whine - also nothing new :lol:
[2026-6-19. : 9:57 am]
Oh_Man -- makes me wonder if SEN knows anything about the topic
Please log in to shout.


Members Online: jun3hong, Roy