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

    2. News

    1. Red Dead Redemption 2

    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

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

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. 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. Forum Support

    2. Site Suggestions

TheSangheili

[HELP] Duplicating madleg's ragdoll mod

Recommended Posts

TheSangheili
Posted (edited)

So madleg's ragdoll mod looks good, it makes SA more like IV, but it does not work for everyone and we don't have the source to fix it. And it is not compatible with all mods. Sadly madleg has not been active for 3 months or so, asking him for the source code is a long shot.

 

I want to duplicate his work in pure C++, no cleo bull-poop.

 

What I know:

- Assembly

- C++

- https://github.com/DK22Pac/plugin-sdk(Thanks to DK22Pac)

 

What I don't know:

- How to control the Ped, i.e. send the arms and legs flying around their joints, the limits of the joints...etc.

- The physics of ragdoll.

- I don't know the SDK very well.

 

What I want:

- Make dead bodies solid like IV.

- When you run some fool over, your car slows down as if he weighs at least 400 kg. I want to correct that.

- Add ragdoll simulation when the ped is dead or flying

- Add ragdoll simulation when the ped is shot with a big gun (Shotgun, AK...)

 

Can you give me some pointers (pun intended)? any help would be appreciated.

Edited by TheSangheili

Share this post


Link to post
Share on other sites
4Arty

Ask dk, only one of us can help you)

Share this post


Link to post
Share on other sites
thalilmythos

I still got the release he made Before the last, which is made purely on cleo, no asi maybe you could get the source from there? let me know if you want me to send it.

Share this post


Link to post
Share on other sites
TheSangheili

I still got the release he made Before the last, which is made purely on cleo, no asi maybe you could get the source from there? let me know if you want me to send it.

 

Please do. :colgate: Hopefully it won't have any custom opcodes.

Share this post


Link to post
Share on other sites
Davve95

Will you relase it if you were allowed to?

If it's done and be something

Share this post


Link to post
Share on other sites
TheSangheili
Posted (edited)

Will you relase it if you were allowed to?

If it's done and be something

 

That's the point, to release it, and to make it open source.

And I don't think he would mind. I'll give him credit if I use his source, and I will give him credit for the idea.

 

 

EDIT: I just realized you misspelled release, I would let it slide but grammar is very important to the Nazi party.

Edited by TheSangheili

Share this post


Link to post
Share on other sites
Junior_Djjr
Posted (edited)

which is made purely on cleo, no asi maybe

But... .cleo = .asi = .dll

You can also rename .cleo to .asi that you work.

 

 


You will definitely need the source code.

Edited by Junior_Djjr

Share this post


Link to post
Share on other sites
TheSangheili
Posted (edited)

Thank you.

 

 

 

which is made purely on cleo, no asi maybe

But... .cleo = .asi = .dll

You can also rename .cleo to .asi that you work.

 

 


You will definitely need the source code.

 

Ah! yes, there is a '.cleo' file. Not cleo scripts only... (A cleo plugin)

He added some opcodes the the cleo library...

It won't be the same as the source, but it is better that nothing. I just read the cleo sdk, I should be able to find out what opcodes were added, and by looking at what their callbacks do to gta_sa.exe, I should be able to understand what their functions are.

Edited by TheSangheili

Share this post


Link to post
Share on other sites
thalilmythos
Posted (edited)

Thank you.

 

 

 

which is made purely on cleo, no asi maybe

But... .cleo = .asi = .dll

You can also rename .cleo to .asi that you work.

 

 


You will definitely need the source code.

 

Ah! yes, there is a '.cleo' file. Not cleo scripts only... (A cleo plugin)

He added some opcodes the the cleo library...

It won't be the same as the source, but it is better that nothing. I just read the cleo sdk, I should be able to find out what opcodes were added, and by looking at what their callbacks do to gta_sa.exe, I should be able to understand what their functions are.

 

 

Still, callbacks or not, it is purely cleo, and there are more tools for it so, you can get the information you need, like you just said so i'm glad i was helpfull, i do want to see what you are promissing happen

Edited by thalilmythos

Share this post


Link to post
Share on other sites
TheSangheili
Posted (edited)

Still, callbacks or not, it is purely cleo, and there are more tools for it so, you can get the information you need, like you just said so i'm glad i was helpfull, i do want to see what you are promissing happen

 

It's so easy. All I have to do is find out where he called this (the debugger will do that for me):

BOOL  WINAPI CLEO_RegisterOpcode(WORD opcode, _pOpcodeHandler callback)

Then I can read the code to get the Opcode (16bit integer) and the address of the function.

Then I can jump to the address of the function to find out the number of parameters and their types:

DWORD WINAPI CLEO_GetIntOpcodeParam(CScriptThread* thread);float WINAPI CLEO_GetFloatOpcodeParam(CScriptThread* thread);void  WINAPI CLEO_SetIntOpcodeParam(CScriptThread* thread, DWORD value);void  WINAPI CLEO_SetFloatOpcodeParam(CScriptThread* thread, float value);LPSTR WINAPI CLEO_ReadStringOpcodeParam(CScriptThread* thread, LPSTR buf, int size);void  WINAPI CLEO_WriteStringOpcodeParam(CScriptThread* thread, LPCSTR str);

Then I can add the opcodes to SannyBuilder (No, Tommy killed Sunny, not Sanny) and decompile the script. And there you go, Now I know what the parameters are. I can go back to the callbacks and try to guess what they are doing, Thanks to DK22Pac, I have the addresses of so many functions and structures I can find out what he is doing and rewrite the mod.

 

It's only a matter of time. :colgate: also this version is better that the last one because it is simpler. :colgate:

Edited by TheSangheili

Share this post


Link to post
Share on other sites
DK22Pac
Posted (edited)

Why do you strictly depend on this mod?

I think you can learn some basics of bullet library and make your own mod.

 

Also, I offered to help madleg, but he kinda ignored it. So I don't think it's a good idea to dig in his work.

Edited by DK22Pac

Share this post


Link to post
Share on other sites
TheSangheili
Posted (edited)

Why do you strictly depend on this mod?

I have no idea how to make the Ped 'floppy' and toss them around. And I know that If you set the ped's velocity to something small, the game will not send them flying unless they are already in the air. (I could be wrong or oblivious to the trick, should I NOP something?).

And I don't know how to make the Ped solid when they're dead.

I think you can learn some basics of bullet library and make your own mod.

 

What do you mean bullet library? do you mean how bullets work in gta_sa?

I am writing an asi plugin to make all bullets like the sniper bullet, i.e. delayed bullets not "instant_hit, created and destroyed in the same frame". It is still WIP. I did not finish the simulated M4 bullet. I also changed the limit to 4096 or whatever I want, and all bullets have traces. Also big bullets go through Peds and Cars (Not Tanks).

 

But I don't want it to be just for bullets, I want SA to become like IV, dead bodies have mass & collision. And you can move them around with your car or if you kick them. I used to go to that building facing the apartment Niko & Roman fled to. and take cover at the end of the stairs just under the roof with the cops on my tail. I used to kill so many, the game can't load anymore peds. And when I try to get out I can't because the dead bodies are blocking Niko's big feet. That's what I want to do for SA.

 

In gta_iv I used to alter the guns to have higher damage and force. When you blast a fool with the shotgun he would fly 2 meters. one time I shot a fat pin and he dropped his shotgun and it went off and hit his partner, IT WAS AWESOME! AND I WANT IT IN GTA_SA.

Edited by TheSangheili

Share this post


Link to post
Share on other sites
4Arty

 

Why do you strictly depend on this mod?

I have no idea how to make the Ped 'floppy' and toss them around. And I know that If you set the ped's velocity to something small, the game will not send them flying unless they are already in the air. (I could be wrong or oblivious to the trick, should I NOP something?).

And I don't know how to make the Ped solid when they're dead.

I think you can learn some basics of bullet library and make your own mod.

 

What do you mean bullet library? do you mean how bullets work in gta_sa?

I am writing an asi plugin to make all bullets like the sniper bullet, i.e. delayed bullets not "instant_hit, created and destroyed in the same frame". It is still WIP. I did not finish the simulated M4 bullet. I also changed the limit to 4096 or whatever I want, and all bullets have traces. Also big bullets go through Peds and Cars (Not Tanks).

 

But I don't want it to be just for bullets, I want SA to become like IV, dead bodies have mass & collision. And you can move them around with your car or if you kick them.

 

he means bullet physics library engine

Share this post


Link to post
Share on other sites
kkjj
Posted (edited)

Yep.

Edited by kkjj

Share this post


Link to post
Share on other sites
Davve95
Posted (edited)

I also think you should create your own one because of what DK22Pac said.

But maybe it will work anyway with madlegs work.

 

Maybe you could come in contact with him at his YouTube channel in the comments.

 

And if you not decide to use his work, you could just use his script for inspirations and help if you would get stuck.

Edited by Davve95

Share this post


Link to post
Share on other sites
TheSangheili

Ok. I will start form scratch then... I hate cleo anyway.

Share this post


Link to post
Share on other sites
Junior_Djjr
Posted (edited)

I also think you should create your own one because of what DK22Pac said.

Idem.

 

If you at least had the source code... but editing it this way is crazy.

 

(and someone need to move this thread to the correct area)

Edited by Junior_Djjr

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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