Page 1 of 1

Python SCMap Parser

PostPosted: 14 Apr 2017, 03:00
by b2ag

I've build a script based on the bits currently flying around in the world wide web (mostly thanks to HazardX) on scmap file format parsing. My implementation successfully parsed the 123 SC maps currently on my PC with map minor versions including 60, 59 (only one map), 56 and 53.
I've chosen Python to write this script, because I'm using Linux and can't really deal with VB, .NET and C# code there.
The script definitely contains some unexplained readings and possible wrong readings to variable name mappings. Nevertheless it is able to find the props section on at the very bottom of each map file for all my 123 maps.
This should be seen as possible starting point for other developers for their own projects, since it's not that many information out there. Please connive the hacky code.

Have fun,

Re: Python SCMap Parser

PostPosted: 18 Apr 2017, 00:51
by b2ag
Younger sibling of code linked above is the beginning of a mirror map tool linked here:
Read more here: viewtopic.php?f=53&t=14382&start=10#p147024

Re: Python SCMap Parser

PostPosted: 20 Apr 2017, 14:33
by Dragonfire
for code sharing I suggest

Re: Python SCMap Parser

PostPosted: 04 May 2017, 02:16
by b2ag
Dragonfire wrote:for code sharing I suggest

I've now uploaded everything to Github, since I wanted to release the tool which needed this parser. The current parse code is at ...

Re: Python SCMap Parser

PostPosted: 05 Feb 2018, 18:05
by Lionhardt
I have written a small adaptation of your parser and mirror script to randomise decals lod cutoffs. Is it fine if I post that adaptation in the mapping forum?

Re: Python SCMap Parser

PostPosted: 06 Jan 2019, 12:43
by teddy26

Friends I don't know about python SCMap parser.I'm beginner in python Language so tell me its working with python so that when I learn on that topic it gives me knowledge about them.One thing please provide some details which is important part python language from job purposes.
Please Reply...

Re: Python SCMap Parser

PostPosted: 20 Mar 2019, 20:46
by teddy26
With Python 3 being the future of Python while Python 2 is still in active use, it is good to have your project available for both major releases of Python. This guide is meant to help you figure out how best to support both Python 2 & 3 simultaneously.

If you are looking to port an extension module instead of pure Python code, please see Porting Extension Modules to Python 3.

If you would like to read one core Python developer’s take on why Python 3 came into existence, you can read Nick Coghlan’s Python 3 Q & A or Brett Cannon’s Why Python 3 exists.