What happens when you run out of PW?
Announcement
Collapse
No announcement yet.
SAP2 AI V's other mods AI
Collapse
X
-
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
-
I think it won't be easy to balance where it hinders the human but not the AI.
I'm not convinced it will even the odds either, but it depends on the AI bonuses.
Also, it will probably cripple early-game warfare, and the barbarians will have a field day. I use almost all of my early-game PW in farms.
It'll certainly be interesting to see how it affects play.Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Comment
-
Originally posted by Immortal Wombat
I think it won't be easy to balance where it hinders the human but not the AI.
I'm not convinced it will even the odds either, but it depends on the AI bonuses.
"We" -- Easy for me to say, since I'm not a SLIC coder!"...your Caravel has killed a Spanish Man-o-War."
Comment
-
Peter, Player1 wrote this.
What oyu think?
[code]
////////////////////////////////////////////////////////////////////////////
//Infrastructure SLIC v1.01
//
//This code fixes AI bug in which AI players, when trying
//to use Infrastructure or Capitalization, leave build queue empty.
//It detects cities with empty build queues and gives them
//15 per city pop PW and 10 per city pop gold bonus,
//lowered by PW tax percent value.
//
//Example:
// City size 28, PW tax 20%
// gives 28*15*(1-0.2)=336 PW and 28*10*(1-0.2)=224 gold bonus
//
// by player1
////////////////////////////////////////////////////////////////////////////
Code:HandleEvent(AIFinishBeginTurn) 'Infras' post { if(!IsHumanPlayer(player[0])) { // not human int_t i; int_t my_tax; //PW tax int_t my_pw; //toloal PW int_t my_capit; //gold from cities int_t my_infras; //PW from cities city_t my_city; player[0] = g.player; my_tax = player[0].publicworkstax; for(i = 0; i < player[0].cities; i = i + 1) { GetCityByIndex(player[0], i, my_city); if (!my_city.buildqueuelength && (HasAdvance(player[0], ID_ADVANCE_MASS_PRODUCTION) || HasAdvance(player[0], ID_ADVANCE_GLOBAL_ECONOMICS))) { my_infras = my_city.population * 15 * (100 - my_tax) / 100; my_pw = player[0].publicworkslevel; my_pw = my_pw + my_infras; SetPW(player[0], my_pw); //add pw my_capit = my_city.population * (100 - my_tax) / 10; AddGold(player[0], my_capit); //add gold } } } }
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Comment
-
Personally, I didn't mean for this to sound like its a problem on my part, because it is not. I've always looked at it as an AI civ's "strategy" more than a game flaw because every civ doesn't play that way. As Dale alluded to, it makes sense that the civs that have been at war (for a few thousand years sometimes) and sent huge stacks of troops all over the land mass pay the price in the end with poorly defended cities. And it makes sense that civs that are mostly peaceful are, as a rule, smaller but well defended. To me this is balanced. Plus I get a great deal of satisfaction from punishing aggressive civs in the end that tried to wipe me off the map at the start.
I'm not sure if a larger Army should be economically penalized. Large armies, especially at war, are actually good for the overall economy (the so called "War Time Economy"). And even in peace time where large armies directly drain government budget, the actual military personnel themselves put a great deal back into the country's coffers because of their unusual amounts of disposable income."Guess what? I got a fever! And the only prescription is ... more cow bell!"
Comment
-
Originally posted by TheArsenal
Personally, I didn't mean for this to sound like its a problem on my part, because it is not. I've always looked at it as an AI civ's "strategy" more than a game flaw because every civ doesn't play that way. As Dale alluded to, it makes sense that the civs that have been at war (for a few thousand years sometimes) and sent huge stacks of troops all over the land mass pay the price in the end with poorly defended cities. And it makes sense that civs that are mostly peaceful are, as a rule, smaller but well defended. To me this is balanced. Plus I get a great deal of satisfaction from punishing aggressive civs in the end that tried to wipe me off the map at the start.
I'm not sure if a larger Army should be economically penalized. Large armies, especially at war, are actually good for the overall economy (the so called "War Time Economy"). And even in peace time where large armies directly drain government budget, the actual military personnel themselves put a great deal back into the country's coffers because of their unusual amounts of disposable income.
Comment
-
Pedrunn,
I think that must be an early version. Here's the version from SAP:
Code:// // pw_cheat.slc // by player1 // ver 1.01 // // gives 5 gold per global pop evry turn, // gives 0-20 PW per global pop evry turn (depending of PW tax) // for AI players only // HandleEvent(BeginTurn) 'PW_Cheat' pre { int_t my_tax; int_t my_pop; int_t my_pw_level; int_t my_pw_points; int_t my_gold; if(!(IsHumanPlayer(player[0])) && (player[0] != 0)) { // not human my_tax = player[0].publicworkstax; my_pop = player[0].totalpopulation; my_pw_level = player[0].publicworkslevel; my_pw_points = my_pop * my_tax / 5; my_pw_level = my_pw_level + my_pw_points; SetPW(player[0], my_pw_level); //add pw my_gold = my_pop * 5; AddGold(player[0], my_gold); //add gold } }
I'm a bit dubious about the 'Infras' handler: I guess it works but I don't like the line "player[0] = g.player;" There's already a player[0] here, the AI player who's finishing his BeginTurn. I don't even know what that line does (if anything) in this context. I think you'd only want to do something like that in the very special circumstances where you're triggering on the UI: g.player will be the obviously human player who pressed the button and then when player[0] gets a value you can access the other members of the player array (like, player[0].militaryunits).
Another thing is that it doesn't actually solve the problem: there's a BuildListElement Infrastructure which you can find in some of the BuildListSequences but it doesn't seem to work. I say this because i) in Cheat mode I've never seen the AI civs using infrastructure, ii) if I put my cities under mayor control where they use those BuildListSequences, I've never noticed them go to Infrastructure, and iii) I can't construct a custom buildlist that contains Infrastructure.
So, when I said the AI doesn't use infrastructure, I should have said "yet". IMO, here's a better solution. Create a dummy building with a huge production cost and a BuildingBuildlist that contains only it:
IMPROVE_QUEUE_INFRASTRUCTURE {
DefaultIcon ICON_IMPROVE_INFRASTRUCTURE
Description DESCRIPTION_IMPROVE_INFRASTRUCTURE
EnableAdvance ADVANCE_SLAVE_LABOR
ProductionCost 100000
Upkeep 0
}
BUILDING_BUILD_LIST_QUEUE_INFRASTRUCTURE {
Building IMPROVE_QUEUE_INFRASTRUCTURE
}
Code:HandleEvent(CityBeginTurn)'InfrastructureWorkaround'pre { int_t cityPW; int_t playerPW; if (IsBuildingAtHead(city[0])== BuildingDB(IMPROVE_QUEUE_INFRASTRUCTURE)) { cityPW=100000/city[0].buildingtime; player[0]=city[0].owner; if (IsHumanPlayer(player[0])){ cityPW=(500*cityPW)/1000; } playerPW=player[0].publicworkslevel; SetPW(player[0], playerPW+cityPW); Event:ZeroProduction(city[0]); if(AtWarCount(player[0]) && !IsHumanPlayer(player[0]) ){ // if at war, stop AI queueing ClearBuildQueue(city[0]); } } }
And now you can use the above BuildingBuildlist in any of the BuildListSequences that you want. It allows a considerable simplification in them. For example, here's the Science BuildListSequence I'm currently using:
BUILD_LIST_SEQUENCE_SCIENCE {//scientist: Top 0.3 ProductionCities, others Top 0.1 ProductionCities
BuildListElement { BuildingBuildList BUILDING_BUILD_LIST_SCIENCE }
BuildListElement { BuildingBuildList BUILDING_BUILD_LIST_PRODUCTION }
BuildListElement { BuildingBuildList BUILDING_BUILD_LIST_GOLD }
BuildListElement { WonderBuildList WONDER_BUILD_LIST_SCIENCE }
BuildListElement { GarrisonUnitBuildList }
BuildListElement { AllUnitBuildList }
BuildListElement { Freight }
BuildListElement { BuildingBuildList BUILDING_BUILD_LIST_GROWTH }
BuildListElement { BuildingBuildList BUILDING_BUILD_LIST_HAPPINESS }
BuildListElement { WonderBuildList WONDER_BUILD_LIST_GOLD}
BuildListElement { WonderBuildList WONDER_BUILD_LIST_HAPPINESS }
BuildListElement { BuildingBuildList BUILDING_BUILD_LIST_QUEUE_INFRASTRUCTURE }
}
As far as large armies go, I agree with The Arsenal, although not for the reasons he put forward. IMO, the AI needs LOTS of military units before it will do anything really interesting.
Comment
-
Originally posted by Pedrunn
Peter, Player1 wrote this.
What oyu think?
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
-
Code:cityPW=(500*cityPW)/1000;
Code:cityPW=cityPW/2;
Peter, any clues on when CtB will be out?Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Comment
-
Originally posted by Peter Triggs
Pedrunn,
I think that must be an early version. Here's the version from SAP:
This just gives each AI player a gold and PW bonus based on their population. Either player1 or Dale must have simplified it.
Originally posted by Peter Triggs
I'm a bit dubious about the 'Infras' handler: I guess it works but I don't like the line "player[0] = g.player;" There's already a player[0] here, the AI player who's finishing his BeginTurn. I don't even know what that line does (if anything) in this context. I think you'd only want to do something like that in the very special circumstances where you're triggering on the UI: g.player will be the obviously human player who pressed the button and then when player[0] gets a value you can access the other members of the player array (like, player[0].militaryunits).
Originally posted by Peter Triggs
Another thing is that it doesn't actually solve the problem: there's a BuildListElement Infrastructure which you can find in some of the BuildListSequences but it doesn't seem to work. I say this because i) in Cheat mode I've never seen the AI civs using infrastructure, ii) if I put my cities under mayor control where they use those BuildListSequences, I've never noticed them go to Infrastructure, and iii) I can't construct a custom buildlist that contains Infrastructure.
Originally posted by Peter Triggs
You'll get a chance to see more of this in my forthcoming mod, "Call to Bloodlust", which uses SAP as a base.
Originally posted by Peter Triggs
As far as large armies go, I agree with The Arsenal, although not for the reasons he put forward. IMO, the AI needs LOTS of military units before it will do anything really interesting.
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
-
Originally posted by Martin:
I hope you took a look on my GoodMod
I would like to switch to your new DiploMod Peter, so is it now in a stage ready for use.
That's the reason why I made this better AI slic file that groups the AI stacks and moves them into transports, you can see the results in the tournerment game, unfortunatly only in the late game, when the capacity of the transports increases
Originally posted by IW:
Peter, any clues on when CtB will be out?
Comment
-
That's interesting, I've tried increasing the capacity of transports right from the beginning but still the AI won't use them. It looks like there's no way out except by doing it with SLIC.
But seriously, one game I had an AI naval invade me using transports, escorts and landed infantry and tanks. FOUR TRANSPORTS FULL!
Comment
-
Originally posted by Dale
I dunno. I've found the AI makes decent use of transports in WAW. The amount of times I've been naval invaded in WAW has surprised me. And I don't mean invaded by one unit. There was this one time at band camp...... Just kidding.
But seriously, one game I had an AI naval invade me using transports, escorts and landed infantry and tanks. FOUR TRANSPORTS FULL!
So far I thought it is possible to improve the AI just by modifying the text files. So I used slic to stack the AI units that hand an effect, it looked that the problem was that the AI didn't stack it's units. So I did this the next problem was that I found settlers in these stacks, so next stage sort the armies. Ok this was done then I discovered the AI would restack the settlers, so then they had to leave the stack. Another thing was that you shouldn't do it in a city. So I reduced the stack size in cities to allow the AI to produce new units. Then I didscovered that all the transports were empty, because the stack size was too big, so a ship loader was neccesary. So when ever now a ship comes to the cost and there is a huge stack then I will move all the units into the transport, but only if I can move into the transport more than four units or I can fill the transporter and the stack is on homeland. you can see the results in the tournerment thread were I posted a screenshot with an invasion, the AI used a stack of transporters no escorts, because it needed a deep water ships for the escorts and these one weren't available at that point.
For the better AI slic I recommend the version I posted in the tournerment thread. That is a debugged version with DebugSlic=Yes.
In the last tournerment with ApolytonPack I had more then 1000 years war with the Romans and all what I saw was some greek fires pillaging my cost, no invasion, even with one unit nothing.
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
Comment