Tag requests

If there is not already one could a <PrereqAndBonuses> be added to units?

Right now you can have ...

<BonusType>BONUS_FRENCH</BonusType>
<PrereqBonuses>
<BonusType>BONUS_COPPER</BonusType>
<BonusType>BONUS_IRON</BonusType>
<BonusType>BONUS_STEEL</BonusType>
</PrereqBonuses>

Which comes out to French AND (Copper OR Iron OR Steel). But what if I want to have French AND Copper AND Iron AND Steel? I can only have French AND Copper at the most for and. Please make it so I can have more than just 2 ANDs.

Please don't forget this. This tag is very important to implementing to units.
 
Could we please have a tag added that would allow you to specify build rate bonuses for certain improvements? IE, so that a Combat Worker could have +25% construction bonus on forts and roads, and a -25% penalty on building other stuff? I need this to make the Armed Workers balanced and fit their niche.
 
Sorry to tack on to someone's unending list, but I request we make some kind of tag that makes one civic require another to be active. Example: Military Vassalage requires Society: Feudal.
 
I'm currently practicing some tag making myself for my own projects. Each one is a major research for me to figure out then how to apply it in the code to make it do what its designed to. I'd LOVE to help with all of these requests but you're going to have to be very patient with me. The others are admittedly much more advanced in their programming skills! But with each success I get a little more capable overall. I'm loving some of these tag ideas and can see how each could be rather easily implemented (comparatively anyhow... each would still take quite a bit of time for me at the moment.)

So eventually, I'll come back to these requests and go all out to fulfill what you guys want to see... but I'm trying to sort out a few things of my own and having a lot of difficulty with the complexity of the combat/unit coding and how many places those tags show up in the code - its mind boggling!
 
Sorry to tack on to someone's unending list, but I request we make some kind of tag that makes one civic require another to be active. Example: Military Vassalage requires Society: Feudal.

That's actually a good idea for a request CIVPlayer8. I second that request.

An interesting idea but how will you make it work
- with the User Interface Civics Screen it is going to mean much scrolling around
- when a new civic is available up pops a box asking if you want to convert to it. What if you can't?
- with the UN votes
 
Maybe... If you try to start a revolution without the correct required civics, it would say "Sorry, requirements not met" and you would not be able to change civics unless you met those requirements. As for the UN... To be honest... I never really liked the idea of forcing you to change civics. Not all countries are a part of the UN, and making a country change from a dictatorship to a democracy is... Well... Unheard of. I suggest scrapping the UN force civic.
 
Maybe... If you try to start a revolution without the correct required civics, it would say "Sorry, requirements not met" and you would not be able to change civics unless you met those requirements. As for the UN... To be honest... I never really liked the idea of forcing you to change civics. Not all countries are a part of the UN, and making a country change from a dictatorship to a democracy is... Well... Unheard of. I suggest scrapping the UN force civic.

The ai would need some rework to handle the concept of legal civic choices not being independent
 
I was sortof thinking that it'd be a one-time check... if you currently have adopted the qualifying civic, you can switch to the civic that requires it, but if you end up changing the qualifying civic, it would not enforce any such change to the civic with the prereq. This would mean its a condition only checked when attempting to adopt the civic with the prereq. Otherwise you'd have a lot of problematic programming elements coming up. Would this be a sufficient solution or would it throw off the concept we're aiming at?
 
I was sortof thinking that it'd be a one-time check... if you currently have adopted the qualifying civic, you can switch to the civic that requires it, but if you end up changing the qualifying civic, it would not enforce any such change to the civic with the prereq. This would mean its a condition only checked when attempting to adopt the civic with the prereq. Otherwise you'd have a lot of problematic programming elements coming up. Would this be a sufficient solution or would it throw off the concept we're aiming at?

The AI doesn't look at changing single civics, it looks at the best civic in all categories at once as a set, so if it decided the best in category A was alpha and in category B was beTa, but alpha was only legal with the current choice in B (not beta) it would fail when it tried to change to it's new selection set. It would have to change to iterate a one at a time change until the overall set stabilized (which of course it might never do if the optimal choice in one category changes based on becoming legal after it chooses something else, which in turn becomes sub optimal when it makes that second change)
 
Yeah, I can see how that would be problematic for sure! It'd take a lot more evaluating to get the ai right on that sort of thing and without it, we'd have hangs for sure.
 
If there is not already one could a <PrereqAndBonuses> be added to units?

Right now you can have ...

<BonusType>BONUS_FRENCH</BonusType>
<PrereqBonuses>
<BonusType>BONUS_COPPER</BonusType>
<BonusType>BONUS_IRON</BonusType>
<BonusType>BONUS_STEEL</BonusType>
</PrereqBonuses>

Which comes out to French AND (Copper OR Iron OR Steel). But what if I want to have French AND Copper AND Iron AND Steel? I can only have French AND Copper at the most for and. Please make it so I can have more than just 2 ANDs.

So I was looking in Realism Inviticus and their code seems to work different from ours. IF you put ...

<BonusType>BONUS_COPPER</BonusType>
<PrereqBonuses>
<BonusType>BONUS_SILVER</BonusType>
<BonusType>BONUS_GOLD</BonusType>
</PrereqBonuses>

into C2C it will come out as ...

Copper AND (Silver OR Gold)

but in Realism Inviticus it comes out to ...

Copper AND Silver AND Gold

Could you please make code that allows for OR and AND. Thanks!
 
So I was looking in Realism Inviticus and their code seems to work different from ours. IF you put ...

<BonusType>BONUS_COPPER</BonusType>
<PrereqBonuses>
<BonusType>BONUS_SILVER</BonusType>
<BonusType>BONUS_GOLD</BonusType>
</PrereqBonuses>

into C2C it will come out as ...

Copper AND (Silver OR Gold)

but in Realism Inviticus it comes out to ...

Copper AND Silver AND Gold

Could you please make code that allows for OR and AND. Thanks!
The expression system will solve that for good once it is finished as it allows you to specify any combination of AND/OR/NOT and similar with resources/buildings/whatever.
 
Is the code in the expression system in the mod for this (resource A + B + C)? If so what code do I need to do?
Yes, but I still need to add a ConstructCondition/TrainCondition expression tag to buildings/units (should be done some time this weekend although with the restriction that the AI will not understand them properly yet) and add display capability to the expression system (so the mouseover will display a proper rendering of the expression requirement).
The code will then look like this:
Code:
<TrainCondition>
  <And>
    <Has>
      <GOMType>GOM_BONUS</GOMType>
      <ID>BONUS_A</ID>
    </Has>
    <Has>
      <GOMType>GOM_BONUS</GOMType>
      <ID>BONUS_B</ID>
    </Has>
    <Has>
      <GOMType>GOM_BONUS</GOMType>
      <ID>BONUS_C</ID>
    </Has>
  </And>
</TrainCondition>

That also allows all kind of combinations like (A or B) and (C or D):
Code:
<TrainCondition>
  <And>
    <Or>
      <Has>
        <GOMType>GOM_BONUS</GOMType>
        <ID>BONUS_A</ID>
      </Has>
      <Has>
        <GOMType>GOM_BONUS</GOMType>
        <ID>BONUS_B</ID>
      </Has>
    </Or>
    <Or>
      <Has>
        <GOMType>GOM_BONUS</GOMType>
        <ID>BONUS_C</ID>
      </Has>
      <Has>
        <GOMType>GOM_BONUS</GOMType>
        <ID>BONUS_D</ID>
      </Has>
    </Or>
  </And>
</TrainCondition>
 
Sorry to tack on to someone's unending list, but I request we make some kind of tag that makes one civic require another to be active. Example: Military Vassalage requires Society: Feudal.

Another tag for civics would be having a civic not be able to be activated if another one is
 
Another tag for civics would be having a civic not be able to be activated if another one is

Neither of these are easy, because introducing dependencies between civic categories would invalidate the algorithm the AI uses to choose it's civics.
 
@AIAndy

What happens if you use the old system of <BonusType> and <PrereqBonuses> with the expression system? What will happen?
I don't quite get what you mean.
<BonusType> or <PrereqBonuses> have no meaning within an expression but they will still work at the places outside expressions where they work now.
 
Back
Top Bottom