Fix parsed data for Unit enum

Issue #2 resolved
Hottemax repo owner created an issue

There are inconsistencies in the data, see updated ticket/comments.

Comments (15)

  1. PiMastah

    I have sent you results regarding units in Unit.java. To adapt these 1:1 some minor changes in tech group names need to be made.

    I have looked into Terrains as well. They should be trivial to generate from game sources. The same goes for tech groups and cavalry ratios.

  2. Hottemax reporter
    • changed status to open

    There are some discrepancies: * some only relate to having the specific/flavored unit names (i.e. "Dutch Maurician" instead of "Maurician Infantry". This goes for all tech groups. * Others have wrong data totally (just one example: Indian Cavalry Archer, available at tech level 6, is not found. There is a similarly named unit parsed at tech level 1 (INDIAN_ARCHERS in the enum), but that has wrong stats (1 off shock instead of def. shock). There are no "Elephant Archers" etc.

    Is there anything you could do to help, PiMastah.

    Happy belated PiDay, btw :D

  3. PiMastah

    Hey,

    I can have a look at the files again.

    Will let you know soon what I can find out so you can decide how to proceed.

    Regards

  4. PiMastah

    "Dutch Maurician" instead of "Maurician Infantry"

    #content of "dutch_maurician.txt"
    
    # Dutch Maurician
    
    type = infantry
    unit_type = western
    
    maneuver = 1
    offensive_morale = 3
    defensive_morale = 2
    offensive_fire = 2
    defensive_fire = 2
    offensive_shock = 2
    defensive_shock = 1
    

    Indian Cavalry Archer, available at tech level 6, is not found

    https://bitbucket.org/Hottemax/eu4-combatsimulator/src/196440241a8abf06cc21422ba952a3ed3f4b5190/eu4-sim/src/eu4/comsim/core/datatypes/Unit.java?at=master&fileviewer=file-view-default#Unit.java-109

    There is a similarly named unit parsed at tech level 1 (INDIAN_ARCHERS in the enum), but that has wrong stats (1 off shock instead of def. shock)

    #content of "indian_archers.txt"
    
    # Indian Cavalry Archers
    
    unit_type = indian  
    type = cavalry
    
    maneuver = 2
    offensive_morale = 1
    defensive_morale = 1
    offensive_fire = 0
    defensive_fire = 0
    offensive_shock = 1
    defensive_shock = 0
    

    There are no "Elephant Archers"

    These two units are the level one cavalry choices:

    https://bitbucket.org/Hottemax/eu4-combatsimulator/src/196440241a8abf06cc21422ba952a3ed3f4b5190/eu4-sim/src/eu4/comsim/core/datatypes/Unit.java?at=master&fileviewer=file-view-default#Unit.java-195

    https://bitbucket.org/Hottemax/eu4-combatsimulator/src/196440241a8abf06cc21422ba952a3ed3f4b5190/eu4-sim/src/eu4/comsim/core/datatypes/Unit.java?at=master&fileviewer=file-view-default#Unit.java-109

    However, apparently there is a localisation for the English language, containing stuff like this:

    indian_archers: "Elephant Archers"

    rajput_hill_fighters: "Indian Cavalry"

    Therefore, I will update my script to use localised keys for unit name strings, which should fix alle the problems you mentioned.

    Do you think it is sufficient to only update the description strings (e.g. "Rajput Hill Fighters" with "Indian Cavalry"), or would you also need to update the identifiers (e.g. RAJPUT_HILL_FIGHTERS(...) with INDIAN_CAVALRY(...))?

    Regardless, I think I will be able to get to this task later tonight after work.

  5. PiMastah

    Coming to think of it, this would allow you to use localised unit names as well If you wanted to. I think I should be able to provide a named list with translation keys for English, German, French and Spanish without spending considerably more time compared to updating the English names alone. Let me know what you think.

  6. PiMastah

    PR created, please review and merge if acceptable. Let me know if you want the localized names in other languages as well.

  7. Hottemax reporter

    Thank you, looks great. Since I don't plan to localize the whole Gui, this is not that important, I do not want to impose too much on your time.

  8. Log in to comment