Star Trek Armada 2 Modding

Moderators: GSH, VSMIT, Commando

Post Reply
Rifraf
Scrap
Posts: 3
Joined: Fri Jun 08, 2018 1:33 pm
Location: USA

Star Trek Armada 2 Modding

Post by Rifraf »

Greetings All,

It looks like there's not much going on these days here, but thought I'd register to see if anyone might have some insight into AI modding. The reason I'm asking here is because Star Trek Armada 1 & 2 used the same engine as Battlezone, Dark Reign and Civ 3 and a lot of the AIP files use similar code.

I've figured out most of it, but looking for any info beyond what I've found here and online regarding each of the games mentioned above. Specifically I'm trying to understand what the following entries mean:

build_buildings_priority = 100.0;
build_troops_priority = 100.0;
seige_priority = 200000.0;
explore_priority = 30000.0;
attack_troops_priority = 200000.0;
attack_region_priority = attack_troops_priority/2;
settle_priority = 100000.0;
defend_priority = 90000.0;
perimeter_priority = 0.0;
chokepoint_priority = 10.0;
patrol_priority = 20.0;
harass_priority = 20.0;
bombard_priority = 20.0;
rustle_priority = 20.0;
expel_priority = 20.0;
sally_priority = 20.0;
retreat_priority = 20.0;
convert_priority = 20.0;
bioterror_priority = 20.0;
nanoattack_priority = 20.0;
pillage_priority = 20.0;
pirate_priority = 20.0;
counter_stealth_priority = 20.0;
counter_stealth_priority = 20.0;
bonus_food_priority = 20.0;
goody_hut_priority = 20.0;
defuse_mines_priority = 20.0;
enslave_priority = 20.0;
plant_nuke_priority = 20.0;
create_park_priority = 20.0;
underground_railway_priority = 20.0;
establish_embassy_priority = 20.0;
franchising_priority = 20.0;
assasinate_ruler_priority = 20.0;
steal_technology_priority = 20.0;
injoin_priority = 20.0;
incite_revolution_priority = 20.0;
cause_unhappiness_priority = 20.0;
nuke_city_priority = 20.0;
danger_diminishment = 0.5;
max_danger_raw_bonus = -10.0;
reform_city_priority = 20.0;
sue_franchise_priority = 20.0;
probe_wormhole_priority = 20.0;
build_end_game_object_priority = 100.0;
build_capitalization_priority = 100.0;
max_threat_raw_bonus = -1.0;
distance_from_home_priority_modifier = -1000.0;
distance_from_enemy_priority_modifier = 1.0;
max_chokepoint_raw_bonus = 500.0;
random_modifier = 100.0;
human_target_raw_bonus = 100.0;
defenseless_city_raw_bonus = 100.0;

fzbuild_priority_modifier = 1.0;
fzwonder_priority_modifier = 1.0;
fzfreight_priority_modifier = 1.0;
per_capita_modifier = 200.0;
threat_proximity_modifier = 100.0;
max_misc_bid_bonus = 10000.0;
persistence_modifier = 1000;
distance_from_unit_priority_modifier = -10.0;
better_unit_type_modifier = 200.0;
patrol_one_in_n = 10;
memory_rounds = 10;
memory_rounds_stealth = 2;
min_attack_matching_force_ratio = 1.5;
min_defense_matching_force_ratio = 1.0;
num_city_defenders = 1;

The above code is from Civ 3. More specifically I really need to try and understand how the following affect the AI:

danger_diminishment = 0.5;
max_danger_raw_bonus = -10.0;
max_threat_raw_bonus = -1.0;
threat_proximity_modifier = 100.0;
max_misc_bid_bonus = 10000.0;
persistence_modifier = 1000;

Those 6 entries above appear in all the games I mentioned earlier. From info I've found on other sites regarding these entries

danger_diminishment = 0.5; I can't understand why you would diminish the danger? Wouldn't it help the AI to determine where to go?
As to the danger_raw_bonus and threat_raw_bonus are those to add weight or incentive for the AI to determine what/where to attack? Not a bonus as far as the word means?
As to the threat_proximity_modifier is that telling the AI to give more weight towards threat that is closer to it?
As to the max_misc_bid_bonus I have no idea? Again, give more weight to attacking/defending based on other parameters?
Lastly, I think I've determined that persistence_modifier is something to do with when squads get assigned to a goal this is used to keep the same squad going back to the same goal or something?

Any help would be greatly appreciated if anyone happens to know.
User avatar
Ded10c
Recycler
Posts: 3815
Joined: Sun Feb 20, 2011 11:05 am
Location: Stoke-on-Trent
Contact:

Re: Star Trek Armada 2 Modding

Post by Ded10c »

Are you sure? Battlezone's engine was built from the one used by the Interstate games, which are based around car combat. I'm not sure if Civ 3 and the Armada titles, which is very much focused on strategy play, would have used an engine where strategy mechanics were essentially added as an afterthought. I have copies of Civ 3 and Armada so I'll install them when I get home on Tuesday and take a look.
battlezone.wikia.com needs your help!
Rifraf
Scrap
Posts: 3
Joined: Fri Jun 08, 2018 1:33 pm
Location: USA

Re: Star Trek Armada 2 Modding

Post by Rifraf »

Hey there. Yeah, I'm very sure. It started with the Interstate games then Battlezone 1&2, Dark Reign, Civ 3 (maybe not in that specific order) then on to Star Trek Armada 1&2 and I think even Star Trek Legacy used a modified version of the engine IIRC. I appreciate you taking the time to look.

I've been modding the AI in Armada 2 to see if there is any way to get it to play better and understanding those last 6 lines of code I mentioned are the ones that elude me for the most part.
User avatar
GSH
Patch Creator
Posts: 2485
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: Star Trek Armada 2 Modding

Post by GSH »

If those strings don't appear in any Battlezone 2 files -- use Pak Explorer as a can opener for BZ2's files -- then they were added specifically for that game. I added a few hundred parameters to .odf/.aip files during Battlezone 2 v1.3's development.

While the .odf reader code may have been shared around between games -- it's a lot like Microsoft's .inf format -- I don't think that the Battlezone 2 engine was used in any further games after BZ2.

-- GSH
User avatar
Ded10c
Recycler
Posts: 3815
Joined: Sun Feb 20, 2011 11:05 am
Location: Stoke-on-Trent
Contact:

Re: Star Trek Armada 2 Modding

Post by Ded10c »

I can't speak for Armada 2 because I don't own a copy, but I've just checked out Armada and Civ 3:

Armada has several features similar to the Battlezone games - but not Battlezone II. It's actually more similar to Battlezone; its assets are contained in ZFS (Zork FileSystem) files, it uses .map for a good chunk of its configuration data, and uses the same .BZN/.TRN/.HGT combination for levels (that being the main giveaway). Its folder structure is very similar, its cursors are direct recolours, and there are even a few leftover files from Battlezone. It's not quite the same engine but there's definitely a distinct lineage here. I can't speak for Dark Reign quite so easily but Dark Reign 2 and Battlezone II's engines are quite closely related, and it seems the Star Trek Armada games may also be part of the same family. Crossing features over isn't likely to be easy, but you may find something interesting you can do. I've found threads suggesting Legacy is also of the same family but, if as it seems Armada 2's engine is derived from Armada's and Legacy's is derived from that, each game is a degree further removed. Saying all these games are built on the same engine is like saying the Call of Duty or Half-Life series use the Quake engine.

I can't find any similarities at all in Civ 3, I'm afraid. That definitely doesn't look like one of the family.
battlezone.wikia.com needs your help!
Rifraf
Scrap
Posts: 3
Joined: Fri Jun 08, 2018 1:33 pm
Location: USA

Re: Star Trek Armada 2 Modding

Post by Rifraf »

I hope I didn't over generalize by saying they're all the same engine. A poor phrase on my part. Using pieces/parts of a game engine may be more accurate. From what I found parts of it started with Mech Warrior 2 around '95 and then a modified version of that engine or at least parts of it were used on I76. Then modified again to whatever degree for Battlezone. Maybe it skipped Battlezone II and Dark Reign, however some of the AIP entries I posted above do appear in Dark Reign files. Then it was modified to some degree for Star Trek Armada.

Quite a few of the files in Armada 2 were taken directly from Armada 1 with very little changed. Laziness or little time to build the game properly on the dev's part? As you stated Legacy used a few things from Armada 2, but from what I found it was mostly a new engine. It's suggested that some of the things I'm seeing in one game were brought over from an earlier game as reference material and then never deleted and certainly never activated.
Post Reply