The end of the year (since the last update) was getting close, and I didn't want to remember it as only posting
in the shoutbox (I may have done more, but details details details...)
So I finally managed to push forward enough to get an update:
Version 5.950:
- added ordersIDCases to orders_root
- hooks\right_click_returnedOrders added, and functions moved in from hooks\recv_commands\CMDRECV_RightClick
- Added PortraitId enum and use it in hooks\interface\status_display\unit_portrait
- added displayUpdatePortrait hack in hooks\interface\status_display\unit_portrait_inject
- unlocked DamageOverlay in images_dat now that use is confirmed
- added killTargetUnitCheck in hooks\weapons\weapon_damage
- hooks\weapons\weapon_impact added
- hooks\weapons\wpnsplash added
- Fixed mistake in helper function FindBestUnit where it appear
- changed some comments to reflect new knowledge
- minor fixes and changes
The orders root hooking is now finally complete (should have done a minor update for that thing).
The "returned orders" were taking too much space compared to the focus of CMDRECV_RightClick, so I moved them separately.
PortraitId was to support the portrait hack that come next.
I really don't link the displayUpdatePortrait hack, I don't want to write a whole book explaining what it is, how it work,
how to use it, and yet, I definitely must provide as much insight as possible to users, but that's more the competence
of a teacher than a programmer, so I didn't really know what to write around as comments for that.
I hope the way I did it won't cause more harm than help.
DamageOverlay unlock, as usual, I unlock things I had listed and left commented, after confirming they weren't beta version
things and the context confirm the name I should use.
The killTargetUnitCheck is useful, because without it, it looked like units should take damage while the invincibility cheat
was used. Now things are made clear, damage was reduced to 0 (again) within that function.
The weapon impact function is the source of all stuff from wpnspellhit hook.
It show where applying mind control as an explosion type cause a crash, how mutalisks bounce work (and crash if increased
the wrong way lol), where the impact logic of the parasite is applied, and other things.
The weapon splash hooks will finally provide the way to control the splash damage part of weapons damage.
The "comment about new knowledge" is mainly about the very old bunker_hooks.cpp and its unitCanAttackInsideBunkerHook
function (they were here before my GPTP 2008
), revealed as really being an order executed by units (including
the AI one) within a bunker, as seen in function ordersIDCases.
That's it.
I'm not really sure in which direction I will go from now on, I'm still frustrated to have hit a wall with
Save/Load related stuff, even though it would be vital to allow to create any amount of new unit types without
replacing any with GPTP tricks, something I wish would become achievable eventually (if it's multiplayer, it's
probably already possible to do a lot).
edit:
Seriously, I did kill stuff during my test, so why the die order summoning by the latest root of orders
functions wait until I played the campaign to start crashing the game.
Fixed that in a hurry in 5.950b, along the hold position not allowing units to attack, and the wrong
max timer being displayed for hallucinations/broodlings.
Post has been edited 1 time(s), last time on Sep 9 2021, 10:00 pm by UndeadStar.