Coding

 Reply to this postStart new topic

Shadows' Limit

DK22
post Sep 24 2011, 08:29 PM
Post #1


Member

Posts: 197
From: Liberty City, Shoreside
Joined: 15-July 10



So, I want to increase that limit.
Defaul "limit"

48 shadows (as I remember).
"New" "limit"

255 shadows.
Problems

Game crashes when I enable HD cars' shadows ("Very High" graphics).
Update

Mistakes fixed. Now the limit is 255, all working fine.
Code

SANNY
Wanted this code? GTFO


This post has been edited by DK22: Dec 23 2011, 12:51 AM
Go to the top of the page
 
+Quote Post
Silent
post Sep 24 2011, 10:26 PM
Post #2


The master of cut retort

Group Icon

Posts: 239
From: Warsaw, PL
Joined: 21-July 10



Wouldn't it be better to use malloc and mass writemem 0? laugh.gif
Go to the top of the page
 
+Quote Post
Wesser
post Sep 25 2011, 07:21 AM
Post #3


The Assistant

Posts: 84
From: Matera, IT
Joined: 16-June 11



Using calloc (0x72F460, RenderWare function) would be still better. tongue.gif
Go to the top of the page
 
+Quote Post
uokka
post Sep 25 2011, 01:33 PM
Post #4


Actually living entity

Posts: 143
From: Earth
Joined: 15-January 11



I think my game crashed pretty badly because of using this script..
My monitor complained about missing signal and I wasnt able to kill the gta_sa.exe process blindly via task manager (as I normaly have to do on a crash) but gta_sa.exe seemed to die after hitting some keys randomly.

I tested your script with a low end gfx card on GTA's "Very High" graphics setting in combination with ENB, driving a high poly car model.
Didnt noticed any changes/more shadows.. What kind of changes could I possibly see?


--------------------
My english is just perfekt. I am only not sure, whether I it rightly utilize..
. . .
Go to the top of the page
 
+Quote Post
DK22
post Oct 1 2011, 09:36 PM
Post #5


Member

Posts: 197
From: Liberty City, Shoreside
Joined: 15-July 10



@uokka:
You wouldnt seeany changes for this time.
If you'll create, f.e., 200 shadows in your game (you can add them with opcode 016F), youll see only 48 shadows. With this code, that limit is 255 shadows.
@Silent:
yeah, I updated the code, all right now?
@Wesser:
Where the 0AC8 and/or calloc creates that memory-space? And how many bytes can be there?
And about calloc there are two parameters, one is size, right? What is the second?

And another question - how can I create the array of bytes in C++?

This post has been edited by DK22: Oct 1 2011, 09:43 PM
Go to the top of the page
 
+Quote Post
Deji
post Oct 1 2011, 11:58 PM
Post #6


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



You don't have to use calloc unless you want CLEO 3 compatibility, you can use malloc (0AC8) and just calculate the size yourself. I'd think using 0AC9 to free game-allocated memory would go wrong somewhere tongue.gif

QUOTE
And another question - how can I create the array of bytes in C++?

Depends what you want to do with the array afterwards. These are a few ways to make an array:
CODE
char byteArray[5];  // array without pre-defined values
char byteArray[] = {value1, value2, value3, value4, value5};  // array with pre-defined values


The size of both arrays will be 5 bytes. You could also use malloc, or classes (which are like structs in IDA) if you wanna name the fields.


--------------------
Go to the top of the page
 
+Quote Post
Wesser
post Oct 3 2011, 12:52 PM
Post #7


The Assistant

Posts: 84
From: Matera, IT
Joined: 16-June 11



Calloc allocates N items, each one with N size. Passing parameters are in this order. This is the code:
CODE
0AA7: call_function 0x72F460 num_params 2 pop 2 nSize 32 nNum 4 pResult 0@ // CRenderWare__calloc
Go to the top of the page
 
+Quote Post
Deji
post Oct 3 2011, 06:44 PM
Post #8


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Or just do 4*32 (128) and allocate it using 0AC8. It's the same thing. Only difference is that the method using 0AC8 doesn't support CLEO 3, wheras the method calling the function will not be as easily compatible with as many .exe's. So it'd be best to find the adresses for v1.01 for the function version.


--------------------
Go to the top of the page
 
+Quote Post
Wesser
post Oct 4 2011, 07:00 AM
Post #9


The Assistant

Posts: 84
From: Matera, IT
Joined: 16-June 11



Tools have been created mostly for 1.0 version. People using newer versions have to switch inevitably. Personally, I pay attention only for US and EU compatibility.
Go to the top of the page
 
+Quote Post
Deji
post Oct 4 2011, 06:39 PM
Post #10


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Yeah, but if I was more of a player of the game and had the knowledge of modding I have now, I'd prefer to have 1.1, which has less bugs and install mods which not only work for it, but work flawlessly. I'm getting quite picky about scripts being well coded now tongue.gif


--------------------
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

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