Staredit Network > Forums > Modding Discussion > Topic: [Stopped/Replaced] GPTP for VS2008
[Stopped/Replaced] GPTP for VS2008
May 12 2015, 3:30 pm
By: UndeadStar  

May 12 2015, 3:30 pm UndeadStar Post #1



LAST EDIT: Replacement here: http://www.staredit.net/topic/18034/

Hi,

As stated in my introduction, I started my own fork of GPTP (General Plugin Template Project) there.
How it was initially born is explained in the slightly modified readme.
Then I started the Changelog file to report on new things.

There are usually 2 branches, the master one (last commited, to get part of the changelog fixed) and the ongoing one.

The first big update added :
-colors related functions (when I wasn't going deep inside yet).
-more use of enums instead of numerical values here and there
-various little changes and fixes
-the first version of the infestation hook, allowing to control the order ran by an unit being infested.

The ongoing branch currently (when I first write this) has:
-extended infestation hook (the order ran by the queen, or any unit you allow to use infestation)
-new enums
-extended DatLoad data (because it will be necessary eventually to understand/access the inner work of the game)
-experimental buttonset hook (should work, but may lack some features)

If you try it and see bugs (that are not part of StarCraft from the start, because yeah, it happens), if you want
to make suggestions on existing things (it's better to not suggest non-existing hooks, it can go in so many
different directions that it would only make things slower to have propositions regarding that), or just to discuss
anything about it, feel free to do it here.

UndeadStar / BoomerangAide

EDIT: At the time I'm writing this, even if I keep working on new stuff, I don't know how I would publish my results
due to Github not working properly anymore for me.So as I'm putting in the title, this is somewhat stalled.

Post has been edited 2 time(s), last time on Oct 7 2020, 12:35 pm by UndeadStar.




May 13 2015, 5:51 am iCCup.xboi209 Post #2



Why are you still using VS2008? Is there something wrong with the newer versions?




May 13 2015, 11:25 am UndeadStar Post #3



Newer version: less (or not at all) compatible with Windows XP or older, offline help being dropped (might be 100% lost for latest versions), (more) quickly lose backward compatibility with previous version of Visual Studio, or compatibility with others development environments.

Besides, there should be no major incompatibilities issues for those that try to import new features from my project to their VS2010+ project (while the other way around is not the case, but if I see VS2010+ project implementing good new stuff, I will try to convert them to my project if there's an incompatibility issue)




May 13 2015, 5:07 pm A_of-s_t Post #4

aka idmontie

Glad to see any development on GPTP! Since you are using GitHub, I recommend making issues for all of the ongoing tasks that you mentioned in your post. It's very useful for when someone else is coming into the project to see what is being worked on and what is planned.

Good luck! :jaff:



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

Sep 20 2015, 7:29 am UndeadStar Post #5



Update 2 is now officially deemed complete (and because of troubles with git/github, the master branch was nuked to make it the official main branch)

Besides several little changes here and there, the main features are:
-the completed infestation hook (for both infesting and infested unit order processing)
-the buttonset hook (cover many mechanisms related to the buttonset, and allow to use a custom one created more or less manually).
-the siege transform hook (may allow to make the siege transform system more flexible to be used in more cases)
-the selection hook (2 functions allowing some changes on selection behavior)




Feb 19 2016, 3:43 pm UndeadStar Post #6



Hi,

As I was working on an experimental hook, I ran into some code that I can't seem to convert properly in C.
Eventually, I tried just making it in inline assembly, and it worked with the following code:
Code
                __asm {

                    PUSH EAX
                    PUSH EDX
                    PUSH EDI

                    MOV EDX, unk1
                    MOV EAX, return_value
                    LEA EDI, [EDX+EDX*2]
                    MOV DL, AL
                    MOV DH, DL
                    SHL EDI, 0x04
                    ADD EDI, 0x006408F8
                    MOV ECX, 0x0000000C
                    MOV EAX, EDX
                    SHL EAX, 0x10
                    MOV AX,DX
                    REPE STOSD

                    POP EDI
                    POP EDX
                    POP EAX

                }


If anybody see how to make C code from that, and it actually work when I test it, I would be grateful.

By the way, this is what would cause, during construction attempt, gas extractors not placed on geyser and protoss building placed away from pylons, to display only red below their picture (while other buildings display part green and part red depending on where it's partially buildable), though it may not be used only for drawing.

When I tried my own conversion in C, I had mixed green and red spots not making sense, so to not confuse people, I won't put that faulty code here.




Feb 19 2016, 4:35 pm O)FaRTy1billion[MM] Post #7

👻 👾 👽 💪

memset((int*)(0x006408F8 + unk1*48), return_value, 48); ?


or if you really want, the code is basically doing this:
Code
int c;
int fill = (return_value << 24) | (return_value << 16) | (return_value << 8) | return_value;
int* ptr = (int*)(0x006408F8 + (unk1*3 << 4));
for(c = 0; c < 12; c++) ptr[c] = fill; // It's actually counting down from 12 and incrementing ptr ... but close enough


Post has been edited 5 time(s), last time on Feb 19 2016, 4:45 pm by FaRTy1billion. Reason: OOP



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Feb 23 2016, 11:01 am UndeadStar Post #8



Thanks. I thought about memset, but because I miscalculated "SHL EAX, 0x10" as "multiply by 2^10" (forgot to convert the 10 into decimal), my calculations were off, and I could not realize what you called "fill" was filled with the byte value of return_value.
Thanks again.




Mar 21 2018, 8:51 pm UndeadStar Post #9



So, I made mistakes in the past, but recently, a crash was reported to me, and it was coming from the very first hook I worked on: the infestation hook.
It is now fixed in version 4.024, but it means anybody having used any former version of GPTP made by me including the infestation hook, would have the issue, so I thought it was bad enough that I would have to report it here.
Sorry about the inconvenience.




Mar 21 2018, 8:57 pm Voyager7456 Post #10

Responsible for my own happiness? I can't even be responsible for my own breakfast

Excellent, thanks for continuing to follow up on issues!



all i am is a contrary canary
but i'm crazy for you
i watched you cradling a tissue box
sneezing and sniffling, you were still a fox


Modding Resources: The Necromodicon [WIP] | Mod Night
My Projects: SCFC | ARAI | Excision [WIP] | SCFC2 [BETA] | Robots vs. Humans | Leviathan Wakes [BETA]


Mar 21 2018, 10:53 pm KYSXD Post #11



Thanks for your great work!




May 6 2018, 3:19 pm Biophysicist Post #12



What methods can and can't be edited? Would changing, say, the member functions of CUnit have a meaningful effect?

Does this version of GPTP have a way to set a player's selection (a la the Select Larvae button)?



None.

May 6 2018, 7:15 pm UndeadStar Post #13



Methods that can be edited are the ones in the files of the hooks folder, that are then used in the Wrapper functions in the *_inject.cpp files
Members functions of CUnit only imitate or directly use game methods, and don't replace them, but if a hook call them, then the modified version would be used by the hook (with the risk that some unhooked stuff use the original function and inconsistencies arise).
The "select larvae" feature isn't hooked, what is hooked (in hooks/interface/selection) would be selections through key presses and clicks (though it's not impossible that the select larvae command would call on those at some point).




May 7 2018, 6:40 pm Biophysicist Post #14



Quote
Methods that can be edited are the ones in the files of the hooks folder, that are then used in the Wrapper functions in the *_inject.cpp files
Members functions of CUnit only imitate or directly use game methods, and don't replace them, but if a hook call them, then the modified version would be used by the hook (with the risk that some unhooked stuff use the original function and inconsistencies arise).

Noted, thanks.



Quote
The "select larvae" feature isn't hooked, what is hooked (in hooks/interface/selection) would be selections through key presses and clicks (though it's not impossible that the select larvae command would call on those at some point).

I'm afraid my question may have been unclear. Let's continue this elsewhere before I derail yet another thread :/



None.

Nov 16 2018, 8:38 pm UndeadStar Post #15



So, I thought people were being pessimistic after Microsoft bought GitHub, but they were completely right.
Today, as I tried to produce a 4.106 version, I had to resort to editing the pages sources to get a submit button, several other buttons were broken, it was impossible to create folders as you create a file name anymore, drag&drop support was completely destroyed, the code editor was extremely suspicious, well anyways, I had to give up right in the middle of the update, and the project, if downloaded as is, would probably be not functional (though it should be possible to tweak a few things to make it working, or just take the previous version of a few files with 4.106 as change log).

Anyway, anybody know what I could use now as a replacement to github?
The main feature I need is to be able to create/edit code files online (creating folders too), though the ability to upload files directly would be a good addition.
And of course it should be free.

Ideas?




Nov 17 2018, 1:49 am KYSXD Post #16



Gitlab!


Edit:

By the way, aren't you using terminal to update the sources?

Edit2:

Are you using a gui to update? github desktop?

Post has been edited 1 time(s), last time on Nov 17 2018, 1:58 am by KYSXD.




Nov 17 2018, 4:40 am UndeadStar Post #17



Seems like gitlab is banning my email provider :(
As for the updates, I was doing it live on the website.I only used git (terminal) once at the very beginning, and it's not adapted for the way I need to update.




Nov 28 2018, 5:43 pm UndeadStar Post #18



Using an outside computer, an usb key and a kidnapped McGyver (poor guy is as outdated as my browser though :-_-: ), I managed to (probably) fix version 4.106.
When I have more time, I will have to research a new mean of online code hosting/editing/providing.




Nov 28 2018, 6:19 pm Voyager7456 Post #19

Responsible for my own happiness? I can't even be responsible for my own breakfast

Thanks for updating 4.106 - hope GPTP finds a new home soon. I can second GitLab as being a good replacement, if you can resolve your email issue with them.

Maybe Bitbucket? I haven't used it myself, but I've had some people recommend it as a GitHub replacement.



all i am is a contrary canary
but i'm crazy for you
i watched you cradling a tissue box
sneezing and sniffling, you were still a fox


Modding Resources: The Necromodicon [WIP] | Mod Night
My Projects: SCFC | ARAI | Excision [WIP] | SCFC2 [BETA] | Robots vs. Humans | Leviathan Wakes [BETA]


May 5 2023, 9:25 pm A_of-s_t Post #20

aka idmontie

I ended up hosting everything I could find here: https://github.com/SCMapsAndMods/general-plugin-template-project. I was able to get a new project going is Visual Studio, do some little mod tweaks like a 3rd resource, and build an executable to run. I should update the READMEs at some point with more detailed instructions.

I've also been trying to gather all the modding tutorials and information into a single Notion wiki with detailed GPTP, I just always get distracted by life.



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.
[12:30 am]
ClansAreForGays -- When you join a pub lobby because you see 7/8 players, but then realize host is bating you with computers. :flamer: :flamer:
[2024-10-30. : 11:48 pm]
O)FaRTy1billion[MM] -- :wob:
[2024-10-30. : 6:24 pm]
Ultraviolet -- :wob:
[2024-10-29. : 4:33 pm]
Vrael -- :wob:
[2024-10-29. : 1:32 pm]
Zoan -- :wob:
[2024-10-28. : 5:21 pm]
Ultraviolet -- :wob:
[2024-10-27. : 4:34 pm]
jjf28 -- :wob:
[2024-10-27. : 9:01 am]
Zycorax -- :wob:
[2024-10-27. : 3:31 am]
RIVE -- :wob:
[2024-10-26. : 7:12 pm]
Ultraviolet -- :wob:
Please log in to shout.


Members Online: lil-Inferno