Author Topic: Analyzed Procedures and Flags  (Read 10846 times)

0 Members and 1 Guest are viewing this topic.

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #15 on: September 29, 2015, 01:43:27 AM »
The procedure that starts at address 005AEDE0 controls various functions relating to the Accelerated Start Rule.
The procedure that starts at address 005B0420 controls various functions related to a non-accelerated start in the game.

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #16 on: September 29, 2015, 02:16:55 AM »
I also noticed that if the difficulty level on the scenario or game is Specialist or lower, than certain faction AI traits are not activated at the beginning of a game.
Aquatic Factions always start with the Emphasize Sea Power and Lots of Sea Bases options activated.
Alien Factions always have the Emphasize Air Power and Lots of Missiles options activated at the start of a game.
The Data Angels always start with the Lots of Probe Teams option activated.
The Free Drones always start with the Lots of Terraformers option activated.
« Last Edit: September 29, 2015, 02:43:04 AM by Dio »

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #17 on: September 29, 2015, 02:20:35 AM »
I also noticed that if the global difficulty level is at Talent or lower, than the AI factions receive a -2 Penalty to AI Nutrient Reserves for Base Growth (The value that the nutrient surplus from a base goes into each turn).

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #18 on: September 30, 2015, 11:37:24 PM »
I knew the AI involved with the Believers was less than friendly, but I never expected it to have such negative attiudes towards many aspects of diplomacy. The following is information that I presently believe about this AI:
1. The Believer AI never purchases Technology from a human player while selecting the diplomatic option that says the faction needs energy credits.
2. The cost of purchasing bases from the believers is increased compared to other factions.
3. The benefit from giving them technology as gifts appears reduced compared to other factions.

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #19 on: October 02, 2015, 04:38:10 PM »
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.

Offline Yitzi

Re: Analyzed Procedures and Flags
« Reply #20 on: October 02, 2015, 06:30:22 PM »
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.

Interesting.  What is the feature that makes them appear?

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #21 on: October 02, 2015, 07:05:18 PM »
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.

Offline Yitzi

Re: Analyzed Procedures and Flags
« Reply #22 on: October 02, 2015, 10:41:41 PM »
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...

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #23 on: October 02, 2015, 11:08:38 PM »
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 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.

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #24 on: October 08, 2015, 11:48:48 PM »
The procedure that starts at address 0052AEB0 controls the AI tendency to call or to support the council proposals. A few things I noticed include the following effects on the AI:
1. The Global Trade Pact Proposal AI interest decreases if the Faction Commerce Rate is equal to or lower than the faction that called the proposal. The interest in this proposal increases by 1 if the faction has a treaty or pact with the faction that called the proposal. The interest in this proposal increases if the AI has an interest in Build (set to 1). The interest in this proposal decreases if the faction has an interest in Conquer (set to 1). The interest in this proposal decreases if the faction has an aggresive value of 1 (AI Fight Value set to 1). The interest in this proposal increases if the faction has an ECONOMY score of 2 or higher. The interest in this proposal decreases if the faction has an ECONOMY score of -1 or lower. The sum from these effects become reversed if the proposal is the repeal global trade pact proposal (This means if it increased the value for the Global Trade Pact proposal it means that it decreases the value for repeal Global Trade Pact Proposal).

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #25 on: October 09, 2015, 12:04:42 AM »
The AI effects of the Repeal U.N. Charter proposal include the following effects:
1. It first checks the technology pre-requisites to see if the faction has the needed tech. The game then checks a section that checks the number of planetbusters the faction controls and another value that I am uncertain about its meaning. The interest in this value decreases if the AI has a Fight Value of -1. The interest in this value decreases by 2 if the faction has an Discover and Explore AI value set to 1 (A.K.A. The Peacekeepers). It then adds the number of minor atrocities the faction has commited to the value. The procedure than adds 1 to the interest value if the faction has a fight value of 1. The procedure lastly increases the value by 1 if the faction has a Conquer value of 1.

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #26 on: October 09, 2015, 04:41:40 AM »
The salvage unity core proposal functions as follows for the AI:
1. If the faction has an interest in Power other than 0 (Conquer set to 1), place a value of 1 into Local 1 (AI interest in Proposal).
2. If the faction has a Fight interest of -1, than decrease AI interest in Proposal by 1.
3. If the faction has more than 500 Energy Credits in reserve, than decrease the interest in this proposal by 1.
4. If the faction has equal to or less than 99 energy credits in reserve, than increase the interest in this proposal by 1.
5. If the faction has equal to or less than 199 energy credits in reserve, than increase the interest in this proposal by 1.
6. If the faction that made the proposal has equal to or less than the number of energy credits of the current faction, decrease the value by 1. Otherwise, increase the value by 1. If the economy income of this faction is lower or equal to the energy income of the other faction, than decrease the value by 1. Otherwise, increase the value by 1.
7. The procedure than jumps if the total value from step six is equal to or less than 0 (the range of values varies from -2 to 2). If it greater than 0, it subtracts the value in edx from the value in step 6 and adds approximately 1/2 this value to the value used to determine AI interest in this proposal.

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #27 on: October 09, 2015, 08:50:36 PM »
The process to determine support from the AI with regards to the Elect Planetary Governor Proposal remains complicated due to numerous expections within the procedure. This does not mean, however, I could not figure specific aspects of the code. The procedure first ranks the factions by the number of votes they have as determined by summing the population of the faction bases, and adding any applicable modifiers from Clinical Immortality, The Empath Guild, and the VOTES Faction Power. The factions receive a ranking from 1-7 in votes. After this point, it checks to see which factions remain eligible to become planetary governor based upon the intial vote tally for that faction. It then jumps if the faction is not a faction eligible to become Planetary Governor. The section for non-eligible candiates first checks to see if the faction has a pact and surrendered to the faction that wants the vote. If the faction has surrendered and has a pact with the faction, insert a value of 99 into the local address that controls AI interest in this area. It then jumps if this condition is met over much of the procedure.  :( This is not all the expections within this procedure.

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #28 on: October 09, 2015, 11:41:25 PM »
I discoverd on Thinker difficulty that the AI essentially receives additional energy credits each turn equal to approximately 0.3 * Total Maintenance Cost for facilities controlled by the faction that require support with the product rounded up (e.g. 3.5 rounds to 4) or down (e.g. 3.4 rounds to 3) to the closest whole integer. On transcend difficulty the AI receives additional energy credits each turn approximately equal to 0.6 * Total Maintenance Cost for facilities controlled by the faction that require support with the product rounded up or down to the closest whole integer. The AI doe not receive a bonus on any difficulty level equal to or lower than Librarian. The calculations involving the facility maintenance cost, if this condition applies to the faction, uses the value after applying the Self-Aware Colony effect to determine the extra energy credits earned.

Offline Dio

Re: Analyzed Procedures and Flags
« Reply #29 on: October 10, 2015, 12:09:51 AM »
It appears as though the native life against AI faction units receive penalities in addition to ignoring the non-combat unit penalty during the first 15 years of a game. I need to perform additional analysis before I can provide more precise results.

 

* User

Welcome, Guest. Please login or register.

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

We shall take only the greatest minds, the finest soldiers, the most faithful servants. We shall multiply them a thousandfold and release them to usher in a new era of glory.
~Col. Corazon Santiago 'The Council of War'

* 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: 39.

[Show Queries]