Giter Club home page Giter Club logo

hoi4_calculator's People

Contributors

florian-delrieu avatar

Stargazers

 avatar

Watchers

 avatar

hoi4_calculator's Issues

ATK et DEF issue

  1. Les stats des unités (sans armes) soient en accord avec les stats approximatives de HOI 4 (voir #39 (comment) )

  2. Faire en sorte que les armes donne un bonus (multilicateur) des ces stats aux unités qui le composent
    Ex :
    - 1 compagnie de 100 gardes ( DEF=20, ATK=2)
    - 100 fusil laser ( Tir rapide => No bonus )
    - 5 Shotgun ( Assaut => *1.05 par exemple

TODO

  • Changer les bonus d'ATK DEF des armes en par des multiplicateur en fonction de leurs type
  • Revoir ATK/DEF pour les infantry (en accord avec HOI4 ?)
  • Revoir ATK/DEF pour les véhicules
  • Voir ATK/DEF pour les Marcheurs
  • DEF/BRK bonuses for grenades ?
  • Regler les bonus DEF/BRK pour les armes dans les chars (Turret,Side,Hull)
  • Change SMA and HMA stats

Validations de STATS

  • DEF/BRK Pour toutes les unités et companies
  • Equilibrer SA HA pour tank (trop faible par rapport a infantry)

COMPANIES

Faire en sorte que les bonus dues aux compagnies soient plutot ajouté aux unité elles mêmes.

DEFENSE and BREAKTRHOUGHT issue

The current calculation of DEFENSE and BREAKTRHOUGT is not at all satisfactory. It needs to be seriously considered.

Factors influencing BRK and DEF of an company

Weapons

  • F
  • PA
  • Type
  • Fire rate
  • range

Unit or vehicule carrying a weapon

  • Infantry
    • F
    • E
  • Tank
    • Armor
    • Speed
    • Weapon placement (turret, sponson, hull, ....)
    • Type (Heavy,Flyer etc...)
  • Walker
    • Armor
    • Type

Note: Note that an unit (or a vehicule) without weapons havereduced (but not zero) ATK and DEF stats that can be add to those of weapons

Calculation exemple

DEF = sum( all_weapon.DEF + unit.DEF) * company.unit.DEF_bonus

  • unit can be an Infantry, Tank or walker

Sources

W40K - Debugg and Test

  • Creer une unité
  • Creer une arme
  • Creer une unité avec une arme
  • Creer une company avec des unités simple pour verifier facilement si les stats obtenue sont celles attendues
  • Debugger

class Unit

  • Space Marine armor = 0 ( should be 2 )
  • Space Marine Hardness = 0 ( should be 20% )

A surveiller

  • La HardMeleeAttack est bien plus grande que la SoftMeleeAttack Problème non détecté dans les tests de débug 1,2A et 2B

Debugg units stats

all stats in CSV files are wrong

  • Need huge debugging ⚠️ ⚠️

  • Ajouter la force dans le calcul de la SMA/HMA pour les unité

    • SMA/HMA *= 1 si CC = 3
  • HMA = 0 si F <= 3

Minor fix and update

wrong ORG calculation

  • L'organisation des compagnies est la moyenne des Organisation de chaque unité
  • Ajouter une table donnant la valeur d'ORG d'une unité en fonctions de son Cd

Specials Rules

  • Cut DEF if véhicule has "immobile" rule (for artillery too??)

W40K - Company, Regiment and Battle Editing

class Company

class Regiment

  • List des compagnies
  • Sommes des stats
  • Moyenne des stats
  • Strength du regiment (niveau de HP / HP max)
  • def show stats
  • #31

Battle

  • def Bonus
  • Ajout traits de commandant
  • #31 and reserves
  • Bug for CAC level when changing tactics ⚠️
  • Equilibrer le nombre d'attaque et de defense ⚠️
  • Tactiques
  • Evolution CAC

Width

Battle.py

  • Finnish TODO list
  • fix all errors

GLOBAL VERIFICATION

at commit cf7cf10 in DEF/BRK-editing

CSV checks

weapons.csv

  • Bolter and Melta have same SA
  • Plasma have to hight HA ? no
  • Plasma have same HA than Autocanon fix range bonuses
  • see Ordnance weapons for Earthshaker

Stats_Functions.py

  • SP artillery and Tanks have same DEF and BRK stats
  • Un tank est une Artillery si son arme principale est un arme d'artillerie et qu'il ne peut pas tirer en mouvement (pas pesant)

Weapons

  • see BRK and DEF bonus for weapons
  • see bonuses caused by weapons range (different between SA and HA)

Import Error 😠

Import Error when runnig Saver.py in commit 7fd922d

Log below

runfile('/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/Saves/Saver.py', wdir='/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/Saves')
Traceback (most recent call last):

  File "/Users/floriandelrieu/miniconda3/envs/spam/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File "<ipython-input-2-a9776579246c>", line 1, in <module>
    runfile('/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/Saves/Saver.py', wdir='/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/Saves')

  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_umd.py", line 198, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script

  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)

  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/Saves/Saver.py", line 5, in <module>
    import W40K.LandBattles.Companies_list as CompanyList

  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)

  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/LandBattles/Companies_list.py", line 1, in <module>
    from W40K.UnitCreator.Unit_list import *

  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)

  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/UnitCreator/Unit_list.py", line 1, in <module>
    from W40K.UnitCreator.Class.Unit import Infantry, Tank, Walker

  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)

  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/UnitCreator/Class/Unit.py", line 1, in <module>
    from W40K.FuncAndTables.Stats_Functions import *

  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  
  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/FuncAndTables/Stats_Functions.py", line 2, in <module>
    from W40K.UnitCreator.Class.Weapons import * # Weapon

  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)

  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/UnitCreator/Class/Weapons.py", line 2, in <module>
    from W40K.FuncAndTables.Functions import *

  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)

  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/FuncAndTables/Functions.py", line 1, in <module>
    from W40K.UnitCreator.Class.Unit import Infantry,Tank,Walker

ImportError: cannot import name 'Infantry' from 'W40K.UnitCreator.Class.Unit' (/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K/UnitCreator/Class/Unit.py)

W40K - Tactics Editing

TO DO

  • Selectionner les Tactiques
    • Attaquant ou Defenseurs ?
    • Fonction pour determiner le choix de la tactique
  • Ajouter dans la bataille pour chaque camps
  • Appliquer les bonus du à la tactiques
  • Tester si la tactique est contré
  • Appliquer le CAC_level
  • Ajouter les tactiques (https://hoi4.paradoxwikis.com/Combat_tactics)
  • Ajouter les modificateur en fonction de la situation de combat ( canceled )

Files

Tactics_class.py

  • class Tactics
  • add that begin specific battle phase according tactics used and/or if they are'nt countered

TacticsList.py

  • Fichiers regroupants toutes les tactiques
  • Remove isDefendingTactic argument
  • set weight = 1 for all particular phase battle tactics
  • Replace all list occurence by tactics in lists names

Tactics_func.py

  • Change ATK and DEF tactics list with according to battle phase in choose_Tactics function
  • Fonction permettant le choix de l'une d'entre elle
  • Fonction permettant l'application des bonus/malus
  • Fonction modifiant le CAC_level

Alpha 0.1

  • Algorithme complet
  • Nombre de round jusqu'à la défaite d'un camp
  • Lancement nombre de round
  • Log de fin de round

W40K Weapons Number bug

  • Remove error added in the commit 19d0c98

Erreur quand lancement de W40K_list.py

from W40K_UnitCreator import *
Lasgun = Weapons(10)
Lasgun.Show_HOI_Stats()
Lasgun = Weapons(100)
Lasgun.Show_HOI_Stats()
#Lasgun.Show_HOI_Stats()
Bolter = Weapons()
Bolter.F = 4
Bolter.PA = 5

Log

/Users/floriandelrieu/miniconda3/bin/python "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K_List.py"
Traceback (most recent call last):
  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K_List.py", line 6, in <module>
    Lasgun.Show_HOI_Stats()
  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K_UnitCreator.py", line 57, in Show_HOI_Stats
    self.HOI4_Profil()
  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K_UnitCreator.py", line 20, in HOI4_Profil
    self.SoftAttack = (SoftAttack_F[self.F]*SoftAttack_PA[self.PA] / 100)*self.Number
KeyError: 100

        Soft Attack   = 17.6
        Hard Attack   = 27.0
        Defense       = 42.3
        Breakthrought = 8.5
        Piercing      = 14

W40K - Errors report in profils

Nombreuse incohérences dans les profils HOI IV

Unit.csv

https://github.com/Florian-DELRIEU/HOI4_Calculator/blob/5ee1c0aef2044ca2c92afd1e8df369dbff01051e/W40K/UnitCreator/Unit_Saver/SaveUnit.csv

  • Leman Russ
    • 0.00 % Hardness mais pas Predator
    • Pas de MeleeAttack
  • Space Marines a peu de HP en plus par rapport aux Guardes

Weapons.py

https://github.com/Florian-DELRIEU/HOI4_Calculator/blob/5ee1c0aef2044ca2c92afd1e8df369dbff01051e/W40K/UnitCreator/Unit_Saver/SaveWeapons.csv

  • #22
  • Krak Grenade a moins de HA que FragGrenade
  • Trop de SA pour CanonLaser

W40K - Error when running

Erreur lors du lancement de W40K_addon/W40K_Run.py

Log

runfile('/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K_addon/W40K_Run.py', wdir='/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K_addon')
----------- round 0 -----------------
ATK shot 1949.82 SA + 349.42 HA // 0.0 SMA + 0.0 HMA
DEF shot 1379.98 SA + 131.7 HA // 0.0 SMA + 0.0 HMA
ATK: 194.98 --->> // 3867.24 DEF
DEF: 125.52 --->> // 998.76 ATK
Traceback (most recent call last):
  File "/Users/floriandelrieu/miniconda3/envs/spam/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-2-e634e227748a>", line 1, in <module>
    runfile('/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K_addon/W40K_Run.py', wdir='/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K_addon')
  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K_addon/W40K_Run.py", line 22, in <module>
    BattleA.Round(-1)
  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K_addon/W40K_Battle.py", line 38, in Round
    self._Round(Loglevel=LogLevel)
  File "/Users/floriandelrieu/OneDrive/Logiciels et Jeux/Heart of Iron IV/HOI4_Calculator/W40K_addon/W40K_Battle.py", line 59, in _Round
    self.ATK.round_Stats()
AttributeError: 'Regiment' object has no attribute 'round_Stats'

W40K - Too many attack

Le nombre d'attaques pendant les batailles sont trop grands, les batailles durent 1 tour ...

  • Reduire le nombre d'attaques
    • Réduire la SA et HA ?
    • Diviser le nombre d'attaque par 100 ?

Compétence du général

  • Ajoutez les skills (ATK, DEF, etc...)
    • chaque niveau de skill monte les stats de 5% (a voir sur wiki)
  • Ajoutez tactiques préférée
  • Ajoutez les traits de leader (voir wiki)
  • update initiative round

`Krak Grenade` a plus de `SA` que `FragGrenade`

Probleme

  • FragGrenade.SoftAttack = 0.15
  • KrakGrenade.SoftAttack = 0.36

La FragGrenade devrait avoir plus que la KrakGrenade. Il me faut trouver un moyen de faire en sorte que la KrakGrenade ai très peu de SoftAttack

W40K - class editing

class weapons

  • Armes de mêlée ou de tir
    • SMA et HMA si arme de mêlée
    • SA et HA si arme de tir
  • Trouver effet de la portée et de la cadence
    • grenade -20% de SA et HA ?? car portée de 8 ps
  • class Equipement (donne des bonus aux stats des unités) en fonction de leurs quantité dans la compagnie
    • Exemple : Réacteurs Dorsaux dans compagnie de combat Space Marine

class Marcheur

  • HOI stats
  • def show
  • def set_quantity
  • self.Hardness en fonction du Type
  • self.org a revoir

class char

  • HOI stats
  • def show
  • def set_quantity
  • self.Hardness en fonction du Type
  • self.org a revoir
  • SoftMA
  • HardMA
  • Defense
  • Breakthrought
  • def weapons
    • turret
    • side
    • hull
    • mounted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.