Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Bug/Patch Discussion => Topic started by: Dio on August 30, 2013, 07:23:58 PM

Title: Design Window re-do
Post by: Dio on August 30, 2013, 07:23:58 PM
I am attempting to get the weapon animations working in the design shop under Yitzi's most recent unofficial patch. So far, no luck but that could change.
Title: Re: Weapon Animations
Post by: Dio on August 30, 2013, 07:34:49 PM
Odd... This only happens with particle impactors.
Title: Re: Weapon Animations
Post by: Dio on August 30, 2013, 07:42:12 PM
How about this?
Title: Re: Weapon Animations
Post by: Dio on August 30, 2013, 09:04:03 PM
I do not know how to add the ability to make them move 1 frame each time you change windows. I do know what makes certain other caviar parts move frame by frame.
Title: Re: Weapon Animations
Post by: Geo on August 30, 2013, 09:13:46 PM
The Particle Impactor seems to be the only weapon with that particular kind of animation. Perhaps that's why whatever you tried only works in the workshop.
Title: Re: Weapon Animations
Post by: Yitzi on August 30, 2013, 09:28:59 PM
Is this something that works with earlier patches?  If so, if you describe what you're doing and what happens I might be able to investigate.  If not, then it's a graphics issue and not something I can deal with.
Title: Re: Weapon Animations
Post by: Dio on August 30, 2013, 09:41:15 PM
What I did is change push value at addresses 004c2ea3 and 004c2ef0.

Okay first all moving animations contain the data segment 008E9F50 which you can search for. Second, the procedure for weapon graphics starts at 004C2CF0. Lastly, you will want to definitely take a look at the prodecure where the caviar files are. The caviar prodecure starts at address 00451030.

Step 1: change push 0 to push a number
Step 2: done except for the fact that the animation does not change.
Title: Re: Weapon Animations
Post by: Yitzi on August 30, 2013, 10:59:43 PM
That's useful for when someone is modding the graphics, but that's not on my priorities.

If you're doing it, PM me the segments you're changing and the hex value of the changed area, and I can include it in my next patch just so that we don't overwrite each other.
Title: Re: Weapon Animations
Post by: Dio on August 30, 2013, 11:12:30 PM
Okay I understand.
Title: Re: Weapon Animations
Post by: Dio on August 30, 2013, 11:18:56 PM
I could make an alternate chassis for infantry if anyone is interested.
Title: Re: Weapon Animations
Post by: Geo on August 30, 2013, 11:53:33 PM
I could make an alternate chassis for infantry if anyone is interested.

For the alien colony pod?  8)
(basically I have use of the alien colony pods using the same parts as the human one - crawler chassis, pod housing, and the colony 'tank').

Title: Re: Weapon Animations
Post by: Dio on August 31, 2013, 12:00:12 AM
I could make an alternate chassis for infantry if anyone is interested.

For the alien colony pod?  8)
(basically I have use of the alien colony pods using the same parts as the human one - crawler chassis, pod housing, and the colony 'tank').



Unfortunately the caviar parts for alien colony pods and human colony pods are in a single file. The reason they need only one file for all of those is because they use the same base chassis parts and then a single caviar file is added for a equipment. For example, their is a single section where it assembles the infantry equipment chassis tread, body, and support. This section is used in all the equipment sections where they simply add single piece to the base chassis.

 In other word, no I can not make a new alien colony pod because it is a single piece. However, I can diassemble the infantry construct that appears in the weapon design window.
Title: Re: Weapon Animations
Post by: Dio on August 31, 2013, 12:04:23 AM
I am also going to post my helpx file that will provide an example of how to make weapon and armor types appear in the datalinks.
Title: Re: Weapon Animations
Post by: Geo on August 31, 2013, 12:08:46 AM
My tinkering has shown me the aliens use only one .cvr for their infantry colony pod, while the humans use an assembly of the crawler chassis (in itself 3-4 parts IIRC), the pod module (weapon .cvr so to speak), and a 'body' which you can compare with the alien .cvr file.
I know that the other chassis' use the same general assembly, but not for infantry pods...
Unless I'm completely misunderstanding you?
Title: Re: Weapon Animations
Post by: Dio on August 31, 2013, 12:25:59 AM
Their is a single base chassis for human infantry equipment (land unit with 1 movement). The equipment that use this single chassis are terraformers, colony pods, supply transports, and Troop Transports. All of these equipment pieces use the same base chassis except that each of them add one or two unique caviar piece to that base chassis. You can view the base equipment chassis in game by changing a weapon or equipments offense mode to 4.

Let me tell what caviar files are used to make each infantry equipment (Land movement 1):

Base Chassis: VB.CVR + VBp.cvr + VCL.cvr + VCLT00.cvr + VLIGHTS.cvr

Colony Pods: Base Chassis + Drop.cvr + Droplet.cvr

Terraformers: Base Chassis + VT.cvr + WVNTu.cvr

Supply Transport: Base Chassis + VWNST.cvr

Troop Transport: Base Chassis + VWNTT.cvr
Title: Re: Design Window re-do
Post by: Dio on August 31, 2013, 03:04:45 AM
The addresses 00433066 and 00433074 control the labels for weapon and equipment respectively on the weapon design window.
Title: Re: Design Window re-do
Post by: Dio on August 31, 2013, 03:58:40 AM
The whole shaded area controls the label weapon on the main design window. Why it is taking up so much more space than the other labels?
Title: Re: Weapon Animations
Post by: Geo on August 31, 2013, 02:02:14 PM
Their is a single base chassis for human infantry equipment (land unit with 1 movement). The equipment that use this single chassis are terraformers, colony pods, supply transports, and Troop Transports. All of these equipment pieces use the same base chassis except that each of them add one or two unique caviar piece to that base chassis. You can view the base equipment chassis in game by changing a weapon or equipments offense mode to 4.

Let me tell what caviar files are used to make each infantry equipment (Land movement 1):

Base Chassis: VB.CVR + VBp.cvr + VCL.cvr + VCLT00.cvr + VLIGHTS.cvr

Colony Pods: Base Chassis + Drop.cvr + Droplet.cvr

Terraformers: Base Chassis + VT.cvr + WVNTu.cvr

Supply Transport: Base Chassis + VWNST.cvr

Troop Transport: Base Chassis + VWNTT.cvr

I know all that. I checked with a .cvr viewer what all these files look like.
My point is that the human (infantry/crawler) colony pod uses the Base Chassis + Drop.cvr + Droplet.cvr, but the aliens only the ACOLPOD.cvr file.
What I'd like is the aliens using base chassis + droplet as well so I can switch around.
Title: Re: Design Window re-do
Post by: Buster's Uncle on August 31, 2013, 02:12:40 PM
We really, really, need someone to crack the .cvr format and whip up an editor.  That would be HUGE.
Title: Re: Design Window re-do
Post by: Dio on August 31, 2013, 03:30:02 PM
Their is a single base chassis for human infantry equipment (land unit with 1 movement). The equipment that use this single chassis are terraformers, colony pods, supply transports, and Troop Transports. All of these equipment pieces use the same base chassis except that each of them add one or two unique caviar piece to that base chassis. You can view the base equipment chassis in game by changing a weapon or equipments offense mode to 4.

Let me tell what caviar files are used to make each infantry equipment (Land movement 1):

Base Chassis: VB.CVR + VBp.cvr + VCL.cvr + VCLT00.cvr + VLIGHTS.cvr

Colony Pods: Base Chassis + Drop.cvr + Droplet.cvr

Terraformers: Base Chassis + VT.cvr + WVNTu.cvr

Supply Transport: Base Chassis + VWNST.cvr

Troop Transport: Base Chassis + VWNTT.cvr

I know all that. I checked with a .cvr viewer what all these files look like.
My point is that the human (infantry/crawler) colony pod uses the Base Chassis + Drop.cvr + Droplet.cvr, but the aliens only the ACOLPOD.cvr file.
What I'd like is the aliens using base chassis + droplet as well so I can switch around.

I will see what I can do for you.
Title: Re: Design Window re-do
Post by: Dio on August 31, 2013, 03:33:37 PM
This is the code for the alien colony pod. Note that it has a special animation.
Title: Re: Design Window re-do
Post by: Dio on August 31, 2013, 03:45:21 PM
Interesting fact. It appears that each faction starts a new game with the highest level of ground unit that does not have a pre-requisite techonology. For example, lets say that hovertanks are available from the start of a game. Then each faction starts out with a scout hovertank.
Title: Re: Design Window re-do
Post by: Dio on August 31, 2013, 04:06:36 PM
The best I can do without re-writing both the chassis and weapons section is give you a colony pod equipment without the tread and body for aliens.
Title: Re: Design Window re-do
Post by: Geo on August 31, 2013, 04:26:01 PM
The best I can do without re-writing both the chassis and weapons section is give you a colony pod equipment without the tread and body for aliens.

Mmm. That might work too. Because when switching aliens to humans, I have the colony pod weapon in the 'alien body' and tracks underneath them, though the latter are nearly invisible because of the size of ACOLPOD.cvr

Interesting fact. It appears that each faction starts a new game with the highest level of ground unit that does not have a pre-requisite techonology. For example, lets say that hovertanks are available from the start of a game. Then each faction starts out with a scout hovertank.

Interesting indeed. Jarlwolf's initial planet busters may not be so far-fetched after all.  ;lol
Title: Re: Design Window re-do
Post by: Dio on August 31, 2013, 06:05:06 PM
A test of changes I have made in the code.

Title: Re: Design Window re-do
Post by: Dio on August 31, 2013, 06:09:46 PM
I want to try and get offense modes and defense modes to appear where the labels weapons and armor are. Also, I would like the single letter to appear behind the weapon strength on the design labels.
Title: Re: Design Window re-do
Post by: Dio on August 31, 2013, 06:33:15 PM
So after inserting the address for defensemodes, this is what I get.
Title: Re: Design Window re-do
Post by: Yitzi on September 01, 2013, 03:02:27 AM
The whole shaded area controls the label weapon on the main design window. Why it is taking up so much more space than the other labels?

Because it's not a hardcoded label, but rather from the text files, so the program code uses a pointer to a pointer to the label, and dereferencing pointers takes up space in the code.
Title: Re: Design Window re-do
Post by: Dio on September 16, 2013, 12:11:28 PM
It is odd that all VW weapons except for the resonace bolt, resonace lasers, lasers (VW01) and hand weapons (VW00) are only referenced in the caviar section of code
Title: Re: Design Window re-do
Post by: Yitzi on September 16, 2013, 02:20:33 PM
VW?
Title: Re: Design Window re-do
Post by: Dio on September 16, 2013, 02:27:27 PM
VW?

VW=Vehicle Weapon or weapons and equipment.
Title: Re: Design Window re-do
Post by: Dio on September 16, 2013, 02:58:10 PM
Also, I have found out that all vehicle weapon placement caviar files and vehicle lights caviar file have three seperate positions they can be placed in for vehicles. (which are AVGTGUN.cvr, AVHT-GUNREPOSITION, AVHT-LIGHTSREPOSITION.cvr, ADROPER.Cvr and VLIGHTS.cvr)
Title: Re: Design Window re-do
Post by: Dio on September 16, 2013, 03:09:01 PM
In addition, there are several caviar files that exist in the game folder but are not coded for in game. They are VCT02.cvr, SELECT.CVR, Asas, and AVI-GunReposition.cvr. Caviar files that are coded for but unused outside the caviar procedure are: VRCPO0-03.cvrs and VW02-12.cvrs
Title: Re: Design Window re-do
Post by: Dio on September 16, 2013, 03:22:08 PM
These are the caviar files that include animations: VCUW.cvr, Select.cvr, VI.cvr, Vipta00 and 01.cvr, VIptapsi.cvr, VIptasgn.cvr, Viptapwall.cvr, Viptr00-03.cvr, VSPTf.cvr, VSPTb.cvr, VW01-12.cvrs, VCTb.cvr, ACOLPOD.cvr, AA.cvr,  and Vpt.cvr.
The files that I know have been coded for animations are VIpta00 and 01, Viptapsi.cvr, Viptasgn, Viptapwall.cvr, Viptapwall, Viptr00-03.cvrs, VSPTf.cvr, VSPTb.cvr, VCtb.cvr, ACOLPOD, Vpt.cvr and VI.cvr. That leaves VW01-12.cvr and VCUW.cvr unanimated. Why is that happening?
Title: Re: Design Window re-do
Post by: Dio on September 16, 2013, 03:29:02 PM
Lastly, I have found that the controls for if a faction starts with a colony pod are at addresses 004C268C and 004C268F.
Title: Re: Design Window re-do
Post by: Geo on September 16, 2013, 04:57:32 PM
Also, I have found out that all vehicle weapon placement caviar files and vehicle lights caviar file have three seperate positions they can be placed in for vehicles. (which are AVGTGUN.cvr, AVHT-GUNREPOSITION, AVHT-LIGHTSREPOSITION.cvr, ADROPER.Cvr and VLIGHTS.cvr)

Starting to wonder if you never found the file in attachment. ;)

Title: Re: Design Window re-do
Post by: Geo on September 16, 2013, 04:58:45 PM
Also, I have found out that all vehicle weapon placement caviar files and vehicle lights caviar file have three seperate positions they can be placed in for vehicles. (which are AVGTGUN.cvr, AVHT-GUNREPOSITION, AVHT-LIGHTSREPOSITION.cvr, ADROPER.Cvr and VLIGHTS.cvr)

Suspiciously, those are caviar files that cannot be opened by the viewer. ;)
Title: Re: Design Window re-do
Post by: Yitzi on September 16, 2013, 07:23:42 PM
It could be that they code for effects rather than components, which is why the viewer can't open them, and if so they might be called by the other caviar files rather than the exe, which is why you couldn't find them.
Title: Re: Design Window re-do
Post by: Dio on September 25, 2013, 07:18:13 PM
@Yitzi, do you have any idea of the locations in the code where the numbers for the design window labels are taken from? The labels are in the following format, W:a number equal to weapon strength or psi, or A: a number equal to armor strength. I know where the section for the designlabels as a whole is controlled but not where the individual numbers and letters are controlled and taken from.
Title: Re: Design Window re-do
Post by: Yitzi on September 29, 2013, 05:59:50 AM
@Yitzi, do you have any idea of the locations in the code where the numbers for the design window labels are taken from? The labels are in the following format, W:a number equal to weapon strength or psi, or A: a number equal to armor strength. I know where the section for the designlabels as a whole is controlled but not where the individual numbers and letters are controlled and taken from.

I don't know, but if you know where the section as a whole is, you should be able to just read it* and see where it brings up those features.

Alternatively, you can breakpoint the section, then once it hits that breakpoint, make a read breakpoint at the weapon and armor strengths (weapon strengths are at 94AE6B+10Xweaponkey, armor strengths are at 94F280+10Xarmorkey) and find where it hits that breakpoint and read from there.


*I'm hoping you do know how to read assembly and figure out what it's doing; if not, that is by far the most necessary skill if you're going to do anything with .exe modding.
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: 33 - 892KB. (show)
Queries used: 20.

[Show Queries]