IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the GTA IV Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules Attention:

The Mod Showroom is only for posting previews/downloads of completed or near finished mods.
All help topics should be posted in the Editing Discussion forums. Help topics and mod requests posted here will be locked or binned. Thank you.
GTAGarage.com : Free mod hosting, attach your files and screenshots to your topics
GTAModding.com : A wiki for everything related to GTA modding, including documentation and tutorials

Pages: (3) [1] 2 3   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

> Real Time Clock, Me = SUCCESS!
 
spaceeinstein  
Posted: Jul 15 2005, 04:41
Quote Post


Chocolate
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




CONVERTED FOR SAN ANDREAS!

Created by Barton Waterduck for Vice City. Converted by spaceeinstein for San Andreas. This is a script mod that controls the in-game clock to imitate real life ones.

Installation for intermediate scripters only. Please download Barton's mission builder using Craig's link. The weather will stay the same but will be modified later on.

CODE
004F: create_thread ££TimeMod

...

:TimeMod
0004: $weather = 6;; integer values
0006: @33 = 0;; integer values  - Reset internal timer

:TimeLoop
0001: wait 500 ms
00BF: @1 = current_time_hours, @2 = current_time_minutes
00C0: set_current_time @1 @2
01B5: force_weather $weather
00D6: if 0
0019:   @33 > 59999;; integer values  - if internal timer >= 1 minute
004D: jump_if_false ££TimeLoop
0006: @33 = 0;; integer values  - reset the internal timer
000A: @2 += 1;; integer values
00D6: if 0
0019:   @2 > 59;; integer values
004D: jump_if_false ££TimeModL2
0006: @2 = 0;; integer values
000A: @1 += 1;; integer values
00D6: if 0
0038:   $ON_MISSION == 0;; integer values
004D: jump_if_false ££TimeModL3
0008: $weather += 1;; integer values
00D6: if 0
0018:   $weather > 19;; integer values
004D: jump_if_false ££TimeModL3
0004: $weather = 0;; integer values

:TimeModL3
00D6: if 0
0019:   @1 > 23;; integer values
004D: jump_if_false ££TimeModL2
0006: @1 = 0;; integer values

:TimeModL2
00C0: set_current_time @1 @2
0002: jump ££TimeLoop

Gltiches: May interfere with timers in the game.


This post has been edited by spaceeinstein on Jul 22 2005, 23:42
Users WebsitePM
  Top
 

 
Demarest  
Posted: Jul 15 2005, 05:24
Quote Post


what could be
Group Icon
Group: BUSTED!
Joined: Jul 12, 2003

XXXXX



QUOTE (spaceeinstein @ Jul 14 2005, 23:41)
Gltiches: May interfere with timers in the game.

I don't think it will. And shouldn't it say "rewritten for SAMB" instead? tounge.gif
Users WebsitePMAOL
  Top
 

 
Dogmeat  
Posted: Jul 15 2005, 06:27
Quote Post


Snitch
Group Icon
Group: Members
Joined: May 12, 2005

sf.gif

XXXXX



Damn I would love to use this but I just started playing SA with the opened up mod :<
In VC there was only sunny weather when using this mod, same problem here?
Could you release the main.scm file?
PMMSN
  Top
 

 
Demarest  
Posted: Jul 15 2005, 09:12
Quote Post


what could be
Group Icon
Group: BUSTED!
Joined: Jul 12, 2003

XXXXX



This is a script mod whereas Opened Up is a SCM mod. So you'd have to add this to that. If you got a compiled SCM of this mod, it would be the regular game with just this added.
Users WebsitePMAOL
  Top
 

 
Dogmeat  
Posted: Jul 15 2005, 09:37
Quote Post


Snitch
Group Icon
Group: Members
Joined: May 12, 2005

sf.gif

XXXXX



Thanks... I got it working now... a great mod but there is a problem. The weather does not change... and it isn't even the sunny weather like in the VC version.

This post has been edited by Dogmeat on Jul 15 2005, 09:40
PMMSN
  Top
 

 
spaceeinstein  
Posted: Jul 15 2005, 21:31
Quote Post


Chocolate
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




Why should I say "rewritten for SA MB"? And the weather, I made it so it stays the same. There are a whole lot more weather types in San An but that's was late at night when I converted it.
Users WebsitePM
  Top
 

 
Dogmeat  
Posted: Jul 16 2005, 06:20
Quote Post


Snitch
Group Icon
Group: Members
Joined: May 12, 2005

sf.gif

XXXXX



Well how can I make it to be sunny weather because the default one puts your drawdistance to 0 and everything looks just blue and white confused.gif

"0004: $weather = 6;; integer values"
Could it be this?
PMMSN
  Top
 

 
Demarest  
Posted: Jul 16 2005, 06:38
Quote Post


what could be
Group Icon
Group: BUSTED!
Joined: Jul 12, 2003

XXXXX



QUOTE (Dogmeat @ Jul 16 2005, 01:20)
"0004: $weather = 6;; integer values"
Could it be this?

Nah. That's just the setting of a variable. Until that variable gets used for something, it wouldn't effect your game at all.

For that matter, this code is totally useless
CODE
0008: $weather += 0;; integer values
00D6: if 0
0018:   $weather > 6;; integer values
004D: jump_if_false ££TimeModL3
0004: $weather = 6;; integer values
...which begins to reveal what I meant by it being translated for SAMB. As CyQ pointed out earlier in the week, it's not really converting mods because with the exception of using @33 instead of @17, nothing about this is platform specific. It's just reworked so that a different interpreter can use it. If it was converted, code like I quoted would've been eliminated because it does nothing. $WEATHER is set to 6 to start, incremented, and constantly put through an if >6 then 6 check. It's ALWAYS going to be 6. So instead of using another global var, just always say force weather 6 and be done with it.
Users WebsitePMAOL
  Top
 

 
Dogmeat  
Posted: Jul 16 2005, 10:42
Quote Post


Snitch
Group Icon
Group: Members
Joined: May 12, 2005

sf.gif

XXXXX



My skills on modding scm are almost zero... I can't figure out how to make it sunny. Could somebody just paste the line?
PMMSN
  Top
 

 
spaceeinstein  
Posted: Jul 16 2005, 16:12
Quote Post


Chocolate
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




O, yes, about that weather part, it was for my All In One Mod which uses the real time clock mod to make my permanent sunny weather in Vice City. I converted straight from that. Barton didn't do that, I did that, for my dead mod. If you want to fix that, here it is.
CODE
0008: $weather += 1 ;; integer values
00D6: if 0
0018:   $weather > 19 ;; integer values
004D: jump_if_false ££TimeModL3
0004: $weather = 0 ;; integer values
Users WebsitePM
  Top
 

 
Dogmeat  
Posted: Jul 16 2005, 17:40
Quote Post


Snitch
Group Icon
Group: Members
Joined: May 12, 2005

sf.gif

XXXXX



Hmm i'm getting some sort of error when I try to compile it.

"Memory beyond the defined range has been accessed. Use DEFINE MEMORY 43805 or higher to allocate enough memory."
PMMSN
  Top
 

 
Demarest  
Posted: Jul 16 2005, 21:41
Quote Post


what could be
Group Icon
Group: BUSTED!
Joined: Jul 12, 2003

XXXXX



QUOTE (Dogmeat @ Jul 16 2005, 12:40)
"Memory beyond the defined range has been accessed. Use DEFINE MEMORY 43805 or higher to allocate enough memory."

Actually, it says to set it to that and recompile. So... set it to that and recompile tounge.gif
Users WebsitePMAOL
  Top
 

 
CyQ  
Posted: Jul 16 2005, 22:22
Quote Post


Mack Pimp
Group Icon
Group: Members
Joined: Jun 27, 2002

Member Award




durrr locals

but, here's the proper way to make your game 'real time' (ie without screwing up the weather or having to start a new game, etc):

1. open up your savegame in a hex editor.
2. at offset 81h change the two bytes "E8 03" to "60 EA". this changes the length of an in-game minute from 1000 milliseconds to 60000 ms.
3. then, at the very end of the savegame (offset 317FCh), add 5Fh to the dword there. this adjusts the savegame's checksum so that sa won't detect your tampering with it.
4. load it up!
PM
  Top
 

 
Dogmeat  
Posted: Jul 17 2005, 07:43
Quote Post


Snitch
Group Icon
Group: Members
Joined: May 12, 2005

sf.gif

XXXXX



Lol I didn't even notice the "define memory" at the start biggrin.gif
I now compiled it but the weather is still the same...
And for that hex editor stuff... I managed to change the first part but I didn't get it the last part of it (dword)... forget this thing... I had enough confused.gif

This post has been edited by Dogmeat on Jul 17 2005, 07:50
PMMSN
  Top
 

 
julmajukka  
Posted: Jul 17 2005, 20:02
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Sep 29, 2004

sf.gif

XXXXX



Hello! I put this code to opened up mod and it works fine (Sky looks little foggy). I was doing some missions and savings, weather was same until i was driving to desert stormy weather starts and i drive fast to los santos to saving my game several times (hoping that stormy go away). Now my game had only weather: storm and it wont stop (i try to save many times and even cheat to get littlefoggy/sunny weather back). How i can get better weather (cloudy or sunny) Please help me?
PM
  Top
 

 
Dogmeat  
Posted: Jul 18 2005, 06:34
Quote Post


Snitch
Group Icon
Group: Members
Joined: May 12, 2005

sf.gif

XXXXX



My game was very foggy too and the weather cheats are not working so I don't think that there is much you can do. confused.gif

I think that you have to mofidy your save game like CyQ said but I don't understand the
"then, at the very end of the savegame (offset 317FCh), add 5Fh to the dword there" part.
PMMSN
  Top
 

 
NDG474  
Posted: Jul 18 2005, 06:46
Quote Post


VaiN
Group Icon
Group: Members
Joined: Jun 15, 2005

us.gif

XXXXX



QUOTE (CyQ @ Jul 16 2005, 17:22)
durrr locals

but, here's the proper way to make your game 'real time' (ie without screwing up the weather or having to start a new game, etc):

1. open up your savegame in a hex editor.
2. at offset 81h change the two bytes "E8 03" to "60 EA". this changes the length of an in-game minute from 1000 milliseconds to 60000 ms.
3. then, at the very end of the savegame (offset 317FCh), add 5Fh to the dword there. this adjusts the savegame's checksum so that sa won't detect your tampering with it.
4. load it up!

thanks for the help CyQ, but could you maybe give us some more details for installation? Which hex editor would you recommend?
Users WebsitePMYahoo
  Top
 

 
Dogmeat  
Posted: Jul 18 2005, 06:50
Quote Post


Snitch
Group Icon
Group: Members
Joined: May 12, 2005

sf.gif

XXXXX



PMMSN
  Top
 

 
CyQ  
Posted: Jul 18 2005, 10:52
Quote Post


Mack Pimp
Group Icon
Group: Members
Joined: Jun 27, 2002

Member Award




pretty much any hex editor will do. i generally use one called hex workshop.

i'll elaborate on how to do step 3:
- at the very end of the savegame you will find 4 bytes which make up a value. in my savegame these are "B0 27 24 01", but they can be pretty much anything.
- if you reverse them you will get what is called a dword. in my case: 012427B0.
- open up the windows calculator in scientific mode. set it to "hex". enter the dword, and add 5F to it. in my case: 012427B0 + 5F = 0124280F.
- reverse the result again (0F 28 24 01), and overwrite the last 4 bytes in the savegame with that.
PM
  Top
 

 
Dogmeat  
Posted: Jul 18 2005, 13:38
Quote Post


Snitch
Group Icon
Group: Members
Joined: May 12, 2005

sf.gif

XXXXX



Thanks man! biggrin.gif Now it seems to work just fine.

---Edit: Blah the weather is still kinda foggy...---

This post has been edited by Dogmeat on Jul 18 2005, 14:11
PMMSN
  Top
 

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

Topic Options Pages: (3) [1] 2 3  Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG
     

 
     
Message Boards and Forums Directory