Log in to reply
 

Is it possible to skip failed replace lines with oiv xml script?



  • Is it possible to skip failed replace lines with oiv assembly.xml because I've been thinking of possible skip scripts that would work with xml and so far everything I though of has not worked. I'm trying to replace lines in handling.meta and some of the lines I am using don't exist in the games handling.meta.

    So basically can I skip a xml archive replace command without there being the "unhandled exception" error which aborts the whole oiv installation.



  • @3_Washing_Machines

    Can you replace the entire file instead?

    OIV installers are for users who don't know or don't care what will happen to their setup, so they're very much accustomed to having their files replaced, even with outdated files. Perfect example are mods which replace the dlclist.xml.

    If you're trying to add error trapping to the vanilla OIV process that's not possible. However there are replaces and of course createIfNotExist. You have insert for additions. You can also use gt and lt to create opening and closing tags.

    Might be better to give an example of what you're trying to do, a snippet or full xml, for someone to help you.

    https://github.com/OpenIV-Team/OpenIV-PackageFormat/blob/master/specification/versions/2.2.md

    Here is a text example, refer to documentation for xml, this should work given xml is text.

    
    <add>This line is added</add>
    <delete condition="Equal">Line 3</delete>
    <replace line="Line 4" condition="StartWith">THIS IS NEW LINE</replace>
    <insert where="After" line="Line 5" condition="Equal">This is last line</insert>
    <insert where="Before" line="Line 1" condition="Equal">This is first line</insert>
    <delete condition="Mask">#*</delete>
    
    
    

    Unclear if you're doing this for yourself or for a mod or for multiple vehicles.meta files, so it seems replacing entire file makes more sense, particularly if you're doing it for one specific car. Or provide manual instructions so users can avoid the OIV process and actually learn the intricacies of the copy and paste operation to a text file, something most 6 year old kids can master.



  • Thank you, I was attempting to error trap. What I am attempting to do is make an oiv in which would replace every single collision & deformation handling line to make it so that you could install a vehicle deformation mod without having to replace handling.meta itself. Meaning that it would be compatible with other handling.meta mods. Thank you as your sort of workaround is something that I had not thought of or seen online. Thanks.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.