Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

ffzero58

FX research

Recommended Posts

ffzero58

Hey all,

 

I've been looking through the decompiled scripts to generate particle FX or other FX in-game. Has there been any active research on this front?

 

GRAPHICS::START_PARTICLE_FX_LOOPED_AT_COORD("scr_fbi_falling_debris", 93.7743f, -749.4572f, 70.86904f, 0f, 0f, 0f, 0x3F800000, 0, 0, 0, 0)

 

The native seems simple enough (and other related ones). Does anyone have any examples of this working in-game? I'll need to ask headscript to update the natives (testing only in LUA).

Edited by ffzero58

Share this post


Link to post
Share on other sites
Fireboyd78

Hey all,

 

I've been looking through the decompiled scripts to generate particle FX or other FX in-game. Has there been any active research on this front?

 

GRAPHICS::START_PARTICLE_FX_LOOPED_AT_COORD("scr_fbi_falling_debris", 93.7743f, -749.4572f, 70.86904f, 0f, 0f, 0f, 0x3F800000, 0, 0, 0, 0)

 

The native seems simple enough (and other related ones). Does anyone have any examples of this working in-game? I'll need to ask headscript to update the natives (testing only in LUA).

 

No need for headscript to update the natives, his updates every 10 minutes using NativeDB entries. Just download it from his GitHub.

Share this post


Link to post
Share on other sites
ffzero58

I literally made the change to the Native DB a couple of hours ago - however, on the GitHub, the last compile was 2 days ago. I just posted in his thread to see what's up. Here's the status:

 

https://github.com/gallexme/LuaPlugin-GTAV/commits/master

 

Seems he may have paused it.

Share this post


Link to post
Share on other sites
CamxxCore

Here is how I did fireworks (C#)

Commented in the names of the functions for you.

 if (!Function.Call<bool>(Hash._0x8702416E512EC454, "scr_indep_fireworks")) //STREAMING::HAS_NAMED_PTFX_ASSET_LOADED                {                    Function.Call(Hash._0xB80D8756B4668AB6, "scr_indep_fireworks"); //STREAMING::REQUEST_NAMED_PTFX_ASSET                }                Function.Call(Hash._0x6C38AF3693A69A91, "scr_indep_fireworks"); //GRAPHICS::_SET_PTFX_ASSET_NEXT_CALL                GTA.Math.Vector3 around = ped.Position.Around(5f);                Function.Call<int>(Hash.START_PARTICLE_FX_NON_LOOPED_AT_COORD, fireworkname,                around.X, around.Y, around.Z, 0, 0, 0, 3.5f, 0, 0, 0);

Share this post


Link to post
Share on other sites
Fireboyd78

Damn, that sucks. I wasn't aware of that. If it doesn't "continue" soon, I'm switching to GTALua :p

Share this post


Link to post
Share on other sites
ffzero58

Thanks, CamxxCore. I may just bite the bullet soon and test this in C++ or C#. Curiosity is killing me.

 

WWO2s.jpg

 

Interestingly, it seems the fireworks requires some checks before it can become active? Perhaps this is more for online integrity than SP.

Share this post


Link to post
Share on other sites
ffzero58

Looks like just calling START_PARTICLE_FX... will not invoke the effect. I have not tried the above yet but perhaps I need to structure it similarly.

Share this post


Link to post
Share on other sites
Vrock_wave

Looks like just calling START_PARTICLE_FX... will not invoke the effect. I have not tried the above yet but perhaps I need to structure it similarly.

I got so effects on Lua

STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_fbi4")
GRAPHICS._SET_PTFX_ASSET_NEXT_CALL("scr_fbi4");
GRAPHICS.START_PARTICLE_FX_NON_LOOPED_ON_ENTITY("scr_fbi4_trucks_crash", PLAYER.PLAYER_PED_ID(), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10.0, false, false, false);
fx_prop.png

Share this post


Link to post
Share on other sites
ffzero58

Hmm, I get odd results using this:

if(get_key_pressed(Keys.N)) then --N pressed			coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.PLAYER_PED_ID(), 0, 0, 0)			while (not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED("scr_fbi4")) do wait(50) end			STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_fbi4")                       			GRAPHICS._SET_PTFX_ASSET_NEXT_CALL("scr_fbi4")						GRAPHICS.START_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_fbi4_trucks_crash", coords.x, coords.y, coords.z, 0.0, 0.0, 0.0, 10.0, false, false, false)		end

However, I only get the glow - not the sparks as you have it in your screenshot. I'm using the LUA scripthook by headscript.

 

GRAPHICS.START_PARTICLE_FX_NON_LOOPED_ON_ENTITY("scr_fbi4_trucks_crash", PLAYER.PLAYER_PED_ID(), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10.0, false, false, false) gives me an error where the first param expects a number. That tells me the LUA script is getting the definition of this native wrong. It looks correct on the Native DB... http://www.dev-c.com/nativedb/func/info/0d53a3b8da0809d2

 

LgcOQ.jpg

Edited by ffzero58

Share this post


Link to post
Share on other sites
julionib

 

Here is how I did fireworks (C#)

Commented in the names of the functions for you.

 if (!Function.Call<bool>(Hash._0x8702416E512EC454, "scr_indep_fireworks")) //STREAMING::HAS_NAMED_PTFX_ASSET_LOADED                {                    Function.Call(Hash._0xB80D8756B4668AB6, "scr_indep_fireworks"); //STREAMING::REQUEST_NAMED_PTFX_ASSET                }                Function.Call(Hash._0x6C38AF3693A69A91, "scr_indep_fireworks"); //GRAPHICS::_SET_PTFX_ASSET_NEXT_CALL                GTA.Math.Vector3 around = ped.Position.Around(5f);                Function.Call<int>(Hash.START_PARTICLE_FX_NON_LOOPED_AT_COORD, fireworkname,                around.X, around.Y, around.Z, 0, 0, 0, 3.5f, 0, 0, 0);

from where you get this particle effect info? i mean the asset name + name used in variable fireworkname

Share this post


Link to post
Share on other sites
Vrock_wave

Hmm, I get odd results using this:

if(get_key_pressed(Keys.N)) then --N pressed			coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.PLAYER_PED_ID(), 0, 0, 0)			while (not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED("scr_fbi4")) do wait(50) end			STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_fbi4")                       			GRAPHICS._SET_PTFX_ASSET_NEXT_CALL("scr_fbi4")						GRAPHICS.START_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_fbi4_trucks_crash", coords.x, coords.y, coords.z, 0.0, 0.0, 0.0, 10.0, false, false, false)		end

However, I only get the glow - not the sparks as you have it in your screenshot. I'm using the LUA scripthook by headscript.

 

GRAPHICS.START_PARTICLE_FX_NON_LOOPED_ON_ENTITY("scr_fbi4_trucks_crash", PLAYER.PLAYER_PED_ID(), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10.0, false, false, false) gives me an error where the first param expects a number. That tells me the LUA script is getting the definition of this native wrong. It looks correct on the Native DB... http://www.dev-c.com/nativedb/func/info/0d53a3b8da0809d2

 

LgcOQ.jpg

download new Lua plugin hichab

no sparks yes it's all because of the radius

GRAPHICS.START_PARTICLE_FX_NON_LOOPED_ON_ENTITY("scr_fbi4_trucks_crash", PLAYER.PLAYER_PED_ID(), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10.0, false, false, false)

parameter number 9 (10.0) the radius place 1.0

 

STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_rcbarry2")
GRAPHICS._SET_PTFX_ASSET_NEXT_CALL("scr_rcbarry2")
GRAPHICS.START_PARTICLE_FX_NON_LOOPED_ON_ENTITY("scr_clown_appears", car.vrockcar3, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false);
Edited by Vrock_wave

Share this post


Link to post
Share on other sites
ffzero58

Thanks, I got this to work a while back. Got misled by the hash being used for the FX size.


So, it looks like the native GRAPHICS.SET_PARTICLE_FX_NON_LOOPED_COLOUR only works for the tire smoke FX (like "scr_recartheft", "scr_wheel_burnout" and "scr_carsteal4", "scr_carsteal4_wheel_burnout")

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.