Staredit Network > Forums > Modding Discussion > Topic: General Plugin Template
General Plugin Template
May 17 2009, 8:09 pm
By: A_of-s_t  

May 23 2009, 8:41 pm Mauron Post #21



It compiled fine, I just thought I'd give you the heads up.

What's the proper way to control the positioning of buttons in a set? I tried using this, but it gives me the odd result shown in the screenshot below.

Code
button =             buttonSet->firstButton;    
button->iconID =     374;
button->position =   2;


When the new button becomes disabled, everything returns to the proper position.

Attachments:
buttons.jpg
Hits: 6 Size: 19.33kb



None.

May 23 2009, 8:51 pm A_of-s_t Post #22

aka idmontie

All the buttons are connected, so moving the first button that was in position 2 to position pushes the rest of them.

I believe all the buttons are stored together, so you could always change buttons using this code:

Code
    button                = &buttonTable[n]; //Button 'n'


Of course, I don't think there is a way to see what the button IDs are.

Post has been edited 2 time(s), last time on May 23 2009, 9:17 pm by A_of-s_t.



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

May 23 2009, 10:34 pm Mauron Post #23



I tried playing around with that code, and didn't have any luck using it.

I tried using the button set numbers provided by FireGraft, but that didn't match anything. Then I tried using the unit IDs, which also didn't work. Finally, I tried outputting the value generated by button = buttonSet->firstButton; and comparing it to button = &buttonTable[n]; //Button 'n'. (Thanks for including that test.txt code, by the way.)

For n, I looped through OVER 9000!!! entries (0-9001), and did not find a match.

buttonSet->firstButton; when using a marine, gave me 005177E0. The closest to a match was 005177E8.

Then again, my plan of attack may have been completely off, now that I think about it.



None.

May 24 2009, 4:39 am A_of-s_t Post #24

aka idmontie

I'll work on button handling over the Memorial weekend; I want to try to finish the GUI developer though.

I added a pre-release of the GUI. Nothing is close to done, just the basic layout and how its going to work.

Post has been edited 1 time(s), last time on May 24 2009, 4:57 am by A_of-s_t.



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

May 28 2009, 2:56 pm Mauron Post #25



Is there a way to modify existing code through this? I found the area where buildings are checked for the rally point ability, and I'd like to overwrite that section.



None.

May 28 2009, 4:04 pm A_of-s_t Post #26

aka idmontie

Just include it in nextFrame.cc. And if you don't mind sending me the code when your done, I'd like to modify it for 1.15.1 :P .

Do you mean, edit memory in SC at those addresses? What I would do is check the asm with ollydbg and just copy +paste that into VC++ as a new function and dereference the pointer to the original to reference the new function.



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

May 28 2009, 4:33 pm Mauron Post #27



I already have the 1.15.1 addresses. 0x00467359 is where the list to check is called, and 0x0047B6E0 has the list itself. At least that's what CheatEngine gave me.

I'm not sure how to do the whole dereference/reference thing you mentioned.



None.

May 29 2009, 1:09 am A_of-s_t Post #28

aka idmontie

You do it pretty much the same way you dereference buttons and button sets. I'll check it out in a bit.



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

May 29 2009, 4:35 pm A_of-s_t Post #29

aka idmontie

Okay, I stayed up all last night redoing the GUI. I was originally doing it with Windows.Forms with C#, but I just realized how powerful WPF is... so, I completely overhauled and redid the program. The text editor now includes syntax highlighting :D .

I haven't updated the download yet, I'm trying to add word autocompletion and a button for compiling. I also need to finish as much as possible before May 31 since I'm entering it in for a scholarship.



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

May 29 2009, 4:56 pm Mauron Post #30



Sounds cool. Are you going to release the source for it?

Good luck with the scholarship.



None.

Jun 1 2009, 5:35 pm A_of-s_t Post #31

aka idmontie

http://broodwarai.com/GPTP/main.htm

I released the GUI. I'll upload the source to it in the next version -- I already have plans for updating, so, post any ideas you have to improve the program.

The list of things to add:
Installer
Utilizing the Registry
On start up, detect prerequisites
Add conditions to the toolbox
Add help files



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

Jun 9 2009, 12:06 am Heinermann Post #32

SDE, BWAPI owner, hacker.

A_of-s_t, please get back to me on the success or failure of your attempt to load BWAPI as an MPQDraft/Firegraft plugin.




Jun 9 2009, 4:52 am A_of-s_t Post #33

aka idmontie

I was successful in my attempt to load the BWAPI as an MPQDraft plugin. The CTRT_Thread in the BWAPI is the same as the InitializePlugin function in the MPQDraft plugin.



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

Jun 9 2009, 1:42 pm Heinermann Post #34

SDE, BWAPI owner, hacker.

Could you post the modified files? I'd like to make the latest version compatible with MPQDraft, but I can't seem to get it to display in the plugin list.




Jun 11 2009, 8:44 pm A_of-s_t Post #35

aka idmontie

I didn't completely convert the BWAPI, but I'll upload when I can.

EDIT:

GPTP is no longer supported here. Go to broodwarai.com or modcrafters.com for support.

Post has been edited 1 time(s), last time on Jun 11 2009, 9:26 pm by A_of-s_t.



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

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[04:31 pm]
Zoan -- where's the option to delete my account
[04:30 pm]
Zoan -- goodbye forever
[04:30 pm]
Zoan -- it's over, I've misclicked my top right magic box spot
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- there are some real members mixed in those latter pages, but the *vast* majority are spam accounts
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- there are almost 3k pages
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- the real members stop around page 250
[2024-4-14. : 9:20 pm]
O)FaRTy1billion[MM] -- look at the members list
[2024-4-12. : 12:52 pm]
Oh_Man -- da real donwano
da real donwano shouted: This is the first time I've seen spam bots like this on SEN. But then again, for the last 15 years I haven't been very active.
it's pretty common
[2024-4-11. : 9:53 pm]
da real donwano -- This is the first time I've seen spam bots like this on SEN. But then again, for the last 15 years I haven't been very active.
Please log in to shout.


Members Online: Wing Zero, jun3hong, Vrael