MISI

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 11 Mar 2018, 10:37

elypter wrote:wow, flashlights. thats perfect for a zombie mode
Yes, I also thought about it.
T.M. wrote:There are probably other methods that use 255 also, cannot remember myself anymore, but in the Decompiler i wrote has those in use. Maybe you can learn other useful stuff from the decompiler sources too.
This happens in parallel with the development, there is no need to specifically look for it. I found this from the SCR dump experimentally.

Also found a similar method for universality if set 65535 for trailermodel:

Code: Select all

 CAR_DATA car = CREATE_CAR (x, y, z) remap rotation model trailermodel END

You get. Again, if you set z 255:

Code: Select all

 CAR_DATA car = CREATE_CAR (x, y, z) remap rotation model END 

Get:

Code: Select all

 CAR_DATA car = CREATE_CAR (x, y) remap rotation model END

Set z 255 is almost the same applies to almost all CREATE for CHAR_DATA, CAR_DATA, OBJ_DATA is maby etc.

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 12 Mar 2018, 06:49

Found problems in the basic commands.

Can not compile:

Code: Select all

SWITCH_ROAD ON (x, y, z) 
SWITCH_ROAD OFF (x, y, z) 

Compiles, but WHILE_EXEC is not executed in the game. Example:

Code: Select all

DESTRUCTOR name 
COUNTER true = 1 
COUNTER create_destructor = 0 
PLAYER_PED player = (x, y) remap rotation 
LEVELSTART 
WHILE_EXEC (true = 1) 
IF (create_destructor = 1) 
    name = CREATE_DESTRUCTOR (x, y) (width, height) END 
    SET create_destructor = 0 
ENDIF
ENDWHILE 
LEVELEND

* Variables of type x, y are just an example. You can write down your values ​​in them.
** Used the version of the compiler from Vike: http://gtamp.com/GTA2/gta2mispad-vike.rar

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 14 Mar 2018, 05:29

Found a way how to cling one car to another.
To do this, you need to create a new car and specify the model of your car instead of the trailermodel.



True, it is possible that the compiler will not let you specify the car model for this, you must use other methods of compiling the code where it is possible to specify the model and not the constant:

Code: Select all

 CAR_DATA car = CREATE_CAR (x, y, z) remep rotation model trailermodel END
* Instead of x, y, z, remap, rotation, model, trailermodel the value of the value.

Also it will be possible to do this with the next release of the MISI update.

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 16 Mar 2018, 22:42

Currently I'm developing the update MISI v0.2.2b.

At the same time, I publish features/game errors.

The command:

Code: Select all

SAVE_GAME()
does not store exact coordinates (this is noticeable when you re-enter the game). The error is approximately ~0.5. As often, the player appears under the ground. If the save was on the platform with the ground floor.

The command is missing from the compiler or renamed:

Code: Select all

SET_CHARACTER_OBJECTIVE (name, FOLLOW_CAR_ON_FOOT_WITH_OFFSET, second_item, rotation, distance) 
* Used the version of the compiler from Vike: http://gtamp.com/GTA2/gta2mispad-vike.rar

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 18 Mar 2018, 15:50


BeepBoop
Car Jacker
Car Jacker
Posts: 44
Joined: 14 Oct 2016, 01:32
GH nick: BeepBoop

Re: MISI

Post by BeepBoop » 18 Mar 2018, 18:26

Very cool, how did you figure that one out? Would it be possible to turn all traffic headlights off during Noon gameplay? I know in the Sega Dreamcast Version, all of the pedestrain cars headlights were off. [respect]

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 18 Mar 2018, 20:11

BeepBoop wrote:Very cool, how did you figure that one out? Would it be possible to turn all traffic headlights off during Noon gameplay? I know in the Sega Dreamcast Version, all of the pedestrain cars headlights were off. [respect]
It's possible. If you can find the flags for disabling the animation timer.

Traffic lights are objects, and the object has a sprite, and sprite animation. It is possible to cycle through all the traffic lights and turn off the texture of the glow or to delete the entire object, replacing it with the turned off.

But here it is better to turn to the Sector, he worked with finding objects in his work "GTA2 Radar" there are offsets.

As for the car lights off. I wrote already about the method found here http://gtamp.com/forum/viewtopic.php?f= ... =60#p10552 Also in the examples MISI there is a script carlight.txt where detailed addresses are described for switching on/off the lights.

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 20 Mar 2018, 16:05


User avatar
Sektor
Boss
Boss
Posts: 1369
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: MISI

Post by Sektor » 20 Mar 2018, 18:42

That's cool, construction mode. I always wanted a portable ramp.

BeepBoop
Car Jacker
Car Jacker
Posts: 44
Joined: 14 Oct 2016, 01:32
GH nick: BeepBoop

Re: MISI

Post by BeepBoop » 20 Mar 2018, 18:55

Wow, what does the spawn buildings script look like? Can you spawn different types of buildings?

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 20 Mar 2018, 20:22

Yes. You can create a ready-made structure editor and build a map while in the game. In this case, store the finished objects in a text file.

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 20 Mar 2018, 21:52

Notes for developers.

Objects where you can change the position through the structure:
* Arrow (you can write/read only the x, y and zoom coordinates, the angle can only be read)
* Light (you can write the coordinates x, y, z at a distance of max. Drawing, then the light goes out: 8.0 == 8 blocks?)
* Sound (you can write/read x, y, z coordinates on the whole map)
* Object (you can only change the z coordinate, the x, y, coordinates and the angle are readable)
* Car (coordinates x, y, z and angle? It changes only after the initialization of physics)
* Ped (you can writer/read x, y, z coordinates and angle)

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 22 Mar 2018, 14:06

The release of the new version of MISI will be held on March 24.

Details of the changes will be after publication.

To everyone who participates, comments, helps with the search for addresses of thanks.
Enjoy!

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 24 Mar 2018, 21:27

This is the final version of MISI no more updates. Yes, the stability of the library wants the best, but I tried to create new possibilities interesting for the modemaker. I hope someone will be interested. Maybe later I will release fixes, if there is a desire in this. Enjoy!

v0.2.2b 22 mar 2018
No public version
  • * Fixed methods:
    GetPedCurrentWeaponID(ped)
    GetPedCurrentAmmo(ped)
    SetPedCurrentWeaponID(ped, id)
    SetPedCurrentAmmo(ped, ammo)
    GET methods returned 0, because they read the wrong address, and when the SET method was used, the game crashed
    * Fixed? GetPedID(ped)
    The method re-generated the value in the size of 1 byte, from 2 bytes, verified in version 0.2.1b
    * Fixed methods:
    GetPedAngle(ped)
    GetCarAngle(car)
    SetPedAngle(ped, angle)
    SetCarAngle(car, angle)
    The methods returned/recorded the opposite meaning of the angle if the character/car was rotated to the west or east side
    * Added method GetMaxPlayers() for "Player"
    The method returns the number of players in the game.
    Note: The value does not decrease when the player leaves. Range of values from 1 to 6
    * Added method GetPedTouch(ped) for "Ped" thanks to BeebBop for found address
    The method returns the structure of all the peds touched to the passed ped
    Note: The return variable continues to hold a reference to the last touched ped
    To fix a one-time touch, you must zero the value
    * Added method GetPedFromPoint(x, y, z, range) for "Ped"
    Looks for all peds that are in the specified coordinates in a given radius
    Returns an array (table in LUA) consisting of structures ped
    If no ped was found, returns an array with a single value of 0
    * Added method GET/SET for "Ped":
    GetPedCamPos(ped)
    SetPedCamPos(ped, x, y, z)
    Get/Set the current coordinates for the ped camera.
    This method is similar to the method GetPlayerGameCam(player) and SetPlayerGameCam(player, x, y, z)
    but works with the structure of ped
    * Added method GET/SET for "Car":
    GetCarArmor(car)
    GetCarDecal(car)
    SetCarArmor(car, value)
    SetCarDecal(car, decal)
    Get/Set the car protection against the specified attack type: bullets, rocket, fire
    * Added method GET/SET for "Light":
    GetLightPos(light)
    GetLightColor(light)
    GetLightIntensity(light)
    GetLightRange(light)
    SetLightPos(light, x, y, z)
    SetLightColor(light, red, green, blue)
    SetLightIntensity(light, value)
    SetLightRange(light, range)
    Methods for working with light.
    * Added method GET/SET for "Arrow":
    GetArrowPos(arrow)
    GetArrowColor(arrow)
    GetArrowModel(arrow)
    SetArrowPos(arrow, x, y, z)
    SetArrowColor(arrow, color)
    SetArrowModel(arrow, model)
    Methods for working with the arrow
v0.3.1b 24 mar 2018
MD5 8b1925daa168ccfb96368cfb9f598157 MISI.ASI
  • * Basic LUA modules are included (in previous versions they were disabled): io, package, debug
    Now you can read/write in a file using the io class
    It also became possible to connect modules through the require(modulename)
    More information about this team and other teams can be found in the LUA documentation https://www.lua.org/manual/5.3
    * Added method for "System":
    IsReadPointer(address, size)
    IsWritePointer(address, size)
    The method checks the access for reading/writing the memory area, if available returns 1 if there is no nil
    * Renamed GetGameOffset() method in GetGameHandle()
    * Added a macro method in the "System" module:
    GetGameOffset()
    * Added GET/SET method for the game:
    SetPoliceSkip(Status)
    SetMedicSkip(Status)
    SetFiremanSkip(Status)
    GetRiotMode()
    SetRiotMode(mode)
    * The remote method GetPedSpec(ped)
    * Changed method SetPedSpec(ped) to RemovePedSprite(pedal)
    The method deletes the sprite (and runs the garbage collector?)
    * Added the GetSCROffset() method for "Resurces"
    The method returns the downloaded * .SCR file. Thanks Sector for the submitted address
    * Added sciprt STAGEC.SCR
    STAGEC is an experimental "Stage Constructor" for creating/deleting game objects: Ped, Car, Obj, Sound, Light, etc.
    The level constructor is a GBHScript compiled into a binary * .SCR
    MISI accesses the constructor via methods: ReadProcessMemory(address, size) and
    WriteProcessMemory(address, value, size)
    * Added module STAGEC.LUA
    The module contains all the methods for controlling the STAGEC.SCR.
Download link is available in the topic header http://gtamp.com/forum/viewtopic.php?f=4&t=1136#p10506

User avatar
Sektor
Boss
Boss
Posts: 1369
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: MISI

Post by Sektor » 24 Mar 2018, 22:00

Thanks, I'm excited to try it.

User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: MISI

Post by elypter » 24 Mar 2018, 22:45

thats really cool
yur sa'nok ngeyä

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 25 Mar 2018, 05:58

Thank guys for your kind comments. Nice to know.

Small changes in the topic header http://gtamp.com/forum/viewtopic.php?f=4&t=1136#p10506:
  • * Minor fixes constants in the documentation.
    * Added an archive with modules.

User avatar
Sektor
Boss
Boss
Posts: 1369
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: MISI

Post by Sektor » 25 Mar 2018, 06:38

If I run gta2manager.exe, I get a popup saying "unable to load misi.asi", it still loads gta2manager after I click ok, so only a small annoyance. Previous version had the same bug but I forgot to report it.

It seems to use the same thread as GTA2 which makes it blocking and any delays in the scripts will also delay GTA2. There are permission advantages to running in same thread as GTA2 but for best performance it might be better to run a separate process/thread.

There's a large startup delay when using any script that uses stagec.scr. It's not just a delay either, it makes everything stop responding until GTA2 loads. It still works, I tested the car and building spawning, very useful.

Logofero
Serial Killer
Serial Killer
Posts: 258
Joined: 09 Dec 2015, 14:18
GH nick: Logofero

Re: MISI

Post by Logofero » 25 Mar 2018, 11:32

Sektor wrote:If I run gta2manager.exe, I get a popup saying "unable to load misi.asi", it still loads gta2manager after I click ok, so only a small annoyance. Previous version had the same bug but I forgot to report it.

It seems to use the same thread as GTA2 which makes it blocking and any delays in the scripts will also delay GTA2. There are permission advantages to running in same thread as GTA2 but for best performance it might be better to run a separate process/thread.

There's a large startup delay when using any script that uses stagec.scr. It's not just a delay either, it makes everything stop responding until GTA2 loads. It still works, I tested the car and building spawning, very useful.
Attach to the post MISI.log (from directory GTA2) and a screenshot.
This will improve the parsing of the error. The log does not contain any personal information.

1) The problem with GTA2 Manager has never occurred to me because of this I can not know the reasons for the error. Screenshot will give more information about the error.

2) Delays in loading the game can occur due to a lack of wait in the body of the while(true) do <body> end. Check all your scripts in scripts and add wait(200).

The library is not stable. She can often crash out especially at the start of the game. If I have time, strength and great motivation, I will try to make it more stable. In the meantime, these are just reflections.

User avatar
Sektor
Boss
Boss
Posts: 1369
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: MISI

Post by Sektor » 25 Mar 2018, 23:17

When I run gta2manager.exe from v11.44 on Windows 10.

Image

[26.03.2018-10:17:06] -----------------------------------------------------------
[26.03.2018-10:17:06] ***** MISI.ASI build v0.3.1b, 24 mar 2018 by DenLover *****
[26.03.2018-10:17:06] Email: logofero@gmail.com
[26.03.2018-10:17:06]
[26.03.2018-10:17:06] Game exe: offset 0x400000 size 495616 detected version UNKNOWN VERSION
[26.03.2018-10:17:06] LUA scripts directory: C:\games\gta2\scripts
[26.03.2018-10:17:06] -----------------------------------------------------------
[26.03.2018-10:17:06] Not supported game exe UNKNOWN VERSION. MISI only supported version: v11.44

If I run just run gta2.exe, there is no error:

[26.03.2018-10:19:33] -----------------------------------------------------------
[26.03.2018-10:19:33] ***** MISI.ASI build v0.3.1b, 24 mar 2018 by DenLover *****
[26.03.2018-10:19:33] Email: logofero@gmail.com
[26.03.2018-10:19:33]
[26.03.2018-10:19:33] Game exe: offset 0x3F0000 size 1740800 detected version v11.44
[26.03.2018-10:19:33] LUA scripts directory: C:\games\gta2\scripts
[26.03.2018-10:19:33] -----------------------------------------------------------
[26.03.2018-10:19:33] **** MISI library: C:\games\gta2\MISI.ASI loaded.
[26.03.2018-10:19:33] Total scripts loaded: 1 of 2000
[26.03.2018-10:19:33] * LUA Script index (0) C:/games/gta2/scripts/playsoundmessage.txt started...
[26.03.2018-10:19:38] **** MISI library: C:\games\gta2\MISI.ASI unloaded.

Post Reply