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 http://www.staredit.net/topic/17547/
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
https://github.com/KYSXD/GPTP-For-VS2008/wiki/%5BPlugin%5D-Smart-rally
https://github.com/KYSXD/GPTP-For-VS2008/wiki/%5BPlugin%5D-Increase-initial-amount-of-workers

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.



None.

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:https://github.com/KYSXD/GPTP-For-VS2008/wiki/%5BPlugin%5D-Increase-initial-amount-of-workers)


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

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

CreateInitialMeleeUnits();
}

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




None.

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



PROBLEM:

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

any suggestions?



None.

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



SOLUTION:

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

un-comment
Quote
hooks::injectHallucinationSpellHook();
hooks::injectFeedbackSpellHook();
hooks::injectBtnsCondHook();
hooks::injectRecvCmdHook();*/
hooks::injectCreateInitUnitsHooks();
/*hooks::injectGiveUnitHook();
hooks::injectTrainCmdRecvHooks();
hooks::injectCMDRECV_SiegeTankHooks();
hooks::injectCMDRECV_MergeArchonHooks();

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"



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:19 pm]
Moose -- eternal beta version is a vintage mapping and software meme
[2023-9-29. : 12:51 am]
Ultraviolet -- RIVE
RIVE shouted: Beta 4 lyfe, ya kno
feels like a lower commitment. like if someone bitches about something, I can say it's in beta phase whatchu expect? :P
[2023-9-28. : 6:46 am]
RIVE -- Beta 4 lyfe, ya kno
[2023-9-28. : 5:26 am]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider I suppose that's one justification for pushing it to 1.00. I'm still messing with some novel concepts, I completely revamped the Shadowcraft hero in v0.18 and there's some kinks to work out with some of the other changes I made, but I suppose that doesn't mean I can't call the currently version 1.XX
indeed
[2023-9-28. : 1:13 am]
Ultraviolet -- NudeRaider
NudeRaider shouted: Ultraviolet prediction: It will. ;)
:massimo:
[2023-9-28. : 1:13 am]
Ultraviolet -- NudeRaider
NudeRaider shouted: Ultraviolet Oh, then your versioning is maybe a bit misleading. I didn't have much trust in a v0.2
I suppose that's one justification for pushing it to 1.00. I'm still messing with some novel concepts, I completely revamped the Shadowcraft hero in v0.18 and there's some kinks to work out with some of the other changes I made, but I suppose that doesn't mean I can't call the currently version 1.XX
[2023-9-28. : 1:12 am]
Ultraviolet -- NudeRaider
NudeRaider shouted: Ultraviolet :lol: did you really just commit another shout just to add a bracket? :D
Damn straight! :P
[2023-9-27. : 7:22 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: Imp UV3 is actually in the works with some major changes, but it's been slow going. I'd like to have a version of Imp UV for every tileset at one point.. hopefully it doesn't take until 2030 :P
prediction: It will. ;)
[2023-9-27. : 7:21 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider Oh definitely fully playable. I used the first map as the shell, so it was basically complete from the first release. I've made some tweaks and improvements here and there based on nuances between the maps, like UV2 has more air units so certain ground-focused heroes like Psycho and Shadowcraft have needed some buffing. Other improvements have been little bug fixes or ways of stopping cheese strategies (like the bosses now spawn in a random location instead of at their lair so players can't just camp them with nukes. UV2 is definitely harder despite only being 4 levels + boss fight instead of 5. I'd say it's definitely worth a go, there's some unique mechanics that make each of the levels have kind of their own interesting spin
Oh, then your versioning is maybe a bit misleading. I didn't have much trust in a v0.2
[2023-9-27. : 7:21 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: nukes).* lol
:lol: did you really just commit another shout just to add a bracket? :D
Please log in to shout.


Members Online: RIVE, Roy, Dem0n, Ultraviolet