• 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.
Showing developer posts only. Show all posts in this thread.
Ah I see, now looking at that block in the building file. That's quite clever.

Still, it looks like it works with resources only? and wouldnt work on non-resources? Like:
  • trade value
    • looks like commercial buildings get around this by taking the EC equivalent of TV output when telling the ai what to do?
    • but it does not look like they take alternative trade conversion types in to account (... actually, does the AI ever use the consumer goods, unity or trade-federation trade-conversion types?)
    • View attachment 799732#=my own comment
  • or fleet capacity?
    • Unless I make a dummy/hidden fleet cap resource for AIs to track/mirror fleet capacity output from starbases and strongholds, ordering the AI to target X amount of mod_dummy_fc and inserting this as a ai_resource_production block in to strongholds/naval yards, too - which sounds horribly bug-prone even just typing the idea out.

I told the AI to start using the consumer goods trade policy in this patch since i think it's vastly superior.
There should be a way to check how much trade value is making in script ( i think ).

The AI will estimate what the building is doing by taking their trade policy into account. So IF they have enabled the consumer goods conversion policy it can understand that making a trade based building will give it consumer goods.

You would not be able to add fleet capacity into the AI economic plan and have them follow it without changing the code, all the non resources like amenities, housing and admin cap were added manually in code to make them work.

AI is building fleet cap by spending its alloys according to the priorities laid out to it, but it is not part of the economic plan
 
  • 3
  • 2Like
Reactions:
Is this also going to be the automatic resettlement behavior for player-controlled empires?
This is just using the normal mechanics of the game. Unemployed pops have a chance each month to move to other planets that have jobs and housing for them
 
  • 3
Reactions:
Very good changes. The custodian team is really a bless for this game.

I think I can assume you are gonna fix the other AI modules, right? The military AI, the diplomacy AI and such of the Normal empires after you fix the economic AI.

Do you think it would be better to create these generic AI solutions for the Fallen Empire? Specially the Awakened Empires, they basically work just like any normal empire, they just have special tools like different ships and behaviors.

Can you use your AI for their economy...? So they can build, research, get unity and traditions, conquer and develop planets, etc... I'm pretty sure it will help them a lot, specially after fixing the military AI.
Hmmm, I would have to go check with some others how it is intended for them to operate once they awaken. They should be able to use the normal economy plan and the AI improvements. Just would have to make sure it is enabled for them and also double check how they are intended to work.
 
  • 3Like
  • 3
Reactions:
I think I can speak for everyone here when I say that it's nice to have an actual conversation with a (definitely human, not a shadow of a doubt here, move along) dev for once, so thank you for the time invested.

As it happens, if you go back to my post you'll see that the link I posted is to a bug report. Unfortunately, I suspect that the team's living standards had accidentally been switched to Chemical Bliss when I posted it, so no one paid attention. Therefore it's appreciated if you can help it surface towards the top of the pile since it would complement your changes so well.

Here's the link to the bug report again, a save is joined to my second post in that thread: https://forum.paradoxplaza.com/foru...-take-into-account-production-bonuses.1505476
I like icecream.

I can have a look. The thing with the job weight is that it is pretty hard to make it work perfectly as usually when you change the weights, something else then breaks somewhere else due to there being such an insane amount of combinations of different traits that should all work "optimally" together.
 
  • 3Like
Reactions:
A question that may be out of contest there .

what happens when building military ships cost something that is not alloys\special resources? ... i ask because it seems that any mod that give any part that add food-minerals-energy to the ship cost , make the AI stop building them ... but i know colony ships may have different resources costs and crisis ships cost minerals and the AI regulary build them with no problems.

i mean.. the answer is probably "its a beta and you play mod with it? " . but... well i trowed the question .

You have to add these resources to AI ship upkeep budget, here is a special budget for AI using become the crisis AP to allow them to build ships with minerals:

Code:
minerals_upkeep_ships = {
    resource = minerals
    type = upkeep
    category = ships

    potential = {
        has_ascension_perk = ap_become_the_crisis
        has_crisis_level = crisis_level_2
    }

    fraction = {
        weight = 0.3
    }
}

But if your mod does this for all ships all the time then you have to make a general budget for it that is always active
 
  • 5
Reactions:
You can fix a ton of problems with AI decisions without going minmax. Sure, a lot of stuff is begging for minmaxing because the game balance is busted (missiles suck; long range alpha strike is king, weapons that do too much damage don't allow a retreat chance, etc; it gets better sometimes e.g. with strike craft being viable now, but it's not there yet). However, there's also a lot of choices that are just clearly dumb such that it's immersion-breaking to see in a game because only artificially stupid players would ever do them. For example, disrupters being mixed with non-penetrating weapons is a constant problem that really needs to be addressed.

In fact, if anything I'd say the AI's problem is sometimes that it does minmax, and is just extremely bad at it. For example, going 100% one weapon type is sometimes justifiable when that weapon is extremely good with no real downsides (looking at you, Neutron Launcher), or even necessary when the weapon doesn't synergize with anything but itself (disruptors), but it's extremely stupid to do it with e.g. autocannons or plasma, given how trivial they are to counter. Going 100% on a single defense is similarly bad.

It's one thing to say "the AI favors certain offense/defense/etc. types", and honestly that's mostly OK as long as they aren't missiles (which are usually much too easy to counter right now; either bump their ability to penetrate PD or make swarm missiles both better and more likely to be used against PD/strike craft), but it should be implemented as "the AI prioritizes picking techs and hulls for those weapons" and "all else being equal, the AI uses those weapons preferentially". It should not mean any of:
  • The AI favors their preferred weapons even when they are significantly worse, due to tech that the AI player has, than alternatives.
  • The AI splashes a little of their preferred weapon type into ships, or even fleets, where it has no synergy and basically wrecks their effectiveness (see: disruptors).
  • The AI exclusively using kinetics (even assuming that their kinetics are better than any other weapon tech they have!) after their opponent switches over to exclusively using armor, or similar "optimize for failing against enemy defenses" situations.
  • The AI ever exclusively uses kinetics or laser/plasma except in response to an enemy being equally stupid with their defensive mix first.
  • The reverse of the two items above, for AI defense choices.
Instead, what I'd really like to see:
  • AIs that like penetrating weapons start designing their whole ships around them earlier than otherwise (this probably still doesn't mean "in the first 50 years", though, when hulls are strong but shields and armor suck! And it definitely doesn't mean "throws a disruptor onto an otherwise conventional-weapon ship!")
  • AIs that like particular offense/defense mixes preferentially pick fights with other AIs whose preferences are weak to their own, and try to make nice with the ones their preferences are weak to.
  • AIs that favor strike craft absolutely rush cruiser/battleship tech, and mostly don't build smaller hulls anymore (perhaps actually disband smaller hulls) once they get it.
  • AIs that favor shields prioritize reactor tech as well, since that's usually the limiting factor in how shielded a ship can be, while AIs that favor armor care less (but not much less) about reactors.
  • The AI needs to stop putting swarm computers on ships already at their evasion cap, or picket computers on ships that already have 90+ tracking on their weapons (e.g. autocannons + sensors).
  • AIs optimizing not just their offense/defense mix choices but also their hull/section choices for effect against their enemy. Go high-evasion or battleships-with-big-guns when the enemy brings the low-tracking guns, and vice versa; don't ever bring big guns to a fight against missile corvettes, or carrier battleships / missile corvettes to a fight against artillery battleships.
  • AIs in general picking hulls sections that make sense for their offensive and defensive techs. I think (hope) that we're past the day of battleships sporting spinal bows with empty X slots because they didn't want to put a lance but didn't have anything else, but it gets more subtle than that too. If you have all three hull upgrades (cost&time, 2x hull strength) for corvettes and none of them for destroyers, you probably shouldn't use destroyers yet! If you insist on going missile-heavy, you should skip building destroyers entirely - including de-prioritizing all destroyer hull upgrades - unless you have the Menacing variant.
  • Picking ship sections that make sense at all. Picket bows and non-picket sterns on destroyers is literally never a good combo; one S is never going to out-DPS two P and every other arrangement is strictly worse. Using one long-range section and then a bunch of short-range ones is pretty much always bad too, especially if you then use a long-range computer such that the short-range sections are just dead weight against long-range enemies.
Obviously, the balance stuff is not your wheelhouse (although I'd appreciate it if you poked the rest of the team about some of the dumber stuff, like picket bows being 3/4 the efficacy of the other types). However, making the AI act logically within that balance is something you can definitely do, and it doesn't require being perfectly optimal so much as just not being blatantly stupid, and especially not trivially exploitable.

There are many good points here.

The easy answer here is just time and priority. AI not making great ship designs is definitely something I know about and want to fix, but the general economy and then general control of their fleets are bigger issues, and then at some point down the line comes ship design.

One step at a time
 
  • 14Like
  • 1
Reactions:
Shiftclicking and designation switch should both fixed on the internal build now :)
BTW this can also happen when a colony designation changes (destroys & creates) a lot of jobs at once, like if I change from Industrial -> Forge and then 20 Artificer jobs disappear and 20 Metallurgist jobs appear. In previous versions those 20 pops were able to immediately become employed.


Honestly I'd be happy enough if the AI were able to RP with its ships, for example if it was all "I like kinetics" and all its designs predominantly used kinetic weapons, that would be fine with me.

Missiles / Strike Craft / Disruptors would need some special handling since they don't fit in every hull, but I bet you can make me as the player feel the AI's preference even with that hurtle.
 
  • 4Love
  • 1Like
Reactions:
Found another place that it happens:

View attachment 800389
^^^ that is BEFORE a Commercial Zone got replaced by a Research Lab

View attachment 800390
^^^ this is the day after the CZ got replaced by the RL


View attachment 800391
^^^ This is the next month roll-over.


Note that there are no unemployed Specialists, but those former Clerks just don't want to put on the diving suits.
This belongs in the bug report forum, upload the save game there and I will try it tomorrow if it works or not with the other bug fixes that are already in place
EDIT: Haven't seen this one before so ty, but question, if you just unpause the game and let two months tick by do they go back to work or stuck there forever?
 
  • 2Like
Reactions:
Understood, and thank you.

My feeling is that a pure weight system will indeed always be broken somewhere.

It's needed because it's the only way to compare things that can't be expressed into a common unit or currency. For example, how else would you decide if it's better to assign some race to soldier jobs because it has the Very Strong trait, or to technician jobs if it also happens to have a trait for 15% extra energy production.
Or how do you decide whether to assign a soldier position to the Very Strong race at the expension of a specialist job it could work, or the Servile race which won't make as good a soldier but would free up the other pops to work as a specialist.

(Side-note, perhaps shortages of specialists should be taken into account into the weight computation? At least in slaver empires, those tend to be always in shortage.)

On the other hand, the weight system ends up completely occulting the raw data of whether the overall resource production has been optimized. That's why after the weights have done their job you could bring back the raw economic data to have a last pass that only affects pops that could be freely swapped without inconvenient to optimize their resource output. The prerequisite would be to remember whether pops have a "reason" other than raw resource output to be there. i.e. "I'm a soldier because I was picked for being Very Strong" vs "I'm a soldier because I was eligible to work any menial job and just happened to be picked, feel free to swap me with someone else".

Until that system is perfected (which is unlikely, as you yourself pointed out), I think giving back some manual control to the player is really needed, at least at the race level. These are some user stories, which can obviously translated into a variety of UI systems:
  • "I want to globally disable clerk jobs" (I'd settle for being able to do it race by race)
  • "Yes I know that my main race is Very Strong but I still want the Servile race to always take soldier jobs if possible."
    • Alternate rule with somewhat similar result: "I want my main race to always prioritize specialist jobs"
  • "This race of robots should always take technician jobs in priority"
  • If amenities are higher than 10, this Domestic Servitude race should prioritize relocating to planets with open jobs. (Instead of piling up more servants on the same planet needlessly.)
Is this getting completely off-topic? My hope is that as an AI programmer you can exert some push-back on the game designers to respectfully inform them that the jobs AI will never (or not in any reasonable time frame) make it to a point where it can completely replace player decisions, and that they need to give the player some control.
If anything this is more of UX design. The job system isn't even part of the AI at all really. The only thing that the AI now does with the job system is to down prioritise jobs manually when they have too many amenities on a planet.

Adding some player choice for which species should work which job would be cool. This is what the weights are supposed to do but I like the idea of giving the player control if they want to go in and tweak it themselves
 
  • 1Like
Reactions:
Mhm, there does seem to be a fairly low incidence of dev responses to bug reports. Counting, it looks like 9 of my 48 reports have been flagged as either Confirmed or Duplicate, with the other 39 recieving no response.

That 18.75% acknowledgement rate is a bit disheartening and has definitely impacted my report rate, especially for the bugs I can fix myself in less time than it takes to write out a report.
We've been a bit quiet on the forums as of right now our focus is on our internal bug backlog. A good chunk of said issues are duplicated by posts on the forum.

We're moving focus now and will be doing a forum pass to make sure we didn't miss anything that the community has reported.
 
  • 6Like
  • 6
Reactions:
Can I provide a suggestion? The problem with ascension perk and AI never completing its species ascension is that, when they unlock their perk slot, they usually don't have the technology required to pick the perk itself, and always end up picking all 8 perks including suboptimal one before they can choose the last ascension perk. It is the same problem for Galactic Wonder and Master Builder too since they can hardly complete the condition to get them before they have the last empty slot.
So, please add weight for "not picking any perk" and run that every 6 months to not impact performance. The weight for "not picking any" will be impacted by all picked ascension perks, available tech options, and researched tech options.
For example, if the AI got the synthetic tech option and has already taken cyborg perk, it will greatly prefer saving its ascension slot for synth ascension. And if a materialist is on their 2nd perk, they will lean toward waiting for "the flesh is weak" than immediately picking something. And if they already have colonial centralization they will be more likely to wait for droids instead of picking "executive vigor" immediately (lol they did that, believe me).
And, if AI is having a ruined megastructure within their border, they will certainly leave their last slot for Galactic Wonder. After all, if they have enough alloy they should start to build megas anyway, so why leave behind one of the strongest perks in the game?

Makes sense.

After the DD i went in and adjusted some of the AP and traiditon tree selections. Among one thing I made it much more likely that AI will finish their ascension path if it is available.


How fast traditions are finished is now quite a bit different compared to 3.2 with the addition of the high tradition tree adoption cost from sprawl. If it continues to be a problem that the AI picks too many APs outside of what would make sense for them, adding the option to wait for another perk they want more could be a solution.
 
  • 4
  • 1Like
Reactions:
Interesting. Did you teach AI to handle disabled buildings while you're at it? or is it still beyond their understanding?
AI can repair buildings, if the requirements are right. But I haven't see any support for enabling/disabling buildings.
Are you thinking about when AI takes a planet from the player which has disabled buildings on it?
 
  • 2
Reactions:
Does this mean that we can look forward to no longer manually disabling enforcer jobs on every habitat, especially for Void Dwellers, to avoid the ~5% production loss of wasting about 1/20 pops to prevent "crime"?
Pops will still work any open job as a last resort compared to being unemployed.

You could probably go in a mod it yourself to give a negative job weight for the job if the crime is below some threshold to force the pop to be unemployed.

This subject is quite tricky as I think a large number of players would think it was a bug if their pops would refuse to work jobs under some circumstances even though it may make sense for experienced players
 
  • 3
  • 1Like
Reactions:
Does the ai now keep their dificult bonuses while vassalised, as currently the scion start for ai is just bad on higher dificulties.
We didn't change this. This has come up a few times in discussions between me and Guido.


I think this was put in for good reason so I would have to try and find out why it was done in the first place before removing it
 
In the beta I've seen an AI with a Holo-Theatres building but all entertainer jobs disabled, so it's wasting energy on building upkeep. Before the beta I saw a case where an AI who hadn't researched Robotic Workers yet gained control of a planet with a Robot Assembly Plant but kept it running, throwing away energy and alloys without building any robots. If the AI could disable Robot Assembly Plants you could remove the Cease Robot Assembly decision. Disabling buildings is also useful when a planet is depopulated and can't fill their jobs yet, often due to purging. You could also allow the AI to build Planetary Shield Generators during the Gray Tempest or Unbidden and disable them when the planet doesn't have bombardment.
AI will forbid amenity jobs if they have already way too many amenities, so its possible they did something like build the holo theatre and then ugpraded the capital building and then temporarily forbid the entertainer job due to having too many amenities. Usually they go back to work when the needs for amenities go up again.

Personally I don't really fancy the AI using the cease drone production at the moment, I would much rather have them resettling the robots to new worlds and creasing drone production would be done on an empire wide level instead if they managed to completely run out of space.
 
  • 1Like
Reactions:
When every system is marked as chokepoint so the AI tries to build bastions to fortify the borders you are really messing with the it. I play with the lowest value for hyperlanes and a fortress can hold an attack for years, because in some cases the planet will break before the guard
And the AI would stil be much stronger if it had fortress worlds after the midgame, more fleet cap = more fleet at the start of the war.




Yes i am running the new beta version. It was mentioned that tha AI is able to interchange districts on planets for specializing (and it looks decent honestly), but their ecumenopolis is stil undermaintained. An ecumenopolis can free up a decent amount of planets for other use and resource production. But an industrial district on a planet is technically not the same district as one on an ecumenopolis or habitat or ringworld. I dont know if the AI is able to interchange these sub groups of districts.

It also seems that the AI can not use the general industrial planet designation, which could be a good pick for a planet after war in transition times or for boxed in small empires in general.

The new AI logic will probably not work for ecumenopolis and normal planets. The logic is that it compares two planets that both have district A and B and then switches places. The AI would probably need several ecumenopolis worlds to start specializing them as their industry district is different from the industry district on normal worlds.

The AI will not (as it is now) demolish industrial district on their normal planets in order to rebuild them and move pops to the ecumenopolis
 
  • 3
  • 1Like
  • 1
Reactions:
I have just finished fighting a war with an AI that felt like it had built too many Bastions. If it had spent those starbases on Anchorages and Shipyards, maybe it would have fared better in the war.

(Obligatory disclaimer: I play on max hyperlanes, which I suppose might be messing with its brain.)

It is possible that there is some issue with it. I went over the AI starbase template code/script as was mentioned in the dev diary (I think). Overall we gave the AI fewer bastions and more anchorages. But as you say its possible the hyperlane settings are interfering with it.

Have you seen the same issue with normal settings?