Map Disassembling + tutorial

Started by Blackcode, February 28, 2010, 06:49:28 AM

Previous topic - Next topic

Blackcode

Quote from: Vernam7 on March 14, 2010, 05:04:39 AM
hello friends


why the spaw position although is written perfectly, works only SOmetimes, in all maps and ALWAYS correct in Shakuras Plateu???


this is happening to all launchers btw


i will investigate on this... till now i had no problems

Valkirie

Quote from: Blackcode on March 14, 2010, 05:42:49 AM
Quote from: Vernam7 on March 14, 2010, 05:04:39 AM
hello friends


why the spaw position although is written perfectly, works only SOmetimes, in all maps and ALWAYS correct in Shakuras Plateu???


this is happening to all launchers btw
Mine too ? Because our launcher is generating a new file from nothing, not patching the actual one. Then if yes, you should investigate.


i will investigate on this... till now i had no problems

Vernam7

#62
Quote from: Valkirie on March 14, 2010, 11:49:26 AM

Mine too ? Because our launcher is generating a new file from nothing, not patching the actual one. Then if yes, you should investigate.



Valkirie what are you talking about?, your latest launcher doesn't even have start locations how can it be even broken, yet?

and so far your tool also patches the maps and lives them patched and not playable from other tools!
but start locations i couldnt tested on yours. so now that you are making start locations make sure you also do so serious tests, cause i though it was working too, but it doesnt always work, actually most of the times its totally random, besides the Shakuras Platue map.


its a general question not specified to one person, or launcher.

i hope its just a map issue, but i tested with sYk0's latest map pack official blizzard maps, nothing all give the same results! ::)


its indeed strange.
if there was something wrong in the implemention process it would work not even for 1 map!
i have triple check the proccess is exactly how our beloved BlackCode told us in his tutorial.


Valkirie

Quoteits a general question not specified to one person, or launcher.
The map is patched but not the MapInfo, which is entirely generate by the tool. I didn't made any serious test about start location. Anyway, so far i didn't used BlackCode tutorial, I should probably take a look at it. Hope my three years of Warhammer Online reverse engineering will help me discovering some hidden things.

Vernam7

#64
pffff


well a friend and i have found the answer to the problem i need to verified again and if it goes well i will make it publically available to everyone ;-)  8)


i also PM BlackCode to the issue and solution. after verification the tutorial will be updated i hope. :thumbsup:

Blackcode

Quote from: Vernam7 on March 16, 2010, 08:42:46 AM
pffff


well a friend and i have found the answer to the problem i need to verified again and if it goes well i will make it publically available to everyone ;-)  8)


i also PM BlackCode to the issue and solution. after verification the tutorial will be updated i hope. :thumbsup:

ok man... tnx and waiting for it

Vernam7

#66
hi BlackCode


the solution to the Start Locations is this:


i am going to use your tutorial to make the compairing more esy.


now you said
Spaw Position

01
01000000FFFFFFFF50726F740000000000000000000000000000

00 Bytes - can take values 01 - 04 (this case 4 player map 4 spawn points. 00 is random base)
what i delete is the problem, we should NOT put values from 1 to what ever player may have lets say 1 to 6.

BUT what we should really do is open the file Objects from the .s2ma
this is a very tipical XML file.
at the bottom of it search for  tags like those (its a demo from the lost temple)


    <Point id="97" position="98.5,133.5,0" scale="1,1,1" type="StartLoc" name="
Start Location 003" color="0,0,0,0"/>
    <Point
id="115" position="132.5,102.5,0" scale="1,1,1" type="StartLoc" name="Start Location 004" color="0,0,0,0"/>
    <Point
id="116" position="62.5,26.5,0" scale="1,1,1" type="StartLoc" name="Start Location 001" color="0,0,0,0"/>
    <Point
id="117" position="27.5,63.5,0" scale="1,1,1" type="StartLoc" name="Start Location 002" color="0,0,0,0"/>


you notice the node name="Star Location 00x?" in the begging of the line its an ID="xxx" this ID 2 or 3 digits IS your TRUE start location!


WAIT you may found your ID BUT in order to modify correctly the MapInfo file you have to read it as HEX and as you correctly said locate the 6th pair of -00- but instead of just writing values 1 to 4etc you must get the ID values and CONVERT them to hecidecimal that will give you a pair of bytes -xx- now this is ready to apply in MapInfo start location.


here is an easy VB.net Demo Conversion



Dim myID As Integer = SL2 ' the ID value from objects file
Dim myHEX As String = Convert.ToString(myID, 16) '<-----
convert it to hexadecimal first
Location = hex '<----this is what you should put in the 6th pair in MapInfo!  ;)


the location 4 is the ID = 115 after conversion should be -73- so
REPLACE the -00- with -73- to start always in this 4th location!
final result should look like this
0101000000FFFFFFFF50726F740000000000730000000000000000

your example was working because you got "lucky" (no offence) in one map startlocation had ids 1,2,3,4 so was working because the id was allready corerct. :thumbsup:

sorry for late replay i was busy with my launcher!


hope its clear, Blackode take this and update your tutorial as you may wish. ;-)






special tnx goes also to et2010 for helping on this finding.






Update if StartLocation ID is bigger than 255 and return a 3 or 4 digit value you will have to reverse the last pair with the first, and feelin 0 "zeros" to the missing numbers in hex


for example start location 385 = hex 181 becomes 81-01!

last update here:
weeks ago i found out what the rest of the 00000 are for but since this topic is dead there is no point start write an other small tutorial.