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

    1. GTANet.com

    2. GTANet 20th Anniversary

    1. GTA Online

      1. The Cayo Perico Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

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

    1. Red Dead Redemption 2

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

    1. Grand Theft Auto Series

      1. 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. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    7. GTA III

      1. Guides & Strategies
      2. 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. 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. Support

      1. Court House
    3. Suggestions

GTA Palette & Mouse SCM API


fastman92

Recommended Posts

 

GTA Palette & Mouse SCM API

 

Many of people have asked how to create UI interface in CLEO SCM, but most of them have no required knowledge to know how to begin.

However creators of CLEO added useful commands such as 0AB1 and 0AB2 that make it possible to simulate classes from modern programming languages.

When combined with method of additional variables, we’re able to do something than usual 0AB1 SCM functions.

The subject described in this document is easy-to-use circular HSV palette with few buttons to select color, alpha and switch whether value of color shall be maximized when particular color is being chosen by clicking on palette.

Reasonably a mouse support is easy to use as well. It occurs as a matter of 3 opcodes to add in source of project.

What’s more – you can use more than one instance of palette and draw it on screen. Feel free to use palette and mouse cursor in whichever project where you can find these things useful.

As time goes by - GTA SA modding is still growing up.

 

Fully compatible with GTA San Andreas v1.0 [uS] HOODLUM No-CD Fixed EXE & GTA: San Andreas v1.01 [EURO] No-CD/Fixed EXE

Fully compatible with any screen resolution (4:3, 16:9, 16:10...)

Fully compatible with CLEO3 and newer

- - - - - - - - - - - - - - - - - -

 

Download

http://www.mediafire.com/?8irp00v7a2jqr64

 

user posted image

 

 

***** How to use

Open Readme.docx and read more about it.

 

***** Changes in 1.1 version:

- enlarged "hsvPalette" texture to 512 x 512 px

- fixed number of input parameters in example of function @PaletteHSVCircle_setHSVcolor

- added aliases such as:

PaletteHSVCircle_getRGBcolor and PaletteHSVCircle_readRGBcolor

PaletteHSVCircle_getRGBAcolor and PaletteHSVCircle_readRGBAcolor

PaletteHSVCircle_getHSVcolor and PaletteHSVCircle_readHSVcolor

- added automatic rescaling when user has changed the game resolution

- fixed incorrect change of position when PaletteHSVCircle_RescaleAllObjects is used subsequently

 

***** 1.1 is 100% compatible with previously written scripts.

 

***** Informations:

Date of release: 02-05-2012 (d-m-Y)

Author: fastman92

Version: 1.1

For: GTA San Andreas

Visit fastman92-site.tk

Edited by fastman92
Link to post
Share on other sites

I have only a video of the In-game Timecyc Editor (project already), where palette is used.

 

On the video, button to switch option, brightening value of color when color is chosen by clicking on palette didn't exist yet.

 

What i made is Palette & Mouse Cursor SCM Framework for which you will need little skill of CLEO scripting.

 

It's FOR SCRIPTERS, who want use mouse cursor and possibly a palette in their projects.

 

Please download archive and open Readme.docx to read more.

Edited by fastman92
Link to post
Share on other sites

This interface is much better than SA's panels.

Link to post
Share on other sites

I miss working with these kind of interfaces. Can't wait until L.A.M.E. is the next thing on my todo list...

 

Mouse is tiny, though tounge2.gif

Link to post
Share on other sites
  • 4 weeks later...

Thanks for replies.

 

I updated version to 1.1:

 

***** Changes in 1.1 version:

- enlarged "hsvPalette" texture to 512 x 512 px

- fixed number of input parameters in example of function @PaletteHSVCircle_setHSVcolor

- added aliases such as:

PaletteHSVCircle_getRGBcolor and PaletteHSVCircle_readRGBcolor

PaletteHSVCircle_getRGBAcolor and PaletteHSVCircle_readRGBAcolor

PaletteHSVCircle_getHSVcolor and PaletteHSVCircle_readHSVcolor

- added automatic rescaling when user has changed the game resolution

- fixed incorrect change of position when PaletteHSVCircle_RescaleAllObjects is used subsequently

 

***** 1.1 is 100% compatible with previously written scripts.

 

Note that anyone can use the palette in their projects freely. You can use it whenever needed. Example: car color editor.

Upcoming In-game Timecyc 1.7 will be integrated with GTA Palette & Mouse SCM API.

Edited by fastman92
Link to post
Share on other sites
  • 6 months later...
  • 3 months later...

You should include a sample that demonstrates how to check if a drawn texture has been clicked on, because I couldn't understand it in the PaletteCircleHandling.

Link to post
Share on other sites
  • 4 months later...

 

Can I use this pallete in a mod?

Be sure I will add your name in authors.

He, I think so, otherwise he would not have posted the library including a how to use and stuff sarcasm.gif

Link to post
Share on other sites
  • 5 months later...

oh... i totally forgotten about this topic!

excuse me(after some years and years!)

that will never be done again and this(really i've to say word 'This' after this time?!) just for midnightz's post.

Link to post
Share on other sites

It's fairly easy to make CLEO with a palette and mouse.

If anyone has an idea for interactive CLEO script, then go ahead.

Link to post
Share on other sites

Just wondering fastman32 I was experimenting with your mod with my modified exe it led to some bugs like not correctly displaying the texts,panel etc.It was completely random.

Will it be possible to make the pallette compactible with my exe ?/

I can PM you my exe if you could help me.(GTAF doesn't support sharing of game files so I won't be posting the link here).

Link to post
Share on other sites

Just wondering fastman32 I was experimenting with your mod with my modified exe it led to some bugs like not correctly displaying the texts,panel etc.It was completely random.

Will it be possible to make the pallette compactible with my exe ?/

I can PM you my exe if you could help me.(GTAF doesn't support sharing of game files so I won't be posting the link here).

Random? I don't know it at all. I can't imagine it.

 

What EXE size is yours? You should write it already in a post. Otherwise you're wasting someone's time.

 

Readme.docx says:

 

Basic information

Palette API was confirmed to be:

• Fully compatible with GTA San Andreas v1.0 [uS] HOODLUM No-CD Fixed EXE & GTA: San Andreas v1.01 [EURO] No-CD/Fixed EXE

• Fully compatible with any screen resolution (4:3, 16:9, 16:10...)

• Fully compatible with CLEO3 and newer

Link to post
Share on other sites

It's fairly easy to make CLEO with a palette and mouse.

If anyone has an idea for interactive CLEO script, then go ahead.

you want idea? I have one!

InGame Paint!

yes paint.

lets explain that:

as you know In SCM shapes don't have a name (opposite of flash)

so how to move/re-scale/re-color them?

yes. we have to make an array for naming them like:

posX[shapeIndex]

posY[shapeIndex]

and so on...

 

script must draw all of them every moment;

but the uncolored/unscaled shapes have colorAlpha[shapeIndex] = 0

 

every new click mouse must increase 1 our shapeIndexCounter

script check what tool we are using that? pen, rectangle or circle.

if pen then increase shapeIndexCounter every moment else wait until mouse button have released and then increase it.

drawing rectangle is too easy with opcode 0937 but circle.

i think must there is a 1*1 circle texture that script draw it according to our pos/size.

it's my first question to is there any other way for it?

 

loading pic is so easy... wait... not so easy!

i think it's possible to use windows funcs to open a open file dialog:

else have to make a one, manual!

listing all files of an folder is not so hard.

just need to search for *.* (or *.bmp/png) and give name of them to an memory alloc array.

wen list of folder's files is available it's time to draw window.

an white rectangle. an exit × button. cancel button. and open button.

also may an text for write file name manually.(e.g. with the method that used in MyCheatConsole)

then draw an little icon for each file. and draw that's name side of it.

my second question is how to get folder names.

 

but saving is really easy!

opcode 0A1e and find the latest file in gallery folder and then move it to a new folder with an arbitrary name.

Link to post
Share on other sites

 

Just wondering fastman32 I was experimenting with your mod with my modified exe it led to some bugs like not correctly displaying the texts,panel etc.It was completely random.

Will it be possible to make the pallette compactible with my exe ?/

I can PM you my exe if you could help me.(GTAF doesn't support sharing of game files so I won't be posting the link here).

Random? I don't know it at all. I can't imagine it.

 

What EXE size is yours? You should write it already in a post. Otherwise you're wasting someone's time.

 

Readme.docx says:

Basic information

Palette API was confirmed to be:

• Fully compatible with GTA San Andreas v1.0 [uS] HOODLUM No-CD Fixed EXE & GTA: San Andreas v1.01 [EURO] No-CD/Fixed EXE

• Fully compatible with any screen resolution (4:3, 16:9, 16:10...)

• Fully compatible with CLEO3 and newer

 

 

Well thanks for keeping a notice on my post but no worries I fixed it out myself :)

 

@MasterK: Your idea really impressed me :D Are you planning to make a mod like that ?? That would be really great ;)

Link to post
Share on other sites

Sorry, but i meant if someone has the idea to make a CLEO script, then make it yourself.

Beside, your idea would be a waste of time for trying to archive very hard stuff with no exact purpose whatsoever.

 

I'm not fastman32.

Edited by fastman92
Link to post
Share on other sites

i just ask 2 questions on that post.

i just wanted from you to ask them, amigo!



@MasterK: Your idea really impressed me :D Are you planning to make a mod like that ?? That would be really great ;)

 

 

Thank you and...

Perhaps , just Perhaps... : )

Link to post
Share on other sites
  • 2 weeks later...

I got a good idea

an In-game car colours editor with their names and IDs (similiar to your timecyc editor though)

 

Edit : Forget it... terrible idea since vehicle modders are using that tools... whatever it calls... GTA San Andreas Ultimate Editor

Edited by Rizky Rizaldi
Link to post
Share on other sites
  • 2 years later...

Will someone come up and implement anything with this library?

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
  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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