Staredit Network > Forums > Modding Assistance > Topic: plugin how to start?
plugin how to start?
Nov 4 2018, 9:33 pm
By: Lagi  

Nov 4 2018, 9:33 pm Lagi Post #1

I can not make GPTP.qdp from source (i must dont know something basic)

please advice me

i have visual studio 2010 Ultimate

from Framework
I open the GPTP source: project GPTP.vcxproj

any change i made in game hooks.cpp works (f.ex. in line 24 :
scbw::printText(PLUGIN_NAME ": Hello, world! asdasd");

but nothing else dont work: i try include also KYSXD code for

after change i save the .cpp
F5 > debug

go to framework folder
inside /debug/patch/ I find some .gdp file (that is affecting the start txt message only)

from some other tutorial, i know VS should create GPTP.dll file
the problem is in my case those 3.dll file are 1kb heavy and changing extension to .qdp and with error.

precompiled .qdp for smart rally from Framework works.


Nov 5 2018, 6:19 pm Lagi Post #2

SOLUTION (it work, but let somebody check me, if i'm missing something):
all hooks have to be "activate" in file game_hooks.cpp

f.ex. increasing starting workers:
in game_hooks.cpp below other #includes add:
#include "create_init_units.h"

in file create_init_units.cpp
there is function:
void CreateInitialMeleeUnits()
where have to be written code for more than 4 workers
(copy paste KYSXD:

in game_hooks.cpp, after "nextFrame()", add CreateInitialMeleeUnits();

//This block is executed once every game.
if (*elapsedTimeFrames == 0) {
//Write your code here


//Loop through all visible units in the game.
for (CUnit *unit = *firstVisibleUnit; unit; unit = unit-> {
//Write your code here


Nov 5 2018, 7:13 pm Lagi Post #3


if I use the starting worker hook (even with 4 default starting workers),
the default AI is idle (doing nothing),

any suggestions?


Nov 6 2018, 9:59 am Lagi Post #4


in file initialize.cpp there are injects that are commented, inactive- so they not modify SC code.


there is no need to double this code-inject in game_hooks.cpp, plus the AI start working with extra workers.
so KYSXD was right in his tutorial, only required is to change "create_init_units.cpp"


  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:20 am]
Corbo -- but damn that's a good lense lmao
[02:19 am]
Corbo -- Suicidal Insanity i refuse to spend any dime on nikkon products smh
[02:10 am]
O)FaRTy1billion[MM] -- which is why they are not encrypted on the CD
[01:34 am]
jjf28 -- font files are highly confidential
[01:33 am]
jjf28 -- memes
[01:24 am]
O)FaRTy1billion[MM] -- is there a particular reason the fonts are encrypted in the first place?
[09:36 pm]
Suicidal Insanity -- And since only files are affected that were modified with SC:R, I suspect its just a new feature
[09:32 pm]
Suicidal Insanity -- because now my lengths almost match the CD MPQs, only one byte off
[09:23 pm]
Suicidal Insanity -- But this may explain the discrepancies between farty's decoded files and mine
[09:23 pm]
Suicidal Insanity -- which just didn't exist back then
Please log in to shout.

Members Online: Kolokol, jjf28, Roy, Corbo, O)FaRTy1billion[MM]