Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Topic started by: Dewbacca on September 04, 2018, 07:33:44 PM

Title: Unity Supply Pods (renamed)
Post by: Dewbacca on September 04, 2018, 07:33:44 PM
I was browsing the program looking for a way to edit what drop pods give... and alas the only file I can find is a .cvr file, and I have no idea how to open it.

Is there a listing of not only WHAT files do what, but how to open the various file types found in SMAC/ SMAX?
Title: Re: Listing of file types
Post by: bvanevery on September 04, 2018, 09:24:21 PM
The giving of drop pods is controlled by alphax.txt (and of course alpha.txt for old school SMAC).  I allow them to be built on air units and ships, for instance.  "Max airdrop range w/o orbital insertion" is also controlled by alphax.txt; the default value is 8 squares.  "Technology to allow orbital insertion w/o Space Elevator" is also in there; default is Gravity.

If you want drop pods to do something new and weird, you're talking about patching the .exe.  I have no idea how you'd do it or if it's feasible.

.cvr files are art resources, not code.  They're a PITA to edit, and I don't think anyone can get new 3d shapes out of them.  You can, however, apply textures to things with some tool that someone came up with.  I've never tried it, nor am I motivated to do so.

Generally speaking the wiki (http://alphacentauri2.info/wiki/Main_Page) has listings of stuff.  You can find it from the website menu "SMACX.. AC Wiki".  You can also deduce some stuff by staring long and hard at alphax.txt, like what the unit bit flags do.  They're just for the unit abilities, in the order that the abilities appear in alphax.txt.  That's how you control whether a predesigned unit has drop pods, for instance.
Title: Re: Listing of file types
Post by: Dewbacca on September 05, 2018, 03:47:25 AM
I mean the black pods dropped by the colony ship as we arrived on planet. I know what you are talking about, perhaps I use the wrong term.
Title: Re: Listing of file types
Post by: bvanevery on September 05, 2018, 07:53:35 AM
There aren't any moddable .txt settings that control what randomly comes out of a supply pod.  It's hardwired into the game binary.  I don't know if anyone has ever tried to patch the game binary to change this.  I just looked at info about Yitzi's patch, both its readmes and the wiki stuff about it, and I didn't find anything about such a feature.
Title: Re: Listing of file types
Post by: Vidsek on September 05, 2018, 12:54:47 PM
  Indeed, what a Unity drop pod produces when "opened" is coded in the .exe. 
I brought up this exact subject with Yitzi in one of his threads of suggestions for future contents of his patches/bugfixes.   He suggested it was probably possible to make more of the pod contents adjustable by the players, but it was at the time superseded by other more significant bugs and features.
  I'll agree, it's not the most pressing issue with the game or .exe modding, it would be just a minor opportunity for players to customize the game for their playstyle.
  Currently, it *is* possible to restrict some of what the pods produce in the Scenario Preferences.  I forget if those preferences are available at any time when you are *not* running the game as a scenario.
Title: Re: Listing of file types
Post by: Dewbacca on September 05, 2018, 01:19:51 PM
I have found they are called "GOODYPOD" in the .exe.

Quote
GOODYGATE   indbm_sm.pcx    GOODYBUILD  indbm_sm.pcx    GOODYBUILD  art_dis_sm.pcx  GOODYARTIFACT   art_dis_sm.pcx  GOODYARTIFACT   GOODYWIMPOUT    fung_sm.pcx GOODYFUNGUS GOODYCHOPPER    GOODYFOIL   ogre_sm.pcx OGREPOD ogre_sm.pcx OGREPOD supply_sm.pcx   GOODYPOD    supply_sm.pcx   GOODYPOD    GOODYCOMM   GOODYCOMM2  supply_sm.pcx   GOODYCOMM   supply_sm.pcx   GOODYCOMM   GOODYDATA   GOODYDATA   1   supply_sm.pcx   supply_sm.pcx   GAHOODY3    GOODYFOREST2    kelp_sm.pcx GOODYKELP   forgr_sm.pcx    GOODYFOREST forgr_sm.pcx    GOODYFARM   supply_sm.pcx   GOODYMINE   supply_sm.pcx   GOODYSOLAR  GOODYWIMPOUT2   GOODY10 isle_sm.pcx sporlnch_sm.pcx GOODYISLE   GOODYWORMS  isle_sm.pcx mindworm_sm.pcx GOODYISLE   GOODYWORMS  GOODY11 clone_sm.pcx    GOODYCLONE  GOODYWHIRLPOOL  GOODYVANISH supply_sm.pcx   GOODYRESOURCE   GAHOODY4    ARTIFACTTECH    art_dis_sm.pcx  ALREADYARTIFACT art_dis_sm.pcx  GOODYARTIFACT2  ÿÿÿÿúÿÿÿ<   ^   ~   x   e   !   >   r   < 
Title: Re: Listing of file types
Post by: Vidsek on September 05, 2018, 05:49:33 PM
   Good work finding those.  The names make the pods sound like pinatas.  I'll be looking in the grocery stores now for bags of GOODYWORMS and GOODYFUNGUS.

   Next we need to know where in the .exe it chooses which of those to occur.  Hopefully, it will be possible to figure out how it makes the choice, and if all "GOODIES" have the same chance of occuring, or if there is some sort of weighting factor to make some less and some more likely.

   I would not advocate making any changes other than to have more (all) of them refer to a 'Preferences' list like what already exists for a few.  Although if it was simple to also set the frequency of each, that would be nice.  As for instance, in adjusting the worm, isle and fungus bloom chances.

   So.....um......GOODYWIMPOUT?   The mind reels.....
Title: Re: Listing of file types
Post by: Induktio on September 05, 2018, 06:42:14 PM
GOODYWORDS and other similar strings there are just keys that select the translated message from xscript.txt. It does not have any other deeper effect on game mechanics. From Scient's IDA database we can see which functions control the supply pods ("goodies"):

0x57A660 goody_box decides what appears from a supply pod
0x592140 goody_at  decides which squares have supply pods

It would be pretty simple to start changing these functions, but then again, I didn't have any need to go modifying them...
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 31 - 840KB. (show)
Queries used: 15.

[Show Queries]