Forum

> > CS2D > Maps/Editor > Map Editor Bug - 3 Million Coordinates
Forums overviewCS2D overview Maps/Editor overviewLog in to reply

English Map Editor Bug - 3 Million Coordinates

3 replies
To the start Previous 1 Next To the start

moved Map Editor Bug - 3 Million Coordinates

Vennece
User Off Offline

Quote
• Hi im the one who created this map for years and i accidentally discovered a bug, or i created it, i didn't posted at bug reports section because i need a solution to delete it, instead of updating a cs2d.
This map

• What did you do why the bug is found ? :
     welp its crazy, really, its a trick for cs2d mappers, whenever i program a triggers entities (Trigger_delay, once, if), i use notepad
     and replace the notes to just copy paste on entities, meanwhile, i didn't mean to do that. i have delay realized when copying
     a note from notepad then just have space from it.
     IMG:https://i.imgur.com/6i7bm7y.png

     i copy-pasted to entities, saved the map, the result is wierd.

• What does the bug do ?
     the result of last saved map, deleting half the entites you've created at last save, and the triggers of delay had set to over 50000 seconds
     remade all of them and solved the bug, but there was last thing that hard to delete, i tested the map and it spawned at the nowhere
     and it has a steady rain sprites going on, idk where coordinates of map so i used one thing.

• Why 3 Million coordinates ?
     i used the tile mapper at samples of lua at "sys/lua/samples/tilemapper.lua" good thing i used that to detect coordinates. this is the
     result of coordinates
     IMG:https://imgur.com/E1E5vPi.png

     look at that, how do i supposed to go there and delete it !?, there's no way of shortcut, and also it does not only CT entity, and T spawn too
     they are only two errored entites i can't seem to delete it, so i posted this and that's why,


> The solution i think is the best, is to jump the camera to exact coordinates of map editor, just like the valve hammer map editor.
second solution is have a key to go through entities one by one by depth, or delete only these entities like delete all CT spawn not just "Ctrl Shift Del"
i feel sorry for the map i did, and i didn't mean to create it, i don't want to re-create the map instead, i wasted all my hardworks, or copy the entity
one by one. please developers help me. i need to finish this map without bugs.

IMG:https://imgur.com/HrILXKk.png


P.S the title was supposed to be map editor problems, it invalid

Admin/mod comment

Moved to Maps/Editor section. /DC

old Re: Map Editor Bug - 3 Million Coordinates

_oops
User Off Offline

Quote
I reported this in thread cs2d CS2D Bug Reports previously, and I made a script that fixes such glitch spawning.

Just like you state in the thread, it happens when you copy-paste any sentence with lines.

I would suggest you use this Line break site however if it is possible, do not put the lengthy Lua script files in it just use the individual script for the map.
Putting scripts in Trigger_If will just make the map file bigger.

Also, this script will fix the issue
1
2
3
4
5
6
7
8
9
10
11
12
function GLITCH_SPAWN_REMOVE()
	for _,e in pairs(entitylist()) do

		if (entity(e.x,e.y,"typename") == "Info_T" or entity(e.x,e.y,"typename") == "Info_CT" ) then
			if ( e.x > map("xsize") or e.y > map("ysize") ) then
			parse("triggerposition "..e.x.." "..e.y)
			print("\169255255255Found glitched spawn point - "..e.x.."|"..e.y)
			end
		end
	end
end
GLITCH_SPAWN_REMOVE()

The script causes small lag after execution. It took like 0.6 seconds in a map with over 9000 entities.

Don't forget to make it executable in every round, otherwise, it won't disable glitched spawn points!

old Re: Map Editor Bug - 3 Million Coordinates

DC
Admin Off Offline

Quote
Unfortunately copy&pasting line break characters into any editor text field (which is stored as text) will corrupt your map file. Luckily the entities are saved very last in the map file. So loading may still work but all entities after an entity with line break characters in its values will be corrupted (missing/weird values/replaced with "random" other entities at "random" positions).

When you only saved the map ONCE (before it was broken) you can fix the issue with a text or hex editor by removing the wrong new lines (e.g. search for the text you copy&pasted).

If you however loaded the already corrupted map in the editor and saved it AGAIN, data will be reformatted and you will lose information. The only way to rescue parts of the map then is to remove all entities after the first one with corruption.

There are no tools in the editor to jump to certain positions or anything. You can however use a hex editor to manipulate the broken entity positions so they are in sane positions again. This isn't a trivial task though and requires some understanding of data types etc.
The map format is described in all detail here:
http://www.unrealsoftware.de/files_pub/cs2d_spec_map_format.txt

This issue will be fixed in CS2D 1.0.0.8. I will simply strip all new line characters from all copy&pasted text to prevent such problems. This will only prevent future corruptions though.
edited 1×, last 15.11.18 05:43:40 pm

old Re: Map Editor Bug - 3 Million Coordinates

Vennece
User Off Offline

Quote
Thanks @user DC: to future implementations at 1.0.0.8 and also to @user _oops: for solution

This thread will be closed and deleted after 1.0.0.8 released
maybe if other people have encountered this bug and affected on
maps with their hardworks

EDIT : the depth of thousands of entities and oversized that map editor can't handle it, i hope it would won't error on future updates of cs2d.

EDIT2: After all the editing and discovering of how to delete the glitch entity, i used the HxD Editor like @user DC: said and, i tried every day, i spent a week to know how do i delete, while i was using HxD
IMG:https://i.imgur.com/8cxrRxX.png

finally made it, but, the some entities malfunctioned and deleted where the error began.

@user _oops: seems to be work but some entities still cannot removed
edited 2×, last 21.11.18 03:19:04 am
To the start Previous 1 Next To the start
Log in to reply Maps/Editor overviewCS2D overviewForums overview