[Open Assets] SOConverter

This content may be freely modified and/or maintained by anyone.
Status
Not open for further replies.

LJ Sonik

Developer
Sonic Team Junior
Presentation
As its name implies, SOConverter is a SOC converter...
To be exact it can port a 2.0 configuration script to 2.1 without any manual intervention (at least in most cases).
Note that the extension doesn't actually matter, you could convert a file called "something.txt" or even "trolololol.bmp" if you wanted to (but that would be stupid, hu). However the file has to be in text format, it won't work with WAD archives so if you need to convert your MAINCFG lump or some compatible text lump you'll have to export it then importing once it is converted.
It can handle level headers, things (now called objects), frames (states), sounds, and probably more in later releases. Other parts are left unchanged.
You can choose a global prefix that will apply to all custom things/frames names, so it is easier to merge several SOCs without having conflicting names.

How to use
There are several ways to use it: you can just drag-and-drop your file to the converter, or you can directly execute it. In this second case it'll ask you the name of the 2.0 file then the name of the file to create (you have to include the extension for both names). If you decide to drag-and-drop it the ported file will be added "-21" at the end of the name.
If another file with the same name already exists, it will ask you before overriding.

Features
It can currently convert the following properties blocks:

  • Thing
  • Frame
  • Level
  • Sound
Player properties, cutscenes and others aren't modified in the current version, but some, if not all, will be in the future.

Compatibility problems
Due to srb2 v2.1 not always providing backward-compatibily, in some particular cases the ported file won't behave correctly so don't remove the 2.0 file. This happens for instance if the SOC attends to change springs properties, which are now handled in another way, or if it used sprites that have been removed in 2.1.
Note that there are 24 vanilla sounds that are not yet supported because they have been removed/renamed. That isn't a definitive problem and will probably be (for most part) fixed in later releases.

To-do
...well, many things -_-

  • Handle removed and renamed sounds (24 left)
  • Handle springs (SeeState is now replaced by RaiseState, and Mass now replace Speed, also reversed springs are now handled in a different way)
  • Handle endline comments?
  • Use extended names in level headers?
  • Handle cases where Var1 and Var2 are set before Action
  • And more, obviously...
 

Attachments

  • SOConverter.rar
    18.7 KB · Views: 1,174
  • SOConverter-Sources.rar
    14.5 KB · Views: 929
Last edited:
Update!

v0.3 got released!

New features:

  • Prefix for custom objects and states names
  • 2.0's Srb2 Morphed custom actions are now supported (idea from Duon the Adventurer), so you can port Srb2 Morphed's SOCs to vanilla 2.1
  • Sonic 3 & Knuckles sounds names (79!) are now converted, thanks to Duon the Adventurer. There are 24 sounds not converted yet.
  • A_CustomPower and A_GiveWeapon are ported (warning you can't merge shields anymore with 2.1)

Bugfixes:

  • TypeOfLevel now converts correctly Match and Tag
  • The obsolete MapCredit property is now removed from level headers
  • Fixed a bug with custom sounds names conversion using the number of vanilla sprites rather than the number of vanilla sounds
  • Fixed a bug with Sound blocks not converting sounds names
 
Last edited:
Apologies for all the waffling back and forth with this, there was discussion behind the scenes about what to do with this. (Unfortunately the discussion didn't come to a consensus, so I'm just going to have to handle it for now.)

This does not belong in the releases system, as it is an external tool that does not directly interact with the game executable in any way, nor is it a modification of it. It belongs out here in Editing, along with other such tools as Wadzip, SRB2DB, etc. that have always been out here.
 
I have a problem and can't handle attached files on this thread, so the program is only downloadable from a Mediafire link.
Also I reuploaded it because the version I had uploaded wasn't the correct one (0.1 while I said it was 0.3).

---------- Post added at 08:41 PM ---------- Previous post was at 07:42 PM ----------

Nevermind what I said, it is fixed now =D
 
*maniacally laughs while running to put Hinote's SOC through this*

I never would have imagined somebody making a tool to convert those annoying SOC scripts from one version of the game to the next. I see this cutting through a lot of manual labor to porting older content, and might help me finally upgrade to using 2.1 all the time on my notebook. *bricked*
 
Beta v0.4 got released!

  • A_ChangeColorAbsolute is now handled correctly
  • The custom names prefix is now automatically capitalized
 
Beta v0.5 got released!
There are no new features in this version but rather multiple bugfixes, since apparently during the last build the sources hadn't been correctly saved >.<
Now A_SpawnObjectRelative and A_ChangeColorRelative are handled correctly.
 
The program crashes when I manually specify input and output names. It works fine with drag and drop though.
 
Does it actually CRASH or just put an error message then stop working? With me it works fine... Do you use spaces or a very long name?
 
It is an actual crash. The filename is not the issue, it happens regardless of what I put.
 
Last edited:
I don't even have an idea of what is wrong with this :/
I'll look forward for that when I'm back home next week.
 
IIRC Fiends was for 1.09.4 no?

---------- Post added at 10:24 PM ---------- Previous post was at 09:30 PM ----------

v0.6 got released!
No changes, but a major bugfix with the names prefix. It was caused by a memory overflow when allocating space for the prefix string, crashing the program if you used a prefix.
 
v0.7 got released!
Nothing has been changed, but I noticed "A_CheckThingCount" was mispelled as "CheckThingCount", so I fixed it.
 
Is there any video tutorial on this? I tried reading the OP, but i'm still confused.

Edit: I just had to put the MAINCFG into the converter.
 
Last edited:
Sorry for the long wait, and yes there were fiends in Final Demo 1.09.4, not the 1.09.4 that doesn't have wads loaded. It comes with the wad TheMansion.wad which specifically comes from this thread: https://mb.srb2.org/showthread.php?t=36478
I'm sorry but this converter can only port SOCs from 2.0 to 2.1, not from 1.09.4. Making this work for 1.09.4 would require me to make a lot of changes in the source code, which I am not willing to do currently, if ever.
That said, don't forget manual ports are still a thing, this converter is just a convenience.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top