nipkownix / re4_tweaks

Fixes and tweaks for the "UHD" port of Resident Evil 4
zlib License
341 stars 32 forks source link

Option in Trainer to configure the merchant #397

Open DarthxVoid opened 1 year ago

DarthxVoid commented 1 year ago

Describe the feature you'd like to see added

I would like to know if it is possible to have an option on the trainer tab for us modders to make changes to the merchant For example changing purchase prices, sales prices, what will be in the store, which upgrades will release and change firepower, Reload speed and Weapon Capacity

nipkownix commented 1 year ago

This seems like something that would fit the ModExpansion expansions feature, but I haven't really looked at where these things are stored in the .exe. Will require a bit of research, unless emoose already knows something about this.

pas-de-2 commented 1 year ago

g_item_price_tbl = Merchant item prices level_price = Weapon upgrade prices Dmg_tbl_em** = Weapon base damage tables for each em type WeaponLevelTbl = Weapon firepower stats PlShotFrameTbl = Firing speed Reload speed is a combo of PlReloadSpeedTbl and PlReloadEndTbl? Upgrade unlocks are stored in a bunch of level_r*** tables... Similar for stock unlocks, stock_r*** Some of this is determined programmatically in various functions, like the Infinite Rocket Launcher/Chicago Typewriter prices (Merchant::buyup), First Aid Spray stock (Merchant::stockNum), etc.

DarthxVoid commented 1 year ago

It is exactly these functions that are changed in the exe and it also has offsets to change the damage of the knife, harpoon, grenade and Rocket Launcher

DarthxVoid commented 1 year ago

@pas-de-2 Would it be possible to add these implementations for node modders? Merchant and weapon upgrades are one of the most annoying things to modify in the exe

Lioncky commented 1 year ago

I know where them are, but it's a large task to make the code...