Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Forum Support

    3. Suggestions

MoonLoader


BH Team
 Share

Recommended Posts

Fantastic!

Link to comment
Share on other sites

inadequate

If this is a CLEO replacement (as the description states it)... How can someone to port his CLEO script to MOON without to re-write all from scratch again? And even worse if the original script is very, very long. Or are they compatible between platforms?

Edited by Inadequate
Link to comment
Share on other sites

If this is a CLEO replacement (as the description states it)... How can someone to port his CLEO script to MOON without to re-write all from scratch again? And even worse if the original script is very, very long. Or are they compatible between platforms?

Nope, they aren't. MoonLoader is intended to be CLEO replacement for new mods. Theoretically, scripts can be converted almost complete automatically, but making converter isn't worth it, it's better to rewrite script manually because then the script may be performed much better with all of those MoonLoader features. It's more a replacement for developers, than for users.

Edited by BH Team
Link to comment
Share on other sites

goodidea82

Amazing project!

Problem: documentation is not in english http://blast.hk/wiki/moonloader:functions#googtrans(en)

 

Some questions:

- Is the number of local variables unlimited?

- Are the commands executed by the SCM interpreter, or is the execution completely separated from the SCM interpreter?

- Are the datastructures from plugin-sdk included? (or do you plan to do it?)

- Is compatibility with FLA confirmed?

Link to comment
Share on other sites

Amazing project!

Problem: documentation is not in english http://blast.hk/wiki/moonloader:functions#googtrans(en)

 

Some questions:

- Is the number of local variables unlimited?

- Are the commands executed by the SCM interpreter, or is the execution completely separated from the SCM interpreter?

- Are the datastructures from plugin-sdk included? (or do you plan to do it?)

- Is compatibility with FLA confirmed?

1. Yes. Limited only by the RAM, as far as i know.

2. Functions that are opcodes (those who has 'opcode' value in the function list) - yes, but it's not completely executed by the SCM interpreter, it's more like direct opcode handler function calling with some emulation.

3. They aren't. Currently there is no plans in implementing it. It can be easily done via FFI, see the RapidFire.lua from examples.

4. What is "FLA"?

Edited by BH Team
Link to comment
Share on other sites

Colbertson

- Is compatibility with FLA confirmed?

Ive been running a bunch of Moonloader scripts and many other mods including FLA and havent had any issues.

Compatability seems good with everything

Edited by Mubber
Link to comment
Share on other sites

goodidea82

 

Amazing project!

Problem: documentation is not in english http://blast.hk/wiki/moonloader:functions#googtrans(en)

 

Some questions:

- Is the number of local variables unlimited?

- Are the commands executed by the SCM interpreter, or is the execution completely separated from the SCM interpreter?

- Are the datastructures from plugin-sdk included? (or do you plan to do it?)

- Is compatibility with FLA confirmed?

1. Yes. Limited only by the RAM, as far as i know.

2. Functions that are opcodes (those who has 'opcode' value in the function list) - yes, but it's not completely executed by the SCM interpreter, it's more like direct opcode handler function calling with some emulation.

3. They aren't. Currently there is no plans in implementing it. It can be easily done via FFI, see the RapidFire.lua from examples.

4. What is "FLA"?

 

FLA = fastman92limitAdjuster

 

I have looked up the FFI example in RapidFire.lua. Here for the others:

 

 

script_name('RapidFire')script_author('FYP')script_description('Get the latest MoonLoader updates from http://blast.hk/moonloader/')local ffi = require 'ffi'--- ConfigcheatToggle = 'RAPID'amplification = {-- weapon   speed multiplier (greater value = faster)    [22]   =   3,    -- pistol    -- [23]   =   4,    -- silenced pistol    [24]   =   2.5,  -- desert eagle    [25]   =   1.5,  -- shotgun    [26]   =   10,   -- sawn-off shotgun    [27]   =   10,   -- combat shotgun    [28]   =   2,    -- micro uzi    [29]   =   5,    -- mp5    [30]   =   3.5,  -- ak47    [31]   =   3,    -- m4    [32]   =   2,    -- tec9    [33]   =   10,   -- rifle    [34]   =   10,   -- sniper rifle}--- Mainfunction main()    gameGetWeaponInfo = ffi.cast('struct CWeaponInfo* (__cdecl*)(int, int)', 0x743C60)    while true do        wait(0)        if isPlayerPlaying(playerHandle) and isCharOnFoot(playerPed) then            if testCheat(cheatToggle) then                activated = not activated                printStringNow('RapidFire ' .. (activated and '~g~activated' or '~r~deactivated') .. '.~n~~y~Made by FYP~n~~w~blast.hk', 2000)                if activated then                    weaponOrigData = {}                    for skill = 1, 3 do                        weaponOrigData[skill] = {}                        for id, value in pairs(amplification) do                            local weap = gameGetWeaponInfo(id, skill - 1)                            weaponOrigData[skill][id] = {accuracy = weap.m_fAccuracy,                                                        animLoopStart = weap.m_fAnimLoopStart,                                                        animLoopFire = weap.m_fAnimLoopFire,                                                        animLoopEnd = weap.m_fAnimLoopEnd,                                                        animLoopStart2 = weap.m_fAnimLoop2Start,                                                        animLoopFire2 = weap.m_fAnimLoop2Fire,                                                        animLoopEnd2 = weap.m_fAnimLoop2End}                            -- magic                            local mul = 1 / value                            if id ~= 25 and id ~= 26 and id ~= 27 then                                weap.m_fAccuracy = weap.m_fAccuracy / (mul * 1.4)                            end                            weap.m_fAnimLoopStart = weap.m_fAnimLoopFire - (weap.m_fAnimLoopFire - weap.m_fAnimLoopStart) * mul                            weap.m_fAnimLoop2Start = weap.m_fAnimLoop2Fire - (weap.m_fAnimLoop2Fire - weap.m_fAnimLoop2Start) * mul                            weap.m_fAnimLoopEnd = weap.m_fAnimLoopFire + (weap.m_fAnimLoopEnd - weap.m_fAnimLoopFire) * mul                            weap.m_fAnimLoop2End = weap.m_fAnimLoop2Fire + (weap.m_fAnimLoop2End - weap.m_fAnimLoop2Fire) * mul                        end                    end                else                    restoreOriginalWeaponData()                    weaponOrigData = nil                end            end        end    endend--- Eventsfunction onExitScript()    restoreOriginalWeaponData()end--- Functionsfunction restoreOriginalWeaponData()    if weaponOrigData ~= nil then        for skill, weaponsOrig in pairs(weaponOrigData) do            for id, orig in pairs(weaponsOrig) do                local weap = gameGetWeaponInfo(id, skill - 1)                weap.m_fAccuracy              = orig.accuracy                weap.m_fAnimLoopStart  = orig.animLoopStart                weap.m_fAnimLoopFire   = orig.animLoopFire                weap.m_fAnimLoopEnd    = orig.animLoopEnd                weap.m_fAnimLoop2Start = orig.animLoopStart2                weap.m_fAnimLoop2Fire  = orig.animLoopFire2                weap.m_fAnimLoop2End   = orig.animLoopEnd2            end        end    endend--- FFIffi.cdef([[struct CVector { float x, y, z; };// from plugin-sdk: https://github.com/DK22Pac/plugin-sdk/blob/master/plugin_sa/game_sa/CWeaponInfo.hstruct CWeaponInfo{    int m_iWeaponFire; // 0    float m_fTargetRange; // 4    float m_fWeaponRange; // 8    __int32 m_dwModelId1; // 12    __int32 m_dwModelId2; // 16    unsigned __int32 m_dwSlot; // 20    union {        int m_iWeaponFlags; // 24        struct {            unsigned __int32 m_bCanAim : 1;            unsigned __int32 m_bAimWithArm : 1;            unsigned __int32 m_b1stPerson : 1;            unsigned __int32 m_bOnlyFreeAim : 1;            unsigned __int32 m_bMoveAim : 1;            unsigned __int32 m_bMoveFire : 1;            unsigned __int32 _weaponFlag6 : 1;            unsigned __int32 _weaponFlag7 : 1;            unsigned __int32 m_bThrow : 1;            unsigned __int32 m_bHeavy : 1;            unsigned __int32 m_bContinuosFire : 1;            unsigned __int32 m_bTwinPistol : 1;            unsigned __int32 m_bReload : 1;            unsigned __int32 m_bCrouchFire : 1;            unsigned __int32 m_bReload2Start : 1;            unsigned __int32 m_bLongReload : 1;            unsigned __int32 m_bSlowdown : 1;            unsigned __int32 m_bRandSpeed : 1;            unsigned __int32 m_bExpands : 1;        };    };    unsigned __int32 m_dwAnimGroup; // 28    unsigned __int16 m_wAmmoClip; // 32    unsigned __int16 m_wDamage; // 34    struct CVector m_vFireOffset; // 36    unsigned __int32 m_dwSkillLevel; // 48    unsigned __int32 m_dwReqStatLevel; // 52    float m_fAccuracy; // 56    float m_fMoveSpeed;    float m_fAnimLoopStart;    float m_fAnimLoopEnd;    float m_fAnimLoopFire;    float m_fAnimLoop2Start;    float m_fAnimLoop2End;    float m_fAnimLoop2Fire;    float m_fBreakoutTime;    float m_fSpeed;    float m_fRadius;    float m_fLifespan;    float m_fSpread;    unsigned __int16 m_wAimOffsetIndex;    unsigned __int8 m_nBaseCombo;    unsigned __int8 m_nNumCombos;} __attribute__ ((aligned (4)));]]) 

 

 

This looks really good I must admit and should be included in the standard in my opinion.

 

>..but it's not completely executed by the SCM interpreter, it's more like direct opcode handler function calling with some emulation

So how is the speed compared to native SCM execution?

Edited by goodidea82
Link to comment
Share on other sites

Sounds awesome!

 

Great job! And your English was not bad either.

Edited by Davve95
Link to comment
Share on other sites

Nice project.

 

I had the same idea, but stopped development of such a project.

 

You must check if your project is compatible with new ID limits. They are the main problem in other ASI plugins.

Edited by fastman92
Link to comment
Share on other sites

Finally you decided to post it here. Great job , your English is good. I've been following your work since v.021 beta. I am definitely gonna learn this as it seems to have a great future. :)

Link to comment
Share on other sites

This looks like a good CLEO replacement and has a bright future, but is it good for Mission Scripting?

Link to comment
Share on other sites

Oh... Can't say, I didn't test it. It should be good, MoonLoader has little amount of hooks and patches to provide better compatibility with other mods.

 

 

So how is the speed compared to native SCM execution?

Opcode-functions has overhead, it's inevitable, but it's like ~25-45% to the original, so it's ok, doesn't give a huge overload. I should do the benchmarks with comparisons.

 

 

I had the same idea, but stopped development of such a project.

Yea, heard about that somewhere, but after I started working on MoonLoader.

 

 

You must check if your project is compatible with new ID limits. They are the main problem in other ASI plugins.

Can you give me a tip how should I do this?

 

 

This looks like a good CLEO replacement and has a bright future, but is it good for Mission Scripting?

Pretty much. There is all the original game scripting features and game saving/loading system, so yes, why not...

 

 

And your English was not bad either.

So I can remove this ugly disclaimer? Edited by BH Team
  • Like 3
Link to comment
Share on other sites

Yeah, in my opinion it does not seem to be needed. But I'm not a expert either xD.

Edited by Davve95
Link to comment
Share on other sites

Zolika1351

Thank you for this, I always found CLEO scripting harder than lua so this will help me a lot.

Link to comment
Share on other sites

Yeah, me too. I hope this is way easier then CLEO scripting. If so I'd would get started someday.

Link to comment
Share on other sites

So this can give the possibility to developers creating graphics scripts which are mostly only available for MTA or SAMP?

Link to comment
Share on other sites

For people who don't know , here's some cool stuff made with lua scripting for MoonLoader :

 

 

 

Edited by Crspy
  • Like 4
Link to comment
Share on other sites

Hm, sad but none of the scripts are working for me? I put it in the moonloader folder but it doesn't work ingame...

 

 

 

EDIT: f*ck double post sorry....

 

 

EDIT2: Also when I started new game it game me runtime error... I had to uninstall

Edited by deltaCJ
Link to comment
Share on other sites

Hm, sad but none of the scripts are working for me? I put it in the moonloader folder but it doesn't work ingame...

 

 

 

EDIT: f*ck double post sorry....

You sure ? they work fine for me.

Link to comment
Share on other sites

You sure ? they work fine for me.

 

 

 

 

 

Yeah, its weird.

 

I tried the rapid fire and the sprint aim one but none work

Edited by deltaCJ
Link to comment
Share on other sites

Hm, sad but none of the scripts are working for me? I put it in the moonloader folder but it doesn't work ingame...

 

 

 

EDIT: f*ck double post sorry....

 

 

EDIT2: Also when I started new game it game me runtime error... I had to uninstall

Make sure your GTA: SA version is 1.0US and that you have installed MoonLoader properly. I doubt that the problem can be in the ASI loader, but anyway try Silent's ASI Loader.

If all this is true then the problem is in conflicting mods.

Link to comment
Share on other sites

 

Hm, sad but none of the scripts are working for me? I put it in the moonloader folder but it doesn't work ingame...

 

 

 

EDIT: f*ck double post sorry....

 

 

EDIT2: Also when I started new game it game me runtime error... I had to uninstall

Make sure your GTA: SA version is 1.0US and that you have installed MoonLoader properly. I doubt that the problem can be in the ASI loader, but anyway try Silent's ASI Loader.

If all this is true then the problem is in conflicting mods.

 

 

Of course I have GTA SA US 1.0 and I used the installer, I even checked ASI loader and Notepad ++ extension.

Link to comment
Share on other sites

It's great to see it here on GTAForums.It will be awesome if you can add some features like enabling and disabling lua scripts from the game menu (just like the modloader).Good luck with your upcoming projects :)

Link to comment
Share on other sites

Is it possible to Create Shader with LUA script ? @[email protected] Just Like MTA ...
I heard MTA using LUA script Too.. xD

Goodluck with your Project Btw <3 and Love to see Development .. :))

Link to comment
Share on other sites

Of course I have GTA SA US 1.0 and I used the installer, I even checked ASI loader and Notepad ++ extension.

Then most likely the problem in the mods conflict. Can you attach your moonloader.log?

 

 

It's great to see it here on GTAForums.It will be awesome if you can add some features like enabling and disabling lua scripts from the game menu (just like the modloader).Good luck with your upcoming projects :)

It would be nice, it's even can be done via lua script.

 

 

Is it possible to Create Shader with LUA script ? @[email protected] Just Like MTA ...

I heard MTA using LUA script Too.. xD

 

Goodluck with your Project Btw <3 and Love to see Development .. :))

Yes, MTA is using Lua, but it has its own API for rendering. Currently MoonLoader has no its own API for rendering, there is just original game possibilities to display some primitives on the screen. Adding rendering API is one of the priority tasks, but unfortunately, I can not even say approximately when it will be done. Edited by BH Team
  • Like 3
Link to comment
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
 Share

  • 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.