Collisions

06/29/2011 10:43 vorosmihaly#16
Quote:
Originally Posted by chea77er View Post
Maybe reflector.net. kbot is written in .NET and the developer already released the code somewhere so it's okay to decompile.
it's protected with a strong obfuscator :)
06/29/2011 11:11 chea77er#17
Quote:
Originally Posted by vorosmihaly View Post
it's protected with a strong obfuscator :)
not the NavTest2 stuff.
06/29/2011 11:20 vorosmihaly#18
Quote:
Originally Posted by chea77er View Post
not the NavTest2 stuff.
well,I couldn't decompile it,cause it gave me errors and it said it couldn't decompile it cause it's obfuscated..:O but if you could,it'd be nice if you would share it with us^^
06/29/2011 11:45 illstar#19
@Ferpa_ if u really looking for kbot check the downloads again i have uploaded it (it's without the navmesh stuff)


And for the guys that play with the navmesh... check out:[Only registered and activated users can see links. Click Here To Register...]
06/29/2011 11:50 kevin_owner#20
Yeah that bms hitbox thing works fine for me but could someone tell me how the collision works in caves? is that also in a .nvm file cause I can't find it in one of those or is it in another file somewhere?
07/02/2011 23:11 kevin_0x21#21
You can't now it there is a whole system for that.
the navmesh file have this entities which contain an id x y and z position and some other things like rotation.

This id is the id of a .bsr file but you don't know which id matches an bsr file. so there is another file for that called object.ifo in the map.pk2. there are 2 of those one inside of the media.pk2 and the map.pk2 but you need the one from the map.pk2!!

This object.ifo contains the ID - Bsr file path and some random value. check out drew's edxNvmViewer if you want to read it but it's easy. you can also check it out with the hex editor.

So you got this id from the navmesh file all you need to do is find it in that object.ifo and you got the .bsr file which contains a cube of the 3d object but also the names of the .bms files of that 3d object.

So you can view it like this: navmesh -> object.ifo -> bsr -> bms's

So you got to read a few things before you reach the real 3d objects.
07/03/2011 19:21 Kamisuro_x#22
Well I got the most things now...but there's something wrong with the rotation.
[Only registered and activated users can see links. Click Here To Register...]

As you can see there is something wrong with the left side, The bridge is worng and many more, like the stone, house etc.

Here is the code I'm using:

for (int i = 0; i < bms.Points.Count; i++)
{
float newX = (float)(bms.Points[i].X * Math.Cos(-rotation) - -bms.Points[i].Y * Math.Sin(-rotation));
float newY = (float)(bms.Points[i].X * Math.Sin(-rotation) + -bms.Points[i].Y * Math.Cos(-rotation));

bms.Points[i].X = newX + X;
bms.Points[i].Y = newY + Y;
}
07/03/2011 19:31 kevin_0x21#23
That is actually very easy to solve.

In the silkroad gameword the 0,0 is in the southwest. but in a normal gui application it in the northwest. so if one section is for example 256 x 256 pixels you have to substract 256 pixels from the height to make it flip.

Look at the bridges if you would mirror those it would be correct. This is the same for the houses.

But you got to do this at the right point so you don't mirror everything on the entire map but just for every section.