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.
[03:27 am]
m.0.n.3.y -- Maybe because it's an EUD map?
[03:27 am]
m.0.n.3.y -- Can't upload maps to the DB. Error says "The action you have performed caused an Error". Any word?
[2024-4-25. : 7:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
Please log in to shout.


Members Online: Roy, jun3hong