Using both FactoryOwners+FactoryOwners.Forbidden

Registered by FELITH

Hi... again ;)
I just got back into modding this game after quite a while.

edit: 2019-10-22 I misunderstood the documentation a bit so I will summarize the conclusion short (the misunderstood is moved to the whiteboard below)

- I suggest FactoryOwners.Forbidden to be a list of countries of which if own any of their factory the test will fail... instead of a list for the inverse FactoryOwners countries as of now.
- the tags' logic should be using OR instead of AND. it's more flexible.

this needs migration for those who used FactoryOwners.Forbidden.
to do so, inverse the list of countries in FactoryOwners.Forbidden and change the tag to FactoryOwners

edit: 2019-10-28
Ares 0.6 FactoryOwner code:
My attempt to code this suggestion (not sure if it will work tho):

Blueprint information

Not started
Needs approval
Series goal:
Milestone target:

Related branches



----------------noted: when I typed below keep in your mind that I understood the documentation from "the player has any factory not built by a ... country" as "doesn't have any factory build by a ... country" .. blame by poor english skill

the issue I encountered back when I mess with FactoryOwners still persists.
it's that FactoryOwners.Forbidden doesn't get checking after FactoryOwners fails

would you mind make it checks? the tag would easily be more flexible after implementing this.
right now when using both tags at the same time, FactoryOwners.Forbidden basically just get ignored completely.
I mean.. why not it has no downside it doesnt even need migration coz 2 tags dont work together in the first place.

ps. sorry for my poor english.
ps2. I suggested a system that has more flexibility than this before but it involves around creating a new tag, atm we don't need to go that far.
--FELITH 2019-10-20
Example ini:

Right now Ares2.0p1:
  the unit will not available at all if not owning Europeans' factory. the FactoryOwners.Forbidden line is completely useless.

When implemented this:
  the unit will be available if not owning UnitedStates and Pacific as it should be just like when FactoryOwners.Forbidden line present alone. if own any of them the unit will be unavailable only if not owning any Europeans' factory.
--FELITH 2019-10-20
I found the code on old version of the open source.

bool HouseExt::CheckFactoryOwners(
 HouseClass const* const pHouse, TechnoTypeClass const* const pItem)
 return HouseExt::CheckFactoryOwner(pHouse, pItem)
  && HouseExt::CheckForbiddenFactoryOwner(pHouse, pItem);

If I not wrong I think changing && to || would make this works
edit: I'm 10% sure lol
--FELITH 2019-10-20
err.. I apologize I was confusing with the wording
from "has any factory not built by a ... country" in the documentation to "doesn't have any factory build by a ... country"
so the real suggestion should be, could you rework the FactoryOwners.Forbidden to be a list of countries of which if own any of their factory the test will fail. this way definitely is more flexible than FactoryOwners.Forbidden is just for listing a list of inverse FactoryOwners.

I could test it for you if you compile a build for me I just don't have the compiler on my pc
--FELITH 2019-10-22

Ares 0.6 FactoryOwner code:
My attempt to code this suggestion:
--FELITH 2019-10-28


Work Items

This blueprint contains Public information 
Everyone can see this information.


No subscribers.