Quantcast

Jump to content

» «
Photo

[CLEO4]NewOpcodes by DK22Pac

127 replies to this topic
Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#61

Posted 27 December 2013 - 05:28 PM

Indeed, there seems to be enough space for the fifth paintjob too. No more though.

And yes, was about to post this function too :p

Danikov
  • Danikov

    The Fake Russian

  • Members
  • Joined: 27 Aug 2009
  • Israel

#62

Posted 27 December 2013 - 05:49 PM

Just tried a modification which adds paintjobs to SA's default cars(Modifies both .dffs and .txds) and that unfortunately didn't work.

 

Isn't there a way to make it apply on all cars? just like it happens with destroyed cars,they have a darker texture on them somehow...can't that method be copied?


ByteCode2014
  • ByteCode2014

    Square Civilian

  • Members
  • Joined: 28 Mar 2012
  • Philippines

#63

Posted 31 December 2013 - 02:44 PM Edited by ByteCode2014, 31 December 2013 - 02:45 PM.

as an addition to danikov, how to load "0D61: t = load_texture_from "test.bmp" with_mask NULL // IF and SET"  in different cars?..... and @dk can you add for random car in newopcodes? and support 0D61 in all models?   


DK22Pac
  • DK22Pac

  • Feroci
  • Joined: 12 Apr 2009
  • Ukraine
  • Best WIP Mod 2014 [Grand Theft Auto 3D Contribution]
    Contribution Award [Mods]

#64

Posted 05 January 2014 - 10:32 AM

You can use this only for cars with paintjobs.

Isn't there a way to make it apply on all cars?

Yes, and this way is called
Spoiler


I've reached 0D0E, 16 opcodes are remade! So slow...
8o81.th.png

DK22Pac
  • DK22Pac

  • Feroci
  • Joined: 12 Apr 2009
  • Ukraine
  • Best WIP Mod 2014 [Grand Theft Auto 3D Contribution]
    Contribution Award [Mods]

#65

Posted 07 January 2014 - 08:32 AM

Update: 0D30 now works with string parameters!
aq2e.th.png
{$CLEO .cs}

0000:

while true
    wait 0
    if
        player.Defined(0)
    then
        if
            0D30: 0@ = actor $PLAYER_ACTOR bone "R UpperArm"
        then
            0D32: 1@ = bone 0@ quat
            0D18: rotate_quat 1@ axis_vector 1.0 0.0 0.0 angle 45.0 combine_op 2
        end
        if
            0D30: 0@ = actor $PLAYER_ACTOR bone "L UpperArm"
        then
            0D32: 1@ = bone 0@ quat
            0D18: rotate_quat 1@ axis_vector 1.0 0.0 0.0 angle 45.0 combine_op 2
        end
    end
end
z7y2.png
lal.
  • Danikov likes this

MasterHK
  • MasterHK

    کیان حامی‏

  • Members
  • Joined: 20 Mar 2013
  • Iran

#66

Posted 07 January 2014 - 10:01 AM

Just string? :(

that makes opcode useful specially when using scmFuncs...


DK22Pac
  • DK22Pac

  • Feroci
  • Joined: 12 Apr 2009
  • Ukraine
  • Best WIP Mod 2014 [Grand Theft Auto 3D Contribution]
    Contribution Award [Mods]

#67

Posted 07 January 2014 - 10:11 AM Edited by _DK, 07 January 2014 - 10:36 AM.

No, it works with both string (bone name) and integer (bone index) types.
But using it in such way
[email protected] = "R Hand"
0AC7: 4@ = var 0@ offset
0D30: 0@ = actor $PLAYER_ACTOR bone 4@
is impossible. It will detect 4@ as integer (bone index) parameter.
  • MasterHK likes this

Danikov
  • Danikov

    The Fake Russian

  • Members
  • Joined: 27 Aug 2009
  • Israel

#68

Posted 07 January 2014 - 10:40 AM

Haha,lol,Rotate all bones by 180 degrees and you'll get a moonwalking CJ.

Also,could you please rewrite opcode 0D5F,it appears to be crashing when its present in a script.

DK22Pac
  • DK22Pac

  • Feroci
  • Joined: 12 Apr 2009
  • Ukraine
  • Best WIP Mod 2014 [Grand Theft Auto 3D Contribution]
    Contribution Award [Mods]

#69

Posted 07 January 2014 - 11:44 AM

I'm rewriting all opcodes. Can't test them all, but testing some of them.

MasterHK
  • MasterHK

    کیان حامی‏

  • Members
  • Joined: 20 Mar 2013
  • Iran

#70

Posted 07 January 2014 - 01:04 PM

OK. : |

thank you for answer.

now some Ideas for newOpcodes:

isMenuActivated (checks is current menu equal to this variable?)

getSelectedSlot (for get selectedSave/LoadSlot; as in Deji's example in his SuperVars)

saveOnSlot (not needs description for a coder like you : ) )

changeGxtContent (remember your IV radio hud)

exitImmediately (shutdownGame function used in fastman92's TimeCyCeDitor)

getIgnoreState (the result will be 2 boolean nums. one for byCops ignoring stat and one for byAll ignoring stat)

isCarHaveRadio (... : |)

addNewLineInFile (write specified 0x0A chars in a file)

and wesser's useful texture checking funcs.

 

However, goodLuck! : )


Urkman1
  • Urkman1

    Player Hater

  • Members
  • Joined: 07 Aug 2012

#71

Posted 08 January 2014 - 09:03 PM

Whenever I try this, I follow the instructions and it says "error loading plugin newOpcodes.cleo", and SA says it can't find my Audio Card  :panic:


MasterHK
  • MasterHK

    کیان حامی‏

  • Members
  • Joined: 20 Mar 2013
  • Iran

#72

Posted 09 January 2014 - 01:58 AM

have you cleo 4.2?

or better to say anti-every mod! :catspider:


MasterHK
  • MasterHK

    کیان حامی‏

  • Members
  • Joined: 20 Mar 2013
  • Iran

#73

Posted 09 January 2014 - 02:09 AM

for me, using 0D39 make my game _!_!_ ... : (

check it out, please...


DK22Pac
  • DK22Pac

  • Feroci
  • Joined: 12 Apr 2009
  • Ukraine
  • Best WIP Mod 2014 [Grand Theft Auto 3D Contribution]
    Contribution Award [Mods]

#74

Posted 11 January 2014 - 06:26 PM

I've decided to split newOpcodes.cleo into few independent .cleo plugins. They will be:
noMatrix.cleo - matrices stuff
noVector.cleo - vectors
noQuat.cleo - quats
noTexture.cleo - textures loader
noTxd.cleo - stuff related to txd, like loading/unloading, searching for texture in txd
noBone.cleo - stuff with ped bones
noComponent.cleo - vehicle components with ~20 new opcodes
... and maybe some others
Currently added opcodes:
noSprite
0D7E=10, draw_sprite_with_texture %1d% at_cornerA %2d% %3d% cornerB %4d% %5d% color %6d% %7d% %8d% %9d% angle %10d%
0D7E: draw_sprite_with_texture 0@ at_cornerA 100.0 100.0 cornerB 300.0 300.0 color 255 255 255 255 angle 0.0
SCR: DRAW_2D_SPRITE

0D7F=22, draw_sprite_with_texture %1d% at_cornerA %2d% %3d% cornerB %4d% %5d% colors %6d% %7d% %8d% %9d%  %10d% %11d% %12d% %13d%  %14d% %15d% %16d% %17d%  %18d% %19d% %20d% %21d% angle %22d%
0D7F: draw_gradient_sprite_with_texture 0@ at_cornerA 100.0 100.0 cornerB 300.0 300.0 color 255 255 255 255 angle 0.0
SCR: DRAW_2D_SPRITE_WITH_GRADIENT
noTexture
0D7C=2, %2d% = load_texture_dds_from %1s% // IF and SET
0D7C: 0@ = load_texture_dds_from "image.dds" // IF and SET
SCR: LOAD_TEXTURE_FROM_DDS_FILE

0D7D=1, clean_loaded_texture %1d%
0D7D: clean_loaded_texture 0@
SCR: CLEAN_LOADED_TEXTURE
noComponent
0D74=2,%2d% = component %1d% parent_component
0D74: 1@ = component 0@ parent_component
SCR: GET_COMPONENT_PARENT_COMPONENT

0D75=2,%2d% = component %1d% num_objects
0D75: 1@ = component 0@ num_objects
SCR: GET_COMPONENT_NUM_OBJECTS

0D76=3,%2d% = component %1d% object 0
0D76: 1@ = component 0@ object 0
SCR: GET_COMPONENT_OBJECT

0D77=2, object_atomic %1d% hide 1
0D77: object_atomic 0@ hide 1
SCR: HIDE_OBJECT_ATOMIC

0D78=3,%3d% = get_object %1d% atomic_flag %2d%
0D78: 2@ = get_object 0@ atomic_flag 1@
SCR: GET_OBJECT_ATOMIC_FLAG

0D79=3, set_object 0@ atomic_flag 1@ state ENABLE
0D79: set_object %1d% atomic_flag %2d% state %3d%
SCR: SET_OBJECT_ATOMIC_FLAG

0D7A=2,%2d% = get_object %1d% num_materials
0D7A: 1@ = get_object 0@ num_materials
SCR: GET_OBJECT_ATOMIC_NUM_MATERIALS

0D7B=3,%3d% = get_object %1d% material %2d% texture
0D7B: 1@ = get_object 0@ material 0 texture
SCR: GET_OBJECT_ATOMIC_MATERIAL_TEXTURE
  • Danikov, Silent, ByteCode2014 and 1 other like this

MasterHK
  • MasterHK

    کیان حامی‏

  • Members
  • Joined: 20 Mar 2013
  • Iran

#75

Posted 13 January 2014 - 10:52 AM Edited by MasterHK, 13 January 2014 - 10:53 AM.

Great specially Sprite and Texture.

just please try to make it compatible with MogAika's one. : )


Danikov
  • Danikov

    The Fake Russian

  • Members
  • Joined: 27 Aug 2009
  • Israel

#76

Posted 16 January 2014 - 05:33 AM Edited by Danikov, 16 January 2014 - 07:30 AM.

Can you add opcodes that check whether the vehicle is:
-A Boat
-A Helicopter
-A Plane
-A Bike
-A RC Vehicle
-A Train
 
I really hate how there are only opcodes that check if any actor is driving these,It would be really nice to have opcodes that check if the vehicle is an Aircraft for example,without depending on the fact if it has an actor or not inside it.
 
EDIT : I also forgot to mention another thing,can you add an opcode that stores a vehicle from a vehicle generator into a variable?
Example :
6789: get veh_from_generator 0@ store to 1@

DK22Pac
  • DK22Pac

  • Feroci
  • Joined: 12 Apr 2009
  • Ukraine
  • Best WIP Mod 2014 [Grand Theft Auto 3D Contribution]
    Contribution Award [Mods]

#77

Posted 16 January 2014 - 03:01 PM Edited by _DK, 16 January 2014 - 03:02 PM.

Can you add opcodes that check whether the vehicle is:

Did you miss this?
0D5E=3,get_vehicle %1d% class_to %2d% subclass_to %3d% 
VEHICLE_CLASS_AUTOMOBILE 
VEHICLE_CLASS_MTRUCK 
VEHICLE_CLASS_QUAD 
VEHICLE_CLASS_HELI 
VEHICLE_CLASS_PLANE 
VEHICLE_CLASS_BOAT 
VEHICLE_CLASS_TRAIN 
VEHICLE_CLASS_FHELI 
VEHICLE_CLASS_FPLANE 
VEHICLE_CLASS_BIKE 
VEHICLE_CLASS_BMX 
VEHICLE_CLASS_TRAILER
  • Silent and ByteCode2014 like this

Danikov
  • Danikov

    The Fake Russian

  • Members
  • Joined: 27 Aug 2009
  • Israel

#78

Posted 16 January 2014 - 04:17 PM

yes,I have missed this,damnit,thank you!!!

And what about the vehicle generator suggestion?

Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#79

Posted 16 January 2014 - 09:40 PM

What's with you guys naming script stuff as CScriptThread? It's CRunningScript :p

MasterHK
  • MasterHK

    کیان حامی‏

  • Members
  • Joined: 20 Mar 2013
  • Iran

#80

Posted 17 January 2014 - 04:26 AM Edited by MasterHK, 17 January 2014 - 08:27 AM.

an great Idea:

some opcodes for your GREAT pathFinderSytem

0000: 0@ = appear_path_from 2488.562 -1666.865 12.8757 to 1833.36 -1995.45 12.5 color 0xFF8800FF type 0 // 0 = vehicle / 1 = pedestrian

0000: clear_DK_path 0@ :p

0000:   path_defined 0@

Edit:

No, it works with both string (bone name) and integer (bone index) types.
But using it in such way

[email protected] = "R Hand"
0AC7: 4@ = var 0@ offset
0D30: 0@ = actor $PLAYER_ACTOR bone 4@
is impossible. It will detect 4@ as integer (bone index) parameter.

 

 

can i use these cases instead of yours?

4@ = Memory.Alloc(8)
0AD3: 4@ "R Hand"

or

4@ = label @RHNAME offset
...
:RHNAME
hex
"R" 20 "Hand" 00

Wesser
  • Wesser

    The complexity simplifier, the efficiency optimizer.

  • Feroci
  • Joined: 19 Aug 2006
  • Unknown
  • Contribution Award [Mods]

#81

Posted 17 January 2014 - 10:24 AM

an great Idea:
some opcodes for your GREAT pathFinderSytem
0000: 0@ = appear_path_from 2488.562 -1666.865 12.8757 to 1833.36 -1995.45 12.5 color 0xFF8800FF type 0 // 0 = vehicle / 1 = pedestrian
0000: clear_DK_path 0@ :p
0000: path_defined 0@

You can follow some of these information for the path-find system.
  • MasterHK likes this

MasterHK
  • MasterHK

    کیان حامی‏

  • Members
  • Joined: 20 Mar 2013
  • Iran

#82

Posted 17 January 2014 - 12:24 PM

[offtopic]

Yes but apper an line on the map!

i think not it's possible in Cleo...


DK22Pac
  • DK22Pac

  • Feroci
  • Joined: 12 Apr 2009
  • Ukraine
  • Best WIP Mod 2014 [Grand Theft Auto 3D Contribution]
    Contribution Award [Mods]

#83

Posted 17 January 2014 - 04:13 PM

What's with you guys naming script stuff as CScriptThread? It's CRunningScript :p

That's how it's called in CLEO SDK.

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • Poland
  • Contribution Award [Mods]

#84

Posted 17 January 2014 - 08:48 PM

What's with you guys naming script stuff as CScriptThread? It's CRunningScript :p

That's how it's called in CLEO SDK.

Make an alias.

typedef CScriptThread CRunningScript;

MasterHK
  • MasterHK

    کیان حامی‏

  • Members
  • Joined: 20 Mar 2013
  • Iran

#85

Posted 21 January 2014 - 03:03 AM Edited by MasterHK, 21 January 2014 - 03:26 AM.

0000: [email protected] = current_cleo_file_name

(ThreadPointer + 8)


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • Poland
  • Contribution Award [Mods]

#86

Posted 21 January 2014 - 07:35 PM

0000: [email protected] = current_cleo_file_name
(ThreadPointer + 8)

No....
It's script name. Property of a script.
Written either by a CLEO or 03A4 opcode.

MasterHK
  • MasterHK

    کیان حامی‏

  • Members
  • Joined: 20 Mar 2013
  • Iran

#87

Posted 22 January 2014 - 11:23 AM

yes, i know max length is 7 because +16 is base ip.


Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#88

Posted 27 January 2014 - 07:13 PM

Is it ok if i release a mod that uses your New Opcodes ? What you managed to include to gta sa is beyond imagination ( vertices , png and bmp ... )


DK22Pac
  • DK22Pac

  • Feroci
  • Joined: 12 Apr 2009
  • Ukraine
  • Best WIP Mod 2014 [Grand Theft Auto 3D Contribution]
    Contribution Award [Mods]

#89

Posted 29 January 2014 - 01:24 AM Edited by _DK, 29 January 2014 - 01:24 AM.

Who asked me for 05FD opcode?
n583.th.png
  • ByteCode2014 and MasterHK like this

MasterHK
  • MasterHK

    کیان حامی‏

  • Members
  • Joined: 20 Mar 2013
  • Iran

#90

Posted 30 January 2014 - 04:30 AM

some new ideas:

loadExternalIFP(as in deji's black market mod, it can be really useful when number of .ifp files inside img is very much and limit of ifps don't allow us to add more ifps)

 

findObjectByNodeName(as in your sawn-off mod)

 

getWeaponRwFrameByActor(as in your sawn-off mod)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users