Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Topic started by: Linamints on January 09, 2014, 11:35:11 PM

Title: Blank unit file/Faction specific units?
Post by: Linamints on January 09, 2014, 11:35:11 PM
I could've sworn I stumbled onto the graphics file for in game units at one point but I'm having an insanely hard time finding it again if I did.
i was wondering if anyone knew which file it was and if there was a blank one floating around somewhere?
I checked the downloads and didn't see anything like that in there.

Also, I am doing a custom AC faction set for my brother who is curious about the game. He is a big fan of the anime series Zoids and I'm trying to make it fairly accurate. I tracked down the sprites for the different faction's units in the shows/games, however they are supposed to be region specific. I wanted to do custom graphics for each faction but was wondering if there was anyway to make it so they only show up in certain factions and not others?
Title: Re: Blank unit file/Faction specific units?
Post by: Geo on January 10, 2014, 11:46:58 PM
It looks like the file you're looking for is named "units.pcx".

As for unique faction units, the only way is to link them to a tech, give that tech to the home faction, and to ensure no other factions gain this tech disable tech stealing, -trading, and the planetary datalinks, in the alphax file and/or scenario editor when creating yoyr scenario.
Title: Re: Blank unit file/Faction specific units?
Post by: Linamints on January 11, 2014, 03:42:37 AM
I saw that one, but it seems like it only has the native life forms and a red missile thing.
In particular I'm looking for the sprite sheet that controls the patrol scout and other non native units.
Title: Re: Blank unit file/Faction specific units?
Post by: Buster's Uncle on January 11, 2014, 03:46:05 AM
Those are individual .cvr files, and no one knows how to crack them.
Title: Re: Blank unit file/Faction specific units?
Post by: Flygon on January 11, 2014, 10:09:42 AM
It's not so much that nobody knows how, so much as that it'd require a lot of effort. And there's simply much better investments that effort can be put into. Arguably, even remaking the Caviar based assets in a more modern sensible format from the ground up would take less time and effort.
Title: Re: Blank unit file/Faction specific units?
Post by: Buster's Uncle on January 11, 2014, 10:15:45 AM
Someone who did that would be like a god to the modding community...
Title: Re: Blank unit file/Faction specific units?
Post by: Linamints on January 11, 2014, 03:41:37 PM
I can so  agree with that XD, they'd have my eternal praise at least. Is it possible to make any custom graphic with the unit.pcx file then?

And Flygon if you have any pointers to get started I'd be happy to take something like that on as a personal project. I've only been able to find one viewer and it opened them in binary format.
Title: Re: Blank unit file/Faction specific units?
Post by: Geo on January 11, 2014, 04:22:51 PM
... Is it possible to make any custom graphic with the unit.pcx file then?

Yes. Simply edit in your own graphics in the open slots, and/or paste over the existing 'native life' graphics with an editor like gimp.
As you probably already counted, there's at least 10 slots to put in your own graphics. Maybe more, but I haven't looked into how the game manages the appearance of 3 different progenitor ogres from the same row in inits.pcx
Title: Re: Blank unit file/Faction specific units?
Post by: Linamints on January 11, 2014, 03:55:37 PM
Will do, but then how do you tell the game where to pull the correct image from/ what tech makes that particular unit?
Title: Re: Blank unit file/Faction specific units?
Post by: Geo on January 11, 2014, 04:40:21 PM
Will do, but then how do you tell the game where to pull the correct image from/ what tech makes that particular unit?

In the Alphax file, #units section. Look it up, and check the native life/ogre lines. Just before all the zero's, you see either -1, or a positive number. The positive number refers to one of the 10 slots (0-9 IIRC) in units.pcx, the -1 tells the game to refer to the caviar file(s) and 'assemble' the unit accordingly.
Title: Re: Blank unit file/Faction specific units?
Post by: Kilkakon on January 12, 2014, 09:37:13 AM
In LE I used the "starting tech" thing to give people starting armies. :) Eventually they can discover the other ones but not for a while.
Title: Re: Blank unit file/Faction specific units?
Post by: Geo on January 12, 2014, 11:10:21 AM
In LE I used the "starting tech" thing to give people starting armies. :) Eventually they can discover the other ones but not for a while.

Yeah. It's too bad the game doesn't accept 'closed loops' in the tech tree. :(
Title: Re: Blank unit file/Faction specific units?
Post by: Kilkakon on January 12, 2014, 12:55:28 PM
Yeah true. :( I made the base tech for the branching point "inter species society" though so it almost makes sense. :D
Title: Re: Blank unit file/Faction specific units?
Post by: Yitzi on January 12, 2014, 06:34:41 PM
Yeah. It's too bad the game doesn't accept 'closed loops' in the tech tree. :(

What happens if you try?  (I'm guessing some sort of hang or crash as it attempts, and fails, to assign a level.)
Title: Re: Blank unit file/Faction specific units?
Post by: Kilkakon on January 12, 2014, 11:16:02 PM
Unsure--I know it doesn't like unavailable starting techs either as AIs will constantly try to trade for them. It isn't possible to do it as well as in like Civ 2 or something from memory
Title: Re: Blank unit file/Faction specific units?
Post by: Yitzi on January 13, 2014, 03:57:10 AM
Ok, I just tested it, and the game works fine until you try to access the involved techs (or any tech with them as a prerequisite) in some way (not sure of the exact details), at which point you get a crash to desktop.  It is indeed due to an infinite loop when trying to find the tech level, so when I start taking requests, if it's requested to enable tech loops, I'm fairly certain I can do it, I'd just need to know how the tech level should be calculated (as "1 more than the highest-level prerequisite" is quite obviously not going to work for a loop.)
Title: Re: Blank unit file/Faction specific units?
Post by: Geo on January 14, 2014, 08:34:46 AM
..., so when I start taking requests, if it's requested to enable tech loops, I'm fairly certain I can do it, I'd just need to know how the tech level should be calculated (as "1 more than the highest-level prerequisite" is quite obviously not going to work for a loop.)

It is the easiest way I know of making features/units unavailable for some reason, so I'll definitely keep in mind as a request. ;)
But what other way then an up-down/lower-higher relation can you do in the tech tree?
Title: Re: Blank unit file/Faction specific units?
Post by: Yitzi on January 14, 2014, 12:51:20 PM
..., so when I start taking requests, if it's requested to enable tech loops, I'm fairly certain I can do it, I'd just need to know how the tech level should be calculated (as "1 more than the highest-level prerequisite" is quite obviously not going to work for a loop.)

It is the easiest way I know of making features/units unavailable for some reason

You'd also need to make the tech in question unavailable from trade and pods...

Quote
But what other way then an up-down/lower-higher relation can you do in the tech tree?

You mean, how else can you determine the tech level (e.g. industrial base is 1, industrial automation is 3, controlled singularity is 15, etc.)?  You describe how you want it to work for loops, and I can probably implement it, but obviously if tech A requires tech B and tech B requires tech A, you can't have A have a higher level than B and B have a higher level than A.
Title: Re: Blank unit file/Faction specific units?
Post by: Geo on January 14, 2014, 05:33:25 PM
You'd also need to make the tech in question unavailable from trade and pods...

Yeah...
I seem to remember reading the pods only give first-level techs though, so that can be circumvented.
But trading is indeed a completely other kettle.



You mean, how else can you determine the tech level (e.g. industrial base is 1, industrial automation is 3, controlled singularity is 15, etc.)?  You describe how you want it to work for loops, and I can probably implement it, but obviously if tech A requires tech B and tech B requires tech A, you can't have A have a higher level than B and B have a higher level than A.

So you think it would be possible to have half-isolated techs in the tech tree, for instance needing a prerequisite from the for everybody researchable part, and the other prerequisite linked to say the "ALIEN" or "AQUATIC" parameter flag?
Title: Re: Blank unit file/Faction specific units?
Post by: Yitzi on January 14, 2014, 08:00:07 PM
You'd also need to make the tech in question unavailable from trade and pods...

Yeah...
I seem to remember reading the pods only give first-level techs though, so that can be circumvented.
But trading is indeed a completely other kettle.



You mean, how else can you determine the tech level (e.g. industrial base is 1, industrial automation is 3, controlled singularity is 15, etc.)?  You describe how you want it to work for loops, and I can probably implement it, but obviously if tech A requires tech B and tech B requires tech A, you can't have A have a higher level than B and B have a higher level than A.

So you think it would be possible to have half-isolated techs in the tech tree, for instance needing a prerequisite from the for everybody researchable part, and the other prerequisite linked to say the "ALIEN" or "AQUATIC" parameter flag?

That's an idea...it could be made possible.  But what I was thinking of was simpler: A first-level tech is any tech with no prereqs.  A second-level tech is a tech with a first-level prereq and nothing higher.  What level is a tech whose prereq is itself (or whose prereq's prereq is itself, etc)?
Title: Re: Blank unit file/Faction specific units?
Post by: Linamints on January 16, 2014, 11:38:45 PM
Sorry not for responding to any of this, we've had a lot of power outages here lately.
I am confused though why giving higher level techs seems to cause crashing? I made a faction pack for myself at one point where each AI had one of the higher level techs, and played the game through just fine without crashes.

Also How do you disable tech trades? I've never noticed that option in the rules section before and I'd prefer to have it XD. I get irritated pretty fast with AI's harassing me for techs.

I managed to find that Caviar viewer and I'm pretty curious about some of what I've found. Mainly, that certain caviar files cannot be read do to a lack of geometry (according to the error message), are these where the unit sprites are stored?

I'm also curious why the models are all in 3D for what is effectively a 2D scroller style game? And if this might mean the unit sprites might be somewhere else?
Title: Re: Blank unit file/Faction specific units?
Post by: Dio on January 18, 2014, 03:17:44 AM
Sorry not for responding to any of this, we've had a lot of power outages here lately.
I am confused though why giving higher level techs seems to cause crashing? I made a faction pack for myself at one point where each AI had one of the higher level techs, and played the game through just fine without crashes.

Also How do you disable tech trades? I've never noticed that option in the rules section before and I'd prefer to have it XD. I get irritated pretty fast with AI's harassing me for techs.

I managed to find that Caviar viewer and I'm pretty curious about some of what I've found. Mainly, that certain caviar files cannot be read do to a lack of geometry (according to the error message), are these where the unit sprites are stored?

I'm also curious why the models are all in 3D for what is effectively a 2D scroller style game? And if this might mean the unit sprites might be somewhere else?

Most of the files that contain no geometry are used by the game to determine where the weapons are to be attached to a specific vehicle chassis. In addition, the three dimesional models are used for weapons/equipment, armor, vehicles, reactors, specific special abilities, locusts of chiron, and the isle of the deep. Also, the three dimensional models are used everywhere in the game that the graphic is to be represented. Finally, the only two dimensional grpahics unit graphics in the game are located in the units.pcx file.
Note: The lines in the unit.pcx file that contain the spore launcher, sealurk, mindworm and fungal tower have special coding that allows them to change graphics depending on the morale of said lifeform. In other words, if used for anything else, you might run into problems with graphics.
Title: Re: Blank unit file/Faction specific units?
Post by: gwillybj on January 18, 2014, 03:57:03 PM
I seem to remember reading the pods only give first-level techs though, so that can be circumvented.
The pods give all levels of techs.
Title: Re: Blank unit file/Faction specific units?
Post by: Yitzi on January 18, 2014, 11:53:42 PM
Sorry not for responding to any of this, we've had a lot of power outages here lately.
I am confused though why giving higher level techs seems to cause crashing? I made a faction pack for myself at one point where each AI had one of the higher level techs, and played the game through just fine without crashes.

Giving higher-level techs doesn't cause crashes, but stuff like having tech A with tech B as a prerequisite, and tech B having tech A as a prerequisite, does.  Basically, if you can trace down the prerequisite chain and end up where you started, it'll cause a crash.

Quote
Also How do you disable tech trades? I've never noticed that option in the rules section before and I'd prefer to have it XD. I get irritated pretty fast with AI's harassing me for techs.

You can't, at least not yet.
Title: Re: Blank unit file/Faction specific units?
Post by: JarlWolf on January 20, 2014, 02:59:50 AM
Yes, maybe have it where you add more toggled options when creating a custom faction like a "custom unit/tech" where it's a tech or unit attributed and only useable by said faction, sort of how the ALIEN toggle works in a sense.

Might take a fair bit of coding but I could see it working.
Title: Re: Blank unit file/Faction specific units?
Post by: Yitzi on January 20, 2014, 12:53:52 PM
Yes, maybe have it where you add more toggled options when creating a custom faction like a "custom unit/tech" where it's a tech or unit attributed and only useable by said faction, sort of how the ALIEN toggle works in a sense.

Might take a fair bit of coding but I could see it working.

I think it would be easier and more powerful to just have a faction be usable in place of a tech as a prerequisite.
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: 14.

[Show Queries]