Works like a charm! I'll let you know if there are any other issues, but it all looks good so far.
To clarify, the energy regen upgrade is linked to burst lasers, correct?
Responsible for my own happiness? I can't even be responsible for my own breakfast
Looks like everything's in order,
except....
Weapon ID 117 receives an upgrade from upgrade ID 55 that boosts its damage by 25 each increment. The goal was to have the Consume ability heal for the total value, but it seems it's only reading the base value, even if the player's researched the upgrade. I've even put the weapon on a throwaway unit as a test and it is successfully upgraded, but Consume still heals for 25 every time.
Any way that can be fixed?
Responsible for my own happiness? I can't even be responsible for my own breakfast
Ah, didn't realize the damage could be upgraded. Try this. It should now heal (base damage + damage bonus * upgrade level) health.
Post has been edited 1 time(s), last time on May 15 2017, 12:15 pm by Voyager7456.
Yep, working as intended now. Thanks!
Alright, absolutely final request - I'd like to increase the energy regen upgrade's effectiveness.
Currently it's:
No upgrade: Standard
1 upgrade: 1.5x
2 upgrades: 2x
I want it to be:
No upgrade: Standard
1 upgrade: 2x
2 upgrades: 3x
Once this is done, the mod will be complete. Thanks to everyone who's helped!
Responsible for my own happiness? I can't even be responsible for my own breakfast
You're the best. Thanks again!
Wow, that was super simple once I actually had the time to sit down and investigate. The comparison checking if the unit is at max energy is wrong (on the GPTP repository as well). Corrected version posted below.
I never actually noticed this before, the last couple projects I've been working on have overrode Consume for other things.
BTW, could you add that problem to the Github repository as a new Issue thread?
Responsible for my own happiness? I can't even be responsible for my own breakfast
Done.
Attached is the plugin with logging disabled.
Attachments:
Thanks Voy!
The old windowed mode plugin overwrites all non-Firegraft changes when added to the exe. Is there a new one that
only puts the game in windowed mode, and
nothing else?
The windowed mode plugin issue still isn't resolved. Anyone have any info on that?
I've run into a (comparatively minor) issue with maelstrom. I've enabled the tech to affect buildings. However, when used on bunkers, the units inside are unaffected and fire as normal. I could make up some excuse about how the bunkers protect the units inside from the effect (similar to plague and etc), except that if the bunkers are destroyed while disabled by maelstrom, the units inside vanish. Not sure why this happens. Is there any way to make bunkers immune to maelstrom? I imagine that's the easiest way to approach this issue.
Thanks Voy!
The old windowed mode plugin overwrites all non-Firegraft changes when added to the exe. Is there a new one that only puts the game in windowed mode, and nothing else?
If the w-mode was the one that I have in my repo, maybe Voyager could add those lines to the project he's compiling for your other plugins.
The code is
void runWMode()
{
//KYSXD W-Mode start
/// PLUGIN_NAME is defined in definitions.h
int msgboxID = MessageBox(NULL, "Do you want to play in W-Mode?", PLUGIN_NAME , MB_YESNOCANCEL);
switch (msgboxID) {
case IDYES:
HINSTANCE hDll;
hDll =LoadLibrary("./WMODE.dll");
hDll =LoadLibrary("./WMODE_FIX.dll");
break;
case IDCANCEL:
exit(0);
} //KYSXD W-Mode end
return;
}
/// Add the WMode function in plugin initialization:
BOOL WINAPI Plugin::InitializePlugin(IMPQDraftServer *lpMPQDraftServer) {
runWMode();
//StarCraft.exe version check
char exePath[300];
Just remember you must have WMODE.dll and WMODE_FIX.dll in your .exe's folder
About the maelstorm problem: Maelstorm causes the unit to be unable to perform any order. UnloadBunker(well... the Unload order that runs when the bunker is killed) is an order so... maybe that's the problem (PS: Is "Die" an order not affected by maelstorm?).
One solution could be to edit the lines where you check for the Building flag (The ones you edited to make building vulnerable to maelstorm) and add " && unit->id != UnitID::TerranBunker" in order to make the bunker immune.
Responsible for my own happiness? I can't even be responsible for my own breakfast
I assume the Die order is not inhibited by Maelstrom. I'll have to test when I have time.
KYSXD - I didn't edit maelstrom in a plugin, I just ticked this option in firegraft:
Where can I get WMODE.dll and WMODE_FIX.dll?
KYSXD - I didn't edit maelstrom in a plugin, I just ticked this option in firegraft:
Where can I get WMODE.dll and WMODE_FIX.dll?
You can download it
hereAbout maelstrom, maybe I could write something to patch those address. Let me check.
BTW, why aren't you using firegraft v0.94?
The only w-mode downloads there are .bwl files. I don't see any .dlls.
There's a new version of firegraft? I had no idea. I'll try and find a link.
edit: no luck, 0.93 is all I could find on Stormcoast Fortress and the DLDB. Google turned up nothing.
Thanks for all your help!
Post has been edited 1 time(s), last time on May 27 2017, 12:27 am by Pr0nogo.
Thanks, I appreciate it. If Voyager is able to compile the code you posted earlier, I'll test out the windowed mode stuff to make sure it works.
If you are able, could you write code that makes bunkers immune to maelstrom?
Responsible for my own happiness? I can't even be responsible for my own breakfast
Despite saying "yes" when asked if I want to run in W-Mode, the game still launches fullscreen for me. I tested with a couple other mods that use it and got the same results. Is there something I'm missing about the plugin?
The rest of the plugin is completed.