The Dink Network

hex edit maps?

April 7th 2018, 07:50 PM
duckdie.gif
crypto
Peasant They/Them
 
So i can't get the import to work .... So i thought ...

it should be possible to copy the hex strings from one map to another ?

has any one ever tried that? or have any comments on this..

before i go and try it ?

In case anyone was wondering this does work ... but it's very hard to line up the offsets..
April 8th 2018, 03:44 AM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
If the graphics are different in the source dink.ini to the destination dink.ini, you'll end up with everything looking very strange afterwards.
April 8th 2018, 04:19 AM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
Yes, I suppose it would work. However, it sounds easier to me to write a program that converts the file(s) into something editable and back, so you can use that format to edit them. But if you're not a programmer, that's probably not an option.

I have already written such conversion tools, but they aren't really usable for other people at the moment.
April 8th 2018, 10:26 AM
duckdie.gif
crypto
Peasant They/Them
 
@yeoldetoast .. ya thanks i thought of that before i tried, knew that the dink.ini controlled all the graphics ... i was using maps with more or less the same graphic bases ..

--
@shevek -- ya well i'm not a programmer of that calibre yet .. i mean i could read the file in, and do things to it .... but not skilled enough to do my own formats ..

just picked up c++ from bash and very minimal pascal - asm ... so while i understand program structure and can read most things in not always sure about how do do thing my self ... using dinkc to keep me entertained while learning .... just wish dinkc had some "for" "while" stuff... if if if goto ... lol ahahaaaa .. it is however helping to make my code easier to read .. in the dinkc restrictions ..... i mean my c++ is easy to read already .... but dinkc has issues with how i place white space .. I like doing ( "" )
[ s ] and dinkc just skips over that ... so have to (" like this ") | ("this") .. i do that because of bash i think ...

if [ -r /somefile ]; then --- there is also a space after if
April 8th 2018, 01:27 PM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
I completely understand. In fact, I already write a preprocessor that takes code that looks more like actual C and turns it into valid DinkC. It's also not entirely usable for others though. I'm working on that.

But from what you're saying, you should be able to do what I was talking about. What I mean is that you can read map.dat and write out a list of files like:
386:0 127:400 485:0 ...
...
the-script
Sprite 1
x 50
y 100
seq 45
frame 1
...

(The first line is the tile codes and their hardness.) This should be pretty easy to write once you have read the data into memory. Those files are easy to edit by hand, and it shouldn't be too hard to construct a new map.dat from them. Especially if you don't check to see if the files are in the proper format (which just means you have to be careful not to break stuff when you edit them): just discard the first word on every line for the sprite and write the values into the new file.

Anyway, this isn't much more useful than using a hex editor, so it's understandable if you don't see the value in doing this.
April 8th 2018, 03:53 PM
duckdie.gif
crypto
Peasant They/Them
 
hmm, not sure i follow completely ... I do get the concept, maybe I'll play around with it later on, it would be good practice even if I failed ..

however, I have today been inclined toward just making a map on my own now ..

just because then i have a "brain" memory reference for where things are. a lot of the maps don't quite fit what i would like for easy editing navigation..

some things i am working on require that areas are not attached.. i guess i could use hardness, but still learning how to use that right..

getting there though... i would bet that the map will take me the longest amount of time, even if i don't detail it ... i mean i was having issue at the start with dinkc .... but once i got the dev notes ..... that stopped right quick...

it's actually rather fun working in the restrictions that dinkc enforces .. and all the if practice you'll ever need ...

OH, i get you now .. ya ... but ya i think the hex option is faster ... i mean it's copy paste ... it's just lining up the off sets that is an issue