Parik27 / SA.Rainbomizer

A (probably fun) Grand Theft Auto San Andreas Mod that randomizes stuff
GNU General Public License v3.0
155 stars 25 forks source link

More Weapon randomness #39

Open yurnam opened 4 years ago

yurnam commented 4 years ago

as in weapon.dat you can replace the model id's of weapons for example replace 342 (grenade) with 341 (chainsaw)

if you use this luascript in cheatengine it will randomize the weapon ids:

`local weapons = {331, 333, 334, 335, 336, 337, 338, 339, 341, 321, 322, 323, 324,325, 326, 371, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 373, 353, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 370}

local addresses = {0xc8c8f4, 0xC8C884, 0xC8C814, 0xC8C7A4, 0xC8C734, 0xC8C6C4, 0xC8C654, 0xC8C5E4, 0xC8C574, 0xC8C504, 0xC8C494, 0xC8C424, 0xC8C3B4, 0xC8C344, 0xC8C2D4, 0xC8C264, 0xC8C1F4, 0xC8C184, 0xC8C114, 0xC8C0A4, 0xC8C034, 0xC8BFC4, 0xC8BF54, 0xC8BD94, 0xC8BA84, 0xC8BA14, 0xC8B8C4, 0xC8B854, 0xC8B7E4, 0xC8B774, 0xC8B704, 0xC8B694, 0xC8B624, 0xC8B5B4, 0xC8B544, 0xC8B4D4, 0xC8B464, 0xC8B2A4, 0xC8B234, 0xC8B1C4, 0xC8AEB4, 0xC8B934, 0xC8B9A4, 0xC8BAF4, 0xC8BB64, 0xC8BBD4, 0xC8BBD8, 0xC8BC44, 0xC8BCB4, 0xC8BD24, 0xC8BD94, 0xC8BE04, 0xC8BE74, 0xC8B314, 0xC8B384, 0xC8B3F4}

for addrcount = 1, 56 do writeInteger(addresses[addrcount], weapons [math.random(1, 44)]) end`

might be possible to implement this in c++ too

Parik27 commented 4 years ago

It's possible to do it in C++, yeah. I'm not sure if it would work well with weaponss that have two models like Minigun, or if it could potentially cause any crashes, so it would require some testing before I could include it in.

yurnam commented 4 years ago

Yes crashes happened very often. but i figured out why: you can not replace Weapons that have a first-person view like sniper, camera, (heat-seeking) - rocket launcher, ... there are also some that have no icon (armor, flare, missile,) these are also buggy.

without including these, it worked fine even with minigun, jetpack and cellphone.