• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

riknap

Inactive Custodian of the Light
73 Badges
Feb 27, 2011
6.574
198
steamcommunity.com
  • Sengoku
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Magicka
  • Europa Universalis IV: Res Publica
  • Semper Fi
  • Crusader Kings II: Charlemagne
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Pre-order
  • Pillars of Eternity
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Divine Wind
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Hearts of Iron IV: Cadet
  • Stellaris: Nemesis
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: With Fire and Sword
  • Mount & Blade: Warband
  • Europa Universalis IV: El Dorado
  • 500k Club
  • War of the Roses
  • Warlock 2: The Exiled
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
PHASE 1 UPDATE - version 0A_LuxInvicta released

DOWNLOAD 0A_LuxInvicta

Release Notes:
All Skirmish Tactics added in, but not fully fleshed out.
Borrowed Six Gun South's Better Armies's tactics (for the non-cultural melee phase) and sprites.

Known Issues:
a "light_infantry_offensive" tactic shows up, but I'm unable to make it disappear without locking some code in a quarantine
since I just copy-pasted SixGunSouth's code for the melee section, and since it also heavily adds culture resctrictions for these, some tactics may not show up despite theoretically being available. Sorry, I got lazy...

Requirements:
the "unit rebalance" itself requires the defines.lua available in the SVN version. but since we're not yet sure whether to use the beta features or not, I'll omit it for now


As was noted in the General Unit Rebalance thread, it's pointless to rebalance units only while not tweaking the tactics they use. As such, I've fully begun working on my Advanced Battles & Combat Depth Essentials project in tandem with it.

Right now, only skirmish tactics have been added, while the rest of the tactics section uses the Lux Invictified cultural tactics and SixGunSouth's Better Armies tactics for melee.

As I noted, I'm having difficulty finding out why that non-tactic shows up.
Can anyone help? I've been trying to make sense of it, but I just can't find the cause of the bug.
Here's the code block that seems to cause it (ie. removing this removes the bugged "light_infantry_offensive" tactic from showing up)
Code:
#Desert Ambush#
sk_am_desertambush = {
	days = 4
	sprite = 11
	group = sk_ambushes

	trigger = {
		phase = skirmish
		flank_has_leader = yes
		location = {
		terrain = desert
		}
		leader = {
		martial = 8
		intrigue = 8
		}
	}

	mean_time_to_happen = {
		days = 3		
		# commander
		modifier = {
			factor = 5
			leader = {
			OR = { 
			trait = desert_terrain_leader #bonus
			trait = experimenter #bonus
			trait = trickster #bonus
				}
			}
		}
		modifier = {
			factor = 5
			leader = {
			martial = 16 #bonus
			}
		#composition independent
		#location
		modifier = {
			factor = 5
			location = {
				terrain = desert
			}			
		}
		}
		
	}
	light_infantry_offensive = 0.25
	archers_offensive = 0.25
	light_cavalry_offensive = 0.5
	camel_cavalry_offensive = 1
	horse_archers_offensive = 0.5
	
	enemy = {
		group = sk_manoeuvres
		factor = -0.5
	}
	enemy = {
		group = sk_infantryscreening
		factor = 1
	}

}

#Crushing Desert Ambush#
sk_am_crushingdesertambush = {
	days = 4
	sprite = 7
	group = sk_ambushes

	trigger = {
		phase = skirmish
		flank_has_leader = yes
		location = {
		terrain = desert
		}
		leader = {
		martial = 16
		intrigue = 8
		OR = { 
			trait = desert_terrain_leader 
			trait = experimenter 
			trait = trickster 
				}
			}
		}
	

	mean_time_to_happen = {
		days = 3		
		# commander
		modifier = {
			factor = 5
			leader = {
			OR = { 
			trait = desert_terrain_leader #bonus
			trait = experimenter #bonus
			trait = trickster #bonus
				}
			
			}		
		}
		#composition independent
		#location
		modifier = {
			factor = 5
			location = {
				terrain = desert
			}			
		}
		
	}
	light_infantry_offensive = 0.5
	archers_offensive = 0.5
	light_cavalry_offensive = 1
	camel_cavalry_offensive = 2
	horse_archers_offensive = 1
	
	enemy = {
		group = sk_manoeuvres
		factor = -0.25
	}
	enemy = {
		group = sk_infantryscreening
		factor = 1.5
	}

}

Aside from that, I'm also not really fully satisfied with the way tactics are being selected/weighted, and I'd like your opinion on how to fully tighten them up as well. I've updated the OP, so the list of tactics and their relevant modifiers there is exactly how they're coded (barring unintentional typos I might have failed to catch).
 
Code:
#Desert Ambush#
sk_am_desertambush = {
	days = 4
	sprite = 11
	group = sk_ambushes

	trigger = {
		phase = skirmish
		flank_has_leader = yes
		location = {
		terrain = desert
		}
		leader = {
		martial = 8
		intrigue = 8
		}
	}

	mean_time_to_happen = {
		days = 3		
		# commander
		modifier = {
			factor = 5
			leader = {
			OR = { 
			trait = desert_terrain_leader #bonus
			trait = experimenter #bonus
			trait = trickster #bonus
				}
			}
		}
		modifier = {
			factor = 5
			leader = {
			martial = 16 #bonus
			}
		#composition independent
		#location
		modifier = {
			factor = 5
			location = {
				terrain = desert
			}			
		}
		}				[COLOR="#FF0000"]#<- REMOVE THIS!!!!!![/COLOR]
		
	}
	light_infantry_offensive = 0.25
	archers_offensive = 0.25
	light_cavalry_offensive = 0.5
	camel_cavalry_offensive = 1
	horse_archers_offensive = 0.5
	
	enemy = {
		group = sk_manoeuvres
		factor = -0.5
	}
	enemy = {
		group = sk_infantryscreening
		factor = 1
	}

}

#Crushing Desert Ambush#
sk_am_crushingdesertambush = {
	days = 4
	sprite = 7
	group = sk_ambushes

	trigger = {
		phase = skirmish
		flank_has_leader = yes
		location = {
		terrain = desert
		}
		leader = {
		martial = 16
		intrigue = 8
		OR = { 
			trait = desert_terrain_leader 
			trait = experimenter 
			trait = trickster 
				}
			}
		}
	

	mean_time_to_happen = {
		days = 3		
		# commander
		modifier = {
			factor = 5
			leader = {
			OR = { 
			trait = desert_terrain_leader #bonus
			trait = experimenter #bonus
			trait = trickster #bonus
				}
			
			}		
		}
		#composition independent
		#location
		modifier = {
			factor = 5
			location = {
				terrain = desert
			}			
		}
		
	}
	light_infantry_offensive = 0.5
	archers_offensive = 0.5
	light_cavalry_offensive = 1
	camel_cavalry_offensive = 2
	horse_archers_offensive = 1
	
	enemy = {
		group = sk_manoeuvres
		factor = -0.25
	}
	enemy = {
		group = sk_infantryscreening
		factor = 1.5
	}

}

See comment in red.
 
I knew it it was a bracketing error somehow.
(odd though that I couldn't detect the extra bracket in notepad++ :( )
 
it's mostly really because DarkReborn and richvh have more or less been doing the majority of the bug-correction/updating/tweaking of LI-main that I'm able to divert modding time towards this project really.
that said, it's still good to know at least a few people actually care about this project aside from myself - any number greater than zero is still a number :laugh:

as I doubt I'll be obtaining feedback anytime soon, I'll be soon working on the melee tactics before I work on fleshing out skirmish tactics. this phase might take a week or two, though it may be less (since I did manage to exceed my own deadline regarding the skirmish tactics at least)
 
so I thought I'd experiment integrating it with the SVN and checking how it works out, but apparently there's some bug I still couldn't hunt down (aside from "war elephants" showing up as "NONE" - a minor localisation issue that I should probably fix once I remember to)
1024x640.resizedimage
that "}: 3.8%" is no doubt a bracketing mistake right? Or am I missing something? @_@
I've fixed the bracketing error richvh pointed out already, but just in case, could it be it?
Code:
#Desert Ambush#
sk_am_desertambush = {
	days = 4
	sprite = 11
	group = sk_ambushes

	trigger = {
		phase = skirmish
		flank_has_leader = yes
		location = {
		terrain = desert
		}
		leader = {
		martial = 8
		intrigue = 8
		}
	}

	mean_time_to_happen = {
		days = 3		
		# commander
		modifier = {
			factor = 5
			leader = {
			OR = { 
			trait = desert_terrain_leader #bonus
			trait = experimenter #bonus
			trait = trickster #bonus
				}
			}
		}
		modifier = {
			factor = 5
			leader = {
			martial = 16 #bonus
			}
		}
		#composition independent
		#location
		modifier = {
			factor = 5
			location = {
				terrain = desert
			}			
		}
	}
	light_infantry_offensive = 0.25
	archers_offensive = 0.25
	light_cavalry_offensive = 0.5
	camel_cavalry_offensive = 1
	horse_archers_offensive = 0.5
	
	enemy = {
		group = sk_manoeuvres
		factor = -0.5
	}
	enemy = {
		group = sk_infantryscreening
		factor = 1
	}

}
I'm sure there's no bracketing error in that code cluster... or am I mistaken? @_@
 
I don't see any bracketing error there. Is this in your lock box?
 
I don't see any bracketing error there. Is this in your lock box?
it's the combat_tactics.txt that I uploaded to the SVN itself yesterday (a few hours ago) - ie. the current common/combat_tactics.txt
 
I fixed the parsing problems, but you seriously need to run it through Validator. 273 errors, which I cut down to 240 by eliminating false positives on YES and NO and changing NOT = { martial = 0 } to NOT = { martial = 1 } (stats have a floor of 0, so a test for a stat being less than 0 is useless.) A lot of the remaining errors are probably tactics you haven't added yet, but there's bogus cultures, culture groups, attempts to use a non-existent trigger (has_flank_leader) which I'm in the process of changing to NOT = { leader = { always = yes } } to simulate the missing trigger (hie thee to the Modding Improvements thread to ask for its addition)

Got the error count down to 214, most of which are missing tactics/tactic groups or unneeded ANDs or ORs, but a note on something I left for you to fix: there is no camels_offensive or war_elephants_defensive, there is only special_troops_offensive and special_troops_defensive. I'll leave it to you to figure out how to distinguish between different special troops.

Also pay attention on terrain checks, I had to fix several where you left out the location wrapper.
 
Last edited:
... ouch.

IIRC, my intent for the tests for NOT = { martial = 0 } is to prevent the specific tactic from running for those with no martial skill, but I guess I made a mistake in thinking it worked like a "<="/"less than or equal to" operator, which is how I usually define my ranges in C :laugh:
nope. it seems like that was Six Gun South's code. ... well, the line above is still accurate though (ie. I did thought NOT = { martial = 0 } was valid until now).

I'm pretty sure the "has_flank_leader" is an old vanilla command though (I started coding this project months ago, but only picked up steam post-RoI). still, it's certainly possible it was either phased out and is now obsolete @_@
the camels thingy though is still existing, since the vanilla files still use those commands though. well, more accurately, "camel_cavalry_offensive = X" ("camels_offensive is likely a typo).
for reference, here's a vanilla code
Code:
harass_tactic = {
	days = 18
	sprite = 4
	group = harass

	trigger = {
		phase = skirmish
		OR = {
			light_cavalry = 0.001
			camel_cavalry = 0.001
		}
	}

	mean_time_to_happen = {
		days = 3
		modifier = {
			factor = 1.5
			flank_has_leader = yes
			leader = {
				martial = 8
			}
			OR = {
				light_troops = { 
					who = light_cavalry
					value = 0.7
				}
				light_troops = { 
					who = camel_cavalry
					value = 0.7
				}
			}
		}
		modifier = {
			factor = 1.5
			flank_has_leader = yes
			leader = {
				martial = 12
			}
			OR = {
				light_troops = { 
					who = light_cavalry
					value = 0.6
				}
				light_troops = { 
					who = camel_cavalry
					value = 0.7
				}
			}
		}
		modifier = {
			factor = 1.5
			flank_has_leader = yes
			leader = {
				martial = 16
			}
			OR = {
				light_troops = { 
					who = light_cavalry
					value = 0.5
				}
				light_troops = { 
					who = camel_cavalry
					value = 0.5
				}
			}
		}
	}

	light_cavalry_offensive = 3
	camel_cavalry_offensive = 3
	horse_archers_offensive = -1.5
	archers_offensive = -1.5
	enemy = {
		group = swarm
		factor = 1
	}
}
I at least hope they don't change that. it'll be a headache to use "special_troops_offensive/defensive", since our special troops currently are camels, horse archers, elephants, crossbowmen, hedge knights, and spearmen. There's no way a tactic will accomodate that motley assortment equally :laugh:

still, point noted on terrain checks. I got sloppy when copy-pasting. Sorry you had to slog through that :|

on another thought, it's also possible some of the problems are due to Six Gun South's Better Armies tactics. I think I was using an older version as a placeholder (mostly because I didn't want to hand-edit the vanilla icon designations, plus I kind of liked that mod anyway and had permission to use it as well ^_^ )


I promise I'll try using the validator next time... hopefully it works on my botched windows install (I don't have some .NET frameworks installed - I keep getting an 80070643 error trying to get Windows Update to install them, and I'm too preoccupied to attempt to reinstall Windows from scratch yet again since I spent more than a week in my previous attempt :laugh: )
 
"camel" doesn't exist in the executable, "warelephant" exists twice, alone and as "merc_warelephant". It's possible that special troop types are substituted into special_troops_offensive and special_troops_defensive, you'll have to test that.

One terrain error I didn't clean up is rough, which Validator says isn't a terrain type. "serindian" and "english_norse" aren't valid cultures, "east_african" and "crusader_group" aren't valid culture groups. The invalid tactic groups (by far the largest set of errors) is something I'm not knowledgeable enough to fix... I haven't checked to see if the tags are existing but not defined as groups, or what.
 
It's "flank_has_leader", not "has_flank_leader".

You're using both "sk_ambushes" and "ambushes" as groups, are they supposed to be different?

Found one place where rough_terrain_leader applied in woods and hills, are those two supposed to be rough terrain?
 
out of curiosity, what do you mean by "invalid tactic groups"? do you mean the stuff like "sk_standardcharge"? If so, there's nothing that can be done I guess, since those are custom groupings I made so that I could pair them off each other (ie. a rock-paper-scissors system where a set of tactics are weak against some yet strong against other sets of tactics).

the only cultures there are either the CK2plus ones (since Better Armies was made for ck2plus) or the ones DarkReborn allocated for the cultural ones.

@DarkReborn
that said, since we have a lot of new cultures post-Eastern Expansion, any ideas how we temporarily shoe-horn them into the vanilla tactics? :laugh:


on a different but related note, I'm having trouble understanding why the "war elephants" localisation isn't showing up properly. The game should be referencing the vanilla files right? But these don't seem to be properly referenced:
war_elephants;War Elephants;ノl駱hants de guerre;Kriegselefanten;;Elefantes de Guerra;;;;;;;;x;;;;;;;;;;;;;
war_elephants_offensive;War Elephants Offensive;Attaque des 駘駱hants de guerre;Kriegselefanten Angriff;;Elefantes de Guerra Ofensivo;;;;;;;;x;;;;;;;;;;;;;
war_elephants_defensive;War Elephants Defensive;D馭ense des 駘駱hants de guerre;Kriegselefanten Verteidigung;;Elefantes de Guerra Defensivo;;;;;;;;x;;;;;;;;;;;;;
war_elephants_morale;War Elephants Morale;Moral des 駘駱hants de guerre;Kriegselefanten Moral;;Elefantes de Guerra Moral;;;;;;;;x;;;;;;;;;;;;;
faulty encoding aside, those are showing up as "NONE" in-game. it's the same problem with ai weights in traits/modifiers (just looking at the Expand Administration stuff in-game will show a NONE at the bottom, which should be hidden since it represents the the hidden ai_ambition weight.
this is just a post-RoI thing, but I haven't managed to find out why it's showing up like that yet @_@
1024x640.resizedimage

I'm guessing it's not a crash-trigger anyway, but it's a distracting and glaring bug that should really be fixed somehow - kinda like a shoe print on a side walk because someone decided to step on wet cement :laugh:
(speaking of visual blunders, does anyone know why that white line thingy is showing in the tactics icons/indicators? there doesn't seem to be a problem with frame number in the .gfx or the pixel size of the file, so I'm stumped. It's been bugging me for months, but everytime I look I can't see what's wrong -_-)

ah, the bracketed bugged tactic doesn't seem to show up anymore btw (I think), so thank's for the help there :D
 
It's "flank_has_leader", not "has_flank_leader".

You're using both "sk_ambushes" and "ambushes" as groups, are they supposed to be different?

oh, right. that's likely it. *mutters about his Mental Autocorrect Module*

as for the sk_ambush/ambush, no, it's only supposed to be sk_ambush. I likely forgot to add that prefix during coding, and ended up copy-pasting that block (6 times it seems)

could you correct it in your end? we'll probably end up with a conflicting file (and I can't directly access the SVN right now too anyway )
 
Did you see this edit?
You're using both "sk_ambushes" and "ambushes" as groups, are they supposed to be different?

Edit: Oh, I see you did.

Cleaned up all but the invalid tactic group errors (181 of them), and change ambushes to sk_ambushes. Try it now.
 
rough terrain leader should apply to woods and hills, since that's also how vanilla defines it anyway.
I've also managed to "fix" the white line issue by redoing the file from scratch (apparently the file is corrupted. not sure how ck2 even manages to launch it). not sure how that turned out though
kZdv7VYiDj-eeqznHAkEG78C8skk30hKAZEjvNGS7oU
 
take 2:
2A0F04FEB6F198E1D8B6C9AFC67CBBED55BCF14B
I wonder if that looks *any* better. hahaha.
that green icon looks almost cartoonish though @_@
working on a redesign now.

edit:
take 3:
7FFF65E34DE138EE6F2B16581CEE944AE2813033

I think this looks a bit better now. I think.
what do you guys think? is it both intuitive enough (ie. green = good, red = bad, yellow/orange/whatever-that-is = so-so) and not eye-vomity?
 
I had a CTD, don't know if it's ABCDE related. There's also a lot of duplicate IDs reported in error.log, the same two over and over. Again, I don't know if it's ABCDE related, but I can't find those IDs in the mod files.

[id.cpp:83]: Failed to create id 664350 41. Already exists in game.
[id.cpp:83]: Failed to create id 664351 41. Already exists in game.