aliens

Author Topic: modtester  (Read 15288 times)

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
modtester
« on: June 05, 2014, 06:35:16 pm »
update for the modtester https://falkooxc.pythonanywhere.com/

put your mod in a zip file and try it :)

since you can now see the list of possible errors some explanations would be useful:

i downloaded >70 mods to get most of the errors "in the wild"

since we have now >50 errors i explain the more frequent/seriuos ones here
Spoilerstart errors:
'rulfile is likely not UTF-8','some error during rulfile import','rulfile not in Ruleset Folder','the mod .rul is not a map/dict'
here i catch problems reading a mod - i see the rul file as the center of the mod if no rulfile or it is "wrong" yaml format it throws an error
'image/sound file should be in Resources/modname/... ' an information that you should put your files into a subfolder to avoid conflicts with other mods

Spoilerimage errors:
'palette not correct' here we have an error in the image mostly the palette is slightly wrong see: https://imgur.com/kPn3C3W  but sometimes completely
'palette could use more colours' the image of this entry is not shown in the ufopedia and can therefore use the last 16 colors
'a sprite sheet is bigger than needed','references spritesheet does misses images' handobs,armors,tanks where the number of sprites is not as it should be
'an image has the wrong mode' we found a image that is not using a palette that should be fixed

Spoilerlanguage errors:
'no string translation' each new item/research/manufacture/ufopedia,... needs a entry in extraStrings
'a language/translation is missing' the interface allows to select some languages that have to be there .. if not you get an error
'a language is incomplete' one language has more strings than another

Spoilerreference/file errors:
'file/dir not found' happens rarely that a file is wrongly referenced in extrasprites/sounds
'spec file not found' happens more often for maps and terrain - e.g. some mods use map as directory it is MAPS!
'the case sensitive test of dir/file path failed' very often the path of the file extraSound/sprite entry differs from the (case sensitive) real path that leads to problems with using the mod in unix systems
'case sensitive path error for a file' see above but in regard to maps/terrains
'extrasprite/sound is not ruleset-referenced' there are extrasprite entries but no item that uses these entries
'not referenced file found' here are files that were in the mod directory but were not referenced somewhere in the rulset .. bestcase: there is a "Readme.txt" "error"
'no connected file entry found for ruleset-referenced' here an item refers to some file entry but it does not exists happens mostly if someone got confused with the sprite ids

Spoilerother errors:
'a property doubled in map/dict' happens if you have an object and add the same property twice the devs called that "unsafe and unsane"
Code: [Select]
extraSprites:
  - type: FLOOROB.PCK
    files:
      83: Resources/Piratez/FLOOROB/FloorBarrel.gif
      83: Resources/Piratez/FLOOROB/FloorDynamite.gif
'an item occurs multiple time' here we have declared the same item more than once in a list
Code: [Select]
extraStrings:
  - type: en-US
    strings:
      STR_HEAVY_LASER_CLIP: Heavy Laser clip
  - type: fr
    strings:
      STR_HEAVY_LASER_CLIP: Chargeur de laser lourd
  - type: en-US
    strings:
      STR_LASER_RIFLE_CLIP: Laser Rifle clip
  - type: fr
    strings:
      STR_LASER_RIFLE_CLIP: Chargeur de fusil laser
  - type: en-US
    strings:
      STR_LASER_PISTOL_CLIP: Laser Pistol clip
  - type: fr
    strings:
      STR_LASER_PISTOL_CLIP: Chargeur de pistolet laser
    better would be
Code: [Select]
extraStrings:
  - type: en-US
    strings:
      STR_HEAVY_LASER_CLIP: Heavy Laser clip
      STR_LASER_RIFLE_CLIP: Laser Rifle clip
      STR_LASER_PISTOL_CLIP: Laser Pistol clip
  - type: fr
    strings:
      STR_HEAVY_LASER_CLIP: Chargeur de laser lourd
      STR_LASER_RIFLE_CLIP: Chargeur de fusil laser
      STR_LASER_PISTOL_CLIP: Chargeur de pistolet laser


'keeps original value' shows that you have an entry that is a exact copy of the original and it could be removed (or automatically fixed)
'missing research referenced' somewhere you reference a research (unlock,requires,getonefree,..) but the researchobject does not exists
'missing item referenced' somewhere you reference a item (required item, fuel, compatible ammo, ...) but the item object does not exists
'no listorder for new objects' Solarius Scorch wanted that and it was easy to make - errormessage should speak for itself

Spoilerwahts with the fixes?:
now you can make fixes for your mod
the tester takes the last rulfile in a mod and "repairs" it
you can
Change case sensitive filepath entries [that works only for extrafile/sound entries you cant fix a map reference to files named SoMeNeW.MaP+sOmEnEw.rMp with just fixing the ruleset]

Remove unchanged vanilla properties/entries [removes entries that are unchanged in regard to the original values - last update of vanilla=jun 28]

if string only in en-XX add it to en-YY [just mantain en-GB .. US is added automatically or vis versa - is es and es-419 also exchangable?]

Edit:
Spoilerold first post text:
during the devopment of a more complex tool realized i could create a mod tester without much additional work on my site
here it is
https://falkooxc.pythonanywhere.com/
it needs a mod in a zip file with a rulfile in the ruleset Folder
at the moment it chacks for ~40 errors  i encountered  3/4 of these errors in real mods i found online
the "design" is not really good but it does its job
you can see the importance level, error description  and clues where to find the error in the line below the error message

i use a free account on pythonanywhere.com that gives a limited amount of CPU Power so should there be a run on this it could get a bit slow in theory
« Last Edit: June 28, 2014, 05:23:55 pm by Falko »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: modtester
« Reply #1 on: June 11, 2014, 02:53:51 pm »
I tested it briefly. Works like a charm, the only problem I encountered so far is that it raises an alarm regarding non-UTF-8 format when in fact it is UTF-8. Check my recent Firearms Compilation for an example of this.
To sum up, it's a goddamn monster in terms of usability. Great work, Falko!

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: modtester
« Reply #2 on: June 11, 2014, 04:00:49 pm »
there seems to be a problem with some of the es/ es-419 utf strings
i deleted the es* languages zipped it and uploaded it and now the rulfile could be checked
the game seems to be a bit more forgiving than the tool or yaml online parser

Edit:
currently some errors can be a bit missleading:
like:
Code: [Select]
file/dir not found
['warning:', 'a extrasprite/sound entry is wrong', 'extraSprites', 'FLOOROB.PCK', 'Resources/Firearms_Compilation/Submachinegun/floorob_clip.gif']
there is a file Resources/Firearms_Compilation/Submachinegun/floorob_Clip.gif (c!=C in unix where the test is running) i will fix that confusing error recognition some day
« Last Edit: June 11, 2014, 04:11:13 pm by Falko »

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: modtester
« Reply #3 on: June 11, 2014, 04:28:22 pm »
Getting a warning for this is quite important, because it works for some players and breaks for others, causing much confusion.

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: modtester
« Reply #4 on: June 15, 2014, 11:28:01 pm »
update for the tester - description see first post

Offline Jo5hua

  • Captain
  • ***
  • Posts: 78
  • ModSite
    • View Profile
Re: modtester
« Reply #5 on: June 16, 2014, 02:12:02 pm »
Nice. I have a question. What is this coded in? If we get to having an ingame mod downloader we could implement this into the modsite for testing all the mods that are uploaded to the site.

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: modtester
« Reply #6 on: June 16, 2014, 02:50:21 pm »
the url https://falkooxc.pythonanywhere.com/ gives a hint :)
its coded in python (works with 2.7 (web) and 3.x (local version))

the modsite was one of my main search grounds for testfiles for the tool

Offline Jo5hua

  • Captain
  • ***
  • Posts: 78
  • ModSite
    • View Profile
Re: modtester
« Reply #7 on: June 17, 2014, 01:12:01 am »
Ahh yes I saw that just after I posted it :) Even looked a bit into python... Neat though!

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: modtester
« Reply #8 on: June 17, 2014, 11:04:36 pm »
Hey Falko, I'm trying to test this mod (see attachment), but I'm getting internal server error on it. Other mods work just fine.

Help please?

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: modtester
« Reply #9 on: June 17, 2014, 11:16:22 pm »
short help
ru language screws with the "double item"-test
Spoilerwhy?:
the tool compares
Code: [Select]
items:
  - type: STR_ALLOY_CANNON
    size: 1.5
    costSell: 45000
    transferTime: 48
    listOrder: 630
with
Code: [Select]
68007683798485791001items:
  - 66749472307414965242type: STR_ALLOY_CANNON
    65274331231985014017size: 1.5
    83813619105999693028costSell: 45000
    85164732974404812969transferTime: 48
    59065739506796236675listOrder: 630
to check if you have some property twice
but in the [added randomnumber]-file all non ascii chars are deleted and then
it looks like that
Code: [Select]
  - 36311567784243541252type: ru
    83283974477833520692strings:
      59311439341153775329STR_MINIGUN:
      13233305588859474049STR_MINIGUN_CLIP:   
      38655119999810609854STR_MINIGUN_UFOPEDIA:                 .      ,       .
      22889816533367289416STR_LIGHT_MINIGUN: 
and that can not be read by a yaml parser

Edit:
problem is fixed now
« Last Edit: June 18, 2014, 01:48:53 am by Falko »

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
[WIP] check compatibility bethween rulesets
« Reply #10 on: June 18, 2014, 10:34:02 am »
next step it is the merge :P

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: [WIP] check compatibility bethween rulesets
« Reply #11 on: June 18, 2014, 11:18:48 am »
next step it is the merge :P
yes but i am not sure that a webinterface is the right gui-choice for that

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: modtester
« Reply #12 on: June 18, 2014, 05:56:01 pm »
Thanks Falko for precious tool!

One remark : Got the warning :
Quote
[u'info:', u'new object should get a listOrder property to place them within their lists correctly', 'ufopaedia', 'STR_MACHINE_PISTOL_CLIP', u'Ruleset/MachinePistol.rul']
You may want to suppress it for ufopedia entries which have "section: STR_NOT_AVAILABLE"

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: modtester
« Reply #13 on: June 18, 2014, 06:26:03 pm »
i fixed that
missing-listorder-error is now shown for research with cost<=0, items you cant recover from battle and now ufopedia entries with section: STR_NOT_AVAILABLE

question: i find ufopedia entries without section entry in some mods .. is that an error/whats the default?

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: modtester
« Reply #14 on: June 28, 2014, 05:22:58 pm »
switched to a newer software version
now you can make fixes for your mod
the tester takes the last rulfile in a mod and "repairs" it
you can
Change case sensitive filepath entries [that works only for extrafile/sound entries you cant fix a map reference to files named SoMeNeW.MaP+sOmEnEw.rMp with just fixing the ruleset]

Remove unchanged vanilla properties/entries [removes entries that are unchanged in regard to the original values - last update of vanilla=jun 28]

if string only in en-XX add it to en-YY [just mantain en-GB .. US is added automatically or vis versa - is es and es-419 also exchangable?]