Exhumed / PowerSlave DeHacker Updated

oasiz
Posts: 9
Joined: Sun Apr 15, 2018 6:39 pm

Re: Exhumed / PowerSlave DeHacker Updated

Postby oasiz » Mon Apr 16, 2018 12:38 pm

Would be nice if custom maps were better supported without having to overwrite game files.
It's a small market but ideally:
> Level cap , To allow a proper "ending" for custom campaigns
> Allowing adjustment of "final level" , this would allow using some of the level specific effects that are normally impossible.
> Level name changes , For campaign use
> Custom bitmap for world map , "Nicetohave"
-=CHE@TER=-
Posts: 49
Joined: Thu Dec 14, 2017 11:54 am

Re: Exhumed / PowerSlave DeHacker Updated

Postby -=CHE@TER=- » Mon Apr 16, 2018 12:51 pm

And more bugs. How you like this code (executed when you load any level):

Code: Select all

if ((nNetPlayerCount == 0) && (lastlevel == levelnum)) {
  RestoreSavePoint(nLocalPlayer, &initx, &inity, &initz, &initsect, &inita);
}

Comments:
lastlevel - level which player just finished.
levelnum - level to be entered.
nNetPlayerCount - equal to zero for single player game.

If you want to understand what's wrong:
1) Finish any level but make sure you touch at least one scarab there (checkpoint system).
2) At the world map screen select that level and load it again.
3) Voilà - you just found yourself at the last touched checkpoint at that map, not at the start. But notice that whole map was loaded again and all enemies, weapons, broken walls, etc. was restored back.

Features planned for the new DeHacker release (I will fix this issue with the checkpoint too):

Code: Select all

Disable Omen Wasps flying sound // requested by Drog Black Tooth
? Replace annoying sound with empty file (note that enemy will approach silently).

Increase all explosives damage by 12.5%
? All explosives will do an intended damage (Cobra Staff can one-shot Omen Wasp).

Disable player movement prediction for enemies
? Remove nPlayerDX and nPlayerDY in prediction formula (fixes enemy projectiles).

Note that all text descriptions can be changed before actual release.

The first one self-explanatory, so I write only about the last one.
You may notice that sometimes enemies shoot their projectiles to the side where player moving. Cool feature but ruined due to implementation so sometimes enemies shoot to the walls or opposite direction. Because it's not a movement vector - it's differences between old player position and new player position:

Code: Select all

nPlayerDX = PrevPlayerX - PlayerX;
nPlayerDY = PrevPlayerY - PlayerY;
ShootToPosX = PlayerX + (nPlayerDX*15);
ShootToPosY = PlayerY + (nPlayerDY*15);

After you disable this "prediction" all enemies will shoot at the position where you are at the moment of their shot. It's less cool but always works correctly.


oasiz wrote:Would be nice if custom maps were better supported without having to overwrite game files.
It's a small market but ideally:
> Level cap , To allow a proper "ending" for custom campaigns
> Allowing adjustment of "final level" , this would allow using some of the level specific effects that are normally impossible.
> Level name changes , For campaign use
> Custom bitmap for world map , "Nicetohave"
Thanks for the suggestions!
1) All "special" levels (0, 1, 11, 20, etc.) hardcoded in a lot of places. And anyway it's not convenient to include this feature in the DeHacker, so maybe as separate tool?
2) Same.
3) It's image tiles. You can change it in the TILES###.ART files.
4) Same. But I don't know where the position for the level names on the world map stored (didn't look into that thing).
I'm not sure if game load tiles from the current folder as .MAP files or directly from the STUFF.DAT file. The fix for Omen Wasp sound requires to patch executable to look for .VOC files inside current folder and only if nothing here load from the STUFF.DAT file. Not sure about .ART files but I can try to fix this if it's the same.
User avatar
Corvin
Posts: 211
Joined: Fri May 20, 2016 1:10 pm
Location: R.T.C.M.
Contact:

Re: Exhumed / PowerSlave DeHacker Updated

Postby Corvin » Mon Apr 16, 2018 4:29 pm

The explosion and prediction, I wouldn't think need any work. You don't always have a full impact from the explosion, so its not always going to do full damage. Just a thought, but upto you of course.
MetHy
Posts: 2
Joined: Fri Apr 27, 2018 11:52 am

Re: Exhumed / PowerSlave DeHacker Updated

Postby MetHy » Fri Apr 27, 2018 12:09 pm

Hi -=CHE@TER=-,

You're doing a great job with this DeHacker, it looks like more people are interested in Powerslave than we all might think.

I've been playing with the DeHacker, and it feels great just to be able to play in 800*600, but I noticed a few glitches which I hope you can adress.

1) Like mentionned here already, player movement prediction for enemy shots. I've never seen it as wacky as when using the DeHacker (sometimes enemies literaly turn around to shoot at an angle 90° off), but it's a cool and unique thing enemies do in this game which I hope you can fix instead of disabling.
I suspect it comes from the way you handle strafing, as far as I understand you reverse turn/strafe functions and that's probably what confuses enemies.
Before using the DeHacker, I used two different things for strafing:
- By default, the strafing speed of the "strafe_left" and "strafe_right" actions is very slow. However, if you use the auto-running mentionned above, and use the "strafe" key and "turn_left" "turn_right" keys together, you'll get a faster strafing.
- Even with the tip mentionned above, the game doesn't allow strafe circling. For instance you can't do "strafing" + "forward" + "turning" at the same time. There is a patch called EXPSDEHK which allows you to do that.

When using those two things player movement prediction wasn't as crazy, so maybe there is another way you can find to handle strafing? That's granted I'm on the right track when saying that's what makes prediction wacky, it's just a guess.

2)When playing in 800*600 I've also noticed a visual glitch which seem to be based on distance and view angle: entire parts disappear? Never seen this before. Only seems to happen in really big areas, only found 2 places in the game where it happens.

Image

Image

3) Another thing I noticed with the dehacker is that it seems that some sprites appear darker than they should; for instance compare the ammo belt in those 2 screenshots

Image

Image

Also, I hope these new features you're mentionning (disabling Wasps sounds increase explosion dmg) will be off by default.
I understand that the explosion dmg seem to be a glitch, but I always thought it was a great thing gameplay wise that Wasps don't get one shot by Cobra hits. Glitch or not, it gives dynamism and forces the player to switch to another weapon.

Finally, in our Powerslave mapping documentation, under the "playing tips" tab, we mention EXPSDEHK, because that was all there was at the time. If it's okay for you I'd like to mention your DeHacker as well, considering it does what EXPSDEHK did and more. https://docs.google.com/spreadsheets/d/11liHlp2_diL_83fbccFRQob7qm8DJREn-Ej1i1zg8wk
-=CHE@TER=-
Posts: 49
Joined: Thu Dec 14, 2017 11:54 am

Re: Exhumed / PowerSlave DeHacker Updated

Postby -=CHE@TER=- » Fri Apr 27, 2018 8:31 pm

Corvin wrote:The explosion and prediction, I wouldn't think need any work. You don't always have a full impact from the explosion, so its not always going to do full damage. Just a thought, but upto you of course.
Feel at easy - all hacks always will be optional so you can just ignore them if you don't need them.
About explosions damage - as I understand if you standing on the grenade or directly hit by the Cobra you should take full damage. It make a sanse that damage will fall with the distance but it didn't make a sense to me why direct hit still can't make a full damage.

Welcome MetHy and many thanks for the detailed feedback!
I've played your maps for EX/PS it's amazing what you guys pull out from the game.
One thing that I noticed (but maybe this is a v6<->v7 map converter issue) that when you switch to the 3rd person view (Alt+C) the player sprite totally black. I suspect that's a bug caused by the 64 color shades system not properly handled by Build (maybe overflow or underflow so the player sprite rendered pitch black as like there is no lighting at all).

Back to your questions:

1) I'm sure it's not DeHacker strafing hack causing this strange behaviour. You can test it by yourself - run clean game executable (do not install anything from DeHacker or revert all changed back), now hold Shift (Run) and Alt (Strafe) and press Turn_Left and Turn_Right few times. You can easily reproduce the enemy shooting bug. When I first encounter this I did a lot of tests to see if this is truly my bug or not. Since original controls very awkward and you probably didn't use strafing much you have very small chance running into this bug.
I agree that's enemy prediction is a very neat feature, but I doubt there is a enough room for additional code for any fix to make it work as probably indended (even explosion damage increase was a headache and I still didn't ported it yet to the PS from the EX executable). I must say here that all the changes before (excluding future one for explosions) was inplace byte changing and didn't require any additonal space for new code.

2) It's probably will be too hard to fix. I can look to it but didn't expect much from me. By the way what level is it?

3) Same as above. And well you're shooting in the second screenshot so probably game switch palette to more contrast one (see a black square at the floor on the second screenshot between columns). What's the level number?

And this bug with right and bottom black lines in magic and life animation in custom resolution... uh... it's annoying as hell.
I really want to fix it but can't pinpoint where exactly it's rendered and what caused it (since you can see it even on 640x480 - it's not far from original supported 640x400 but this bug is still there).

4) All features always be off and I never had intention to enable any of them by default. Because I think people should use only things that they personally wants.

MetHy wrote:Finally, in our Powerslave mapping documentation, under the "playing tips" tab, we mention EXPSDEHK, because that was all there was at the time. If it's okay for you I'd like to mention your DeHacker as well, considering it does what EXPSDEHK did and more. https://docs.google.com/spreadsheets/d/11liHlp2_diL_83fbccFRQob7qm8DJREn-Ej1i1zg8wk

Thanks! Actually that was already discussed there.
By the way, you do understand that DeHacker executable named "EXPSDEHK.EXE" right?
You probably found your EXPSDEHK here as the DeHacker v1.0. You can run it and see the same tool name, the same author copyright and even my e-mail (only the site will be different since I change hosting). It's funny how people didn't notice it's the same tool just because of new user-frendly interface.
-=CHE@TER=-
Posts: 49
Joined: Thu Dec 14, 2017 11:54 am

Re: Exhumed / PowerSlave DeHacker Updated

Postby -=CHE@TER=- » Sun Apr 29, 2018 3:39 pm

Future DeHacker version 1.5 probably will be the last one since this happened. If they add DOS version support all efforts to push DeHacker further will be useless since I guess they will fix all that annoying bugs in their remake.

Alright. Confirmed that 2 and 3 discussed above and magic/health HUD animation bug probably somehow related to the width:height coeff. There are some really strange calculations with it.

Also on level 31 (multiplayer) found funny bug - if you jump to the water in main area from the most upper place and don't try to swim (jump) while descending you will recieve damage when touch the bottom and the game don't care that the water are deep enough. Also this bug (can't reproduce since it's unknown what exactly caused it).

Ported three patches from the EX to PS executable (ready to go now):
v1.5 [2018.??.??]
- add "Disable replaying level checkpoint load" hack
Do not load the last checkpoint when replaying any level twice in a row.
- add "Disable player movement prediction for enemies" hack
Exclude player movement delta from prediction formula (fixes enemies shooting).
- add "Disable Omen Wasps flying sound" hack
Replace annoying sound with empty file (note that enemy will approach silently).

Still not sure about explosions damage hack. It's (a) ugly and (b) change game balance drastically.
For example: Cobra Stuff in multiplayer game will oneshot any player and since it's homing projectile you have very little chance to survive if someone shoot it to you. Also noticed that Omen Wasps can actually dodge Cobra if it's far enough from them.

Maybe it's better to just lower Omen Wasp health instead?
800 original -> 720 will be oneshoted by Cobra.
Machete: 800/100 = 8 hits; 720/100 ~ still 8 hits
.357 Magnum: 800/100 = 8 bullets; 720/100 ~ still 8 bullets
M-60: 800/60 ~ 14 (14/3 ~ 5 shots); 720/60 = 12 (12/3 = 4)
Flame Thrower = 800/20 = 40 (40/4=10 shots); 720/20=36 (36/4 = 9)
So player will notice difference only with M-60 or Flame Thrower (one shot less) or when use more than one weapon together.
MetHy
Posts: 2
Joined: Fri Apr 27, 2018 11:52 am

Re: Exhumed / PowerSlave DeHacker Updated

Postby MetHy » Sun Apr 29, 2018 5:10 pm

-=CHE@TER=- wrote:Welcome MetHy and many thanks for the detailed feedback!
I've played your maps for EX/PS it's amazing what you guys pull out from the game.
One thing that I noticed (but maybe this is a v6<->v7 map converter issue) that when you switch to the 3rd person view (Alt+C) the player sprite totally black. I suspect that's a bug caused by the 64 color shades system not properly handled by Build (maybe overflow or underflow so the player sprite rendered pitch black as like there is no lighting at all).


Thanks!
Not sure what you mean about the 3rd person view, you mean you get that glitch when playing our maps? I've never had it personally, although I only ever used the 3rd person view in the 2nd map.

Also I'll update our doc regarding the dehacker when I find time.


-=CHE@TER=- wrote:Future DeHacker version 1.5 probably will be the last one since this happened. If they add DOS version support all efforts to push DeHacker further will be useless since I guess they will fix all that annoying bugs in their remake.


I wouldn't worry just yet. For one thing, there has been no official announcement. It may just be they grabbed the trademark only because it was up to grabs.
Secondly, even if they do something, it'll probably just be PowerslaveEX.... I mean what could they do with the DOS version? For all we know the sourcecode is lost, even if they do something it'll probably either be throwing the game in DOSbox, or another shitty recreation. In either case your dehacker is still useful.
-=CHE@TER=-
Posts: 49
Joined: Thu Dec 14, 2017 11:54 am

Re: Exhumed / PowerSlave DeHacker Updated

Postby -=CHE@TER=- » Mon Apr 30, 2018 2:10 pm

By the way everyone what should I do with the Cobra Stuff, Omen Wasps and damage?

MetHy wrote:Not sure what you mean about the 3rd person view, you mean you get that glitch when playing our maps? I've never had it personally, although I only ever used the 3rd person view in the 2nd map.
I can swear I've seen it at the start of the second map at the outside area. Just tested again and can't reproduce it. Looks like another "how you did that?!" engine bug. Sorry about that, it's not your maps issue.
On another note - when you hit by the red mummy skull in third person your player sprite changes to mummy too. That was fun discover.

MetHy wrote:I wouldn't worry just yet. For one thing, there has been no official announcement. It may just be they grabbed the trademark only because it was up to grabs.
Well I guess it's safe to say that if they buy a trademark something definitely coming, since otherwise it's not a worth way to spend a money.

MetHy wrote:Secondly, even if they do something, it'll probably just be PowerslaveEX.... I mean what could they do with the DOS version? For all we know the sourcecode is lost, even if they do something it'll probably either be throwing the game in DOSbox, or another shitty recreation. In either case your dehacker is still useful.
I should point few things out:
1) Nor PowerSlave, nor Exumed indeed, doesn't have source code anywhere in the public. But it's not mean that you can't obtain it. And since they're now legal trademark holder/owner it can be a lot more easy (if we assume that source codes still there somewhere).
2) Both DOS versions of PowerSlave and Exhumed still have Watcom debug information symbols - it's not stripped. There are functions and variables names. It's kinda awkward to pull it out and use with some disassemblers like IDA, but if I manage to do that I'm sure it's not a problem for them. Maybe it's not a complete source codes but this will help a lot to understand what's going on.
3) Author of PowerslaveEX did a Turok and Turok 2 remake last year. I'm not sure if there are any original source codes involved but remakes AFAIK was fair close to the original games plus some modern tweaks (as I can judge based on YouTube videos since I'm still using Windows XP and my hardware too old to run this remake).
4) IIRC PowerslaveEX author digging DOS version before so it's high chance that it will be included in release as well as console version.

All in one - I think DOS version may be released along and it will be probably fair close to the original.
It's just assumption so let's see how this will turn out in the end.

oasiz wrote:> Level name changes , For campaign use
> Custom bitmap for world map , "Nicetohave"

Anyway, to the good news. As oasiz asked I've taken a look into level names and .ART files.
The good news - TILES###.ART files loads from the game folder first so you don't need to replace them inside STUFF.DAT file to change level names. All the required tiles (map background, level names, fire-smoke on the map, etc.) can be found in TILES026.ART and TILES027.ART files. Yes, level names are images and you'll need to redraw them (hint: artmerge).
Another good news - I discover and reversed world map information.
And that's where all the good news ends.
The bad news - world map information hardcoded inside executable file (EX.EXE or PS.EXE) as 4 structures:
- level names shift values for the world map
- level names position on the world map and animation
- fire-smoke animation
- fire-smoke postion on the world map (appears after you beat specified level)
All values relative for the current screen. Also note that each screen always contain 2 levels name (note 10 background images - 20/2 = 10). Anyway, this structure kinda complicated for manual edition and because of that maybe it's better to write a separate tool for that. As example - dump all tile numbers and positions to the .INI file for easy modification and read and parse it to put infromation back after. Write such a tool takes a time and efforts, but I'm not sure someone will really use it for anything except messing around for fun. I mean you can still change level names via editing tile images. So by now I didn't plan to write anything.

But in case someone urgently need this information I will put a C-code with the structures and offsets here.

Code: Select all

#pragma pack(push, 1)
typedef struct {
  SHORT nTile;
  SHORT X;
  SHORT Y;
} TileList;

typedef struct {
  // level name relative position on current screen
  SHORT X;
  SHORT Y;
  // two background level panel animation
  TileList Back[2];
  // red colored level name on transparent background
  TileList Name;
} NameInfo;

// fire-smoke animation frames
typedef struct {
  TileList Frame[4];
} FireAnim;

typedef struct {
  // how many fires (0..3) use from the array Fire[] below
  SHORT    nFire;
  // note: nTile here it's a fire number from FAnim[] not tile number
  TileList Fire[3];
} FireInfo;
#pragma pack(pop)

/*
structures below located in followed order at:
EX.EXE:00055A4B
PS.EXE:0005557D
*/
BYTE Shift[20];
NameInfo Title[20];
FireAnim FAnim[3];
FireInfo Fires[20];

// how to use Shift[] values
// LevelNum - zero based level number: 0..19
// divided by 2 since 2 levels per one screen, remember?
ScreenLevelPos = Shift[LevelNum] + (200 * (LevelNum / 2));
Last edited by -=CHE@TER=- on Tue Jun 19, 2018 3:51 pm, edited 1 time in total.
User avatar
Corvin
Posts: 211
Joined: Fri May 20, 2016 1:10 pm
Location: R.T.C.M.
Contact:

Re: Exhumed / PowerSlave DeHacker Updated

Postby Corvin » Tue May 01, 2018 1:10 am

I've seen the black color appear. But I can't remember if it was long ago before I started using your patches or not. I think it was before, and not a result of the patches.

I wouldn't worry about any problems. I've asked about the code 15 or more years ago. No one seemed to have it. I asked a few developers and publishers then. All I got where some images that have since been posted.
The original beta was hard to find though and not until latter did I realize they had a reviewers version out, and I already found it when searching for the beta. I deleted it, thinking the first time it was just a hacked up version, but was in-fact the one I mentioned. I restored it and posted it now.

Anyhow. I hope the new editor becomes widely available soon. So others can mess with PS / EX quickly, rather than dealing with all the issues.
I don't know when though. It reads the STUFF.DAT and the standard pal / table files outside of the group. I wasn't aware that external tiles can supers-cede the internal ones. Didn't get that far at testing.

Alright -=CHE@TER=-, I hope to enjoy your new patcher when it comes out. Adding an external variables/hitpoints etc would be nice if possible. :!:
-=CHE@TER=-
Posts: 49
Joined: Thu Dec 14, 2017 11:54 am

Re: Exhumed / PowerSlave DeHacker Updated

Postby -=CHE@TER=- » Tue Jun 19, 2018 4:24 pm

Corvin wrote:Adding an external variables/hitpoints etc would be nice if possible. :!:

Um, what's "external variables/hitpoints etc"? Can you be more specific? Thanks!

I've added new feature to upcoming 1.5 version of the DeHacker:
- add "Always show subtitles in briefings"
Subtitles will be shown along the speech animation (end of level 1 and 11).

This will be useful for those people like me who don't understand English very well by ear.
The game didn't show subtitles at the end of level 1 and 11 if MSCDEX loadead and required CD music tracks available (all speech recorded as CD tracks).
In contrast briefings with the static images (like one at the end of level 10) always with the subtitles.

And I'm still not sure what to do with the Cobra-Wasps issue. As I already said:
-=CHE@TER=- wrote:By the way everyone what should I do with the Cobra Stuff, Omen Wasps and damage?

For tests I lowered Omen Wasps health to 720 but... damn! If you didn't hit exactly the center of the Wasp sprite with the Cobra you'll never get 720 points damage, only 640 (hit from below as example). And since you can't control Cobra shots you're probably always will be out of luck. If I lower Omen Wasps health to 640 this will seriously breaks game balance (if there are any at first place and amount of health for monsters was not an arbitrary choice of developers).

My head is burning and I really don't know what to do, since all the possible solutions to fix this which I can think of are ugly as hell.

Return to “Powerslave / Exhumed”

Who is online

Users browsing this forum: No registered users and 1 guest