Jump to content


Chachalon

Member Since 15 Mar 2005
Offline Last Active Aug 14 2006 12:36 PM

Topics I've Started

Battle for Grollins

25 May 2006 - 12:21 PM

OK, I've been working on this one for some time now, but as I lost interest in some other mods for different games I started before AFTER announcing them, I decided to wait until I'm only a few days away from the first beta until I tell anybody. The beta (I only have to do some lotr.str editing and learn how to use that "-mod" command) will include one new faction, no new models or sounds as I'm not very good at modeling. I'll be looking for some skinners & modelers after the release of this beta... anyway, here are some first screenshots:

Posted Image
Posted Image
Posted Image

I'll post some further information later.

Chachalon's questions

05 May 2006 - 10:12 AM

So I had the idea for my mod to have an upgrade for infantry units to enable them to climb walls as walls will be much more important in this mod. But they would need to change their locomotor for that (do they?) to be able to scale walls like goblins... is there any way to change the locomotor by an upgrade? I tried with some kind of "fake-mounting", but that did not work, the "mount" button appeared and was clickable, but nothing happened when clicking on it, didn't turn grey with timer, nothing... can somebody help?

[BfME II] AI tutorial, part 2

01 May 2006 - 01:36 PM

This next part is about changing the upgrade priorities of the AI. You'll need to manipulate upgrade.ini for this.
The AI knows at least 3 levels of "importance" for upgrades. To define them, the upgrade needs

SkirmishAIHeuristic =

this line. Used values for this are "AI_UPGRADEHEURISTIC_IMPORTANT" (for example for fire arrows), "AI_UPGRADEHEURISTIC_FORTRESS" (all fortress upgrades) and "AI_UPGRADEHEURISTIC_FACTORY_UNITUNLOCK" (for unit-producing structures).
Others won't give a crash, and it "feels" like "AI_UPGRADEHEURISTIC_LOW" and "AI_UPGRADEHEURISTIC_MEDIUM" also work, but I'm not sure about that.
As the standard AI never (?) uses fortress upgrades, you might want to change the rather important ones (bats for example) to "AI_UPGRADEHEURISTIC_IMPORTANT".
The importance of buying upgrades on single batallions is defined in skirmishaidata.ini (see part 1 of this tutorial), so those upgrades don't need such a line, but if you want the AI to use forged blades and heavy armor earlier and not just fire arrows, you might just put the technologies for these (those that you research at the blacksmith/treasure trove/eregion forge etc) to "AI_UPGRADEHEURISTIC_IMPORTANT", too.
Note: Do not put all fortress upgrades to "AI_UPGRADEHEURISTIC_IMPORTANT"... in that case the AI will rather upgrade its fortress than building any units.

[BfME II] AI tutorial, part 1

01 May 2006 - 01:32 PM

So, as Solinx already linked to them (thx man!) I decided to repost my AI tutorials here, maybe somebody will find them helpful:

I'll try to explain the stuff of skirmishaidata.ini which I understood so far...


BrutalDifficultyCheats TheBrutalDifficultyCheats
BuildCostReduction = 15%
BuildTimeReduction = 15%
End

Those are the "cheats" of the brutal AI. Pretty much self explaining...



ArmyDefinition MenOfTheWestArmy

The next block is the one which holds the information for the skirmish AI of the MotW faction. As the other ones are quite similar, I will use this one as an example.

MustUseCommandPointPercentage_Phase1 = 80%;// The AI UnitBuilder tries to keep the army at at least this size
MustUseCommandPointPercentage_Phase2 = 90%
MustUseCommandPointPercentage_Phase3 = 100%

Note that this is already the modded version. The AI divides the game into three phases (rush, mid game, late game, see below). These values tell it how many command points its army shall use.

EconomyBuilderMinFarmsOwned = 6

This tells the AI to build a total of 6 farms at a time. One might want to increase this number...

PercentToSave_Rush = 0.5%
PercentToSave_MidGame = 0.01%; Why should the AI save anything?
PercentToSave_EndGame = 0.01%

This, too, is the modded version. The original AI is told to save much more of its money, one of the reasons for doing so I can imagine is to be able to quickly build lots of units when under attack... as soon as the AI has to defend its own base, it's most likely already lost. The other reason might be to be able to build heroes, but I had some games with this set to something like 5% and it just saved insane amounts of money and not build heroes earlier than normal... and then I played with the above settings once and each of the five AI opponents had his first hero before the 5-minutes mark...


PhaseDuration_Rush = 240.0;//amount of time in seconds from the beginning of a match, 4 minutes is too long
PhaseDuration_MidGame = 300.0;//amount of time in seconds from end of Rush Phase

Here you got the length of the rush- and midgame-phase defined.


ChanceForUnitsToUpgrade=
One might put that up to increase the chance for units being upgraded by the AI (more about the AI and upgrades in part 2 of this tutorial)

;//
;// ARMY UNIT DEFINITIONS
;//

The following part of the ini gives the AI instruction on what units it shall build in which phase of the game. For example

ArmyMemberDefinition GondorFighterHorde_Member
Unit = GondorFighterHorde;infantry
PercentageOfArmyPhase1 = 80.0
PercentageOfArmyPhase2 = 20.0
PercentageOfArmyPhase3 = 20.0
End

This would tell it that in the rush-phase, the army should be made up of 80% normal soldiers, while in mid- and late-game only 20% of the army would be soldiers.
You can easily add new units here by just making a new block just like the one above and give it a different name ("ArmyMemberDefinition XY_member") and replace the unit with your new one.

Capturing structures

27 April 2006 - 12:20 PM

FInally, long time past since my last post here :blink: . I already posted this in other forums, but as this one seems to be the most active by far, why not post it here since someone might be able to use this...

While working on my mod, I thought it might make sense for players to be able to capture hostile resource-buildings rather than destroying them. I tried to get the flag-method (the one used for Inns, Outposts etc) to work and failed... and then suddenly had the idea to make the farms garrisonable and allow enemies inside. This way you can send infantry units in there just like into towers, and once they are in, the building is captured. There are only two things you have to do to make this possible:
- Add GARRISONABLE and GARRISONABLE_UNTIL_DESTROYED (not sure if the last one is really needed) to the KindOf-list of the building
- Add this block below:

Behavior = HordeGarrisonContain ModuleTag_hordeGarrison
ObjectStatusOfContained = UNSELECTABLE CAN_ATTACK ENCLOSED
ContainMax = 1; This handles how many batallions can be inside the strucutre at a time
DamagePercentToUnits = 0%
PassengerFilter = GENERIC_FACTION_GARRISONABLE
AllowEnemiesInside = Yes; This allows units to capture the building
AllowAlliesInside = Yes
AllowNeutralInside = No
AllowOwnPlayerInsideOverride = Yes
NumberOfExitPaths = 1
PassengerBonePrefix = PassengerBone:ARROW_ KindOf:INFANTRY
EntryOffset = X:50.0 Y:0.0 Z:0.0
EntryPosition = X:35.0 Y:0.0 Z:0.0
ExitOffset = X:75.0 Y:0.0 Z:0.0
End

You can also leave the "CAN_ATTACK" out if you don't want archers to be able to shoot from inside the building.
I also found out that if you move your units out again the building will be given back to the original owner. And for buildings which are not meant to be garrisoned (towers should need nothing more than changing "AllowEnemiesInside" switched from No to Yes) one might want to add a "Command_ExitGarrison" to the commandset.