62 734
modifications
mAucun résumé des modifications |
Harmonisation des identifiants techniques |
||
(4 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 2 : | Ligne 2 : | ||
local tooltip = require( 'Module:Infobulle' ) | local tooltip = require( 'Module:Infobulle' ) | ||
COMPORTEMENT_LOOKUP = { | |||
["agressivité"] = { | |||
['0'] = { tag = "Non agressif", label = "N'engage pas les affrontements." }, | ['0'] = { tag = "Non agressif", label = "N'engage pas les affrontements." }, | ||
['1'] = { tag = "Agressif", label = "Attaque les ennemis à vue." }, | ['1'] = { tag = "Agressif", label = "Attaque les ennemis à vue." }, | ||
['2'] = { tag = "Très agressif", label = "Attaque les ennemis et les créatures neutres à vue." }, | ['2'] = { tag = "Très agressif", label = "Attaque les ennemis et les créatures neutres à vue." }, | ||
['3'] = { tag = "Frénétique", label = "Attaque n'importe qui à vue." } | ['3'] = { tag = "Frénétique", label = "Attaque n'importe qui à vue." } | ||
} | }, | ||
["assurance"] = { | |||
['0'] = { tag = "Lâche", label = "Fuit ou évite les affrontements." }, | ['0'] = { tag = "Lâche", label = "Fuit ou évite les affrontements." }, | ||
['1'] = { tag = "Prudent", label = "Fuit ou évite les menaces plus faibles que lui." }, | ['1'] = { tag = "Prudent", label = "Fuit ou évite les menaces plus faibles que lui." }, | ||
Ligne 33 : | Ligne 15 : | ||
['3'] = { tag = "Courageux", label = "Fuit ou évite les affrontements s'il est sévèrement dépassé." }, | ['3'] = { tag = "Courageux", label = "Fuit ou évite les affrontements s'il est sévèrement dépassé." }, | ||
['4'] = { tag = "Téméraire", label = "Ne fuit ou n'évite jamais les affrontements." } | ['4'] = { tag = "Téméraire", label = "Ne fuit ou n'évite jamais les affrontements." } | ||
} | }, | ||
["assistance"] = { | |||
['0'] = { tag = "N'aide personne", label = "N'aide personne lors des affrontements." }, | ['0'] = { tag = "N'aide personne", label = "N'aide personne lors des affrontements." }, | ||
['1'] = { tag = "Aide les alliés", label = "Aide les alliés lors des affrontements." }, | ['1'] = { tag = "Aide les alliés", label = "Aide les alliés lors des affrontements." }, | ||
['2'] = { tag = "Aide les amis", label = "Aide les amis et les alliés lors des affrontements." } | ['2'] = { tag = "Aide les amis", label = "Aide les amis et les alliés lors des affrontements." } | ||
} | } | ||
local | } | ||
return | function rd(localdata) | ||
local rd = localdata['rd'] | |||
if rd ~= nil then | |||
rd = rd .. ' %' | |||
end | |||
return rd | |||
end | |||
function formatcomportement(localdata, setting) | |||
local comportement = localdata[setting] or "0" | |||
comportement = COMPORTEMENT_LOOKUP[setting][comportement] | |||
if not comportement then | |||
return nil | |||
else | |||
return tooltip._build({ comportement.tag, comportement.label }) | |||
end | |||
end | end | ||
Ligne 53 : | Ligne 44 : | ||
parts = { | parts = { | ||
{ type = "table", rows = { | { type = "table", rows = { | ||
{ type = "row", label = "Nom", icon = " | { type = "row", label = "Nom", icon = "sic", value = "nom" }, | ||
{ type = "row", label = "[[Form | { type = "row", label = "[[Form ID]]", icon = "réparation", value = "formid" }, | ||
{ type = "row", label = "[[Niveau]]", icon = "niveau", value = "niveau" }, | { type = "row", label = "[[Niveau]]", icon = "niveau", value = "niveau" }, | ||
{ type = "row", label = "[[Points d'expérience]]", icon = "xp", value = "xp" }, | { type = "row", label = "[[Points d'expérience]]", icon = "xp", value = "xp" }, | ||
Ligne 63 : | Ligne 54 : | ||
}}, | }}, | ||
{ type = "table", title = "[[Attributs de l'IA Gamebryo|Comportement]]", rows = { | { type = "table", title = "[[Attributs de l'IA Gamebryo|Comportement]]", rows = { | ||
{ type = "row", label = "Agressivité", icon = "poing", value = function(localdata) return | { type = "row", label = "Agressivité", icon = "poing", value = function(localdata) return formatcomportement(localdata, "agressivité") end }, | ||
{ type = "row", label = "Assurance", icon = "confiance", value = function(localdata) return | { type = "row", label = "Assurance", icon = "confiance", value = function(localdata) return formatcomportement(localdata, "assurance") end }, | ||
{ type = "row", label = "Assistance", icon = "groupe", value = function(localdata) return | { type = "row", label = "Assistance", icon = "groupe", value = function(localdata) return formatcomportement(localdata, "assistance") end } | ||
}}, | }}, | ||
{ type = "list", title = " | { type = "list", title = "Attaques", prefix = "attaque", max = 5 }, | ||
{ type = "list", title = "Capacités", prefix = "capacité", max = 5 }, | |||
{ type = "list", title = "Objets", prefix = "objet", max = 8 } | |||
} | } | ||
} | } |
modifications