Sword of the Samurai (DOS - 1989)

Upload your cheat tables here (No requests)
Post Reply
User avatar
eien
Novice Cheater
Novice Cheater
Posts: 24
Joined: Sun Jan 26, 2020 1:04 pm
Reputation: 14

Sword of the Samurai (DOS - 1989)

Post by eien »

Hey all,

Here's my first contribution (of many, hopefully):

Game: Sword of the Samurai
Year: 1989
Publisher: MicroProse
Platform: DOS
Where to get: [Link], [Link]

By request of: danielyee and myself
With suggestions from: Lord Blade
Original Request: viewtopic.php?f=2&t=2322

Table Options:
+ Duel - God Mode
+ Battle - God Mode
+ Melee - God Mode
+ Melee - Fast Reload
+ Melee - Fast Movement
+ Player Stats (Name, Age, Honor, Territory, Troop Size, Generalship, and Swordmanship)

IMPORTANT: For technical reasons, this table only works when you play the game without sound. I'll try to fix this soon, but for the time being, you shoud play it silent. Sorry!

Comments: There were a few challenges to developing this one. First, since this is a DOS game, it run on DosBox which emulates 16-bit assembly. As a consequence, CE's own debugger wasn't too helpful. I ended up using DOSBox's own debugger, manually finding code caves and handwriting the 16-bit assembly code. The second challenge is that the game uses different executables, one per mini-game (i.e., melee, duel and battle). Therefore I had to create a timer that checks every second which binary is running and applying the correct patch, given the options activated by the user. I spent around a week doing the debugging, and around a week trying to learn Lua and CE scripting. Overall, it went pretty well.

Next steps: There's a few more options I'd like to explore like "superspeed" on maps and melee to make them a bit less tedious. Also, to always use the bow in melee, since the sword kinda sucks. If you have other suggestions, let me know. These are less impactful and more complex mods, so I may take longer to update the next version of this table.

Requests: If you'd like me to take a look at another DOS oldie that hasn't been properly cheated yet, let me know. I make no promises on delivery (life is hectic), but I'll do my best. If you wanna buy me such game, I'd be even happier to take a look. Of my own volition, I plan to tackle Syndicate (Bullfrog - 1993) next.

Download:
sots-1.1.1-eien.CT
(14.09 KiB) Downloaded 170 times
Updated: Changed player stat types to 2-bytes.
sots-1.1.0-eien.CT
(13.46 KiB) Downloaded 73 times
Updated: Fixed bug checking current DOS executable and added experimental option: "Melee - Fast Movement"
sots-1.0.0-eien.CT
(12.68 KiB) Downloaded 75 times



Now I'm gonna spend the weekend chilling with this masterpiece of a game. Hope you have fun too with this table!

How to use this cheat table?
  1. Install Cheat Engine
  2. Double-click the .CT file in order to open it.
  3. Click the PC icon in Cheat Engine in order to select the game process.
  4. Keep the list.
  5. Activate the trainer options by checking boxes or setting values from 0 to 1
Last edited by eien on Wed Feb 05, 2020 7:00 am, edited 7 times in total.

User avatar
Lord Blade
Expert Cheater
Expert Cheater
Posts: 1377
Joined: Thu Mar 09, 2017 7:52 am
Reputation: 132

Re: Sword of the Samurai (DOS - 1989)

Post by Lord Blade »

So, the table doesn't seem to work. Do I need to do something specific?

danielyee
Expert Cheater
Expert Cheater
Posts: 1303
Joined: Wed Apr 05, 2017 11:38 pm
Reputation: 151

Re: Sword of the Samurai (DOS - 1989)

Post by danielyee »

hi sir...plz assist sir..tq

User avatar
eien
Novice Cheater
Novice Cheater
Posts: 24
Joined: Sun Jan 26, 2020 1:04 pm
Reputation: 14

Re: Sword of the Samurai (DOS - 1989)

Post by eien »

Lord Blade wrote:
Fri Jan 31, 2020 5:28 pm
So, the table doesn't seem to work. Do I need to do something specific?
Ahh what a shame. To let me help you with that please let me know a few things:

- What is the problem you are getting? (does the script not activate?, does god mode not work?)
- Which version of DosBox or other emulator you are using?
- Which version of the game (GoG or Steam, or... elsewhere).

The table should work regardless of the version, but there's always the chance it fails.

Thanks in advance for helping me improve the table.

User avatar
Strider
Noobzor
Noobzor
Posts: 10
Joined: Thu Oct 10, 2019 8:03 pm
Reputation: 0

Re: Sword of the Samurai (DOS - 1989)

Post by Strider »

I haven't tried it, but I was very surprised to see this...thank you!

User avatar
Lord Blade
Expert Cheater
Expert Cheater
Posts: 1377
Joined: Thu Mar 09, 2017 7:52 am
Reputation: 132

Re: Sword of the Samurai (DOS - 1989)

Post by Lord Blade »

So I'm running the game through Steam. Just hitting play and using the default DosBox option (the second option never launches for me). So I guess whatever version Steam uses?

Get into the game, turn on the table, and I can check boxes, but nothing seems to happen. And for the stats, everything just shows as ?.

Just started up the game again. It shows DosBox 0.74.

User avatar
eien
Novice Cheater
Novice Cheater
Posts: 24
Joined: Sun Jan 26, 2020 1:04 pm
Reputation: 14

Re: Sword of the Samurai (DOS - 1989)

Post by eien »

Strider wrote:
Fri Jan 31, 2020 7:56 pm
I haven't tried it, but I was very surprised to see this...thank you!
You're welcome!
Lord Blade wrote:
Fri Jan 31, 2020 8:39 pm
So I'm running the game through Steam. Just hitting play and using the default DosBox option (the second option never launches for me). So I guess whatever version Steam uses?

Get into the game, turn on the table, and I can check boxes, but nothing seems to happen. And for the stats, everything just shows as ?.

Just started up the game again. It shows DosBox 0.74.
Thanks for the feedback.

So, three things:
1) I'm using DOSBox 0.74 as well, so that musn't be it, though I bought it through GOG. However, the game itself hasn't been changed by any of the distributors (be it gog, steam, etc). It's only been wrapped around DOSbox. So this shouldn't a problem
2) The stats will only show when you are playing a campaign (e.g., during the "what to do" menu). In any other situation (e.g., during a battle), it will display ??s.
3) If the boxes are checked, it means it is working fine. Have you tried whether god mode in duel or melee does actually work? You should not be damaged upon enemy attacks.

If it still doesn't work, I'll have to buy the steam version and see what shenanigans they did to prevent the table from working.

EDIT: attaching demo
[Link]

User avatar
Lord Blade
Expert Cheater
Expert Cheater
Posts: 1377
Joined: Thu Mar 09, 2017 7:52 am
Reputation: 132

Re: Sword of the Samurai (DOS - 1989)

Post by Lord Blade »

It doesn't seem to matter what screen I'm in, the values don't populate. So in the selection or any other, they just show ?.

And I've tried going into battles and such with the cheats on, and they don't seem to work. I still get hurt as normal.


So I downloaded the GoG version to see if that would work.
In that version the table will show values, however changing them does nothing. And none of the cheats actually work (I can tick the boxes but no god mode).

User avatar
eien
Novice Cheater
Novice Cheater
Posts: 24
Joined: Sun Jan 26, 2020 1:04 pm
Reputation: 14

Re: Sword of the Samurai (DOS - 1989)

Post by eien »

Lord Blade wrote:
Sat Feb 01, 2020 8:18 am
It doesn't seem to matter what screen I'm in, the values don't populate. So in the selection or any other, they just show ?.

And I've tried going into battles and such with the cheats on, and they don't seem to work. I still get hurt as normal.


So I downloaded the GoG version to see if that would work.
In that version the table will show values, however changing them does nothing. And none of the cheats actually work (I can tick the boxes but no god mode).
Sorry about about that. I've finally found the cause of the problem: the criteria for checking the current DOS executable wasn't robust enough, and failed in different versions of DOSBox. I've fixed it now and tested it on a bunch of DOSBox versions, and all work.

I've uploaded v1.1.0 with the fix, plus the "Melee - Fast Movement" cheat (although it is still a bit glitchy). I'll add the table to the original post above.

Thanks again for the feedback.

EDIT: I just noticed that the god mode cheats will only work if you play the game WITHOUT sounds. If you activate sounds, all the code gets moved around in memory, and I still haven't figured out a solution for this. :(

User avatar
Lord Blade
Expert Cheater
Expert Cheater
Posts: 1377
Joined: Thu Mar 09, 2017 7:52 am
Reputation: 132

Re: Sword of the Samurai (DOS - 1989)

Post by Lord Blade »

That's... very strange. Wonder why sound would affect that.

User avatar
eien
Novice Cheater
Novice Cheater
Posts: 24
Joined: Sun Jan 26, 2020 1:04 pm
Reputation: 14

Re: Sword of the Samurai (DOS - 1989)

Post by eien »

Lord Blade wrote:
Sat Feb 01, 2020 5:34 pm
That's... very strange. Wonder why sound would affect that.
It's because the sound modules are loaded before the code modules, therefore ruining all non-relative memory jumps (as the ones I'm using for the injected code). I'd use relative memory jumps, but the code is very compact already. Instead, I'd need to figure out a different solution, but for the time being, it's either music or cheats :lol:

Post Reply

Who is online

Users browsing this forum: bladechampion, debuota, Google Adsense [Bot], Owlbeard, sdf, TipTopTam