Modules and OpenBOR compatibility

fantomid

New member
Hello all,

I'm actually going to release some PND files for the Pandora handheld. The PND file is a sort of ISO file that contains the binary and datas to not pollute the root firmware of the device. So, I downloaded MODs and checked for the OpenBOR version in the log file to compile the same version for the Pandora. For some old MODs, if you search for the version, the source code is available on sourceforge with svn. And you have to compile this version.
How could I get compatibility with theses old MODs with the last corrections of the engine and the full support of the commands includes in the module ?
Are there release notes that list the commands lost between version ?
 
fantomid,

Through the years we've made every effort to keep backward compatibility. The main issues that tend to break stuff in old modules are when we discover a bug and fix it, but the module was built around said bug. Or more often, the module uses a feature that was still in development and later finalized in a different form.

We almost never outright remove commands. In my entire 10+ year tenure here I think that's happened like three times, tops. They were either not used by any modules we knew of in the library, or are not required to run. In no case do we ever remove functionality. Example: The colormode option (8bit, 16bit, 32bit) was removed some time ago - the engine always runs in 32bit color mode now. But older modules with the colormode option set aren't affected. The command is just ignored and the module runs as is. There's no functionality loss since 32bit can obviously accommodate 8bit and 16bit color depth projects.

In other words, the various breaks are either a coding oversight, or a bug fix, not intentional backward compatibility breaks. And that means there's no comprehensive list. You just have to experiment with individual modules to bring them up to date. Sorry I can't give you a better answer.

DC
 
So, the problem is more Mod relative than Engine relative.
I will test old Mods and try to handle errors.

Thanks for your answer.
 
Other question;

If I build a version with the last github tag, how could I debug mods ?
Is there a define (VERBOSE give for example more information in the log file) or other things to do to handle errors  and then correct them ?
 
fantomid said:
Other question;

If I build a version with the last github tag, how could I debug mods ?
Is there a define (VERBOSE give for example more information in the log file) or other things to do to handle errors  and then correct them ?

Unless you are talking about putting breakpoints into the engine source and checking through the memory, then no. The native log is about as verbose as it gets. If a module does something wrong, there is almost always a clue in the log somewhere - people erroneously say "OpenBOR crashed when I did X", but it doesn't work that way. Unless you purposely write something like an infinite loop script, you can't really crash the engine. It just doesn't know what to do with a bad command or syntax, so it logs the error (if possible) and then performs a controlled shutdown.

Show us the log if something is confusing you, we can probably help.

DC
 
I got a bug for the Pandora version with Golden Axe Myth Mod.
The "splash screen" with the dialog before entering the level was displayed in the background.
I found that the value gives in "setlayer" overflow with atoi on the Pandora.
I wrote a function (safe_atoi) that return INT32_MAX in this case and that resolves the "splash screen" problem.
With this new function, I also added tests that detect for example if the read value is an integer or not.

And now, in SOR2X mod's log, I got this kind of WARNINGs:

"lifescore" and "credscore"
Code:
WARNING: data/models.txt tries to load a numeric value at lifescore but overflow occurred!
erroneus string: 9999999999 not in [-2147483648, 2147483647]
WARNING: data/models.txt tries to load a numeric value at credscore but overflow occurred!
erroneus string: 9999999999 not in [-2147483648, 2147483647]

Several warnings on "jugglecost"
Code:
Loaded 'Axel' from data/chars/heroes/axel/axel.txt 
WARNING: data/chars/heroes/axel/axel.txt tries to load a non-numeric value at jugglecost, where a number is expected!
erroneus string: 2.5

I will create a new branch on my github fork to review the safe_atoi modifications.
And do you think this kind of verification could be added in the master ?
 
fantomid said:
And do you think this kind of verification could be added in the master ?

I don't think I'd have a problem with that. Just add a log alert when the limiters apply. Module building can be hard enough already without the engine silently modifying more of the creator's values.

DC
 
A tool to parse the pak file or files of the module finding wrong values, unused files and whatever could help building modules ?
 
fantomid said:
A tool to parse the pak file or files of the module finding wrong values, unused files and whatever could help building modules ?

I'm sure it would help, but what's the point? Most older modules run just fine on new engine versions anyway, older engine builds are available for those that don't, and frankly most older modules are pretty dubious in quality. I can't speak for others, but I seriously doubt you'll find anyone willing to put effort into such a project just to play Beats of McDonald's XXXIII from 2006 on {console}. By the time it was finished and working, any modules actually worth updating could be fixed by hand several times over.

IMO, we'd be better off with a general editor that's completed and stable.

DC

Edit: fantomid, It's not a backward compatibility tool, but for what's it's worth, O Ilusionista pointed out there was a tool in progress by netspider1 that helped remove unused resources. It's in this thread. Doesn't look like it gained much traction and the link is broken, but would be handy if completed.
 
Damon Caskey said:
IMO, we'd be better off with a general editor that's completed and stable.

Sounds good. Is there a thread to speak about this kind of tool ?
I think you are with O Ilusionista and some others the best to give orientations to produce this kind of tool.


Damon Caskey said:
Edit: fantomid, It's not a backward compatibility tool, but for what's it's worth, O Ilusionista pointed out there was a tool in progress by netspider1 that helped remove unused resources. It's in this thread. Doesn't look like it gained much traction and the link is broken, but would be handy if completed.

Thank you DC to point me to the tool. I will check it.
 
Back
Top Bottom