Coding

 Reply to this postStart new topic

Requests Topic

Deji
post
Post #41


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



Requests Topic


Rules:

  • Don't request large mods. Keep requests simple.
  • Use detail and good spelling/grammar in order to make your request understandable.
  • Check to make sure the mod doesn't already exist.
  • This topic is not for recruitment posts. If you need a team, post your WIP mod in the showroom and specify that you need help or use the PM system.
Go to the top of the page
 
+Quote Post
jayd00
post
Post #42


Ameteur Member

Posts: 42
From: Guatemala
Joined:



Hi!
I have a request (IMG:style_emoticons/default/tongue.gif) well actually I don't know if it's a easy script, but I hope you can help me (IMG:style_emoticons/default/wink.gif)

I want to throw a fireball in straight line, using sine and cosine.
But I want that the fireball at the begining has a size (radius) of 0.5 (as example) and when the distance of the player and the fireball has like 2 meters the fireball change the size to 1.5 and so on...
when the distance of the fireball and the $player it's smaller, the fireball will be small. and when the distance from the fireball and the $player it's more larger, the fireball will be more bigger...

And of course if the fireball collides with something, it creates a small explosion, or if the distance of the player and fireball it's more larger than 15 meters, it just disappear...


I think, the size can be done with this opcode right?
CODE
08D2: object 347@(39@,10i) scale_model 0.3


Thanks for help!
Go to the top of the page
 
+Quote Post
Deji
post
Post #43


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



Working on it (IMG:style_emoticons/default/wink.gif)
Go to the top of the page
 
+Quote Post
jayd00
post
Post #44


Ameteur Member

Posts: 42
From: Guatemala
Joined:



Thanks a lot man! I'll waiting..
(IMG:style_emoticons/default/thanks.gif)
Go to the top of the page
 
+Quote Post
Deji
post
Post #45


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



Hmm.. kinda turned into more of a "Fire Grenade" mod... It's not possible to have the particles change size, and when the fire moves, it tends to trail.

Still, it's the best I could do in 2 days (IMG:style_emoticons/default/tongue.gif) I might work on improving it later when I get a chance.

Fire Grenade
Go to the top of the page
 
+Quote Post
jayd00
post
Post #46


Ameteur Member

Posts: 42
From: Guatemala
Joined:



it doesn't matter, you do it really cool!! thanks man! (IMG:style_emoticons/default/thumbsup.gif)
Go to the top of the page
 
+Quote Post
420
post
Post #47


The New Guy!

Posts: 5
From: Europe
Joined:



How bout making Ryosuke's Javelin/Stinger cleo4 compatible?

http://hotmist.ddo.jp/cleomod/stinger/index.html
Go to the top of the page
 
+Quote Post
Deji
post
Post #48


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



The script uses his Missile mod. Chances are the only problems with it are the same ones that occur in the missile mod.

CLEO 4 is being updated with fixes for CLEO 3 mods. Hopefully all the problems should be gone soon.
Go to the top of the page
 
+Quote Post
jayd00
post
Post #49


Ameteur Member

Posts: 42
From: Guatemala
Joined:



Hi!
How can I check if player wasted or busted in a cleo script?

can you make a small script doing that? (as example)
thanks!
Go to the top of the page
 
+Quote Post
Deji
post
Post #50


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



SANNY
{$CLEO}
0000:
while true
    wait 100
    if
        8256:   not player 0 defined
    then
        // player is wasted or busted
    end
end
Go to the top of the page
 
+Quote Post
Adler
post
Post #51


Devil's Advocate

Group Icon

Posts: 413
From: CA US
Joined:



Hmmm is there a way to make helicopter rotor blades smash obstacles that are blocking it when you try to take off? It sucks having to push a helicopter out of the way of objects or else it won't start. (IMG:style_emoticons/default/sad.gif)
Go to the top of the page
 
+Quote Post
jayd00
post
Post #52


Ameteur Member

Posts: 42
From: Guatemala
Joined:



QUOTE (Deji @ Dec 22 2010, 12:12 AM) *
SANNY
{$CLEO}
0000:
while true
    wait 100
    if
        8256:   not player 0 defined
    then
        // player is wasted or busted
    end
end

Thank you very much! (IMG:style_emoticons/default/thumbsup.gif)
Go to the top of the page
 
+Quote Post
ThirteenAG
post
Post #53


Ameteur Member

Posts: 54
Joined:



http://www.youtube.com/watch?v=KeksObPsZrg...tailpage#t=140s
In just cause 2, helicopters have very good keyboard/mouse control.
In SA, instead, heli mouse control like the hell. Any ideas, how to make SA heli controls more like JC2's?
Go to the top of the page
 
+Quote Post
uokka
post
Post #54


Actually living entity

Posts: 143
From: Earth
Joined:



hello everybody

i would like to have a cleo script which turns the Y angle (i think) of a cars tires/wheels. (so the side/rim of the wheel points to the ground)

just like in this cheatcode for driving on water:
CODE
0A8C: write_memory 9867602 size 4 value 1 virtual_protect 0


well, this cheat is nice but it has no style since there is no animation. plus, if the car is in the air, the wheels angle becomes normal.

today i was visiting the snippets section and it led me to this place: Car Components
i thought i finally found something where google and SBs OPCode search tool couldnt help me.
verry interesting if i can do something with each wheel, so i tryed to turn each wheel smoothley in a loop.

with something like this:
CODE
for 1@ = 0.0 to 1.0 step 0.2
    wait 10
    08A6: set_car 0@ componentA -7 rotation_to 1@
end


yeah, my game crashes. i tryed a lot and if it didnt crashed, i had, f.e. an opened door... wrong component.
my standard way of try & error seems not to work here.
the point is, i dont know how to do. so if anybody is interestet in trying this, i would really apreciate.

before i forget, the reason.
i wanna get rid of the 'sparrow' helicopter hover conversion in "Back To The Future SA MiniMod" because it is glitchy, helicopter flying is not much fun and i always fly with the REAL Delorean.
i let it use the boost, and navigating this thing in the air is not that hard when u press 'handbreak' to steer left/right. the bad thing is u cant steer and roll at the same time. (hmm, this could be my next request...)

and no, i cant ask the bttf team to help me out, since they seem to already get stuck on the sparrow as someone on thier forum asked to put all delorean versions in one. answer was no. plus, nobody is able to register on thier forums at the moment so i cant ask them anything. i think they are working a lot.

whatever, is the wheel thing even possible? the cheat is able to do something like that and the front wheels are still moving coresponding to where u are steering. would be good looking.
Go to the top of the page
 
+Quote Post
jayd00
post
Post #55


Ameteur Member

Posts: 42
From: Guatemala
Joined:



I need some help please...

how can I make that when the player is aiming without weapon, the player rotate with the camera?

like when you have a weapon, and when you're aiming the player rotate to the target.

how can I do that?
thanks! (IMG:style_emoticons/default/thumbsup.gif)
Go to the top of the page
 
+Quote Post
DK22
post
Post #56


Member

Posts: 197
From: Liberty City, Shoreside
Joined:



QUOTE
how can I make that when the player is aiming without weapon, the player rotate with the camera?

Try this (IMG:style_emoticons/default/wink.gif)
SANNY
{$CLEO .cs}
0000:
while true
    wait 0
    if
        player.Defined(0)
    then
        if
            02D8:   actor $player_actor current_weapon == 0
        then
            if
                00E1: player 0 pressed_key 6
            then
                068E: get_camera_target_point_to 0@ 1@ 2@
                068D: get_camera_position_to 2@ 3@ 4@
                var
                    0@: float
                    1@: float
                    2@: float
                    3@: float
                end
                dec(0@, 2@)
                dec(1@, 3@)
                0604: get_Z_angle_for_point 0@ 1@ store_to 2@
                actor.Angle($player_actor) = 2@
            end
        end
    end
end
Go to the top of the page
 
+Quote Post
jayd00
post
Post #57


Ameteur Member

Posts: 42
From: Guatemala
Joined:



QUOTE (DK22 @ Jan 16 2011, 08:30 AM) *
Try this (IMG:style_emoticons/default/wink.gif)
SANNY
{$CLEO .cs}
0000:
while true
    wait 0
    if
        player.Defined(0)
    then
        if
            02D8:   actor $player_actor current_weapon == 0
        then
            if
                00E1: player 0 pressed_key 6
            then
                068E: get_camera_target_point_to 0@ 1@ 2@
                068D: get_camera_position_to 2@ 3@ 4@
                var
                    0@: float
                    1@: float
                    2@: float
                    3@: float
                end
                dec(0@, 2@)
                dec(1@, 3@)
                0604: get_Z_angle_for_point 0@ 1@ store_to 2@
                actor.Angle($player_actor) = 2@
            end
        end
    end
end

it works!.. thank you very much! (IMG:style_emoticons/default/thumbsup.gif)
Go to the top of the page
 
+Quote Post
Deji
post
Post #58


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



QUOTE (uokka @ Jan 15 2011, 06:35 AM) *
with something like this:
CODE
for 1@ = 0.0 to 1.0 step 0.2
    wait 10
    08A6: set_car 0@ componentA -7 rotation_to 1@
end


I think this problem would be better solved with modelling. The EXE probably has full control over the wheels, which can't be easily changed over memory.
Go to the top of the page
 
+Quote Post
uokka
post
Post #59


Actually living entity

Posts: 143
From: Earth
Joined:



Ok, thanks.

i think i can see..
hmm, thats bad news.

Anway, is it possible to make the wheels invisible then?
Is it possible to do ANYTHING to the wheels?

I've made a script a while ago, that does the animation by using Transfender wheels, but the original wheels need to disapear..

Go to the top of the page
 
+Quote Post
Deji
post
Post #60


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



It may be possible to make them invisible, but it requires some documentation of the car memory structure.

Or perhaps one of these may work:
SANNY
0689: set_car 95@ remove_componentA 1 visible_effect_flag 0
0697: set_car 543@ remove_componentB 4 visible_effect_flag 1
Go to the top of the page
 
+Quote Post
uokka
post
Post #61


Actually living entity

Posts: 143
From: Earth
Joined:



QUOTE
Or perhaps one of these may work:
CODE
0689: set_car 95@ remove_componentA 1 visible_effect_flag 0
0697: set_car 543@ remove_componentB 4 visible_effect_flag 1


nope..
thanks anyway!

This post has been edited by uokka:
Go to the top of the page
 
+Quote Post
uokka
post
Post #62


Actually living entity

Posts: 143
From: Earth
Joined:



could someone make a script that warns me when im in the DELETE SAVEGAME menu?

maybe by changing the menu text color to a fairly visible red..

(i have killed at least two savegames in the past; i was clicking to fast due to plenty of test starts..)
Go to the top of the page
 
+Quote Post
Deji
post
Post #63


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



Not that I looked much, but at the moment the best I can find is this:
SANNY
0A8C: write_memory 0x8CE122 size 1 value 0 virtual_protect 0


Basically just overwrites where the "DELETE GAME" option leads. In this case, it points it to the "Stats" menu instead. Not really the best solution, but it should do for what you want.

I'll see if I can learn myself some more things about how the menus work.
Go to the top of the page
 
+Quote Post
jayd00
post
Post #64


Ameteur Member

Posts: 42
From: Guatemala
Joined:



Hi! I have a question, Is possible to do that when you're aiming without weapons, it automatically increase the distance?
like when you're aiming with M4 or AK47

how can I do that?


(IMG:style_emoticons/default/thanks.gif)
Go to the top of the page
 
+Quote Post
Silent
post
Post #65


The master of cut retort

Group Icon

Posts: 239
From: Warsaw, PL
Joined:



I think this is stored somewhere in weapon.dat/melee.dat. Try to dig through these files.
Go to the top of the page
 
+Quote Post
DK22
post
Post #66


Member

Posts: 197
From: Liberty City, Shoreside
Joined:



@jayd00:
I think this opCode will help you
SANNY
0922: set_camera_zoom_in_factor 20.0 out_factor 20.0 timelimit 1000 mode 1

Go to the top of the page
 
+Quote Post
Sweet
post
Post #67


Ameteur Member

Posts: 48
Joined:



Lil' question here.
Right before release, there was ability to point several waypoints in to map.
Is there any reminds left in EXE, or any chance to revive it?
Go to the top of the page
 
+Quote Post
Deji
post
Post #68


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



I can't see anything.. but creating a CLEO to create markers while using the "running scripts in a frozen game" thing could probably do a similar thing.
Go to the top of the page
 
+Quote Post
methodunderg
post
Post #69


Ameteur Member

Posts: 38
Joined:



QUOTE (Deji @ Feb 4 2011, 04:11 AM) *
I can't see anything.. but creating a CLEO to create markers while using the "running scripts in a frozen game" thing could probably do a similar thing.

I have a couple of requests, that I think many would appreciate ..

[REQ] More Stars in the Sky
[REQ] Alter height of clouds
[REQ] Time Advancer (+/- hour)
[REQ] No tire marks when it is wet
[REQ] Radar Zoom like in this mod here
That is all for now .. (IMG:style_emoticons/default/smile.gif)

This post has been edited by methodunderg:
Go to the top of the page
 
+Quote Post
Sweet
post
Post #70


Ameteur Member

Posts: 48
Joined:



QUOTE (Deji @ Feb 3 2011, 06:11 PM) *
I can't see anything.. but creating a CLEO to create markers while using the "running scripts in a frozen game" thing could probably do a similar thing.

But how to make marker on map in menu mode? And how to get 2D marker coords, to 3D world coords? AFAIR, there's only one thing about converting 3D coords to 2D (used in my script (IMG:style_emoticons/default/biggrin.gif) )
Go to the top of the page
 
+Quote Post
Adler
post
Post #71


Devil's Advocate

Group Icon

Posts: 413
From: CA US
Joined:



QUOTE (methodunderg @ Feb 4 2011, 10:45 PM) *
[REQ] Time Advancer (+/- hour)

That's included in my Weather ID Selector. (IMG:style_emoticons/default/rolleyes.gif)
Go to the top of the page
 
+Quote Post
Deji
post
Post #72


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



Use my Running Scripts in a Frozen Game hack. It allows SCM and CLEO scripts to run while the game is paused (with obvious side effects).

I don't know what you mean by 2D to 3D coords. Target markers don't need 3D coords, since there is no "up/down" blips. You can use -100.0 for the Z Coordinate. Passing Z coord values of -100.0 and lower will make the game automatically get the ground height for that position. Still, it'd be better to just pass 0 and save the game from having to do that.
Go to the top of the page
 
+Quote Post
DK22
post
Post #73


Member

Posts: 197
From: Liberty City, Shoreside
Joined:



Would it real to run script while replay is in process? (Just need to draw texture on screen)
Go to the top of the page
 
+Quote Post
Deji
post
Post #74


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



NOP 6 bytes at 0x46A00A to enable scripts during replays. I don't think I've ever tested that, though.
Go to the top of the page
 
+Quote Post
methodunderg
post
Post #75


Ameteur Member

Posts: 38
Joined:



I was thinking of a mod today; and that is, if CJ does have a bullet-proof vest, then he must wear it.
Here is a bullet proof vest mod that I found buried in my mods folder (its littered with 12GB of stuff) So I don't know where I got it from.
(IMG:http://i56.tinypic.com/2vkg8x5.png)

I was wonderin', how could I replace this with a chain that CJ wears ?Because chains always go over t-shirts etc. So if I can replace it with a chain, but still make it act like its a shirt (so it goes over the torso) and then maybe someone could create a script so that if CJ has a bullet proof vest, then he has to wear the chain (bulletproof vest)?

Is anyone good with GFX so they could make the texture a bit better ? I tried messing around in Paint .NET before (thats all I have, and I don't know how to use it) So i played around with the filters for a cpl of hours, but still couldn't get it to work properly.
But try to keep it @ 512 x 512 so that it works with Sokol's bigger player img (IMG:style_emoticons/default/smile.gif)

I also posted this on the GTAForums Coding request thread, but thought I would post it here just incase someone was interested in it as well (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
 
+Quote Post
DK22
post
Post #76


Member

Posts: 197
From: Liberty City, Shoreside
Joined:



QUOTE (Deji @ Feb 6 2011, 06:07 AM) *
NOP 6 bytes at 0x46A00A to enable scripts during replays. I don't think I've ever tested that, though.

Not working.
Go to the top of the page
 
+Quote Post
Deji
post
Post #77


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



What happens when the address is written?

Which .exe do you have?
Go to the top of the page
 
+Quote Post
DK22
post
Post #78


Member

Posts: 197
From: Liberty City, Shoreside
Joined:



Nothing happens. The script is still not working in replay.
I have 1.0US

Maybe I'm not right in noping
Go to the top of the page
 
+Quote Post
Sweet
post
Post #79


Ameteur Member

Posts: 48
Joined:



Is there any way to find out is random ped near entrance marker?
Go to the top of the page
 
+Quote Post
Deji
post
Post #80


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined:



Grr, Windows 7 slowed me down a lot here, with it's downgrading of basic search features, but here:
SANNY
0A8D: 0@ = read_memory 0x96A7D8 size 4 virtual_protect 0
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
for 1@ = 0 to 0x190
    0A90: 2@ = 1@ * 0x3C
    000A: 2@ += 0x10
    005A: 2@ += 0@
    0A8D: 3@ = read_memory 2@ size 4 virtual_protect 0  // x
    000A: 2@ += 4
    0A8D: 4@ = read_memory 2@ size 4 virtual_protect 0  // y
    000A: 2@ += 4
    0A8D: 5@ = read_memory 2@ size 4 virtual_protect 0  // z
    if
        00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 3@ 4@ 5@ radius 2.0 2.0 2.0
    then
        0ACD: show_text_highpriority "Near enex marker" time 1
        break
    end
end


It doesn't include script-created markers though (only about 5 of those can exist at one time, anyway - and can be checked other ways).


Here's a SCM-Function version:
SANNY
:FUNC_isActorNearEnexMarker
0A8D: 2@ = read_memory 0x96A7D8 size 4 virtual_protect 0
0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
while true
    0A90: 4@ = 3@ * 0x3C
    000A: 4@ += 0x10
    005A: 4@ += 2@
    0A8D: 5@ = read_memory 4@ size 4 virtual_protect 0  // x
    000A: 4@ += 4
    0A8D: 6@ = read_memory 4@ size 4 virtual_protect 0  // y
    000A: 4@ += 4
    0A8D: 7@ = read_memory 4@ size 4 virtual_protect 0  // z
    if 00FE:   actor 0@ sphere 0 in_sphere 5@ 6@ 7@ radius 1@ 1@ 1@
    then break
    end
    001B:   0x190 > 3@
    jf break
    000A: 3@ += 1
end
0AB2: ret 0


Call like this:
SANNY
if
    0AB1: call_scm_func @FUNC_isActorNearEnexMarker 2 actor $PLAYER_ACTOR radius 2.0
then
    0ACD: show_text_highpriority "Near enex marker" time 1
end
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: