Opera
Deity
- Joined
- Sep 21, 2008
- Messages
- 4,643
Hi there, wild idea time!
I figured that most criticism towards the "Minor Trait" was because it sucked for the AI. I thought that, anyway, why would we want the AI to use that mechanic? We don't really care how the AI gains its traits! But from that thought came more thoughts that would be a complete rework of this mechanic, basically removing altogether all python parts and making it XML-editable.
How?
It would be a huge thing.
First, the AI shouldn't have the Minor trait and, thus, shouldn't gain any trait during the game. The trick would be to create leaders with the Minor trait (which would use a <bMinorMechanic> tag) but to remove it if the player is not human and to replace it with an appropriate trait. But which one?
Here comes the wild things: each (intended to be minor) leader would have a <CanGainTraits> list. In it, you would have pairs of a Trait and a iChance integer. For the AI, it will have iChance (on 100) to gain the trait X on game start, replacing the Minor trait. Only one (see below for exceptions) could be gained this way.
But this list would also tell the game which traits a leader can gain during the game. Not every leader would be able to gain Spiritual, for example.
The "how do I gain a fuc*ing trait mechanic will be handled in the trait file itself, by a mean of new lists, like <MinorTraitGainChanceTech>. This one would list techs paired with an iChance integer, meaning that, on discovery on this tech, if the player can gain this trait (see above), there's a chance for the player to gain it. We could have such list for BuildingTypes and BuildingClasses too. Maybe a similar one for units but without iChance; with iCounter instead, meaning the player has to build iCounter units. In fact, maybe a similar one for buildings could be used.
One thing I'm not sure about though is how to trigger events from the SDK while not hardcoding them. My thought is to link an event to a trait in the trait file with, say, a <TraitGainEvent> tag. The event would be needed to decline the trait.
Of course, all of this could easily be turned on or off with a gameoption, at least the gaining-traits part. The "random trait on game start" would still happen, both for the AI and the player if the gameoption is off.
Edit: Oh yeah, forgot a thing I mentioned by saying "(see below)" Each trait could have a <GainLesserTraitChance> that would be a Trait paired with an iChance integer. It will tell the game the chance to gain one trait while gaining the one the tag's in. Like when you gain Ingenuity currently
-----
So... what do you think? Good? Bad? Don't care?
I figured that most criticism towards the "Minor Trait" was because it sucked for the AI. I thought that, anyway, why would we want the AI to use that mechanic? We don't really care how the AI gains its traits! But from that thought came more thoughts that would be a complete rework of this mechanic, basically removing altogether all python parts and making it XML-editable.
How?
It would be a huge thing.
First, the AI shouldn't have the Minor trait and, thus, shouldn't gain any trait during the game. The trick would be to create leaders with the Minor trait (which would use a <bMinorMechanic> tag) but to remove it if the player is not human and to replace it with an appropriate trait. But which one?
Here comes the wild things: each (intended to be minor) leader would have a <CanGainTraits> list. In it, you would have pairs of a Trait and a iChance integer. For the AI, it will have iChance (on 100) to gain the trait X on game start, replacing the Minor trait. Only one (see below for exceptions) could be gained this way.
But this list would also tell the game which traits a leader can gain during the game. Not every leader would be able to gain Spiritual, for example.
The "how do I gain a fuc*ing trait mechanic will be handled in the trait file itself, by a mean of new lists, like <MinorTraitGainChanceTech>. This one would list techs paired with an iChance integer, meaning that, on discovery on this tech, if the player can gain this trait (see above), there's a chance for the player to gain it. We could have such list for BuildingTypes and BuildingClasses too. Maybe a similar one for units but without iChance; with iCounter instead, meaning the player has to build iCounter units. In fact, maybe a similar one for buildings could be used.
One thing I'm not sure about though is how to trigger events from the SDK while not hardcoding them. My thought is to link an event to a trait in the trait file with, say, a <TraitGainEvent> tag. The event would be needed to decline the trait.
Of course, all of this could easily be turned on or off with a gameoption, at least the gaining-traits part. The "random trait on game start" would still happen, both for the AI and the player if the gameoption is off.
Edit: Oh yeah, forgot a thing I mentioned by saying "(see below)" Each trait could have a <GainLesserTraitChance> that would be a Trait paired with an iChance integer. It will tell the game the chance to gain one trait while gaining the one the tag's in. Like when you gain Ingenuity currently
-----
So... what do you think? Good? Bad? Don't care?