Friday 22 April 2011

BattleCalculator, InformationContainer, Positioning

Progress is slowly continuing on the matter of '(Artificial) Intelligence -> Information/Dialog/Quest' field. Events are now starting to shape up with the simple decisions of EntityInstances. Aside the UI based combat/encounter involving the player, now AI vs. AI happenings are being tested out with the IntelligenceSystemTest runnable (you can find it in the codebase in SVN if you want to test, and look for your log file under /.jclssicrpg/logs). Firstly BattleCalculator is mostly done that does a simplified, weighted combat calculation with impact of death toll and neutralization (making the enemy give up/surrender). Simple stuff, but for the time being it will suffice and serve well the history creation / plan growing of jcrpg's seed based worlds.
Also first memories are being put into AI information containers, first of all Positining information that mirrors the knowledge of a unit about the location of other entity instances. A lot more to add (like the Historical events that will serve as a backgroundish spice for the conversations, and Plans that will serve as a joining point for the Player to do things related to other entities...in other words do some quests ;))
I can say it's really a tiresome process with a lot of stuff to plan and realize, but it's at the same time rather interesting. A snippet of log for you, as this doesn't involve a screenshot yet:

org.jcrpg.game.logic.ai.BattleCalculator - *INITIATOR MEAN: martial 1.0
org.jcrpg.game.logic.ai.BattleCalculator - #TARGET MEAN: martial 1.0
org.jcrpg.game.logic.ai.BattleCalculator - rollOfInitiator = 961
org.jcrpg.game.logic.ai.BattleCalculator - rollOfTarget = 2500
org.jcrpg.game.logic.ai.BattleCalculator - Absorbing ratio 1 Warthog (4) 0 : 1.0 Impact ratio: 0.0 neutralization: 1.0
org.jcrpg.world.ai.EntityFragments$EntityFragment - AI BATTLE DAMAGE fragment of size 29 - Warthogs 496 = 0.0 / Neut.: 0.0
org.jcrpg.game.logic.ai.BattleCalculator - Absorbing ratio 1 Plant'o'Bite (0) 0 : 1.0 Impact ratio: 2.0 neutralization: 0.0
org.jcrpg.world.ai.EntityFragments$EntityFragment - AI BATTLE DAMAGE fragment of size 7 - Plantoid Horde 495 = Infinity / Neut.: 0.0
org.jcrpg.world.ai.EntityFragments$EntityFragment - Plantoid Horde - decrease relation by 1 level for Warthogs RESULT 0
org.jcrpg.world.ai.EntityInstance - EntityInstance destroyed Plantoid Horde 495

No comments:

Twitter