[BASE] "Minor Trait" Mechanic Rework

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)" :lol: 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? :p
 
very interesting. This is how I plan to rework the dynamic trait system of minor leaders.

1. Make a list of CanGainTraits for a leader
2. leader (human) chooses at game start which trait to go for
3. leader gets some quests related to trait (aggressive raze cities, arcane build a few mages and do X etc.). maybe 2-3 per trait. If the quests are finished, leader gets the trait and can choose to try to gain another one from his list of cangaintraits.
 
Oh, yes, quests. I think players would prefer it with quests rather than just a chance on tech/buildings. Good idea. But this seems less easy to exclusively implement in the DLL :(
 
Well, depends on the quests I guess. Maybe some new eventtags would reduce the python. The good thing is, that it is fully modular (unless you use FFH/Orbis/FF specific tags)
 
The minor-leader AI in my games didn't seem to have too much problem gaining traits. They'd beat me to a wonder or research a tech or fulfull whatever other requirement for a trait, they'd adopt the trait and I'd get the "A leader of the X has an eye for empire and gained the Y trait" message. So the current system works at least OK. And scrapping minor trait for AI civs kinda defeats the purpose of having minor leaders in the game IMHO. But if you can make trait gain more interesting (quests etc.) for the player than by all means go for it! :D
 
The minor-leader AI in my games didn't seem to have too much problem gaining traits. They'd beat me to a wonder or research a tech or fulfull whatever other requirement for a trait, they'd adopt the trait and I'd get the "A leader of the X has an eye for empire and gained the Y trait" message. So the current system works at least OK. And scrapping minor trait for AI civs kinda defeats the purpose of having minor leaders in the game IMHO. But if you can make trait gain more interesting (quests etc.) for the player than by all means go for it! :D
They don't have issues gaining trait, it's just that the AI is already bad, so it's dumb to give them penalties over that (the Minor trait).

And how does it defeat the purpose of having minor leaders in game? I don't see why you'd care about the AI gaining traits.
 
And how does it defeat the purpose of having minor leaders in game? I don't see why you'd care about the AI gaining traits.

I don't, really, but it would make gameoptions such as "The Acknowledgment" kinda useless, since no leader would use the "minor" mechanic except the player. I do see your point about the AI's stupidity though, and streamlining things to make it seem less dumb (I think that's why Kael dumbed down so much stuff in the base mod, like the sorcery/summoning merge and the like).
 
Well, the gameoptions would still be useful for people who, on top of not wanting to gain traits and such, wouldn't want to see other leaders than the base ones. I guess they exist :)
 
Personally, I don't particularly like it. I'd much rather teach the AI than remove a mechanic I like. :lol: Moving it all to XML would be nice, however.

The way I'm tweaking it is to split Minor leaders into two groups... One, Emergent, will have the Emergent trait (Renamed Minor) and a unique trait that plays to their civ's strengths. The other, Minor, will have three unusual traits for their civ, and a new Minor trait that is essentially just a maintenance penalty... It's removed on founding the fourth city. Prevents them from getting too far ahead early on.
 
@Valk: My point is to remove it for the AI because it seems rather useless for them. I mean, the "gain trait during the game" thing was and is more for the human player than for the AI.

Anyway, I'm not working on this right now, so there's still time to talk about it ;)

Because... well... now that I think of it, using my XMLized way, it would be really easy to teach the AI to go for a trait.
 
You could remove the AI ability to use the Minor Trait, but include a python function which automatically assigns each Minor leader certain traits at certain landmarks when controlled by the AI. Choose things which they will naturally do (research techs, get beat up in a war, dogpile someone, declare peace...) and seem fairly fitting, and make it so they should slowly grow to the point that a novice player would reach.
 
I always kinda hoped that Minor leaders - from the AI standpoint - would become leaders that would spawn out of your civilization due to revolution/some instability/colonization mechanics, of the sort common in many 'vanilla' BTS mods.
 
Please don't do modular, Opera, as I can never seem to get them to work, and this is a great idea. I like queests. Plus, teaching the AI to do it easily is a definate bonus.
 
I always kinda hoped that Minor leaders - from the AI standpoint - would become leaders that would spawn out of your civilization due to revolution/some instability/colonization mechanics, of the sort common in many 'vanilla' BTS mods.
Yes, minor leaders could be used for that. But 'that' would be hard to implement so it won't happen right now...

Please don't do modular, Opera, as I can never seem to get them to work, and this is a great idea. I like queests. Plus, teaching the AI to do it easily is a definate bonus.
Modular? Did I say that I would do it modular? I don't remember :p
 
Top Bottom