WhiteSnoop wrote: ↑Mon Dec 18, 2017 9:23 am
doeegberts wrote: ↑Mon Dec 04, 2017 8:01 am
Would the finished version of your maphack script preserve the triggers of units that join you based on proximity? For example, the mark 1 mammoth tanks that join you on the final GDI mission, if you find the old GDI base. Most maphacks I've seen annihilate those specific types of triggers, and you never gain control over the units. Would be nice to have one that doesn't.
It's also an issue in RA2 btw, maphacks in missions break the triggers for grey units that are supposed to join you when you get close to them.
My script doesn't really unshroud the map, it only makes the shrouded parts invisible.
So I don't think it will fire triggers that rely on 'unshrouded/discovered'.
The little downside with the script is that you can't order aircraft or subterranean units to go to the unshrouded parts (which are visible by the script).
I opted to do it this way just because of the aforementioned arguments that you came with. I do not want to break anything during a mission. It must coincide with the original game!
Hey there, been awhile!
I've tried my hand maybe finishing your maphack. Turned into a real conundrum! There are several issues for one, some obvious, some less so.
The inital problem was that a bunch of the map remained shrouded. By chance, I managed to stumble into an opcode that calls an address that other addresses in charge of the shroud access. (It's the opcode below the one where you injected your code. Lucky!)
This way, I first found 5 addresses that accessed the same address. Then, looking at the opcodes, I realised they all had a similar pattern, where there would be a mov xx,[xxx] above these addresses, similar to the original address where you injected. So, I figured, these need to have the transparent color injected within them as well. So I made a bunch of records that changed them the same way as your initial record. And it worked! But, other issues became appearant after it did.
It made me realise that separate addresses are responsible for the shroud color of separate elements on the map. These addresses I found solved only a part of the issue. The first address cleaned up the 'standard' areas of the map your inital injection didn't affect. Then the next 2 addresses existed solely for cliffsides and slanted terrain.
However, there still remained thin lines of shroud, or in cases just a few pixels of shroud on things such as buildings, units, crates, tiberium vein holes and whatnot. These lines were either vertical lines, left sometimes by scrolling past units etc. or 1px wide lines on alongside the terrain grid, where the squares would touch eachother, visually, it kind of looks like the 'seams' of the map.
So I tried again to find more addresses that needed the transparent color injected into them. I managed to find more of them, thanks to the inital opcodes' pointer once again, which changed on a restart. Several other addresses popped up that didn't before for some reason. But this was both a blessing and a curse.
See, it turned out almost every thing had a separate address that colored the shroud above any given object. There's an address that exists solely for buildings & terrain elements like boulders and trees, which I assume are also categorised as buildings behind the scenes, plus veins and tiberium. There's an address solely for moving elements on top of buildings. There's one just for crates. And these are just the ones I could find.
I'm still noticing shroud on several elements, like some vehicles(harvesters&tick tanks/buggies are fine, titans/cyborgs are not), moving infantry, etc. Plus the seaming is still present, but only on the base terrain, but not on buildings. It's kinda disheartening to see that so much effort is required just to get this right.
I gotta ask, is this how it's supposed to be? Am I doing things ass backwards, or is it really necessary to go through each element one by one to get this working as it should? Real pain in the neck to do things this way. Would be nice if there was a single address that needed changing.
Maybe you could enlighten me bout this. You seem to know a thing or 4 about TibSun.