Barbarian Immersion Enhancements

Can you post your logs?
 
Thanks for this mod, I love it!

I want to make a few tweaks based upon the settings that I use: Large maps, Epic speed, Raging Barbarians, modded lower bonuses vs. Barbarians to make them stronger. Specifically:

1. I find I often get fractional bonuses. For example, I'll receive 345.5 culture bonus, or something like that. Is this because there's a 50% bonus for capturing GG on Epic speed? If so, I'd like to remove the game speed bonuses, because I'm already getting so many barbarian kills throughout the game that I definitely don't need such a high culture & gold bonus for each GG killed. Should I simply remove (* SpeedCulture) & (* SpeedGold) from these formulas?

culturebonus = 75 * eratype * SpeedCulture
goldbonus = 75 * eratype * SpeedGold

2. A lot of these features like Barbarian Unhappiness and Promotion are disabled in my mod (v 1). Is this because they're under development, or is it OK to activate these features without causing problems?
 
I wasn't able to find an answer anywhere, does anybody know if this mod is compatible with the Community Patch?
 
I think it should be compatible... right now the only major compatibility issue is the unlimited XP thing.
 
Im not sure, but this mod does not work when starting in another age? (I guess the names and so on changes after a specific time and therefore if I start game in industrial age they are still barbarians)
This, or the renaming does not work for me (don't have time to play a game long enoguh to see, if the names changes after some time)
 
Playing this mod with the community patch, and I hit turn 495 (marathon game), and I crash every time on the barbarian turn. I don't know this stuff very well, but I checked my LUA log and it crashes on this line every time "[164611.287] BarbarianCampPopup: Brigand Promotions". Any ideas on how I can fix this? It looks like the barbarians being promoted is what is breaking the game.

Edit: In database log I get these as well "[163944.243] Invalid Reference on UnitPromotions_Features.PromotionType - "PROMOTION_REBEL" does not exist in UnitPromotions
[163944.243] Invalid Reference on UnitPromotions_Features.PromotionType - "PROMOTION_REBEL" does not exist in UnitPromotions
[163944.243] Invalid Reference on UnitPromotions_UnitCombatMods.PromotionType - "PROMOTION_PIRATE" does not exist in UnitPromotions
[163944.243] Invalid Reference on UnitPromotions_UnitCombatMods.PromotionType - "PROMOTION_PIRATE" does not exist in UnitPromotions
[163944.243] Invalid Reference on UnitPromotions_UnitCombatMods.PromotionType - "PROMOTION_PIRATE" does not exist in UnitPromotions
[163944.243] Invalid Reference on UnitPromotions_UnitCombatMods.PromotionType - "PROMOTION_PIRATE" does not exist in UnitPromotions
[163945.553] Failed Validation."
 
If I change the mod settings to turn off promotions, the last lines for the Lua log are..
"[169929.814] BarbarianCampPopup: MUST change barbarian names
[169929.814] BarbarianCampPopup: Changing Barbarian Strings (LOW)
[169929.814] BarbarianCampPopup: Changing Barbarian Texts: 1/9
[169929.923] BarbarianCampPopup: Changing Barbarian Texts: 2/9
[169929.985] BarbarianCampPopup: Changing Barbarian Texts: 3/9
[169930.204] BarbarianCampPopup: Changing Barbarian Texts: 4/9
[169930.282] BarbarianCampPopup: Changing Barbarian Texts: 5/9
[169930.360] BarbarianCampPopup: Changing Barbarian Texts: 6/9
[169930.469] BarbarianCampPopup: Changing Barbarian Texts: 7/9
[169930.547] BarbarianCampPopup: Changing Barbarian Texts: 8/9
[169930.609] BarbarianCampPopup: Changing Barbarian Texts: 9/9"

And then it ends just like that.

Edit: Mod works if I turn off Barbarian name changes. I would like to hear a possible solution to keep those and promotions if anybody could figure it out.
 
What'd be really cool, is if there was a version that worked with a futuristic mod and made the barbarians "alien invaders".
 
I just want to say I'm really loving this mod. I've been playing with it for a few months now, and the Barbarian Great General are awesome. They give much more tension to the early game and incentive to build an early military even if you're isolated, without going to the extreme of Raging Barbarians.
 
When playing with the community patch,after turning off both the Promotions and the era name change I still get and issue with the great generals Spawning on top of each other even when a great general is already present. i.e. There will be a single plot with 4~ great generals stacked and unguarded.
I think this problem is a result of the No More Civilian Traffic Jams (NMCTJ) mod into CBP
 
At the moment you don't get any gold or culture for killing a general in the ancient era, due to these formulas in BarbarianGGScripts.lua:

culturebonus = 75 * eratype * SpeedCulture
goldbonus = 75 * eratype * SpeedGold

The eratype for ancient is 0, so you get nothing there.
To fix it, just add "+75" (or whatever you feel to be adequate, I personally use lower values for each era) to the end of each formula, or add 1 to eratype.

Thanks for the great mod! :)
 
I found a bug in lua code from BarbarianEraScript.lua.
When addind the terrorist promotion, you remove the terrorist promotion right after that, instaed of removing the rebel promotions.

Hi Serp

would that be related to this error I'm getting

BarbarianEraScripts.lua:101: attempt to call method 'GetHasPromotion' (a nil value)

if so How Do I Fix It, Im guessing it has something to do with this piece of code within the lua
Code:
function Leugi_BarbPromoChange(eraID)
	--print ("eraID: " .. eraID)
	--print ("Starting Promos")
	local pPlayer = Players[63]
	--print ("added bplayer")
	for bUnit in pPlayer:Units() do
	--print ("checking units of bPlayer")
	if eraID == 2 then
        if (bUnit:GetHasPromotion(BrigandPromo)==false or bUnit:GetHasPromotion(UnFriendlyPromo)==true) then
            bUnit:SetHasPromotion(BrigandPromo,true);
            bUnit:SetHasPromotion(UnFriendlyPromo,false);
            --print ("Brigand Promotions")
        end
	elseif eraID == 3 then
        if (bUnit:GetHasPromotion(PiratePromo)==false or bUnit:GetHasPromotion(BrigandPromo)==true) then
            --print ("Pirate Promotions")
            bUnit:SetHasPromotion(PiratePromo,true);
            bUnit:SetHasPromotion(BrigandPromo,false);
        end
	elseif eraID == 4 or eraID == 5 then
		if (bUnit:GetHasPromotion(RebelPromo)==false or bUnit:GetHasPromotion(BrigandPromo)==true or bUnit:GetHasPromotion(PiratePromo)==true) then
            --print ("Rebel Promotions")
            bUnit:SetHasPromotion(RebelPromo,true);
            bUnit:SetHasPromotion(BrigandPromo,false);
            bUnit:SetHasPromotion(PiratePromo,false);
        end
	elseif eraID [COLOR="Red"]>=[/COLOR] 6 then
        if (bUnit:GetHasPromotion(TerroristPromo)==false or bUnit:GetHasPromotion(BrigandPromo)==true or bUnit:GetHasPromotion(PiratePromo)==true or bUnit:GetHasPromotion(RebelPromo)==true) then
            --print ("Terrorist Promotions")
            bUnit:SetHasPromotion(TerroristPromo,true);
            bUnit:SetHasPromotion(BrigandPromo,false);
            bUnit:SetHasPromotion(PiratePromo,false);
            bUnit:SetHasPromotion(RebelPromo,false);
        end
	end
	end
end

Edit: I was Having alook trying to nut it out myself and I notice this (above code highlighted red) is >= part of the code cause I can't find it anywhere in the tuts I've been looking at :think:
 
Hi Serp

would that be related to this error I'm getting

BarbarianEraScripts.lua:101: attempt to call method 'GetHasPromotion' (a nil value)

if so How Do I Fix It, Im guessing it has something to do with this piece of code within the lua
Code:
function Leugi_BarbPromoChange(eraID)
	--print ("eraID: " .. eraID)
	--print ("Starting Promos")
	local pPlayer = Players[63]
	--print ("added bplayer")
	for bUnit in pPlayer:Units() do
	--print ("checking units of bPlayer")
	if eraID == 2 then
        if (bUnit:GetHasPromotion(BrigandPromo)==false or bUnit:GetHasPromotion(UnFriendlyPromo)==true) then
            bUnit:SetHasPromotion(BrigandPromo,true);
            bUnit:SetHasPromotion(UnFriendlyPromo,false);
            --print ("Brigand Promotions")
        end
	elseif eraID == 3 then
        if (bUnit:GetHasPromotion(PiratePromo)==false or bUnit:GetHasPromotion(BrigandPromo)==true) then
            --print ("Pirate Promotions")
            bUnit:SetHasPromotion(PiratePromo,true);
            bUnit:SetHasPromotion(BrigandPromo,false);
        end
	elseif eraID == 4 or eraID == 5 then
		if (bUnit:GetHasPromotion(RebelPromo)==false or bUnit:GetHasPromotion(BrigandPromo)==true or bUnit:GetHasPromotion(PiratePromo)==true) then
            --print ("Rebel Promotions")
            bUnit:SetHasPromotion(RebelPromo,true);
            bUnit:SetHasPromotion(BrigandPromo,false);
            bUnit:SetHasPromotion(PiratePromo,false);
        end
	elseif eraID [COLOR="Red"]>=[/COLOR] 6 then
        if (bUnit:GetHasPromotion(TerroristPromo)==false or bUnit:GetHasPromotion(BrigandPromo)==true or bUnit:GetHasPromotion(PiratePromo)==true or bUnit:GetHasPromotion(RebelPromo)==true) then
            --print ("Terrorist Promotions")
            bUnit:SetHasPromotion(TerroristPromo,true);
            bUnit:SetHasPromotion(BrigandPromo,false);
            bUnit:SetHasPromotion(PiratePromo,false);
            bUnit:SetHasPromotion(RebelPromo,false);
        end
	end
	end
end

Edit: I was Having alook trying to nut it out myself and I notice this (above code highlighted red) is >= part of the code cause I can't find it anywhere in the tuts I've been looking at :think:

Hi, yes this mod is quite buggy ;)
"GetHasPromotion" does not exist. It has to be "IsHasPromotion" ;)

For further questions about bugs, you can take a look at my multiplayer modpack, where I included the Immersion mod. I fixed some bugs and also did some changes you can read in my description. Link see signature.

">=" is correct ;)
 
Hi, I enjoy the mod very much, especially with the BARBARIAN_MAX_XP_VALUE tweaking. However, I have several other things in mind, can y'all teach me how to modify the LUA/XML files to achieve this?

1) How to reduce barbarian great general combat bonus to 5%?
2) How to reduce barbarian heal to +15 per turn?
3) How to remove near terrifying opponent debuff when player unit is adjacent to barbarian units?

Thanks~~
 
Ah, I just realised looking back over the last few posts that Barbarian Immersion is not going to operate quite correctly when a player also has the Enlightenment Era mod enabled. The player will start getting effects Leugi intended for the Industrial Era when the player enters the Enlightenment Era, and so on.

This incorrect effect-implementation will only start occuring after the player exits the Renaissance Era.
 
Top Bottom