SET command/Scriptable instant gang

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: SET command/Scriptable instant gang

Post by Sektor »

No luck yet since most commands we have tried don't modify memory in the way required. I found a command that was able to set health to 16384% but I forgot to write it down. I'll find it again and see if 100% health is possible with a command. I like constant/high health more than invulnerability since characters still bleed.

Vike will probably need to modify some commands. It would be great to do it with the current exe but it's quicker to modify a command than to search all the existing commands to see if any write memory in a useful way.

We found something funny with busted peds. They are invincible and they lie on the ground. If you try to run them over they look like they are doing situps and they give you heaps of points. Since they never die, you can make a nice camp fire with them.
CarThief
Hitman
Hitman
Posts: 108
Joined: 19 May 2012, 18:12
GH nick: CarThief
Location: Holland, AKA The Netherlands

Re: SET command/Scriptable instant gang

Post by CarThief »

Suppose 1.5k health is already quite a bit and perhaps handy for bosses or something like that. Now i think about it being able to stun someone with these memory changes is also nice, could be used as a nice touch to a rescuing mission, or perhaps have some use in PVP.

Hm, perhaps collect some suggestions for vike to try and implement? Alot more tidy if everything is updated at once then generally updating it randomly.
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: SET command/Scriptable instant gang

Post by Sektor »

// Electrocutes
SET special = ( p1 + 7 )
ALTER_WANTED_LEVEL ( special, 6 )

// 46% health
SET special = ( p1 + 11 )
ALTER_WANTED_LEVEL ( special, 6 )

// 12000% health
SET special = ( p1 + 12 )
ALTER_WANTED_LEVEL ( special, 6 )

// You get busted but then you can't move after respawn // Ped freeze ray?
SET special = ( p1 + 17)
ALTER_WANTED_LEVEL ( special, 6 )

I can make peds look cloaked/transparent but they also need to get in and out of a car to update remap, be invulnerable and have electrofingers :). It's all or nothing at the moment.
Galactic Boy
Immortal
Posts: 334
Joined: 15 Apr 2012, 08:26

Re: SET command/Scriptable instant gang

Post by Galactic Boy »

These codes that you wrote aren't work, excluding last code.
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: SET command/Scriptable instant gang

Post by Sektor »

CHAR_DATA special // put this before LEVELSTART

// Electrocutes character. Put this after LEVELSTART
SET special = ( p1 + 7 )
ALTER_WANTED_LEVEL ( special, 6 )

You must have a character named p1 for this to work.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: SET command/Scriptable instant gang

Post by elypter »

have you tried to modify p1 yet? for example for remotecontrolling peds
yur sa'nok ngeyä
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: SET command/Scriptable instant gang

Post by Sektor »

You've probably seen if a car is created on top of p1 then the camera follows a random dummy and you can make them jump. I should try using SET_CHAR_OBJECTIVE to make the ped stop moving, I don't know if that would then you let you control them but worth a try.

What would be cool is if you could get peds to copy the movement of a player. You could put them all in a row and do synchronised killing.
CarThief
Hitman
Hitman
Posts: 108
Joined: 19 May 2012, 18:12
GH nick: CarThief
Location: Holland, AKA The Netherlands

Re: SET command/Scriptable instant gang

Post by CarThief »

Hm, do think the game technically makes you remote control a ped, when attempting to remote control a car, and the ped then controls the car. I've had few bizarre encounters with this, where the remote controlling ped got pulled out of his car and if i recall correctly if killed it would crash the game, when out of the car. Oddly enough when you use teleport while the ped is out he will still take command inputs, you basically move in synch with the ped, but at different positions.
Not sure if he was capable of attacking though, but he certainly was unable to enter/exit cars.

Would be interesting though if one could remote control a ped without it crashing if the ped dies. Heh, oh the multiplayer tactics of such... And is it perhaps possible to put a ped in their stunned state and put them out of it whenever one wants to? Also quite curious if your findings of giving peds Electro Fingers will actually hurt the player with their Electro Fingers as well, might be neat as an extra/boss thing for peds.

Edit: Another thing i remember about remote control suddenly, remote-controlled cars, perhaps MINI_CAR's only, will always fire in an accellerated manner, as if they already collected a Fast Reload, getting Fast Reload just makes it fire even FASTER! Wonder if its possible to enable/disable and possibily stack Fast Reload by memory altering? :P Oh the potential firepower...
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: SET command/Scriptable instant gang

Post by Sektor »

Peds with electrofingers hurt the player but not in my WMD video since I was invulnerable.

I don't know if there is any ped created with the REMOTE_CONTROL command (you can run yourself over) but that command could be modified to work on peds. Switching into the body of every ped you punch would be funny (a few other games do similar things). I have tested randomly controlling different AI cars, that worked for a while but eventually crashed.

Vike is going to modify CHECK_RESPECT_GREATER. It will still be usable as normal but with special parameters it will work as peek and poke (read or write a byte to any memory address). Using the current unmodified commands is just too limiting since most commands write too much data and enable multiple features at once, so you can't just give electrofingers, it also does other things to the ped.
CarThief
Hitman
Hitman
Posts: 108
Joined: 19 May 2012, 18:12
GH nick: CarThief
Location: Holland, AKA The Netherlands

Re: SET command/Scriptable instant gang

Post by CarThief »

Well that sounds like it would open a gigantic amount of doors for GTA2 Modding, and perhaps even in the competetive scene with new kinds of game modes, or just something as simple as using some kind of invisibility flag to remove the player's arrows manually via script instead of custom .sty files, if that's worth anything.

Perhaps have him look into the various possible unstable problems of the ped generated (inside the car) for remote control as well, sounds like a pretty neat feature to be able to remote-control people and perhaps even arm them and dispose of them when they're no longer needed, so that would be quite awesome if it actually worked out.
CarThief
Hitman
Hitman
Posts: 108
Joined: 19 May 2012, 18:12
GH nick: CarThief
Location: Holland, AKA The Netherlands

Re: SET command/Scriptable instant gang

Post by CarThief »

Happen to have made any significant progress with that command? I'm also curious if you tried any of those on vehicles yet, i've tried something like that on vehicles but it would appear right after number 111 + the target car it seems to crash the game. Havent tried anything beyond that yet.

Used this code to test that with, not sure if its the entirely correct way of doing things but i merely put it together to enable the changing of the number and set the special to ON or OFF depending on the weapon picked.
[mis]//The controls for the script are basically firing with a specific weapon in car or zone to do something.
//Fire in car/test enabling area, with Electro Baton: Increase the variable.
//Fire in other designated area, with Electro Baton: Decreate the variable.
//Fire in car/test enabling area, with just about any weapon: Set the thing to ON or OFF.

CAR_DATA Target
CAR_DATA Special
COUNTER EnableTest = 0
COUNTER FireHeld = 0
COUNTER OneTime = 0
COUNTER Number = 1
COUNTER Toggle = 0
ONSCREEN_COUNTER NumberVisual
ONSCREEN_COUNTER ToggleVisual

LEVELSTART

DO_NOWT

WHILE_EXEC (Loop = 1)

//Start the test.
IF((LOCATE_CHARACTER_ON_FOOT(Player1, 127.5, 177.5, 2.0, 1.0, 1.0)) AND (EnableTest = 0))
SET EnableTest = 1
ADD_ONSCREEN_COUNTER(NumberVisual, Number)
SET Number = 1
DO_NOWT
ADD_ONSCREEN_COUNTER(ToggleVisual, Toggle)
SET Toggle = 0
DO_NOWT
ENDIF
//Store the car for testing purposes.
IF(NOT(IS_CHARACTER_IN_CAR(Player1, Target)))
IF((IS_CHARACTER_IN_ANY_CAR(Player1)) AND (EnableTest = 1))
STORE_CAR_CHARACTER_IS_IN(Player1, Target)
DO_NOWT
ENDIF
ENDIF

IF(EnableTest = 1)
DO_NOWT
GIVE_WEAPON(Player1, ELECTRO_BATON, 1)
ENDIF

IF((FireHeld = 0) AND (EnableTest = 1))//Player using Weapon to toggle effect.
IF((IS_CHARACTER_IN_CAR(Player1, Target)) OR (LOCATE_CHARACTER_ON_FOOT(Player1, 127.5, 177.5, 2.0, 1.0, 1.0)))
IF(NOT(CHECK_CHAR_CURR_WEAPON(Player1, ELECTRO_BATON)))
IF(NOT(CHECK_CHAR_CURR_WEAPON(Player1, NO_WEAPON)))
IF(IS_CHAR_FIRING_ONSCREEN(Player1))
DO_NOWT
IF((Toggle = 1) AND (OneTime = 0))
SET Toggle = 0
SET OneTime = 1
//---0
SET Special = (Target + Number)
SET_CHAR_INVINCIBLE(Special, OFF)
//---
ENDIF
IF((Toggle = 0) AND (OneTime = 0))
SET Toggle = 1
SET OneTime = 1
//---1
SET Special = (Target + Number)
SET_CHAR_INVINCIBLE(Special, ON)
//---
ENDIF
DO_NOWT
SET FireHeld = 1
SET OneTime = 0
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF

IF((FireHeld = 0) AND (EnableTest = 1))//Player using Electro Baton to switch number forward.
IF((IS_CHARACTER_IN_CAR(Player1, Target)) OR (LOCATE_CHARACTER_ON_FOOT(Player1, 127.5, 177.5, 2.0, 1.0, 1.0)))
IF(CHECK_CHAR_CURR_WEAPON(Player1, ELECTRO_BATON))
IF(IS_CHAR_FIRING_ONSCREEN(Player1))
//++k
//SET Number = k
++Number
SET FireHeld = 1
DO_NOWT
ENDIF
ENDIF
ENDIF
ENDIF
//Handle the number toggle backwards as well.
IF(EnableTest = 1)
IF((FireHeld = 0) AND (LOCATE_CHARACTER_ON_FOOT(Player1, 125.5, 177.5, 2.0, 1.0, 1.0)))
IF(CHECK_CHAR_CURR_WEAPON(Player1, ELECTRO_BATON))
IF(IS_CHAR_FIRING_ONSCREEN(Player1))
//--k
//SET Number = k
--Number
SET FireHeld = 1
DO_NOWT
ENDIF
ENDIF
ENDIF
ENDIF

IF((FireHeld = 1) AND (EnableTest = 1))//Failsafe for toggling.
IF(NOT(IS_CHAR_FIRING_ONSCREEN(Player1)))
SET FireHeld = 0
DO_NOWT
ENDIF
ENDIF

DO_NOWT

ENDWHILE

LEVELEND[/mis]

Ah well this hacky stuff isnt my specialty anyway, so i probaly wont be bumping into anything usefull anytime soon. But happen to have made any progress with this thing so far?
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: SET command/Scriptable instant gang

Post by Sektor »

I'm waiting on vike to modify one of the commands so that I have more control. The existing commands changed too much data and don't allow precise enough values. PacMani managed to remove the weapon reload times using cheat engine.
Post Reply