-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link tech to the affected units/buildings #61
Comments
While that might be possible to implement, I wonder what the UI for displaying this relation would look like. Do you have something particular in mind? |
Currently there is a static text listing buildings from which a unit can be upgraded. If this list is dynamic and actually listing the upgrades and includes the unique techs this will not be a big change in the UI. Also add one for the buildings. |
We can currently simply take that text from the game data. By contrast, building a list of all techs that somehow affect a unit and describing the effect on that unit is
|
There will be some effort indeed. But the localization/translation will be done for the techs themself. In the dynamic list of effects you can grab the names and the descriptions from the tech list. Am I wrong? |
To answer the question "Does Bodkin Arrow affect Mamelukes?", you have to take the "Bodkin Arrow" Tech (id 200), look at its effect (id 193), and check each of the 93 Effect Commands if it is an Attribute Modifier (Command Types 0, 1, 4, 5, 10, 14, 15) and if it modifies either the unit itself (first value = 282) or the unit's class (second value = 12), or if it modifies a relevant resource (Command Types 1, 6, 11, 16), while knowing what all the relevant resources are. If you find a match, Bodkin Arrow affects Mamelukes. Otherwise it does not. Also, I might still have overlooked some aspects of the whole ordeal. To answer the question "Which techs do affect Mamelukes?", you have to do that thing once for all techs that the current civilisation has access to. Such calculations should definitely be done in advance and just the result should then be put into the data file. The other question is: How would that information then actually be displayed in the UI? |
What @prateekdonni wrote, yes. But also the building - blacksmith, castle, university, monastery. If you have this you can get rid of the static text mentioned above. |
I was thinking of research, as it may vary which one to pick, especially if in the advancement through ages, only 2/3 are available for the civilization |
Implementing that is going to be a lot of work, which I personally will not tackle, at least in the near future. I am however willing to review a merge request in that direction. |
I totally understand. I will put something up.
|
|
Sometimes when reading the description of a tech I wonder what exactly will be affected by it.
I am creating this issue after trying to figure out if 'Farimba' affects camel riders or not (in the description we see that it affects 'Cavalry'). Another popular confusion is the blacksmith armor lines and ranged mounted units.
I would suggest to add a list of tech ids for every unit and building in the data.json since the other direction of the relation is far less important.
The text was updated successfully, but these errors were encountered: