SRB2 Message Board

SRB2 Message Board (https://mb.srb2.org/index.php)
-   Software (https://mb.srb2.org/forumdisplay.php?f=109)
-   -   SOConverter (https://mb.srb2.org/showthread.php?t=40516)

LJ Sonik 05-13-2015 09:44 PM

SOConverter
 
3 Attachment(s)
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...

LJ Sonik 07-06-2015 06:22 PM

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

K.S. 07-06-2015 09:01 PM

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.

LJ Sonik 07-06-2015 09:45 PM

Hu, ok =3
trolololololololololol (for the 10 chars)

LJ Sonik 07-08-2015 06:41 PM

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

.Luke 07-09-2015 06:47 AM

*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*

LJ Sonik 07-09-2015 04:00 PM

Beta v0.4 got released!
  • A_ChangeColorAbsolute is now handled correctly
  • The custom names prefix is now automatically capitalized

LJ Sonik 07-10-2015 12:47 PM

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.

Katmint 07-26-2015 01:31 AM

The program crashes when I manually specify input and output names. It works fine with drag and drop though.

LJ Sonik 07-28-2015 08:03 PM

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?

Katmint 07-29-2015 04:32 AM

It is an actual crash. The filename is not the issue, it happens regardless of what I put.

LJ Sonik 07-30-2015 08:42 AM

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.

golteam 07-31-2015 09:21 AM

Can your make this compatible with invisible NPCs etc The mansion fiends.

LJ Sonik 08-03-2015 08:24 PM

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.

LJ Sonik 12-02-2015 01:10 PM

v0.7 got released!
Nothing has been changed, but I noticed "A_CheckThingCount" was mispelled as "CheckThingCount", so I fixed it.

golteam 06-04-2016 03:53 AM

Quote:

Originally Posted by LJ Sonik (Post 770918)
IIRC Fiends was for 1.09.4 no?

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

nothing 09-19-2016 11:06 PM

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.

LJ Sonik 11-08-2016 01:02 PM

Quote:

Originally Posted by golteam (Post 780214)
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.


All times are GMT. The time now is 12:56 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.