Jump to content

Validate animation xml script. 1.0.4


About This File

Was looking at WickedWhimsInfoLog.log and noticed lots of animation loading errors.

[SEX_ANIMATIONS/WARN] [INVALID LOCATIONS] Invalid Sex Animation '0xC8886AC6' by 'ABC' from missing locations.
[SEX_ANIMATIONS/WARN] [INVALID ACTOR] Invalid Sex Animation 'Shower Play' by 'DEF' from using unspecific preferenced gender type.
[SEX_ANIMATIONS/WARN] [INVALID EVENT] Sex Animation 'Footjob on floor 1' by 'GHI' has invalid cum type event.

.....
.....

Had a go at cleaning them up.

 

Firstly many many thanks to the Authors for their great work in creating animations.

 

After having done manual checks and changes, I can see that it's a lot of work to configure the animation xml file. Thus a validation tool would be useful.

 

This is meant for animation authors to hopefully help them. If you find any missing values add them to the vars at the top of the script.
Animators feel free to take, change, use this script as you want.


This is a python 3 script. python is free in the microsoft store.

 

In a terminal (cmd or power shell)

 

python.exe validate_animation_xml.py -h
validate_animation_xml.py [-h] [-e] [-v] [-s] [-t] [-P] [-c] [-N] [-n] [-E] [-d clipdir] [-b best_match_conf] [-L] animation_xml_file ...
-h: Print help.
-e: Print examples.
-v: Print allowed values.
-s: Show possible solutions.
-t: Check animation_tags and animation_actor_tags.
-P: Ignore non printable character check.
-c: Print all clip names.
-N: Ignore animation_next_stages check.
-n: Print all stages.
-E: Allow euro decimal point.
-d clips_folder: Batch export all clips to a folder then do validate_animation_xml.py -d folder animation.xml
-b best_match_confidence: (0-100) Min confidence level for best guess solution to show. Only for -s and stage and clips.
-L: Lenient checks. Sets these to True. See top of script
    # THINK THIS CAN'T BE A LIST but does not error on load.
    animation_pref_gender_can_be_a_list = False
    # THINK THIS CAN'T BE A LIST but does not error on load.
    receiving_actor_id_can_be_a_list = False
    # THINK THIS CAN'T BE A LIST but does not error on load.
    receiving_actor_category_can_be_a_list = False


Will work with either WickedWhims animation or Stripclub animation file.

For full features install python packages fuzzywuzzy and colorama.
In terminal run
pip install fuzzywuzzy
pip install colorama


python.exe validate_animation_xml.py -e
Examples
python.exe validate_animation_xml.py test.xml
########### test.xml ########################
0xEE3FF4BC@ZorakBookShelfClimaxingInTheStacks1: ERROR: animation_locations not a valid value BOOKSHELF
Femdom Harem: Climax interrupted@ZorakBedFemdomClimaxinterrupted: ERROR: not a single digit actor_id 10
Share Fire With Me@YShFwithM1: ERROR: Wrong event type for cum_layer_type. Change event_type to CUM
She is in my Bed2 ERROR: animation_negative_duration_offset is set and animation_loops > 1
Oraljob@YrSa_LoungeChair_BJ1: ERROR: event target a2 not in actor_id ['0', '1']
.....
Mirror - Standing Bang Climax [RC]@oll_triplemirror_rc_standing_bang_3: ERROR: next animation stage name not found oll_triplemirror_rc_standing_bang_4
Entries: 3928 Errors: 13 Pct: 0.33%
############################### END ############################################

 

With -v option.
python.exe validate_animation_xml.py -v test.xml
########### test.xml ########################
Missionary Floor ERROR: cum_layer_type not a valid value BOTTOM
        Valid values: ("FACE", "CHEST", "BACK", "VAGINA", "BUTT", "FEET", "BELLY", "UPPER_BACK", "LOWER_BACK")
.....
Entries: 3928 Errors: 13 Pct: 0.33%
############################### END ############################################

 

With -s option.
python.exe validate_animation_xml.py -s test.xml
########### test.xml ########################
Missionary Floor ERROR: cum_layer_type not a valid value BOTTOM
        Possible solution: BOTTOM Did you mean BUTT
.....
Entries: 3928 Errors: 13 Pct: 0.33%
############################### END ############################################

 

With -d option
In sims 4 studio sort by type, select all clips and batch export to folder (Here C:\Users\me\tmp\b)
python.exe validate_animation_xml.py -s -d C:\Users\me\tmp\b WW_test_Animations.xml
########### WW_test_Animations.xml ########################
Missionary Floor ERROR: cum_layer_type not a valid value BOTTOM
        Possible solution: BOTTOM Did you mean BUTT
.....
############################### Clip files ######################################
....
QuietBlow MF Disturb The Quiet STAGE 2@quietblowSTAGE2: ERROR: not in folder test_ago_2_bookshelf_blow_quietblow_book
        Possible solution: test_ago_2_bookshelf_blow_quietblow_book.Clip Best match Confidence:92 test_ago_2_bookshelf_blow_makequiet_book.Clip
Unsed clip file 6B20C4F3!00000000!09CB32D613AB42ED.test_ott_4_bed_oralvag_5some_fneck.Clip
....
Clips: 1979 Clip files:1752 Missing: 25 Unused: 18
############################### END ############################################

 

Above was using -s option also. This requires fuzzywuzzy search module to "best" guess a solution.
In terminal - pip install fuzzywuzzy
pip is a python utility that is installed with python. (When installed from the microsoft store)
Can also install color support - pip install colorama

 

With -b option
python.exe validate_animation_xml.py -b 70 -s test.xml
....
Indifferent Doggy@Indifferent Doggy: WARN: next animation stage name not found Indifferent Doggy Phone Call
        Possible solution: Indifferent Doggy Phone Call Best match Confidence:77 Indifferent Doggy Climax
        Possible solution: Indifferent Doggy Phone Call Best match Confidence:76 Indifferent Doggy
....

 

Checks.

  • default package name.
  • default package ID.
  • missing or default author.
  • animation_locations valid value.
  • animation_category valid value.
  • animation_type valid value.
  • animation_gender valid value.
  • animation_pref_gender valid value.
  • animation_outfit_category valid value.
  • animation_naked_type valid value.
  • animation_actor_tags valid value.
  • receiving_actor_category valid value.
  • receiving_actor_cum_layers valid value.
  • prop_type valid value.
  • event_type valid value.
  • cum_layer_type valid value.
  • animation_tags valid value.
  • actor_id, receiving_actor_id is 0-9.
  • types that take a single item are not lists of items.
  • types that require a number is a number.
  • animation_negative_duration_offset is not used if animation_loops > 1.
  • event_types set to CUM if cum_layer_type set.
  • events, props actor mapping valid.
  • attributes are in correct xml sections.
  • animation_next_stages exist.
  • event_end_timecode is after event_start_timecode.
  • clips via previous batch export.
  • receiving_actor_id maps to actor_id. (This is disabled for now as it is quite often not the case so not sure if this is a actual error. Can change via variable near top of script)

NOTE/ Mostly checks values not xml structure. (will crash if xml is bad)

 

Values are based on WW documentation but I think some items have been added.
https://turbodriver.itch.io/wickedwhims/devlog/139556/creating-wickedwhims-animation-xml-file-4

 

You can add new values at the top of the script. (Already added DOOR, MIRROR to animation_locations as these seem valid but are not in WW docs)

 

Not sure on a couple of attributes if they take lists. Defaults to non list. -L option changes to allow lists. (You can also change variables near top to script to change the default)

 

Summary of common issues written to WickedWhimsInfoLog.log.
ERROR           - [SEX_ANIMATIONS/WARN] [INVALID ACTOR] Invalid Sex Animation 'ABC' by 'XYZ' from using unspecific preference gender type.
PROBABLE REASON - animation_pref_gender set to BOTH

ERROR           - [SEX_ANIMATIONS/WARN] [INVALID EVENT] Sex Animation 'ABC' by 'XYZ' has invalid cum type event.
PROBABLE REASON - list of items in cum_layer_type or cum_layer_type=DISABLED or other invalid value (DISABLED is invalid. you have to delete the whole event section)

ERROR           - [INVALID DURATION] Invalid Sex Animation 'ABC' by 'XYZ' from using Negative Duration Offset on a non-single loop animation.
PROBABLE REASON - animation_negative_duration_offset is set to a time and animation_loops > 1

ERROR           - [SEX_ANIMATIONS/WARN] [INVALID ACTORS] Invalid Sex Animation 'ABC' by 'XYZ' from incorrect actors list.
PROBABLE REASON - actor_id can only be 0 to 9 (Thus no more than 10 actors)

ERROR           - [INVALID CATEGORY] Invalid Sex Animation 'ABC' by 'XYZ' from incorrect sex category.
PROBABLE REASON - Can't have a list of entries for animation_category


Have run script against quite a few animation packages. Updated 18 Animation packages based on validation run and this resulted in 20 new animations being loaded.

 

Edited by auric3


What's New in Version 1.0.4   See changelog

Released

V1.0.0 2022/01/08
V1.0.1 2022/01/13 Fix mesg typo Unsed to Unused. Update example message text.
V1.0.2 2022/01/23 Fix crash if saved_animation_genders is None
V1.0.3 2022/01/23 Change "Wrong event type for cum_layer_type. Change event_type to CUM" test to not show error if cum_layer_type is empty
V1.0.4 2022/03/16 Add check if cum_layer_type empty. Add check if negative_duration_offset > 9. Ignore current stage name in best guess next name.
                              Add check if effect_joint_name is in correct event_type.
                              Add check if animation_events_list, animation_props_list, animation_actors_list & actor_interactions are in correct sector.

 

 


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use