532
edits
(spaces between multiple names) |
No edit summary |
||
Line 40: | Line 40: | ||
for i=1,math.random(minprefix,maxprefix) do | for i=1,math.random(minprefix,maxprefix) do | ||
prefixes = prefixes.. prefixtable[math.random(table.getn(prefixtable))] | prefixes = prefixes.. prefixtable[math.random(table.getn(prefixtable))] | ||
if math.random(0, 100) < hyphenationchance then | |||
prefixes = prefixes .. '-' | |||
end | |||
end | end | ||
Line 46: | Line 49: | ||
for i=1,math.random(mininfix,maxinfix) do | for i=1,math.random(mininfix,maxinfix) do | ||
infixes = infixes.. infixtable[math.random(table.getn(infixtable))] | infixes = infixes.. infixtable[math.random(table.getn(infixtable))] | ||
if math.random(0, 100) < hyphenationchance then | |||
infixes = infixes .. '-' | |||
end | |||
end | end | ||
minpostfix=naming[style]['MinPostfixAmount'] | minpostfix=naming[style]['MinPostfixAmount'] | ||
Line 51: | Line 57: | ||
for i=1,math.random(minpostfix,maxpostfix) do | for i=1,math.random(minpostfix,maxpostfix) do | ||
postfixes = postfixes.. postfixtable[math.random(table.getn(postfixtable))] | postfixes = postfixes.. postfixtable[math.random(table.getn(postfixtable))] | ||
if math.random(0, 100) < hyphenationchance then | |||
postfixes = postfixes .. '-' | |||
end | |||
end | end | ||
--[name fitting]-- | --[name fitting]-- | ||
heroname = heroname .. ((prefixes..infixes..postfixes):gsub("^%l", string.upper)) .. ' ' | heroname = heroname .. ((prefixes..infixes..postfixes):gsub("^%l", string.upper):gsub("-$", '')) .. ' ' | ||
end | end | ||
--[title template]-- | --[title template]-- |