Is anyone besides me getting an HTTP error 500 when trying to save changes? It's been happening off and on for the last two weeks.
- 1
Can you PM me the details?Is anyone besides me getting an HTTP error 500 when trying to save changes? It's been happening off and on for the last two weeks.
They look interesting. Does anybody know if templates like these exist in the other wikis? At least eu4 uses lua defines and I think some of the newer games use .txt files which have syntax which could possibly be converted to lua.
I had that as an idea when creating it, but had issues while implementing, regarding it appearing as regular text instead of a reference and ignoring the conditional. I could replicate them just now, but just testing more somehow made the problem disappear and I can't get it to break again. Could add that in as an extra argument, but I need auto-patrol on this account to be able to edit the template space since I created the template before moving accounts.They look interesting. Does anybody know if templates like these exist in the other wikis? At least eu4 uses lua defines and I think some of the newer games use .txt files which have syntax which could possibly be converted to lua.
Is there a reason why read_define doesn't add a footnote with a reference to the define?
Great work on the moduleI had that as an idea when creating it, but had issues while implementing, regarding it appearing as regular text instead of a reference and ignoring the conditional. I could replicate them just now, but just testing more somehow made the problem disappear and I can't get it to break again. Could add that in as an extra argument, but I need auto-patrol on this account to be able to edit the template space since I created the template before moving accounts.
@Randi Moth I've added you to the auto patrol group.
I mostly used existing modules on the English Wikipedia as examples, as well as Wikipedia's https://en.wikipedia.org/wiki/Help:Lua, and also just googled some questions (Thanks to Stack Overflow, as always). I don't know that much Lua myself.Great work on the module
I want to dedicate some time to learning LUA myself (hoping to automate stuff on the wikis). Any suggestion on good learning sources?
if ( AttackerAgility < OurAgility ){
DifferenceFactor = Min( Our Agility / Attacker Agility, BIGGEST_AGILITY_FACTOR_DIFF )
AgilityMitigation =( ( DifferenceFactor - 1 ) * ( AirAttack * COMBAT_BETTER_AGILITY_DAMAGE_REDUCTION ) ).Rounded
}
if ( AttackerSpeed > OurSpeed){
DifferenceFactor =Min( AttackerSpeed / OurSpeed, BIGGEST_SPEED_FACTOR_DIFF );
SpeedBonus =( ( DifferenceFactor - 1 ) * (AirAttack*COMBAT_BETTER_SPEED_DAMAGE_INCREASE ) ).Rounded
SpeedBonus +=( AttackerSpeed * TOP_SPEED_DAMAGE_BONUS_FACTOR / 100* AirAttack).Rounded
}
FinalAirAttack += SpeedBonus - AgilityMitigation
MaxKillCount =Min( TargetablePlaneCount, AirWingSize - DelayedLosses )
RemainingTargetablePlaneCount -=
AttackingPlanes / COMBAT_MULTIPLANE_CAP ).Rounded
ClampMin(RemainingTargetablePlaneCount, 0 )
DamageScale = IsCarrierFight ? COMBAT_DAMAGE_SCALE_CARRIER : COMBAT_DAMAGE_SCALE
CalcKillCount= Max( 0.01, ( FinalAirAttack * DamageScale * 0.1 ) / OurDefense )
if ( CalcKillCount< MaxKillCount ){
KillCount = CalcKillCount.Truncated
if ( RANDOM < ( UnlimitedKillCountWithDecimals - KillCount ) ){
++KillCount
}
}
else{
KillCount = MaxKillCount
}
DelayedLosses += KillCount #this lets us run combat losses over multiple calcs without issue.
From the module:Can't upload svg file. https://commons.wikimedia.org/wiki/File:Lua-Logo.svg
edit.
Plus, someone know why module/template Lua do not create infobox? In other wiki it create, but here it's just normal text.
local html = mw.html.create('div')
:addClass('c-sidebar')
if #modules < 1 then
html
:tag('strong')
:addClass('error')
:wikitext('Error: no modules specified')
HTTP ERROR 500
FRA, USA, UK, SOV, GER, ITA, JAP = 7
Generic, Chinese warlords, Horn of africa countries = 3
YUG, ROM, CZE, HUN = 4
GRE, TUR, BUL = 3
POL, LIT, LAT, EST = 4
MEX, HOL = 2
POR, SPR = 2
SWI, ETH = 2
CAN, SAF, RAJ, AST, NZL = 5
CHI, PRC, MAN = 3
total = 35
SWE, FIN, NOR, DEN = 4
total = 39
Compare https://hoi4.paradoxwikis.com/French_national_focus_tree#Reconnect_To_the_Balkans (working fine as intended) and https://hoi4.paradoxwikis.com/French_national_focus_tree#Loyalty_To_Moscow (with an offset, right after the {{Collapse}} used on a list of nations in the previous focus)@Randi Moth Do you have an example link to replicate this in the hoi4 wiki? If I try e.g. https://hoi4.paradoxwikis.com/Artillery_technology#Anti-Air it seems to be working fine for me in Chrome.
I can't seem to repro it there either... Maybe others can chime in to see how widespread this is. From how I understand it, timing divides between how quickly the JS runs versus the page rendering. The mediawiki version should easily be new enough to contain the referenced commit.Compare https://hoi4.paradoxwikis.com/French_national_focus_tree#Reconnect_To_the_Balkans (working fine as intended) and https://hoi4.paradoxwikis.com/French_national_focus_tree#Loyalty_To_Moscow (with an offset, right after the {{Collapse}} used on a list of nations in the previous focus)
It only seems to only be broken in certain mw-collapsed usages, but not all. Every single {{Collapse}} usage triggers it, however. https://hoi4.paradoxwikis.com/Special:WhatLinksHere/Template:Collapse for a list of pages that use it right now for a minimum amount of affected pages.
Maybe https://hoi4.paradoxwikis.com/French_national_focus_tree#Bomber_Focus is a better test, because there are more collapsed things before it. When I open that link(it does not work if you copy&paste the link into a tab in which that page is already open), it shows me the last focus (Naval Bomber Focus) instead of the Bomber Focus which is four lines above it. The eu4 wiki also has the same problem on a few pages. For example https://eu4.paradoxwikis.com/Achievements#Eat_your_Greens goes to the end of the page instead of the table line for the achievement "Eat your Greens".I can't seem to repro it there either... Maybe others can chime in to see how widespread this is. From what I understand it, timing devides between how quickly the JS runs versus the page rendering. The mediawiki version should easily be new enough to contain the referenced commit.
Good example is also Italian Independace RSI, which move me to Gappisti focus.Maybe https://hoi4.paradoxwikis.com/French_national_focus_tree#Bomber_Focus is a better test, because there are more collapsed things before it. When I open that link(it does not work if you copy&paste the link into a tab in which that page is already open), it shows me the last focus (Naval Bomber Focus) instead of the Bomber Focus which is four lines above it. The eu4 wiki also has the same problem on a few pages. For example https://eu4.paradoxwikis.com/Achievements#Eat_your_Greens goes to the end of the page instead of the table line for the achievement "Eat your Greens".