Last edited by Delicate Strawberry; May 16, 2015 at 03:42 PM.
Already to late too implement it for now sadly, perhaps on next update. This is actually BAI part, which most people believe unmoddable, perhaps we just dont know where the location to edit it. Anyways like Columbus , Sir Opus already found new world, worthy to doing exploration in this uncharted territory.
Who know what will we found.
Modding is like accursed wine, you try a sip and you ended empty the whole glass
Under Proud Patronage of Shankbot de Bodemloze
It could be dangerous and better left undiscovered.
Sir Opus, you're our only hope.
Thankfully I'm joking, exploration can only lead to great things.
Does the better missiles/artillery need updated every time new Radious units come out, or is it a general effect that is applied to every unit and won't need updated?
Forgive my lack of modding knowledge. I look forward to the day I can finally mod something myself and contribute.
Nope, unless Radious create new custom made missile type every time he release units.Which i doubt it he will do that
Modding is like accursed wine, you try a sip and you ended empty the whole glass
Under Proud Patronage of Shankbot de Bodemloze
Ah, thank you. I assumed it would be that way. I shall be keeping it activated then.
Modding Routing behaviour of units:
You can edit the battle.script in Script/lib/lib_battlemanager.lua and you can change also the routing or attacking behaviour under the ROUTE MANAGER (all the way down, f.e. change the 2,5 in any number you like agressive or passive units behaviour.
This is the subroutine for routing you are looking for:
-- rout manager performs its internal check
function battle_manager:check_rout_manager()
local alliances = self:alliances();
local non_routing_enemy_units = num_units_routing(alliances:item(2));
local non_routing_allied_units = num_units_routing(alliances:item(1));
if non_routing_enemy_units < self.rout_threshold and non_routing_allied_units > non_routing_enemy_units * 2.5 then
return true;
end;
return false;
end;
Modding battlebehaviour of units:
lib_script_ai_planner.lua. Here you can change all kinds of attackoptions, active behaviour, distance, time between attacks and reorder attacks, create your own booleans, triggers (need also export.triggers) and callbacks. The Ai is scripted to attack every 15 seconds if a platoon still has units left and status standing around its reorderd at 30 secs for defenders. You can changes this to 45 seconds by "reorder_interval"=45000 f.e. Note : This will slow down the whole battle btw.
The defend radious is 25 mtrs from the startingvector.position. You can change this to 20,15 whatever so units want go to far from the defence line (seemngly coutnerattacking).
This is the subroutine that changes the defenders into attackers:
function script_ai_planner:attack_force(enemy_force, reorder, defend_radius)
-- should we attack or actually defend
local function_name = "attack_force()";
local should_defend = false; ****** If true; defenders defend QQ
if should_defend then ****** True; defenders defend QQ
self.current_order = SCRIPT_AI_PLANNER_DEFEND_FORCE;
self:defend_position_of_sunit(closest_enemy, defend_radius, nil, true);
else
self.current_order = SCRIPT_AI_PLANNER_ATTACK_FORCE;
self:move_to_position_of_sunit(closest_enemy, nil, false, true);
end;
To make things more difficult the script AI_Planner_Defend_force is set to attack (subroutine 10):
"
function script_ai_planner:defend_force(enemy_force, radius) self:attack_force(enemy_force, false, radius);
end;
"
So this seems on purpose or I am missing a reference to another routine from the move to position routines.
Defending radius:
This routine seems to let the defenders go out 25 mtrs from their initial (pos, radius) starting defending point before returning back to ther inital pos/radios/nil/vector. Maybe you can lower this too f.e. 15 mtrs and see the effect.
Routine:
Name "function script_ai_planner:defend_position_of_sunit(sunit, radius, rout_callback, internal)"
Context:
-- watch for our target unit moving and update if it moves too far away from our current destination
self.bm:watch(
function()
return sunit.unit:position():distance(self.current_dest) > 25
end,
0,
function()
self:defend_position_action(sunit.unit:position(), radius)
end,
self.name
Making agressive AI. No passive factions (half agressive, 1/2 defensive and with differences in expansion and opportunist behaviour. I tested this and it gives a whole different gameplay. From the start of the game fe. Geats conquer Jutes. Danes help Jutes, Danes conquer Capital Geats, Geats conquers capital Danes.Langobards have conquered Marcomans and a Roman City. The passive puppetstates from Sassanid and ERE are fighting alongside with their majorallieforces. Picts have finally smashed (their old good oh so boring passive friend) Caledonians and is now the major power in Britian next to Britiain itself. WRE keeps reconquering their cities. Septimania and Gaul allied and hold their ground. No faction is passive anymore, the Target Coaltion works marvelous. so multiple forces attack together from different factions all over the place.
The mainbehaviour of these Factions is organised in CAI_personalities, column 12 to 24. I am using the Oeconomiamod and the Better-AI mod from Bodemloze and finetuned the tables. The taskgeneratorprofilecolumn has the most effect as also the Column that organises the Character of a Nation Expansionist, Opportunist, Defensive, agressive, and all sorts of combinations of these characeristics. These characteristics also show up in the prescription when you click on a Faction in Game. You can ofcourse leave some friendly or diplomatic_friendly but than adjust the agressiveness and budget, so they are not steamrolled and are capable of joining/helping you in battles.
Furthermore I edited some battlescripts and the Startposvariables (CAI_variables) so Factions disable_resettle=false and can and are resettling in my game and I enabled the Agression Ramp in CAI_VARIABLE_AGRR_RAMP_ENABLED = 1
Well so far I am enyoying my game a lot because of all the new things that are happening and the world looks different from every othter Attilla game I have played before. For the modders you might try some of this, if you don't already have...
Greetz
T
Last edited by OpusDei; May 17, 2015 at 12:21 PM.
There is a scripterror somewhere in the original game that makes Armies, lots of stacks not attack Cities with strong walls. So far I have not found this entry, script or db settings, will look further into it.
Keep doing what you doing mate
Modding is like accursed wine, you try a sip and you ended empty the whole glass
Under Proud Patronage of Shankbot de Bodemloze
that's what we need to find, alongside 'lots of stacks not attacking horde armies' problem
and good job for managing to let Germanic/Celtic etc factions fight with each other (which they don't do mostly, unless some of them are Hordes, instead settled), for Better CAI mod there is only Agressive and Expansionist faction leader traits atm, no Defensive nor Opportunist, but your test shows we do need them
btw is it possible for you to share changed parts of the mod in submod section?
Last edited by SharpEyed; May 17, 2015 at 02:11 PM.
Will do sharp, but coming days work and next weekend on a familytrip. But in between maybe I can extract some tables, scripts and post them on mediafire and a link in the submod section.
greetzz
ah ok have a good trip mate
Btw I've also seen defense script/s, and obviously that's not working as well as Rome 2's, idk if you/we can fix it or anyone else (this modder seem to be experienced about it http://www.twcenter.net/forums/showt...1#post14517011)
dammit man too much to fix, CA was suppose to be doing these fixes in the 1st place.
I was just thinking that it may have to do with the limitation of armies that can engage, the other stacks than will be seen as obsolete in the chance calculation.
I think CA has improved a lot, they have a new programmer that is very smart and logical programming the subroutines and variables. The defence routine shows that passive defending is no more... so i think a step ahead, but to get it right it takes a lot of testing. Also the battleprogrammer from CIA left a whole lot open for modding. So I gues that is now our job..