Adding more playable races to race selection screen.

http://img100.imageshack.us/img100/6105/gc2ta1235803294.jpg

We are trying to have more than the standard amount of races selectable on the Pick your Civilization screen.

We have got this far,

But no matter what we alter in raceconfig or any where else we have tried we can't get any more races to show.

We tried changing the civ type of the minors to type 4 (major race) hoping they would show since they are the next races after custom in the raceconfig. Majors being 0-12 and minors 13-20. Nothing changed.

How does the game read the race id number and correspond that to the slot on this screen. I think thats what we are missing.

Or are we way off track?

Anyone point us in the right direction.

Thanks.

41,403 views 19 replies
Reply #1 Top

Well. it sounds to me, that the major race slots are capped to 13 by code.

 

Were you able to mod the 13th slot aka custom race? That definately works!

Reply #2 Top

Do you actually get aythig if you click on the empty slots? Maybe you could load custom opponents into them one @ a time.

Reply #3 Top

AFAIC, the code itself *must* reserve memory stacks for each active races once runtime routines kick in... then, the actual pool of available ID (at the settings phase) is a built-in range of available slots to deploy 12 Majors, 1 Custom, 8 Minors, etc, up until the maximum (code driven, again) of 36 in total... including the mega-events random races.

 

Even if you were to add any majors above the default 12 (typed 4 and filling other's reserved IDs), the code still needs to allocate memory for these extra slots which i'm 98% sure has to be done through function calls & declarations; that stuff being absent, the whole UI won't recognize any supplemental items. Considering also the extra AIs algorithms necessary to drive gameplay processing too, presuming the 9 opponents max rule still stands AFTER your list is properly detected, it would most probably take up as much memory as any single default Major slot *per* any new ones.

There might be an indirect way to "modify" the code... if you'd have access to the source;

 

-- Providing for a selectable screen of more choices (as indicated by your snapshot) that ties each slots with switchable incode definitions. Say, Terran 1a & Terran 1b... toggling upon one or the other.

-- Then a re-parsing routine that resets every code calls to the new race parameters **at runtime**.

-- Increasing the number of active slots for the opponents too since all races can fill such duty also.

-- Rewriting the variable arrays that keep track of *supplemental* stack space, dynamically.

 

If they HAD to reduce memory trace of the ships' graphics to make room for the new Gigantic map -- it tells me that the 'compatible' stack of available heaps is already somehow tight in the code.

Raising that figure, may just be too complex for the kind of feature you want in.

 

Besides, you could always use my X-Worlds' trick; simply switch RC.xml files that has as many different races as you wish within the default pool of twelve.

What puzzles me even further about this "need" to have more than the RC races on screen to select from is this; what stops you from using the Custom slot? It switches to another screen where you can always load up many saved "indirect" races!

 

Reply #4 Top

Well, we wanted to have a larger pool of new "stock "races to choose from without having to direct players to a workaround using the customs. Also there is a plan(and some .dxpack work already underway) to have up to 24 opponent slots, again if we can find a way to get the game to utilize them properly. That in itself is starting to look like a little too ambitious of a goal.

We'll still be striving for it until we find it a definate that it can't be done outside of a full decompiling(which I think is against the EULA anyways). Not that any of us working on it could tell what we were looking at with the bare code 8O

Reply #5 Top

try "up, up, down, down, left, right, left, right, A, B, A, select, start"

Reply #6 Top

What puzzles me even further about this "need" to have more than the RC races on screen to select from is this; what stops you from using the Custom slot? It switches to another screen where you can always load up many saved "indirect" races!
End of quote

Just personal taste. It would look very neat and very slick to have all possible playable races here in this screen. Plus the mod were are doing has more than 13 races.

But. But....it seems that this will be a no go and we will have to resort to the following screen anyway.

As for your X trick. Yeah that would work of course but is a little outside of where we want the mod to be. Though a possability.

@Scoutdog. We can get the slots to light up when you hover over it with the mouse but can find no way of adding opponents into those slots. The game seems to associate Race Id's 0-13 with the slots in the selection scree. Even though the game has 36 Race Id's there does not appear to be a way to allocate a slot to one of those Race Id's, even 30-35 which are there but unused.

Maybe you could load custom opponents into them one @ a time.
End of quote

How do you mean?

@Mr Korx. Yes we can mod the 13 slot as we wish, but going beyond that has eluded us. We had hoped that since the game has 36 Race Id's that they would follow some form of natural progression and that if we used the Akilian Race Id of 13 that it would appear in the next available slot under the Custom Race slot, custom being Race Id 12.

It didn't work, obviously.

You guys at I-mod have not done anything along these lines? I figured you'se might have tackled this area before?

 

Reply #7 Top

What I was talking about was a system in which you could bypass the raceconfig.xml entirely, and load pre-created opponents from the race customizer into each box one at a time. Of course, if you cannot get to the 2nd screen from the empties, I guess that would not work.

Reply #8 Top

Ahh i follow you now. No you can highlight the box but cannot select it.

Thats some food for thought though.

Reply #9 Top

As for your X trick. Yeah that would work of course but is a little outside of where we want the mod to be. Though a possability.
End of quote

 

Ya know, i've been thinking a little deeper about this whole "more races to select from the setting screen" since i first read your initial post and replied and here's (Not that far from what Scoutdog is suggesting above in fact!) what i came up with;

 

- Linking any number of extra races from a 'virtual row of slots' directly to the Custom Race slot itself... the principles would remain the same except that the main dxpack caller stays active while the secondary row pulls its races parameters from the normal process of using the Custom slot functions.

- A bit like "creating" the illusion that a new (custom selection) dxpack is currently being used straight from that specific screen.

- Then, it becomes a simple matter of recalibrating the layouts so that a new sort-of transit screen pops into the UI until you hit the usual *NEXT* to proceed with opponents while skipping or even confirming, the bynow valid & active & selected Custom values.

 

Short of having an indirect way to alter the default code calls for Custom processing functions, of course.

 

(PS; a few months ago , i gave this stuff a ride for its money while i was trying to make each Race slots "selectable" and editable by popping in two simple things; Portrait & Logo via a similar process such as what we can do in the customization by clicking LR arrows. Soon i realized, the dxpack wouldn't let me switch over to the cycling code itself but it doesn't mean it can't be done - indirectly by scripting a special routine.)

Reply #10 Top

indirectly by scripting a special routine.)
End of quote

How do you plan to script a special routine if all you can do is script the position of an object? 

(the game won't recognize any other kinds of scripts)

Reply #11 Top

No, the 'other' scripting code(s), dsep. *_*

I won't go as far as calling it an external patch - but rather, a slight alteration to some tricky areas of any given *source* reference. As everyone knows it's illegal to decompile a packed executable.

Reply #12 Top

Illegal as in go to jail, or illegal as in Stardock can sue the crap out of you?

Reply #13 Top

Quoting Scoutdog, reply 12
Illegal as in go to jail, or illegal as in Stardock can sue the crap out of you?
End of Scoutdog's quote

@Scoutdog: Yep I think that is what he means.

 

@Zyx: Sorry to say but if you want to mod a game to be what your needs even if it includes breaking the law, than you have serious problems.

Reply #14 Top

he was joking

Reply #15 Top

Right, i *was* joking; modding while maintaining compatibility with official stock code is more about finding the tricky hidden stuff and provide indirect gameplay elements which players wouldn't otherwise get unless SD alters its program accordingly.

Neilo's quest for an alternate races selection screen is one more perfect example of the challenges we (modders) all face when we aim for something specific. We must determine principles WITHOUT looking at a source code and try some workaround 'design steps' to succeed or conclude, *IT* can't be done.

How often have i found myself seeking for answers about many code functions, asking SD coders for some help, parsing through hundreds of forum threads, testing gameplays for bazillions of quick verifications, etc.

Yep, that's the beauty in solving these issues -- shoulda seen my big grin a few days ago when i realized the AIs were actually reacting as expected with the numerous 'concepts' introduced in X-Worlds 06-A; enhanced espionage stuff, terraforming complex surfaces, packing up their scouts with extra components on size 20 hulls!

But, it is illegal to decompile copyrights. One can always BE curious if they have the proper skills, though... AFAIC - nobody is going to come here preventing me from using my own PC how i please and for whatever good reasons.

Reply #16 Top

But, it is illegal to decompile copyrights. One can always BE curious if they have the proper skills, though... AFAIC - nobody is going to come here preventing me from using my own PC how i please and for whatever good reasons.
End of quote

No but uppon reading statements like that Brad may see fit to prevent you from using the forums.

You have just basically admitted to decompiling the GC2.exe, on their own forums, and then backed that up with a statement of bravado saying that unless they come a knockin on your door there is nothing they can do about it.

Well far from me to stop you getting yourself banned, but i think Brad has other avenues that although may not physically stop your efforts would satisfy him nontheless.

Decompile away......

Reply #17 Top

OMG... someone is watching over my shoulder. I mean, com'on, Neilo if there IS one member here who'd want me banned for whatever obscure reason - it's you, right?

You've blocked me from one of your sooooo precious thread about fixing the medals, claiming i was going toooooo off-topic. So be it, i had forgotten. But if you really do want to return the favor by publicly stating i decompile stuff around for my own pleasure and curiosity and, in fact, to determine stuff **WHICH i do not get any answers from official SD source & staff & real coders** -- be my guest.

As to what Brad can do or not with people on this forum, i'd risk a theory;

The open-minded listens carefully and doesn't try to interpret words out of context, the programmer studies the stuff with the tools & skills it has access to, and some people prefer to select their friends from what they know exactly about them and not from third party's opinions.

 

You'd want 24 Majors to choose from, right?

I had a very swift & obvious solution since early this afternoon.

Sadly, again.

EOF.

 

(PS; Lemme be absolutely clear about this; i haven't decompiled GC2 but if i really wanted to, i have the means & the perfectly legal & bought professional software to take any C++, packager, compressor codes apart *** FOR PERSONAL USE ONLY ***)

Reply #18 Top

Ya know, i was just pointing out that by even suggesting (and i took it as that you had) you had decompiled the game would be very thin ice to stand on. In fact if anything i thought i was pointing out to you that you should be weary of what you say as SD may not look kindly upon it.

I don't recall mentioning anything about how i fit into this scenario or about our past troubles, although you seem to bring it up often.

I'll remind myself next time i go to post something that may or may not help you that anytime i open my mouth you hear what you want to hear and could really give a rats ass what i actually had to say.

And No, i do not want you banned. I have only ever called for the banning of one member on here.

I guess thats what i get for trying to point out that your comments may place you in a very precarious position.

So be it, i had forgotten.
End of quote

Really, yet here we are again.....

And dangling the preverbial carrot in front of me gets you nothing. If you have a solution to the issue i raised in the OP to offer thinking i would pander to your whimsical needs then you are mistaken.

I tried to help and was shot down for it, keep your solution.

 

As for your disclaimer, i'll go as far as saying my comments were based on my interpretation of what you had already said, but any public stating i made was only ever based on your own public comments. They were your words not mine, though i did draw a conclusion form them.

I'll admit that conclusion is based on no fact whatsoever.

 

Reply #19 Top

Good enough... problem solved.

Let's get on with our lives and our modding stuff --

 

The key with supplemental races is not within the RC.xml file but rather HOW the code keeps tab of the Majors at that particular moment of the settings phase. (Hint; the Minors amount in TA is an optional array that gets parsed at the Galaxy setup screen, btw)

A routine reads the RC and only then, deploys each slot sequentially (that's the essential word right there) in a temporary placeholder - in dynamic memory.

Augment that heap to allocate for extra slots and the routine would follow through with Races 0-12, the usual Minors and, while restricting DreadLords & Pirates as it should -- but, looping out TO any declared extras between 30 to 35.

Sadly, it's a recompile of the source after alterations. Unless, somebody else has a different magical way.