Files

> > CS2D > Misc. > [Ranu] CS2D Map Reader
Files overviewCS2D overviewMisc. overview

English [Ranu] CS2D Map Reader >

1 comment4 kb, 67 Downloads

old [Ranu] CS2D Map Reader

Ranu
User Off Offline

Hi,
I don't know if this already exists or not, but i could not find any good one so I decided to write my own with @user MikuAuahDark. It's 100% pure vanilla lua 5.1, without using CS2D API or special libraries.
Somebody might need this. If you have any issue, or if there's any bugs let us know.
the code is pretty ugly, i havent put any extra effort into it, as long as it works its fine to me. the purpose of the script is to show you how to read a CS2D map file as the official documentation is very confusing.

put the map name into the "map" variable as a string with the file extension ".map".
would look something like this
local map_folder = "maps/" -- assuming the script is in CS2D folder
local map = "cs_italy.map"


Contains everything about the map:
(1) HEADER √
(2) Tile Modes √
(3) Tile Heights √
(4) Map √
(5) Entities √
Approved by Gaios

Download Download

4 kb, 67 Downloads

Comments

1 comment
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

WatPz
User Off Offline

Not long ago, I just have finished my own map reading script o.0. Anyway, thanks for the code.

ps: Noticing that you didn't write the save part, I uploaded my own script, this script can save the modified map information, url: file cs2d CS2D Map Reader v2
I like it!
edited 2×, last 24.06.24 04:40:24 pm
To the start Previous 1 Next To the start