The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 09, 2024, 06:41:46 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Modding the source code/time limit?
« previous next »
Pages: [1] Print
Author Topic: Modding the source code/time limit?  (Read 2371 times)
Elegnaim
Guest


Email
Modding the source code/time limit?
« on: January 02, 2006, 02:26:59 am »

Not entirely sure this is the right forum, although the descriptor mentioned the source code probs.

Okay, because me and a few friends are A) really bored. B) not fond of the time limit, we figured that, for our own amusement and *education*, we'd try and alter the source code to change the way the time limit/in game time works. For, like, our own personal copies.

Anyway, so I had a few questions. I'm assuming that clock.h and clock.c handle time update functions. One of our ideas was just to slow down in-game time passage (make days ten times longer or something) to lower the time limit. While I can find month, year, and... well, leap year handlage in clock.c, I can't find any section that deals with the length of DAYS. What source should we be looking in for this?

Ah, what else... we also thought about just setting the time limit to ten years. Reading gameev.c, it mentions a KOHR_AH_GENOCIDE event, and another one for black ur-quan. I'm assuming these are related to the time limit? Wondering if this is what stores the time limit, or if that's the time_til_kohr_ah_victory one (can't recall the exact name!)

Alternatively, would it be possible to just change the start year? I'm not really sure if the time limit is based on years ELAPSED or on some sort of year variable hitting 2459 (is that the right  year? Tongue)
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Modding the source code/time limit?
« Reply #1 on: January 02, 2006, 02:59:21 am »

I think this is what you're looking for.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Elegnaim
Guest


Email
Re: Modding the source code/time limit?
« Reply #2 on: January 02, 2006, 05:07:21 am »

Ah, good. Good. I got everything to start building properly. However, I've picked up a source code error along the way.

src/sc2code/load.c: In function `LoadGame':
src/sc2code/load.c:198: `KOHR_AH_VICTORIOUS_EVENT' undeclared (first use in this function)

Now, KOHR_AH_VICTORIOUS_EVENT is declared in gameev.h. The post you linked to makes no mention of needing to include that. Should I, or is there some other thing I must do?
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Modding the source code/time limit?
« Reply #3 on: January 02, 2006, 05:34:26 am »

Just include it. It probably wasn't necessary when I wrote that post originally, but we've cleaned up the includes a bit since then.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Elegnaim
Zebranky food
*
Offline Offline

Posts: 11



View Profile
Re: Modding the source code/time limit?
« Reply #4 on: January 02, 2006, 07:34:13 am »

Hey, thanks. Everything worked perfectly. I also set the clock FPS thing to 80. Hope that didn't break anything. It makes time progress a little over 3x as slowly, though, which is pretty much the exact effect I wanted.

Granted, this also makes it the first time I've ever used MSYS, or compiled a complex project. God, education rocks XD

---edit---

Okay, I realized I don't have that dosbox in the background listing... stuff. Was that essential? Is this because I compiled without debug information?
« Last Edit: January 02, 2006, 11:44:53 pm by Elegnaim » Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Modding the source code/time limit?
« Reply #5 on: January 03, 2006, 12:40:42 am »

Yes. If you've chosen for a debug build, you won't have the debug information nor the console window.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
JHGuitarFreak
Enlightened
*****
Offline Offline

Posts: 1374



View Profile WWW
Re: Modding the source code/time limit?
« Reply #6 on: January 03, 2006, 10:44:35 am »

Hey, thanks. Everything worked perfectly. I also set the clock FPS thing to 80. Hope that didn't break anything. It makes time progress a little over 3x as slowly, though, which is pretty much the exact effect I wanted.

Granted, this also makes it the first time I've ever used MSYS, or compiled a complex project. God, education rocks XD

---edit---

Okay, I realized I don't have that dosbox in the background listing... stuff. Was that essential? Is this because I compiled without debug information?

congrats on the compilation, i used MS Visual Studio . NET 2003 the first time around and i only had experience in QBasic, so i had to do some really fast learning before i modified anything.

Now i have visual studio 2005 and am modding lots of other things now Grin

my version of the time fix and many other things can be found at my website.
Logged

The artist once again known as Kohr-Ah Death 213.

Get your MegaMod HERE
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!