Author Topic: Discussion: Conventional missile strength  (Read 4879 times)

0 Members and 1 Guest are viewing this topic.

Offline Yitzi

Discussion: Conventional missile strength
« on: August 25, 2013, 10:20:36 PM »
The strength of conventional missiles is one of those cases where the datalinks and the actual game wildly disagree.

The datalinks say it's 9Xreactor.
The actual game says that any missile unit has attack equal to the normal value for the weapon, plus 50%.  This was not put in there by mistake; it's meant to be there.

So now there are three possibilities:
1) It really should be as the datalinks say, i.e. 9 times the reactor strength.
2) It should be as the game does it, weapon strength +50%.  Missiles should still only be able to use the conventional missile weapon as well as special weapons (planet buster, tectonic, and fungal).
3) It should be as the game does it, but missiles should be able to use other weapons as well (the inability to do this may have been an oversight due to changing intentions).

The strengths and weaknesses of each approach:

Approach 1:
Strengths:
-It means that the datalinks are correct.
Weaknesses:
-It means that the game was intentionally given an approach that is not correct.
-It means that missiles are underpowered for their cost pre-Fusion, but extremely powerful for their cost in the latest stages of the game.

Approach 2:
Strengths:
-It means that the game was coded correctly.
Weaknesses:
-It means that missiles become weak and near-useless later in the game, once normal weapons pass strength 18.
-The coding of the game makes no sense; it would make more sense to not have special rules for missiles and just increase the power of conventional missiles to 18.

Approach 3:
Strengths:
-Missiles scale well throughout the game.
-The way that the game was actually coded makes sense.
Weaknesses:
-It requires assuming that both the datalinks and the actual game are flawed.

So I'd like to have some discussion on which approach is correct; whichever it is, I can implement it, but I want to know what to implement.

Offline gwillybj

Re: Discussion: Conventional missile strength
« Reply #1 on: August 25, 2013, 11:39:19 PM »
I like the way Conventional Missiles are described in the Datalinks: 9*Reactor. That's a good hefty punch at Singularity. As it is now, I use fewer and fewer of them as the game progresses because they do become, as you said, near-useless.
The missile types should be just as they are, as far as their weapons are concerned: Missile, Buster, Tectonic, Fungal. It's enough.
Two possibilities exist: Either we are alone in the Universe or we are not. Both are equally terrifying. ― Arthur C. Clarke
I am on a mission to see how much coffee it takes to actually achieve time travel. :wave:

Offline Yitzi

Re: Discussion: Conventional missile strength
« Reply #2 on: August 26, 2013, 12:08:27 AM »
I like the way Conventional Missiles are described in the Datalinks: 9*Reactor. That's a good hefty punch at Singularity. As it is now, I use fewer and fewer of them as the game progresses because they do become, as you said, near-useless.

Though that does mean that they increase in power but not in cost...

Offline Dio

Re: Discussion: Conventional missile strength
« Reply #3 on: August 26, 2013, 05:23:10 AM »
I have also seen the location in the code where it is placed. I think 9 times reactor strength makes the most sense. The next point I bring up is related to how the missile weapon type works in relation to other offense and defense types. I have also figured out how the missle weapon type would have worked according to the text in the alpha file.
Quote

Combat modes
;   Projectile weapons receive a bonus against Energy Armor.
;   Energy weapons receive a bonus against Projectile Armor.
;   No weapon receives a bonus against Binary Armor.
;   Missile weapons never receive a bonus.
;

So what this means is that most armor and weapons are either energy or projectile unless their is a specific reason for them to not be. That is why only energy and projectile type weapons and armor were included in the designshop section under labels.txt  and were the only two types shown in the pre-release photos. This means that energy weapons recieve a bonus against projectile type armor and projectile type weapons would recieve a bonus against energy type armor. Now, non-weapons=Equipment. In the datalinks, any weapon with a weapon mode value above 2 shows up as being equipment. This means that equipment would get a bonus against binary armor (essentially that might have indicated that each specific type of equipment could have attacked each other [like probe teams currently can against each other]?). That means the two missiles type weapons (conventional payloads and Planet Busters) would never recieve a bonus agianst other defense types. Also, it would explain why in the attack animation graphics their is only one row for missile attack graphics (it is in the XI.pcx file) while the other two types have four each. In short this is important because in the code for conventional payloads and planetbusters they always compare their values against both the weapon's firepower and weapon type value. I.E. jump if the weapon type value is not below 3. In addition, the code that the +50% to attack for conventional payloads is stored in the same memory register that is used in all other comparisions for weapon modes. Finally, this segement of code is both directly above an uncalled prodecure that uses armor strength and armor types and is called into many prodecures that effect weapon strength. So please take into consideration my earlier request to add the weapon type bonuses. I think this feature would add quite a bit to the game.
[End rant]
« Last Edit: August 26, 2013, 05:47:40 AM by Dio »

Offline Yitzi

Re: Discussion: Conventional missile strength
« Reply #4 on: August 26, 2013, 05:54:01 AM »
I have also seen the location in the code where it is placed.

You're a .exe modder too?

Quote
The next point I bring up is related to how the missile weapon type works in relation to other offense and defense types. I have also figured out how the missle weapon type would have worked according to the text in the alpha file.
Quote

Combat modes
;   Projectile weapons receive a bonus against Energy Armor.
;   Energy weapons receive a bonus against Projectile Armor.
;   No weapon receives a bonus against Binary Armor.
;   Missile weapons never receive a bonus.
;

So what this means is that most armor and weapons are either energy or projectile unless their is a specific reason for them to not be. That is why only energy and projectile type weapons and armor were included in the designshop section under labels.txt  and were the only two types shown in the pre-release photos. This means that energy weapons recieve a bonus against projectile type armor and projectile type weapons would recieve a bonus against energy type armor.

Yes, but that doesn't really have much to do with what's going on here; the conventional missile is actually a projectile weapon.  (Gun,basic laser, impact, chaos, graviton, and conventional missiles are considered projectile, all other lasers (gatling, fusion, resonance, quantum, and singularity) and bolts (tachyon and resonance) are considered energy, and only the missile launcher and psi attack are considered missile weapons.  On the armor side, unarmored and synthmetal are considered projectile, silksteel, photon, neutronium, and pulse and resonance armors are considered energy, and plasma, probability, antimatter, stasis, and psi are considered binary.)

Quote
Now, non-weapons=Equipment. In the datalinks, any weapon with a weapon mode value above 2 shows up as being equipment. This means that equipment would get a bonus against binary armor

Huh?  Equipment can't get a bonus, because it can't attack.  When it says "No weapon receives a bonus against Binary Armor", that means that there isn't any weapon that gets a bonus; it does not mean that non-weapons get a bonus.

Quote
Also, it would explain why in the attack animation graphics their is only one row for missile attack graphics (it is in the XI.pcx file) while the other two types have four each.

That's more likely because it's resolved all at once rather than in stages, probably because it doesn't matter how much damage the missile takes when winning.

Quote
In short this is important because in the code for conventional payloads and planetbusters they always compare their values against both the weapon's firepower and weapon type value. I.E. jump if the weapon type value is not below 2.

Which location are you looking at here, that you saw that?

Quote
In addition, the code that the +50% to attack for conventional payloads is stored in the same memory register that is used in all other comparisions for weapon modes. Finally, this segement of code is both directly above an uncalled prodecure that uses armor strength and armor types and is called into many prodecures that effect weapon strength.

I'm not quite sure what you mean here, perhaps if you go into more detail?

Quote
So please take into consideration my earlier request to add the weapon type bonuses. I think this feature would add quite a bit to the game.

I've already taken it into consideration, and decided that while it's potentially worth adding, it's not something that I like enough to push it to the head of the line.  So once I finish what I have planned already and ask for requests, you can submit that.

Or if you prefer, you can do the reverse-engineering and figure out the proper changes and just give that to me, and I can add it.

Offline Dio

Re: Discussion: Conventional missile strength
« Reply #5 on: August 26, 2013, 04:23:51 PM »
Quote
In short this is important because in the code for conventional payloads and planetbusters they always compare their values against both the weapon's firepower and weapon type value. I.E. jump if the weapon type value is not below 2.
Which location are you looking at here, that you saw that?


Quote
In addition, the code that the +50% to attack for conventional payloads is stored in the same memory register that is used in all other comparisions for weapon modes. Finally, this segement of code is both directly above an uncalled prodecure that uses armor strength and armor types and is called into many prodecures that effect weapon strength.
I'm not quite sure what you mean here, perhaps if you go into more detail?

First, here is a screen shot of the suspected location for the +50% attack strength for the conventional payload. This prodecure is very unusual in that it completely jumps over many different commands.  Second, is their are any smallish .exe modding projects for your patch that you would like help with? I can definitely read the assembly language and make some small changes to it if you want. The reason I cannot add rules or make major changes to your patch is because I am unfamiliar with the format changes you have made to the code.

Lastly, I could help quite a bit with the following sections of code right away: the designshop/window, weapons, armor, some special abilities, and chassises. Also, I have done work in the graphics, climate development, and terrain window. So if you want my help, please PM and I will get back to you later today.

Online Buster's Uncle

  • In Buster's Orbit, I
  • Ascend
  • *
  • Posts: 49271
  • €440
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Discussion: Conventional missile strength
« Reply #6 on: August 26, 2013, 04:30:00 PM »
Yitzi, put this man to work, willya?  Let me know when he's earned an .exe Modder membership...

Offline Yitzi

Re: Discussion: Conventional missile strength
« Reply #7 on: August 26, 2013, 05:31:40 PM »
First, here is a screen shot of the suspected location for the +50% attack strength for the conventional payload.

Well, first of all, that's the wrong location.  The actual procedure is at 5C1150.  The procedure you found does the following:
-EDI=0, EBX=-1, local1=0.
-For each weapon (or module), check whether the faction Arg1 knows the prerequisite tech for that weapon.  If it doesn't, increment EDI and go to the next weapon.  If it does, check argument 2.
   -If argument 2 is negative, test whether the weapon's mode is equal to -arg2.  If it is, return EDI (which will be the number weapon you're looking at, counting from 0).  If not, increment EDI and go to the next weapon.
   -If argument 2 is nonnegative, then check if argument 3 is 0 (note: in the actual program, it's always called with arg3=0) and the mode is 2 or more (i.e. missile weapon or equipment).  If both are true, increment EDI and go to the next weapon. 
   -Otherwise, increment EDI and go to the next weapon if the current one is not a weapon (i.e. is a module), or has cost above arg2, or is a planet buster, or is a conventional payload, or twice its strength is less than EBX.  Otherwise, set EBX equal to twice its strength, and local1 equal to its number, and continue to the next weapon.
   -Once all weapons are done, return local1.

So this procedure is actually three procedures in one, none of which have to do with the power of conventional missiles:
-If argument 2 is negative, it finds the number (counting from 0) of the first module whose mode is equal to -arg2 and which faction arg1 has the prerequisite technology for.  If there is no such module, it returns 0.
-If argument 2 is nonnegative and argument 3 is 0, it finds the strongest normal weapon (i.e. not psi, not a planet buster, not a module, and not conventional missile) with cost equal to or less than argument 2.
-If argument 2 is nonnegative and argument 3 is not 0 (this never happens in the actual program), it does the same, but also excludes any missile-type weapons.

Quote
This prodecure is very unusual in that it completely jumps over many different commands.

Not unusual at all.  That's how you do conditional statements in assembly.

Quote
Second, is their are any smallish .exe modding projects for your patch that you would like help with? I can definitely read the assembly language and make some small changes to it if you want. The reason I cannot add rules or make major changes to your patch is because I am unfamiliar with the format changes you have made to the code.

There are a few options:
-The AI does not properly benefit from the "bonus techs" ability (such as the University has).  If you could figure out what's going on there (i.e. where the code is), that would be a great help.
-If you could find the place where it deals with morale calculation, and in particular the effect of the children's creche.
-If you could find where it sets difficulty levels for multiplayer games, that would be a big help, as that is both bugged and could use some increased options (i.e. a way to have different difficulties for different players.)
-If you could find where it stores the intense rivalry setting, that would be handy.
-And of course if you've got a project you'd like to work on yourself, you can design the fix and just give it to me to put in.  Tell me what it is, and I can assign a spot in the alphax RULES section for it.

Offline Dio

Re: Discussion: Conventional missile strength
« Reply #8 on: August 26, 2013, 11:15:47 PM »
Quote
-The AI does not properly benefit from the "bonus techs" ability (such as the University has).  If you could figure out what's going on there (i.e. where the code is), that would be a great help.
-If you could find the place where it deals with morale calculation, and in particular the effect of the children's creche.
-If you could find where it sets difficulty levels for multiplayer games, that would be a big help, as that is both bugged and could use some increased options (i.e. a way to have different difficulties for different players.)
-If you could find where it stores the intense rivalry setting, that would be handy.
-And of course if you've got a project you'd like to work on yourself, you can design the fix and just give it to me to put in.  Tell me what it is, and I can assign a spot in the alphax RULES section for it.

I will start working on them as soon as I can.

Offline Dio

Re: Discussion: Conventional missile strength
« Reply #9 on: August 26, 2013, 11:50:19 PM »
@Yitzi, for morale calculation, do you mean where it controls the name for each morale level, the combat bonus for each morale level, or where it determines if you get a morale upgrade after combat?

Offline Yitzi

Re: Discussion: Conventional missile strength
« Reply #10 on: August 27, 2013, 01:29:36 AM »
@Yitzi, for morale calculation, do you mean where it controls the name for each morale level, the combat bonus for each morale level, or where it determines if you get a morale upgrade after combat?

Whatever the creche affects.

And you probably shouldn't try to work on all of those things I listed at once; if you can pick even one and figure it out, that'd be a help.

Offline Dio

Re: Discussion: Conventional missile strength
« Reply #11 on: August 27, 2013, 02:25:50 AM »
This prodecure determines whether or not you use the boil size or regular morale for the unit.

Offline gwillybj

Re: Discussion: Conventional missile strength
« Reply #12 on: August 27, 2013, 02:48:09 AM »
I like the way Conventional Missiles are described in the Datalinks: 9*Reactor. That's a good hefty punch at Singularity. As it is now, I use fewer and fewer of them as the game progresses because they do become, as you said, near-useless.

Though that does mean that they increase in power but not in cost...
Not good. No existing code to edit here? Maybe 2x base cost for Fusion Reactor, 3x & 4x for Quantum & Singularity? So the cost increases but not as fast as the power.
Two possibilities exist: Either we are alone in the Universe or we are not. Both are equally terrifying. ― Arthur C. Clarke
I am on a mission to see how much coffee it takes to actually achieve time travel. :wave:

Offline Yitzi

Re: Discussion: Conventional missile strength
« Reply #13 on: August 27, 2013, 04:01:30 AM »
I like the way Conventional Missiles are described in the Datalinks: 9*Reactor. That's a good hefty punch at Singularity. As it is now, I use fewer and fewer of them as the game progresses because they do become, as you said, near-useless.

Though that does mean that they increase in power but not in cost...
Not good. No existing code to edit here? Maybe 2x base cost for Fusion Reactor, 3x & 4x for Quantum & Singularity? So the cost increases but not as fast as the power.

Actually, that would increase the cost as fast as the power.

Offline Dio

Re: Discussion: Conventional missile strength
« Reply #14 on: August 27, 2013, 05:46:56 AM »
I have decided to try and tackle the tech bug and to figure out where the intense rivalry rule is processed. Both of these will probably require me to pick apart the playerfiles section.

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Let the Gaians preach their silly religion, but one way or the other I shall see this compound burned, seared, and sterilized until every hiding place is found and until every last Mind Worm egg, every last slimy one, has been cooked to a smoking husk. That species shall be exterminated, I tell you! Exterminated!”
~Academician Prokhor Zakharov Lab Three aftermath

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 41.

[Show Queries]