EDIT: I have updated my requests. The project will be finished within the next few weeks and I am in need of the following:
CONSUME:
-Must heal hit points for a value pulled from an unused weapon (e.g. Weapon ID 117)
-Otherwise, must behave as normal
INFESTED DURAN:
-Must regenerate energy faster after an unused upgrade has been researched (e.g. Upgrade ID 18)
-The upgrade will have 2 levels to it
-The energy regen values should be as follows:
No upgrade - standard regen speed
1 upgrade - 1.5x regen speed
2 upgrades - 2x regen speed
Please let me know if you are able to help. Thanks!
Old OP

For my current campaign project, I am in need of two firegraft plugins, both of which I hope will be incredibly simple.
The first plugin is very general, and I would like it to be compatible with other plugins, as it will ideally be used in all of my projects. It's to enable windowed mode. This is so people who prefer windowed mode can comfortably play the campaign. I am tangentially aware of an existing plugin for this (I believe it was adapted from the windowed mode used in ChaosLauncher), but I am not sure if this plugin is compatible with other plugins, nor do I have access to it.
The second plugin is probably even simpler, but also must be compatible with other plugins, especially the windowed mode one. All it would do is make Consume (the defiler/Duran ability) restore HP along with energy. I would ideally like the amount of HP restored to be customizable on my end, without having to delve into the plugin's code, as this would make balancing much easier. If it must be a fixed value with customization off the table, I would like it to be 25 HP.
Thanks in advance for everyone's help!
Post has been edited 1 time(s), last time on May 9 2017, 6:54 am by Pr0nogo.

Responsible for my own happiness? I can't even be responsible for my own breakfast
Shouldn't be difficult. If I remember correctly, KYSXD has the source for a windowed mode plugin available on GitHub:
https://github.com/KYSXD/GPTP-For-VS2008The Consume change is very easy. Do you have an unused weapon ID? I think the easiest way to allow you to tweak it outside of the plugin would be to read the damage value from an entry in weapons.dat or something.
I'll check out the wmode plugin, thanks.
I have plenty of unused weapon IDs, such as 117 through 129. Would it just read the damage value and convert it to a healing value?

Responsible for my own happiness? I can't even be responsible for my own breakfast
I'll check out the wmode plugin, thanks.
I have plenty of unused weapon IDs, such as 117 through 129. Would it just read the damage value and convert it to a healing value?
Yeah, something like this should work, I think:
if(!(target->status & UnitStatus::IsHallucination)) {
u16 energyMax = attacker->getMaxEnergy();
if((energyMax - attacker->energy) > 12800) //12800 is 50 energy ingame
attacker->energy = energyMax;
else
attacker->energy += 12800;
int healthRestored = weapons_dat::DamageAmount[WeaponId::GaussRifle13_Unused] * 256;
if(units_dat::MaxHitPoints[attacker->id] - attacker->hitPoints < healthRestored) {
attacker->hitPoints = units_dat::MaxHitPoints[attacker->id];
}
else {
attacker->hitPoints += healthRestored;
}
}
if you're still working with Neiv's reverse-engineering project I would recommend that checking if they have worked on Consume.
Failing that, use sigorder instead and check the unit's order signal for the same value.
I know nothing about coding or compiling prewritten code into a working plugin that functions without harming other plugins. I am working with smart rally and auto-repair on idle plugins written as part of a Quality of Life mod from a few years back (don't remember the author's name). Is there a guide somewhere that would walk me through the compilation process so I can test Voyager's prewritten code?
For the windowed mode, this is by no means a solution, but if you're not able to get a plugin to work, there is a way for you to get windowed mode working regardless:
- Rename the mod's executable to Path_Rt.mpq
- Put it in the Starcraft directory (back up the original one)
- Load the game from MCA launcher/Chaos launcher/etc
It's inconvenient, but it is a way to play mods in windowed mode.
Does this method work even for firegraft executables with plugins, or does it only function with SEMPQs created using MPQDraft?

ALL PRAISE YOUR SUPREME LORD CORBO
Here you go.
Use WeaponID 117.
Windowed mode:
http://www.staredit.net/topic/16685/
Attachments:
Post has been edited 1 time(s), last time on Apr 18 2017, 5:04 am by Corbo.
fuck you all
Thanks! I hope it's bug free.
Does it read the healing value from the damage value of 117?
Edit: It displays text upon starting a map. Any way to remove this from my side?
Post has been edited 2 time(s), last time on Apr 18 2017, 5:21 am by Pr0nogo.

Responsible for my own happiness? I can't even be responsible for my own breakfast
No, Corbo will have to do it.

ALL PRAISE YOUR SUPREME LORD CORBO
Thanks! I hope it's bug free.
Does it read the healing value from the damage value of 117?
Edit: It displays text upon starting a map. Any way to remove this from my side?
Absolutely. It has many free bugs included.
Also, yes. It should. I tested it only to the point that it now healed 6. Which is the damage. I did not actually make a dat to test it.
Also, gptp does that. I can remove it. Will send.
EDIT: This should do it.
Attachments:
Post has been edited 1 time(s), last time on Apr 18 2017, 3:34 pm by Corbo.
fuck you all
Works as intended. Thanks very much!
Unless I have problems with windowed mode further down the line, I should be all set now.
Since implementing the plugin, a marine attacking will crash the game. This does not occur without the plugin.

ALL PRAISE YOUR SUPREME LORD CORBO
Not at all. I need this crash fixed.

ALL PRAISE YOUR SUPREME LORD CORBO
Well, we can't always have everything we want now, can we?
There's no reason for the crash. Unless I had something else written that I do not remember that interefered with the plug in so I redownloaded and recompiled the plug in again. This is a fresh unmodified install and there is no reason for the plug in to crash when a marine attacks. If it continues it's on your side, really, something in your mod must be crashing when the plug in is on.
I've also thrown in KYSXD's code for the rally egg/cocoon thing and compiled it in this plug in. So have a go at that.
Attachments:
fuck you all
Corbo, I hope you are only including in the qdp the hooks you're using, not the entire project (AKA disable all the hooks you don't need in the initialize file).

ALL PRAISE YOUR SUPREME LORD CORBO
I... am not
fuck you all
As the updated file is still not working, I've left you a message on discord. Thanks for your help.