Welcome Guest ( Log In / Register ) |
![]() |
Quick Lists Top RatedTutorials Living World Map G… Ultimate beginner'… Arrow scaling bug… Raising Heroes max… Proper Fire Arrow… Creating an asset.… Simple Structure B… Making a simple Ma… Quick and easy sno… Making patrols nea… Mods The Dwarf Holds The Peloponnesian… RJ - RotWK The Elven Alliance… Helm's Deep Last H… The Elven Alliance Special Extended E… Kings of the West… RC Mod The Wars of Arda Downloads BFME1 1.06 Widescr… Enhanced W3D Impor… Fudge's Map Pack LotR/BfME HD Logos Osgiliath Shellmap Crystals Of Ancien… 2v1 Wold The forests of Dru… Converted BFME2 an… ROTWK animations f… |
||||||||||||||||||||||||||||||||||||||
![]() |
Register and log in to move these advertisements down In-depth AI Coding
B. Advanced AI modding (Object AI) This section contains a lot of specialized modules, as well as a custom approach on implementing it for the AI (and NOT for the player). Knowledge of LUA-scripting, ModelConditions, the works of Upgrades and a general feel for all Object-code is a prerequisite. I will start with the basic setup. After that i will give several examples on how to apply this basic principle with several different modules working in concert. B1. The Basic Setup The file 'object.ini' (location: data\default\object.ini) This file contains the default settings that are applied to ANY kind of object, UNLESS overridden by the actual object code. I won't bother with most of it. Only the contents related to the AI matter are reprinted here for convenience. Best you open up the file yourself.
In detail:
Thats:
Now, go into 'upgrade.ini' and add the following two PLAYER-upgrades to the list. They are used by the 'BrutalAI' but you need to list them so you can use them too:
And now comes the Juicy part. You will want to have a single Object-Upgrade that always signifies that this particular Object is controlled by the AI. So, define an appropriate OBJECT-upgrade (like Upgrade_ObjectUnderAIControl) and insert the following module inside 'object.ini':
This way EVERY SINGLE OBJECT in the game, if used by an AI-Player, will have this OBJECT-Upgrade. It will be used as a trigger for things that you just don't want triggered automatically for a HUMAN-Player! Now let's put this new AI-upgrade to good use! Read on! ------------------------------------------------------------------------------------------------------------------------------------------------------------------- CommentsDisplay order: Newest first | Page: 1, 2 Prolong - Thursday July 29, 2010 - 9:21 Very nice guide, even though it never got finished there is still a ton of great information here. Elrond99 - Sunday February 15, 2009 - 7:52 Thanks for updating the Tutorial Sulherokhh (Team Chamber Member) - Saturday February 14, 2009 - 21:19 After 'D. The Faction Base and Fortress', i guess. jakonic - Saturday February 14, 2009 - 12:05 when will be finished Spell Purchase Scripts???please answer Sulherokhh (Team Chamber Member) - Thursday November 29, 2007 - 17:26 I sure will... Rob38 (Team Chamber Member) - Thursday November 29, 2007 - 11:00 This is by far one of my favorite tutorials on T3A! Please continue to add more :) Sulherokhh (Team Chamber Member) - Wednesday October 3, 2007 - 23:07 I am glad you can put it to use, Rob! Your feedback means a lot to me. :D Rob38 (Team Chamber Member) - Wednesday October 3, 2007 - 22:27 Amazing! I also found a way to recognize if a player is controlled by the AI, but this looks to be a much easier method to use. Thank you for all your wonderful knowledge as there is some really cool stuff in here. Sulherokhh (Team Chamber Member) - Wednesday October 3, 2007 - 19:18 I'll split it up. Let's see what would be a good way. - Edit: Done. I hope you like it. Crashdoc - Wednesday October 3, 2007 - 16:48 Nice findings and interesting ways to use them. Thanks for sharing the knowledge! |
![]() |
|||||||||||||||||||||||||||||||||||||
![]() "One site to rule them all, one site to find them, © All Rights Reserved Eric Edwards ©2013. |