I am currently looking into functions that play an important role in determining various aspects of the AI behavior. I plan to release a text file with most of the information I have gathered once I have sufficently compiled accurate material. Presently, this thread is for any .exe coders that want to share the known functions of procedures or memory addresses with flags they have analzyed. I will start with the procedure at 005B9580. I know part of this procedure interacts Unit AI Plans. In particular it is switch 2 of 13 (hexadecimal) that interacts with the AI Unit Plans. In addition, Switch 6 of 13 interacts with Unit special ability flags. Finally, the most frequently called switch in the procedure is switch 2.
Here are some additional flags I have discovered:
0090E8EC: Custome Game Rules Flags
Do or Die: Don't restart eliminated players: 1
Total War: Allow Victory by Conquest: 2
Mine, All Mine: Allow Economic Victory: 4
Peace in Our Time: Allow Diplomatic Victory: 8
Look First: Flexible starting locations: 10
Tech Stagnation: Slower rate of research discoveries: 20
Intense Rivalry: Opponents more aggressive: 40
Time Warp: Accelerated Start: 80
No Unity Survey: World Map not visible: xh, 1 or 100
Blind Research: Cannot set precise research goals: xh, 2 or 200
Iron Man: Save/Restore restricted to exit: xh, 4 or 400
Higher Goal: Allow Victory by Transcendence: xh, 8 or 800
One for All: Allow Cooperative Victory: xh, 10 or 1000
No Unity Scattering: Supply Pods only at landing sites: xh, 20 or 2000
Spoils of War: Steal tech when conquer base: xh, 40 or 4000
Bell Curve: No Random Events: xh, 80 or 8000
0090E8F0:
Randomize faction leader personalities: 80 00 00
Randomize faction leader social agendas: 1 00 00 00
005BF1F0: Is one of the procedures that controls the appearance of Special Ability Names in Scripts.
The associated value for each Special Ability is as follows:
Super Former: 1
Deep Radar: 2
Cloaking Device: 4
Amphibious Pods: 8
Drop Pods: 10
Air Superiority: 20
Deep Pressure Hull: 40
Carrier Deck: 80
AAA Tracking/Tracking Lasers: 1 00
Comm Jammer: 2 00
Antigrav Struts: 4 00
Empath Song: 8 00
Polymorphic Encryption: 10 00
Fungicide Tanks: 20 00
High Morale: 40 00
Heavy Artillery: 80 00
Clean Reactor: 1 00 00
Blink Displacer: 2 00 00
Hypontic Trance: 4 00 00
Heavy Transport: 8 00 00
Nerve Gas Pods: 10 00 00
Repair Bay: 20 00 00
Non-Lethal Methods: 40 00 00
Slow Unit: 80 00 00
Soporific Gas Pods: 1 00 00 00
Dissociative Wave: 2 00 00 00
Marine Detachment: 4 00 00 00
Fuel Nanocells: 8 00 00 00
Algorithimic Enchancement: 10 00 00 00
Those sounds like the diplo flags in the scenario editor.Your observation is correct.
Some flags I know for certain that pertain to Diplomatic relationships.
0096C9F8:
Pact: 1
Treaty: 2
Truce: 4
Commfreq: 8
Vendetta: 10
I want revenge: 20
I shall betray: 4 00
I have infiltrator: 10 00/ edi
I want to talk: 20 00
I am atrocity victim: 4 00 00
I have surrendered: 2 00 00 00
I am uncertain about the meaning of these features and the numbers that appear. They only operate while the scenario editor editor remains active. One of the features allows the toggling on and off of the faction boundaries. Another feature makes the colored numbers and letters appear. The letter in each case corresponds with the first letter of each faction adjective name. I have attached a screenshot with all the features active.
The area that requires changes appears at addresses 0051A39E, 0051A3B8, and 0051A3D5 in Scient's 2010 SMAX Patch. These features will function if you replace the conditional jumps with no operation commands. The scenario editor must remain active in order to view these features because they appear alongside the keyboard shortcuts for numbers in the scenario editor. I also believe these unused shortcuts were developer tools employed to check various aspects of the code inside the game. The $ shortcut makes the white numbers appear, the % shortcut makes the numbers and letters with color appear, and the * shortcut toggles the faction territory boundaries on and off.
I believe that the values inside the procedure simply correspond to various overlays that the game can apply to the world map. As an example, the game uses the same type of process to show the patrol path of units on the world map.The area that requires changes appears at addresses 0051A39E, 0051A3B8, and 0051A3D5 in Scient's 2010 SMAX Patch. These features will function if you replace the conditional jumps with no operation commands. The scenario editor must remain active in order to view these features because they appear alongside the keyboard shortcuts for numbers in the scenario editor. I also believe these unused shortcuts were developer tools employed to check various aspects of the code inside the game. The $ shortcut makes the white numbers appear, the % shortcut makes the numbers and letters with color appear, and the * shortcut toggles the faction territory boundaries on and off.
Ok...I would have to check the code to figure out what they do, and that would take enough time that it's not worth doing unless other people want it...
I also noticed that the function to determine the number of atrocities a faction needs to exceed in order to have the atrociousity script appear if the receiver of these atrocities does not want revenge against the instigator. The formula that determines this particular number appears as follows: 8 - Difficulty Level (always five if Intense Rivalry is active) * 2 - 1.
Why does the code for the Bureaucracy formula use the value of 6 while subtracting it from the Difficulty level? The concepts file says it should equal (8-Difficulty).I also noticed that the function to determine the number of atrocities a faction needs to exceed in order to have the atrociousity script appear if the receiver of these atrocities does not want revenge against the instigator. The formula that determines this particular number appears as follows: 8 - Difficulty Level (always five if Intense Rivalry is active) * 2 - 1.
Interesting. What's the address of this code?
This particular section starts at address 0055F09C in Scient's 2010 Patch. I failed to mention it then goes through the pseudo-"Randomizer" before performing a short series of other operations.
I also noticed that the function to determine the number of atrocities a faction needs to exceed in order to have the atrociousity script appear if the receiver of these atrocities does not want revenge against the instigator. The formula that determines this particular number appears as follows: 8 - Difficulty Level (always five if Intense Rivalry is active) * 2 - 1.
Interesting. What's the address of this code?
Why does the code for the Bureaucracy formula use the value of 6 while subtracting it from the Difficulty level? The concepts file says it should equal (8-Difficulty).
I also noticed that the faction bonus Interest, 0 actually increases the number of energy credits a faction has by 1 per base per year. ...Actually, what I read in alphax.txt Yitzi 3.3:
; INTEREST = Energy reserves interest.
; Non-zero = constant percentage per turn (including negative)
; Zero = +1/base each turn
So it is indicated now (Maybe some exe coder has put it there?)I remain certain that the procedure remains unchanged by any .exe coder. The alphax file remains ambiguous on the actual terms. I only realized the difference between the code and the alphax file after I looked at the code for this bonus. This bonus provides + 1 Energy Credits per turn per year.I also noticed that the faction bonus Interest, 0 actually increases the number of energy credits a faction has by 1 per base per year. ...Actually, what I read in alphax.txt Yitzi 3.3:Code: [Select]; INTEREST = Energy reserves interest.
So it is indicated now (Maybe some exe coder has put it there?)
; Non-zero = constant percentage per turn (including negative)
; Zero = +1/base each turn
What would be interesting, how -0 works (minus zero)
Some languages do recognize minus or plus zero
You mean, that the alphax.txt says "= Energy reserves interest." and not "energy credits"?That is correct. The bonus simply provides +1 energy credits per turn per base. If the faction, for example, has 10 bases and 1000 energy credits at the end of a turn, than they will have an additional 10 energy credits the next turn that equals 1010 + Net Income as seen in the social engineering window.
The bonus working on energy credits is more like what it is expected. It is 'interest' after all, and not raw energy source. It seems like alphax.txt does not say it right.