Pages: [1]
|
|
|
Author
|
Topic: Some new source code questions... (Read 2005 times)
|
Nicholai
Zebranky food
Offline
Gender:
Posts: 32
|
Hey,
Having devoted the last two days of my life to sitting and aimlessly moving stars around (which IS rather elating) I HAVE managed to learn some things about how the source code works.
But, if there's anyone here who might have answers to the following questions, I would appreciate any light you might be able to shed on them! I feel like most of them are probably of the "wishful thinking" variety for someone such as myself who doesn't have a good deal of experience with this programming language.
(some of these questions might imply certain things about the game story, so there is a "spoiler alert" in effect here)
1. With some regularity, GOOD_GUY and BAD_GUY show up in the code. They're used all the time, but I can't figure out exactly what they're responsible for. This is more of a curiosity question than anything else.
2. ZOQFOT_DEATH_EVENT is, I'm sure, related to the Zoq Fot Pik being destroyed. However, in the few places it is mentioned, I can't figure out what it is that actually causes the Zoq Fot Pik to go away. There never seems to be anything in the code in conjunction with ZOQFOT_DEATH_EVENT that implies the game is removing the Zoq Fot Pik from their homeworld, or that Commander Hayes will say, "whoa, the Zoq Fot Pik are gone!"
Related to this, I'm wondering about how the game decides you're allowed to build a certain kind of ship, or why you're suddenly NOT able to if something happens.
3. What part of the black_urquan_genocide (void) function actually erases a race? It's been so long since I've allowed the Kohr-Ah to start cleansing people that I forget whether or not you can still build a race's ship if that race has been cleansed (I suspect not though). The Zoq Fot Pik are destroyed one way, and races which are cleansed are probably destroyed in a different way by the code. Maybe not though.
4. Is there any way to place minerals ON a planet's surface manually, or dictate that a specific planet has a HUGE amount of resources? (I'm sure there is, as anything is POSSIBLE, but what might be involved in this process?)
5. How much of an outrageous pain in the ass would it be to make a new module, or completely revamp what a module does? Does weapon data for ships work the same way as it does for the flagship? That is, could you make a weapon module that fires Kohr-Ah discs? (or a module that generates a Yehat shield, etc.?)
6. Since there are the extra devices (the data plates) available, would it be possible to place them on a planet (say you changed the graphics to be a derelict Androsynth vessel or something) and have that ship added to your fleet if you found it? What would be involved in this?
7. Lastly (and the one I'd most like to be able to make happen) what would it take to make the Syreen starbase function like the Sol starbase? (only you'd talk to Talana instead of Commander Hayes) -- could you use the existing starbase.c and call the necessary functions and such when you visit the Syreen starbase? Is this something I should even think about? Heh.
My overall goal right now is making the game more challenging from the perspective of somebody who has played it daily since 1992, heh. There are some things that I'll never duplicate (like not knowing exactly what I do with Mycon egg cases) -- but I can move the egg cases to God-knows where and make it so far away that you have to stop and refuel at the Syreen base to get to them because your fuel tanks only hold ten fuel each.
|
|
|
Logged
|
~ Nicholai
|
|
|
meep-eep
Forum Admin
Enlightened
Offline
Posts: 2847
|
1. GOOD_GUY refers to the bottom player in combat, and BAD_GUY to the top player. When not in combat races marked with GOOD_GUY are available for building. 2. It's not a matter of removing them, it's a matter of not activating them. At the ZOQFOT_DEATH_EVENT case, 'actual_strength' for the race is set to 0 and GOOD_GUY and BAD_GUY are removed. Then in planets/genzoq.c ActivateStarShip (ZOQFOTPIK_SHIP, SPHERE_TRACKING) will return false. The setting of the ZOQFOT_DISTRESS game state flag to 2 takes care of the commander's message. 3. see 2 4. Yes, you have to override the GENERATE_MINERAL case for the system, as in sc2code/planets/gen* 5. It's possible, and shouldn't be all that much work. It's not explainable in a few words though. Peruse sc2code/ships/sis_ship.c for this. 6. Again, too much to explain. Take a look at the code for the Spathi comm code, in src/sc2code/comm/spathi/spathic.c 7. That's probably very easy. Copy the relevant code from sc2code/planets/gensol.c to gensyr.c. And in DoStarBase() in sc2code/starbase.c you'll have to change the "InitCommunication (COMMANDER_CONVERSATION);" to something dependant on the captain's location.
|
|
|
Logged
|
“When Juffo-Wup is complete when at last there is no Void, no Non when the Creators return then we can finally rest.”
|
|
|
|
|
Pages: [1]
|
|
|
|
|