Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Bug/Patch Discussion => Topic started by: Dio on August 27, 2013, 06:01:49 AM

Title: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 27, 2013, 06:01:49 AM
The first picture is ,I think, the code for the 5 different selections for the AI in the faction files.
Title: Re: Steps for finding the intense rivalry rule
Post by: Dio on August 27, 2013, 06:03:38 AM
Now this is the procedure which is called by each of them.
Title: Re: Steps for finding the intense rivalry rule
Post by: Buster's Uncle on August 27, 2013, 06:09:32 AM
scient tells me
Quote
a dissembler
 makes doing code analysis much easier
Are you using one?
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 27, 2013, 06:23:10 AM
I am only using ollydebugger and my handy intel architecture reference manual. This call is highlighted with my pointer  bar.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 27, 2013, 06:24:46 AM
Which takes you here.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 27, 2013, 03:29:05 PM
Okay, this is the whole rules list except for the randomize faction profile and agenda.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 27, 2013, 03:42:06 PM
This is the code for the rules selection. I noticed case F of this switch is missing.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 27, 2013, 03:45:06 PM
Now I am getting somewhere. The currently selected memory address goes to things like goverment options for the AI. This address also happens to be under the rules section. In addition, it controls various aspects of the random tech (blind research) rule option.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 27, 2013, 03:56:44 PM
Hmmm. It appears that certain social effects have some effect on how the AI behaves.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 27, 2013, 04:03:33 PM
Also, various things like world size effect AI behavior. I am now officially confused and puzzled somewhat by why the rules section is linked so intimately with the AI behavior and why the customized world is also in this picture.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 27, 2013, 04:18:25 PM
Sometimes I feel like I am  :stickpoke: this program.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 30, 2013, 06:14:28 PM
Yitzi, you should probably look in the memory register at address 009a649c. However, I am warning you it is contains a lot of references. So far I have found things for the Diplomatic victory option, the iron man rule and scenario rules.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 30, 2013, 06:17:51 PM
Also, this address is referenced at least once in every faction's AI section.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Yitzi on August 30, 2013, 09:25:50 PM
Yitzi, you should probably look in the memory register at address 009a649c. However, I am warning you it is contains a lot of references. So far I have found things for the Diplomatic victory option, the iron man rule and scenario rules.

Thanks.  I'm sure that is a bitfield of all the rules; can you figure out which one is intense rivalry?

(If it helps, what I really want is the places where the difficulty level affects the AI aggressiveness; I figure those will also be affected by intense rivalry, which will be an easier way of finding it.)
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 31, 2013, 07:25:04 PM
Yitzi, you should probably look in the memory register at address 009a649c. However, I am warning you it is contains a lot of references. So far I have found things for the Diplomatic victory option, the iron man rule and scenario rules.

Thanks.  I'm sure that is a bitfield of all the rules; can you figure out which one is intense rivalry?

(If it helps, what I really want is the places where the difficulty level affects the AI aggressiveness; I figure those will also be affected by intense rivalry, which will be an easier way of finding it.)

I will try.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on August 31, 2013, 10:09:04 PM
So far I have figured quite a bit on what it effects. I will post several screen shots to show you. In short though, so far it has been referenced quite a bit in the hive AI, and in a lot of the diplomacy effects regarding truce, pacts, bribes, demands, and loans. I also know it effects diplomatic victory, ironman, blind research, bell curve, randomize faction profiles and agenda, and I am assuming the references in the AI are probably effecting how they act when you select rules like intense rivalry. Also, some of the ones labeled world map survey or not may also effect the rule look first: flexible starting locations.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Yitzi on September 01, 2013, 02:55:16 AM
So far I have figured quite a bit on what it effects. I will post several screen shots to show you. In short though, so far it has been referenced quite a bit in the hive AI, and in a lot of the diplomacy effects regarding truce, pacts, bribes, demands, and loans. I also know it effects diplomatic victory, ironman, blind research, bell curve, randomize faction profiles and agenda, and I am assuming the references in the AI are probably effecting how they act when you select rules like intense rivalry. Also, some of the ones labeled world map survey or not may also effect the rule look first: flexible starting locations.

Screen shots aren't really necessary, and are too hard to figure out.  Just listing the offsets/pointers where it's referenced (and which bit of the bitfield it is) would be enough.

As I said, I'm really only interested in the ones that are also affected by difficulty level, as the goal is to identify which difficulty-level effects are AI aggressiveness as opposed to other effects of difficulty.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Green1 on September 01, 2013, 03:10:18 AM
I am not a coder, but I used to dabble with Commodore 64 BASIC when I was a kid. Tried machine language for it, but did not have good access to tutorials then got obsessed with Bards Tale and early Ultimas.

One of the things I did when making all the crappy character graphics games I spent way too much time on back in the day was put REM commands in so I would know what part of the program does what.

Maybe that kind of exe mod would be the first place to start and be a great resource for assembly coders if that is possible in assembly. Also, some kind of flow chart with line numbers (or addresses in assembly, I guess)

That way, lets say I was a coder and made a project for myself. For example - I wanted to consolidate the initial world generation settings, rules, difficulty, and faction select screens into just one screen like in the later Civ games. I would know exactly where to look.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Yitzi on September 01, 2013, 03:46:29 AM
I am not a coder, but I used to dabble with Commodore 64 BASIC when I was a kid. Tried machine language for it, but did not have good access to tutorials then got obsessed with Bards Tale and early Ultimas.

One of the things I did when making all the crappy character graphics games I spent way too much time on back in the day was put REM commands in so I would know what part of the program does what.

Ollydbg has breakpoints for that purpose; it's still tricky with a program this size.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Dio on September 01, 2013, 03:38:32 PM
This register is referenced in the difficulty section at addresses 00589d93 and 00589db9.
Title: Re: Steps for finding the intense rivalry rule and other things
Post by: Yitzi on September 01, 2013, 03:57:16 PM
This register is referenced in the difficulty section at addresses 00589d93 and 00589db9.

That's writing to the difficulty, not from it, so it's not finding the difficulty for use in determining AI aggressiveness, which is what I'm looking for.

Dio, perhaps it would make more sense for you to just pick some procedures and figure out what they do, step by step, just to get a sense of how to read the code.  Because so far you seem to be mis-identifying  a lot of things.
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: 18.

[Show Queries]