Opened 8 years ago
Last modified 3 years ago
#4126 new defect
[PATCH] Promotion by Technology
Reported by: | fatherbushido | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Simulation | Keywords: | simple |
Cc: | Patch: |
Description (last modified by )
Promotion component have a RequiredXP element. That one is a non negative integer. Currently we can use a tech to replace it by 0.
The effect of setting RequiredXP to 0 is :
- promote the current units (see Promotion) (with entity mod)
- construct the (more) promoted unit instead of the original unit (ref r14388) (with template mod)
That is used to promote a unit with a tech (see for example mace_champion_infantry_a to mace_champion_infantry_e).
But that is not fully flexible : for example one can perhaps want :
- that unit never promote with xp (see old ugly workaround with a 99999 requiredXP
- allow a promotion only when a given tech is researched
Attachments (1)
Change History (13)
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
by , 8 years ago
Attachment: | promotion.diff added |
---|
comment:3 by , 8 years ago
Keywords: | rfc added |
---|---|
Summary: | Promotion by Technology → [PATCH] Promotion by Technology |
The attached patch is a draft coded in a clumsy way. now :
- we can put a 0 requiredXP (avoid ugly 99999 stuff)
- but if a required tech is not searched, unit can't promote (or promoted template can't be produced)
- when a tech set 0 to requiredXP, the unit are promoted and promoted template can't be produced
If the logic is ok, i will write some tests.
comment:4 by , 8 years ago
The logic looks very good to me and the patch is not that clumsy, only a bit ;)
I agree the required tech and required XP solution looks better that this AllowPromotedUnitPromotion
.
Do you need more feedback on this?
comment:5 by , 8 years ago
Milestone: | Alpha 21 → Alpha 22 |
---|
thx for the feedback. I will finish that in a22 so.
comment:6 by , 7 years ago
Keywords: | rfc removed |
---|
comment:9 by , 7 years ago
Actually there's been progress. D270, D266 would enable this but I'd need D281 (and possibly D274) first.
comment:10 by , 5 years ago
Component: | UI & Simulation → Simulation |
---|
Move tickets to Simulation
as UI & Simulation
got some sub components.
comment:11 by , 3 years ago
Keywords: | simple removed |
---|---|
severity: | → simple |
comment:12 by , 3 years ago
Keywords: | simple added |
---|
"I suggest (for example), to separate 1. and 2. by letting use 0 requiredxp in template, adding an optional RequiredTechnology in the Promotion template (which would be checked Promotion) and an optional boolean AllowPromotedUnitProduction in the Promotion template (which would be checked in ProductionQueue)" -> But i think it's not a good solution.