nadavshemesh / silver-hacks

Infogrames/ Spiralhouse Silver 1999 RPG game hacks
6 stars 3 forks source link

[feature request] playable heroes and ability to edit wisdom, armor and gold #1

Open MisterMax82 opened 2 years ago

MisterMax82 commented 2 years ago

Hi for cheat table but select hero how does it work? Is there any code to enter? How can I play (example) with gorgon or grandpa? If possible add wisdom, armor and gold? thx

nadavshemesh commented 2 years ago

Hi, with regards to wisdom, armor and gold It's currently not in the cheat table but I will provide it in future versions.

with regards to playing a character like grandpa, ts not something you can do with this project yet, but! with this project you can! It's a tool to read & write .sct files.

to make a character playable we need to edit a level's code, It's a little harder to do than activating the hacks provided here but its manageable.

How to make a character playable:

0. Clone/ download the above tool so you can use it.

1. Choose a level .tsct file (here are all of them).

Let's for example choose "exbarrac.tsct" it is that market level at the start near david's house and the port.

2. Choose a character we want to play with. from this list of enemies or this list of characters

Let's choose grandad as an example. we will use a function that creates a character using his name + a prefix to know what type of character he should be.

About Prefix

If you use a function that identifies an enemy by its string ID then the first letter indicates its type:

'h' - he becomes playable, 'f' - he is a foe, 'n' - he is neutral

If it starts with 'h' but ends with '.' he is a friend but unplayable.

Adding such prefix (if it isn't there already) is mendatory

so we need to add 'h' to 'grandad' to make him playable so lets take a note of that.

3. Choose a starting position for that character:

in 'exabarrac.tsct' we have many "init_position" variables so we can just use one of them.

4. Create our playable character:

Since in step (2) we chose "hgrandad" we will use it now, otherwise we can use any character we want.

let's open up "exbarrac.tsct" file and under the line:

._on_load

add the line:

call create_char(var &init_position, "hgrandad", int 35, int 13)

(Optional) Remove current grandad:

If you already have grandad with you at the start of the game and you want to avoid having two grandads you'd probably want to remove the first grandad before creating your own playable one.

open up "exbarrac.tsct" file and under the line:

._on_load

add the lines:

var old_grandad = call get_char_handle(int 393216) call remove_char(var old_grandad)

5. Compile and replace the original:

save the edited .tsct file and take note of where it is saved on your computer. for this example I saved it at: "D:\SteamLibrary\steamapps\common\Silver\silver\levels\verdante\exbarrac\exbarrac.tsct"

backup your original "exbarrac.sct" file before overwriting it.

after that, using the tool execute:

.\sct.exe 1 "D:\SteamLibrary\steamapps\common\Silver\silver\levels\verdante\exbarrac\exbarrac.tsct"

an .sct file will be generated in that directory, you need to copy it and replace the level's original .sct file (located in your silver directory, for me its "D:\SteamLibrary\steamapps\common\Silver\silver\levels\verdante\exbarrac\exbarrac.sct") with the modified one. In this case, since i saved my "exbarrac.tsct" file in the same folder as "exbarrac.sct" I dont need to copy it there it will be overwritten.

now go to that level in the game and see how the created character is there & playable! :)

after the character is playable he remains playable when exiting this level. after that you might want to restore the original "exbarrac.sct" file to avoid having a new grandad everytime you walk in there.

p.s some characters cause certain bugs when playable so take that into account and backup your original game files.

p.s.s pay attention that theres a limit to how many characters can be in the same level all at once (seems to be 10), if youre having trouble with that you can try to remove certain characters in the level by just removing the code that creates them.

MisterMax82 commented 2 years ago

Hi Error sct admin

I followed the instructions step by step but the program I downloaded ( https://github.com/nadavshemesh/silver-reversing-sct/blob/master/sct.exe) on the desktop gives me error. Above the image. I tried admin privileges, compatibility, disabling antivirus, reinstalling runtime and dll but nothing. Suggestions?

Ps

also this tool https://github.com/nadavshemesh/silver-hacks/blob/master/win_launcher.exe doesn't work. missing dlls but I assure you I installed them one by one.

Sigh help plz

thx

nadavshemesh commented 2 years ago

I opened a new issue to deal with the launching error you described: Here is the link

In this page, we'll discuss the playable hero or the player attriibutes issue/ feature request.