Vincentz Infinite Projects [VIP MOD]

The page you linked doesnt have any of the guilds icon (?)
But I saw a lot of other stuff I made. You guys even have the Bullseye corp, which I havent even used in my VIP. Though I made the corp like a Mercenary Corporation, and from what I could read its now a shopping mall :lol:

But seriously, feel free to do anything you like with the stuff from VIP or anything else I've made. I'm just happy its in use :D

THX! I like to shop around in other mods to find good ideas and stuff :)
 
Holy J! This is the 3rd or 4th stack, maybe more. I did get Athens, but it looks like im gonna lose Corinth for the 3rd time. For a civ that is second last, and only have 3 cities left, he do pack quite a punch :wow:
Spoiler :
NZj8XdP.jpg


Btw I'm thinking, if its possible, to hide the cities in diplo talk, that havent been discovered (like Espionage view cities)
 
Yeah, when Toku hit me, it was with a well coordinated attack with 3 mixed stacks.. It wasn't pretty at all.

I actually like that idea of the diplo. But then again, I really like the expanded diplo options in Advanced Diplo2 modcomp.. So my opinion may be a touch biased :D
 
I looked at the diplo part to add some extra stuff and change existing :
Now its :
Resource trading (no limiting except attitude)
Open Borders (City trade, civilian and military units can enter)
Defensive Pact (AIs have to be peace with everyone to form. If one gets attacked everyone declare on the attacker)
Permanent Alliance (imho rarely used, maybe tweak for Union)


My idea :
Trade Agreement (can exhange resources and open up for city trade routes, civilian units can enter)
Default attitude : Cautious
Military Treaty (can enter borders with military units)
Default attitude : Pleased
Defense Pact (AI declare on existing wars as well as future wars.)
Default attitude : Pleased
Union (sort of like a semi permanent alliance but with more civs involved, and preferably the low score civs, so they get a chance to compete)
Default attitude : Friendly

but... its a lot of work with the diplo stuff. Lots and lots of stuff needs to be added/changed, so I kinda pushed it ahead of me for a while now.

edit :

mmm, was thinking about Free Speech Civic... Since it gives Unlimited Artist and Artists give +1 :happy: then it can remove all unhappiness, while at the same time increase the Culture output quite a bit, and on top give +100% Culture, and increased amount of Great People Points at a Low Upkeep.
Maybe its just a little bit over powered ;)

Note to players : Please keep an eye on the civics. What is good, what is bad, what is worthless and what is OP. Thanks :D

Note to sef : Add Ministries to Renaissance (National Wonders that gives Buildings to new build cities)
Ministry of Agriculture (add Granaries)
Ministry of Fishery (add Fishing villages)
Ministry of Commerce (add Markets)
Ministry of Justice (add Courthouses)
Ministry of Defense (add Barracks)
Ministry of Culture (add Theaters)
Ministry of Education (add Libraries)
Ministry of State (add City Halls)
Ministry of Labor (add Forges)

Later Ministries
Ministry of Finance (add Banks)
Ministry of Science (add University)
Ministry of Health (add Hospitals)
 
Really interesting progress on your mod Vincentz!
Just dl'ed the last version you posted, will try it out when life/work/the RNG will allow me.
Looking forward to it!
 
Uploaded 99F
Moddb.com download

Fixed a couple of things with rangestrike:
now show correctly damage when return fire.
A range 2 unit cannot be hit when attacking a range 1 unit from 2 tiles away.
Added experience to rangestriker if it kills unit in attack.
Added check for Bombarding before rangestriking.


Espionage points are now used from a total points pool instead of a civ specific pool.
Turned off a couple of passive missions until fixed.
Changed mechanics for the techsharing projects.


edit:
Of all the changes made recently, healing cost gold is imho one of the best balancing features, though I havent scaled it in any way.
I'm considering scaling it to gamespeed and difficulty level. the first because a unit that cost 100 :hammers: on normal speed cost 200 on Marathon so the healing should be twice as much, and the second because, well, we humans are a bit better at taking care of our units, so higher difficulty should affect this too imho.

edit edit :
so...
HealingCost = how much healed * unitHammerCost * gamespeed * DifficultyCost / CostModifierFromGlobalDefinesAlt.xml
with difficulty going from 40% and increasing 20% with each step (so ...Settler (40%), Noble (100%), Monarch (140%), Deity (200%))
Spoiler :

PHP:
void CvUnit::doHeal()
// Vincentz Healing Cost
{
	if (((currHitPoints() * 100) / maxHitPoints()) < (healRate(plot())) *5)  
	{
		int unitHealCost = (healRate(plot()) * getUnitInfo().getProductionCost() * GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getTrainPercent());
		unitHealCost /= (GC.getDefineINT("UNITHEAL_COSTMODIFIER") * 100 * 100);
		if (isHuman())
		{
			unitHealCost *= (GC.getHandicapInfo(getHandicapType()).getUnitCostPercent());
			unitHealCost /= 50;
		}
		
		if (GET_PLAYER(getOwnerINLINE()).getGold() > unitHealCost)
		{
			changeDamage(-(healRate(plot())));
			GET_PLAYER(getOwnerINLINE()).changeGold(-unitHealCost - 1);
			
		}
	}	
}
// Vincentz Healing end

Edit:
God! sometimes I hate the C++ Integer's "I only want a whole number!"-attitude...
If i multiply an Int with a fraction it becomes zero, no matter if the Int was several millions big. Jeez....
2.000.000 * (1/2) = 0
:(
Anyhow, new code that takes care if unit can be healed more than damaged. Before it was full price if unit was at 99% health. Not anymore, now it only cost 1% gold of normal healing cost:

PHP:
void CvUnit::doHeal()
// Vincentz Healing Cost
{
	if (((currHitPoints() * 100) / maxHitPoints()) < (healRate(plot())) *5)  
	{
		int unitHealCost = (GC.getDefineINT("UNITHEAL_COSTMODIFIER") * healRate(plot()) * getUnitInfo().getProductionCost() * GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getTrainPercent());
		if (isHuman())
		{
			unitHealCost *= (GC.getHandicapInfo(getHandicapType()).getUnitCostPercent());
			unitHealCost /= 50;
		}
		if (getDamage() - healRate(plot()) < 0) 
		{
			unitHealCost *= getDamage();
			unitHealCost /= healRate(plot());
		}
		unitHealCost /=	100*100*100;
		
		if (GET_PLAYER(getOwnerINLINE()).getGold() > unitHealCost)
		{
			changeDamage(-(healRate(plot())));
			GET_PLAYER(getOwnerINLINE()).changeGold(-unitHealCost - 1);
		}
	}	
}
// Vincentz Healing end

Also considering adding the "xUnit have healed y% at z Gold cost" into the combat log. Spam or useful info?

edit:
added a isHurt check for AlwaysHeal (March promotions) in doTurn:
if (isAlwaysHeal() && isHurt())
 
I'm strongly considering 2 things regarding rangestrike:
1) If cities have citywall and/or castle the rangestrike is softened same way as bunkers protect from planes and bomb shelters protect from nukes.
2) return fire when bombarding, so if there is rangestrikers inside the city they return fire at units bombarding the city.
pros and cons?
 
I like both ideas actually.

Additionally, I'm also a firm believer in defensive artillery.
 
Additionally, I'm also a firm believer in defensive artillery.

Defensive artillery?

-----
Part one was pretty easy:
PHP:
	if (pPlot->getPlotCity() != NULL)
	{
		iDamage *= 100;
		iDamage /= std::max(0, (pPlot->getPlotCity()->getBuildingDefense() + 100));
	}
If city have walls its -25% and another -25% if have castle to a total of -50% damage by rangestrikers (should it be another -25% from Bunkers?)

Second part is... tomorrow. Its gettin late here ;)
 
I'm not sure what the name of the modcomp is ( it's in ROM AND 2),
But a sentried range unit gains 1st strike vs opposing range units attacking the city.

I'll see if I can find the name of the mod comp and give you better details.
 
I'm not sure what the name of the modcomp is ( it's in ROM AND 2),
But a sentried range unit gains 1st strike vs opposing range units attacking the city.

I'll see if I can find the name of the mod comp and give you better details.

not a bad idea. what if sieges in towns got 1 extra bonus range, to justify they have been put in fortified defensive positions.
Could add it to Forts as well. Would make them a bit more interesting.
 
That's fairly close to what the modcomp does. I'm at work until tonight, so try to find the name of it when off shift. Love what you been doing bro, great work.
 
Both forts and cities now give 1 extra range to land rangestrikers (not ships or planes)

CvUnit::canRangeStrikeAt
PHP:
	int rangestrikeRangechange = 0;
	if ((plot()->isCity(true, getTeam())) && (getDomainType() == DOMAIN_LAND))
	{
	rangestrikeRangechange += 1;
//		changeExtraAirRange(1);
	}

	if (plotDistance(pPlot->getX_INLINE(), pPlot->getY_INLINE(), pTargetPlot->getX_INLINE(), pTargetPlot->getY_INLINE()) > airRange() + rangestrikeRangechange)
	{
		return false;
	}
 
My cities have a lot of unhealth, with only disadvantage of growing a tiny bit slower.
I'm thinking about adding a random Pollution terrain-feature based on the level of unhealth, removable by workers. Formula something like :

If Random#1-100 < unhealth then a tile in BFC without terrain-feature will have Pollution added.

It shouldnt imho happen too often (chance is pretty slim) so it becomes annoying, but often enough to see the consequences of bad health.
Effect of Pollution : -:food::food::hammers::hammers::commerce::commerce:

Pros/Cons?
 
Regarding health; add a health unit similar to C2C, or perhaps another health building?

Found the name of the modcomp for the arty, it's DCM. The specific tag lines are opportunity fire and range strike.
 
Yup, I remember DCM. It had its shortcomings though, which is why I made Vincentz Rangestrike. Iirc the AI wasnt very good at using it.

Changed Bombarding to be random damage og random hitchance.
Damage is 1-100% of normal damage
Hit chance is : if Random 1-100 < Units Bombardrate + BOMBARD_HIT_CHANCE (from GlobalDefinesAlt.XML, Default is 50)

XP is only given if Damage is > 75% because the sieges would just get too much XP before.

I'm trying to find a solution to balance the rangestrikers (especially sieges) as they dont get any damage if attacking a non-rangestriker, so its easy to bring 20+ sieges and just hammer the units to pieces before attacking.
Solutions:
A) Rangestrikers are "worn" when shooting (either fixed damage applied to rangestriker when attacking or chance of damage applied)
B) Ammo cost gold (there is a fixed gold cost for shooting a rangestriker, could be scaled with later units)
C) Rangestrikers use TONS of movement points when rangestriking (it need to set up a firing base, adjusting fire for effect etc etc)
D) ?
 
PHP:
<!--HANDICAP FOR WHEN OUR COMMERCE IS BIGGER THAN THEIR COMMERCE -->
	<Define>
		<DefineName>HANDICAP_MODIFIER</DefineName>
		<iDefineIntVal>50</iDefineIntVal>
	</Define>

New modifier for when its going "a bit too good".
Kicks in when Our total yield commerce is better than the best AI. From there any commerce processed will be halved (50/100), where 50 can be adjusted in... yup, you guessed it, GlobalDefinesAlt.xml :D

Spoiler :
Only affects Research and Gold, not Culture and Espionage.


added to CvPlayer::calculateGoldRate() and calculateResearchRate
PHP:
//Vincentz Handicapper
	int PlayerCommerce = 0;
	int iBestValue = 0;
	int iValue = 0;
	int iI = 0;
	
	for (iI = 0; iI < MAX_PLAYERS; iI++)
	{
		if (GET_PLAYER((PlayerTypes)iI).isEverAlive())
		{
			iValue = (GET_PLAYER((PlayerTypes)iI).calculateTotalYield(YIELD_COMMERCE));
			
			if (GET_PLAYER((PlayerTypes)iI).isHuman())
			{
				PlayerCommerce = iValue;
			}
			else
			{
				if (iValue > iBestValue)
				{
					iBestValue = iValue;			
				}
			}
		}
	}

	if (iBestValue < PlayerCommerce && isHuman())
	{
		int PlayerCommerceModifier = ((PlayerCommerce-iBestValue) / (GC.getDefineINT("HANDICAP_MODIFIER")/100));
		iRate -= PlayerCommerceModifier;
	}		
//Vincentz End

edit:
Looking at the code again, it will probably break Multi-Player with the check only to see if human. Prolly need some actiiveplayer check as well. Later though.


Didnt work very well in calculateGoldRate() and calculateResearchRate as python (which shows the values on screen) is going deeper, so depper and deeper i went (3-4 layers), but research still wasnt showing correcly.
So in the end I ended in CvCity::updateCommerce, which isnt optimal regarding speed as the handicapper now works on city level instead of Total level, but meh, its turn based, whats the hurry. ;)

Also, now it works on all commerce types.

CvCity::updateCommerce
PHP:
//Vincentz Handicapper
	int PlayerCommerce = 0;
	int iBestValue = 0;
	int iValue = 0;
	int iI = 0;
	
	for (iI = 0; iI < MAX_PLAYERS; iI++)
	{
		if (GET_PLAYER((PlayerTypes)iI).isEverAlive())
		{
			iValue = (GET_PLAYER((PlayerTypes)iI).calculateTotalYield(YIELD_COMMERCE));
			
			if (GET_PLAYER((PlayerTypes)iI).isHuman())
			{
				PlayerCommerce = iValue;
			}
			else
			{
				if (iValue > iBestValue)
				{
					iBestValue = iValue;			
				}
			}
		}
	}

	if (iBestValue < PlayerCommerce && isHuman())
	{
		int PlayerCommerceModifier = (PlayerCommerce - ((PlayerCommerce-iBestValue) * (GC.getDefineINT("HANDICAP_MODIFIER")) / 100));
		iNewCommerce *= PlayerCommerceModifier;
		iNewCommerce /= PlayerCommerce;
	}		
//Vincentz End


edit:
memo to self : need headUnit for Rangestrikers as it calculate range per tile and not active unit, which makes a range 1 unit able to range 2 if grouped with a range 2 unit.
 
A couple of changes:
Fixed the Espionage Evasion Promotion, so it works properly now instead of giving full immunity.

Changed espionage "Return to Capital" to the spy is now staying on tile, THOUGH he will get "locked" on tile for a number of turns depending on difficulty of mission. The lock is a minus to movement points, so giving the spy Movement Promotion will reduce the waiting time.

Changed Loading of units, so its no longer possible to load a unit that have 0 or less movement points.

Land Rangestrikers use movepoints equal to their max, Sea Rangestrikers use 5
 
Thank you.

And Hellooooo to you and Family! :)

JosEPh
 
Back
Top Bottom