Quantcast

Jump to content

» «
Photo

CodeWalker 3D Map Viewer for GTAV

V Released V WIP
235 replies to this topic
Yoha
  • Yoha

    GTAV Moder

  • Members
  • Joined: 18 May 2006
  • China

#211

Posted 21 August 2017 - 04:00 PM

BTW: How did you managed to load up a dlc map in Codewalker?

enable : load mods folder and dlcpacks in codewalker. then, you will see your map in codewalker.

dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#212

Posted 25 August 2017 - 01:48 PM

Demo of the new first-person mode in v.26 which will be released sometime soon :)

  • Gforce, MrGTAmodsgerman, Alex106 and 3 others like this

Ezio Baggins
  • Ezio Baggins

    Player Hater

  • Members
  • Joined: 07 Jun 2017
  • India

#213

Posted 26 August 2017 - 10:26 AM

@dexyfex

Do u have any github link to your source code, so that we can create pull requests of bugs or any other sorts ?


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#214

Posted 26 August 2017 - 10:37 AM

Not yet, but the source is included in the main distribution... There's some major features I want to get finished before trying to coordinate other people developing it. If you have anything specific that you want to add, let me know and something could be coordinated.
For bug reports and feature requests (and preview releases), you can also use the CodeWalker Discord server at https://discord.gg/BxfKHkk:)

  • Mr.Arrow likes this

Yoha
  • Yoha

    GTAV Moder

  • Members
  • Joined: 18 May 2006
  • China

#215

Posted 08 September 2017 - 05:15 PM Edited by Yoha, 08 September 2017 - 05:32 PM.

Hi dexyfex,

It's been a time, here I'm very pround to show you a map that I made:

AkinaV for GTA5
https://www.gta5-mod...v-for-gta5-gta5

401db8-00akinav-cover.jpg
401db8-akinav-001.jpg
401db8-akinav-003.jpg
401db8-akinav-009.jpg
401db8-akinav-004.jpg
401db8-akinav-008.jpg
401db8-akinav-007.jpg
401db8-akinav-0010.jpg
401db8-akinav-0011.jpg
401db8-akinav-0012.jpg



----------------------------------

With codewalker's help, I added many many details on this AkinaV.
You can see the lights, item, and car parking on the road side, which is created by car generator.

And most importand thing is traffic lines.
I created 21 ynd files, which includ over 1200 nodes for the traffic lines.
And it works! :D

But, however, it has some problem.
1st of all, it is just like my last screenshots said, the traffic lines may crash game.
I guess it is because some nodes I didn't set right value.
I will check it one by one, this is ok.

The most important question of traffic line I want ask you for help is:
how to set "Negative offset"?

Please feel free to download and install my AkinaV, and install the ynd files.

Because the road of AkinaV is kind of narrow than GTA5 original road, (because it's a mountain road).
So when I set node, the area between 2 nodes is kind of wider than AkinaV's road.
In this case, NPC's car is very close to the edge when they drive.

So, I tried "Negative offset".
I check the box of "Negative offset", and set value to 3, or 2.
I was hope that this setting can move NPC's car alway from the edge.

But instead, very strange, NPC's car move out.
I mean, they are even more close to the edge.

It's like "Negative offset" is not working.



The 2nd question is:
Can I reverse the direction of traffic line?

In the game, the direction of traffic is American style.
But since AkinaV is a japan mountain, so the direction of road is different with game.

So I want reverse it, then the AkinaV will be more like Janpan style.



The 3rd question is:
Can I set the traffic density by time?

I want the traffic density is a little high in Day-time, and low density in Night-time.
So it will be more like a real life.

I have more question, but these are the main 3 questions I need help.

Thanks~~
And I've put your name in the thanks list of this mod~ :D
  • Ash_735, George Costanza, Apu889 and 7 others like this

Yinepi
  • Yinepi

    Wepwawet Wannabe

  • Victim of The Pit™
  • Joined: 27 Jul 2016
  • Egypt

#216

Posted 09 September 2017 - 12:10 PM Edited by Yinepi, 09 September 2017 - 12:18 PM.

Will entities with children be deletable in the future? Or would this cause some sort of instability?


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#217

Posted 21 September 2017 - 02:06 PM

Will entities with children be deletable in the future? Or would this cause some sort of instability?

Posssibly, but the main problem is that all child ymaps will have to also have to be updated with new indices.


CodeWalker is now on github at:
https://github.com/dexyfex/CodeWalker

  • BlackScout and Yinepi like this

Mr.Arrow
  • Mr.Arrow

    God Save the Penis

  • Members
  • Joined: 08 Nov 2011
  • United-Kingdom

#218

Posted 21 September 2017 - 03:38 PM

CodeWalker is now on github at:https://github.com/dexyfex/CodeWalker

Oh neat, now someone could finally contribute this tool :O

Yay

P2FX
  • P2FX

    I ain't no hipster.

  • Members
  • Joined: 10 Jan 2009
  • None

#219

Posted 14 October 2017 - 08:46 PM

So I know interior editing is not supported but is it possible to make interior props show up outside?

I placed some interior objects on the map but they won't show up in-game.


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#220

Posted 15 December 2017 - 06:50 AM

v.27 is available if you didn't get it already! :)
https://www.gta5-mod...eractive-3d-map

See the mod description for change log info.

  • BlackScout and Slash_Alex like this

BlackScout
  • BlackScout

    Shaka-Brah

  • Members
  • Joined: 08 Sep 2013
  • None

#221

Posted 19 December 2017 - 01:04 AM Edited by BlackScout, 19 December 2017 - 01:06 AM.

@Dexyfex

It's been a while since I've tried Codewalker and I really like that RPF Explorer... Seriously, it beats the competition in many aspects. :V
 
I'm curious though. Is it possible to edit these values [0.5] on shaders?

(Just the values, not edit the assembly and recompile to generate extra shader code)

6wsJLWX.png

(That's alpha stippling code according to that dude who made the graphical research)


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#222

Posted 19 December 2017 - 07:48 AM

There's still a few bugs in the RPF Explorer but I'm proud of it so far :)

 

As for editing the FXC... You can export the raw file using "extract uncompressed" option in RPF Explorer, and edit it with a hex editor. However, I have not built anything to re-import the "uncompressed" version of files into RPF's, and OpenIV I think would require a compressed version (I haven't tried for FXC before). If you can find a way around that issue, you could use the Details tab to find the actual byte code of the shader in question (sorry that it doesn't display file offsets), and then you will have to find that particular chunk of shader bytecode in the FXC file in the hex editor. I think those constant values (eg 0.5) should be visible as 32bit floats in the hex editor. It might be easier to find the right values to change if you look for that 0.003922 value.

 

I'll have a think about making some generic tool to compress/decompress the files for OpenIV, I think it might be useful for occasions like this.

  • Spider-Vice and BlackScout like this

BlackScout
  • BlackScout

    Shaka-Brah

  • Members
  • Joined: 08 Sep 2013
  • None

#223

Posted 20 December 2017 - 03:06 PM Edited by BlackScout, 20 December 2017 - 04:15 PM.

Oh, alright. I will look into it. Thanks for the answer.
 
EDIT: Errr, I didn't find anything valuable in the details tab nor by looking the uncompressed export with HxD.  (Which is the same as raw export for some reason.)
 
(Looking for floats and whatever... if they are there bytes aren't even aligned)
 
EDIT2: I tried looking for 0.75 in hex, found it (misaligned somehow?? I don't get it) [Exported file from OIV]

52ZoUp2.png

Edited some values that seemed to be 0.5 to 1.0 (00 00 00 3F) to (00 00 80 3F)

Because XPNOMuD.png
 
Got this:
Xn7AJnE.png

dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#224

Posted 21 December 2017 - 07:55 AM Edited by dexyfex, 21 December 2017 - 07:57 AM.

It seems like you are close to having it working (you got the file round trip successfully)...

Looks like you edited the wrong bytes. if you got that error, I guess you edited some of the FXC data, rather than the actual DXBC data.

I was suggesting to use the details tab to find the shader you need to edit (under eg vertex or pixel shaders or whichever you are editing), and then you can inspect the bytecode data (byte array, the "..." button will show it in a popup hex viewer). That bytecode data is what you are looking for in the file, to edit the correct shader that you choose. Note that the byte code always starts with "DXBC". Within that block, the actual shader code itself starts with "SHDR". in the SHDR block, you should find your float values to edit.

This link might be useful in understanding the MS compiled shaders data:

http://timjones.io/b...shader-bytecode

  • BlackScout likes this

BlackScout
  • BlackScout

    Shaka-Brah

  • Members
  • Joined: 08 Sep 2013
  • None

#225

Posted 21 December 2017 - 05:06 PM Edited by BlackScout, 22 December 2017 - 05:27 PM.

Thank you for the help. I appreciate it a lot. However. No matter what I do it never seems to work.
 
(Even if I find the values I can't edit through your tool. Grabbing myself a Hex Editor doesn't seem to do much justice either since when I import the file to check changes it's again somehow "corrupted".)
I guess I don't really know what I'm doing.

dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#226

Posted 23 December 2017 - 02:50 AM

No worries...

I think you are probably close to making it work. Have you tested that just re-importing the FXC file to RPF (without making any changes) is working ok?

Assuming you can do that with no errors, I think as long as you are just modifying the float constant values within the SHDR block (make sure you aren't changing the file length!), CodeWalker shouldn't make any error when you try to open the file.

But I think the most difficult part will be finding the correct bytes to edit in the file, since there are many individual shaders within the FXC. Of course you will need to use the hex editor to do this, since CodeWalker only displays the data (not for editing). But at least in the details tab you can see the byte array for the particular shader you want to edit. You will need to find that same block of data in the hex editor, and find the SHDR chunk within that. The SHDR chunk should be generally fairly small, so you shouldn't need to search very far after finding the correct SHDR chunk, to find your float value.

  • BlackScout likes this

BlackScout
  • BlackScout

    Shaka-Brah

  • Members
  • Joined: 08 Sep 2013
  • None

#227

Posted 23 December 2017 - 03:13 AM Edited by BlackScout, 23 December 2017 - 04:17 PM.

I am really struggling to understand what I am doing wrong.
Re-importing the same file works just fine.

 

Spoiler

 

:s


dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#228

Posted 23 December 2017 - 09:37 AM

Hmm everything looks fine there... I don't really have an explanation for that error, since no lengths are changing.
Did you launch CodeWalker again after modifying the RPF with OpenIV? If you edit files with OpenIV while CodeWalker is running, this sort of thing would probably happen. That's the only thing I can think of right now that could cause such an error...


BlackScout
  • BlackScout

    Shaka-Brah

  • Members
  • Joined: 08 Sep 2013
  • None

#229

Posted 23 December 2017 - 04:23 PM Edited by BlackScout, 23 December 2017 - 09:07 PM.

Did you launch CodeWalker again after modifying the RPF with OpenIV?

Just tried it. Same result.
 

If you edit files with OpenIV while CodeWalker is running, this sort of thing would probably happen. That's the only thing I can think of right now that could cause such an error...

Yeah, that would make sense. I imported those edited files many times and none of them worked.

I guess there is something else in the file being considered when those shaders are loaded. So when I edit those files the game and your tool go panic mode. (I think I actually tried testing one of those edits and got graphical issues.)

dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#230

Posted 25 December 2017 - 11:12 AM

Okay, so I investigated what exactly the problem was here, and there is indeed a problem when disassembling the DXBC.
I never realised it, but the DXBC has a checksum value, which obviously causes a problem whenever anything is edited. That link I sent before describes that the first 16 bytes following "DXBC" are the checksum. According to the comments there, it's generated by a private algorithm, but AMD provided an implementation of it here:
https://github.com/G...XBCChecksum.cpp

 

I don't really have the time at the moment to build an app to test that. But let me know if you have any success with it! I'm quite interested to know the result.


BlackScout
  • BlackScout

    Shaka-Brah

  • Members
  • Joined: 08 Sep 2013
  • None

#231

Posted 25 December 2017 - 02:44 PM

Oh, now that makes sense...

Well, unfortunately I don't think I can do much since I can't really code.


robi29
  • robi29

    VisualV creator

  • Members
  • Joined: 20 Jun 2009
  • Poland

#232

Posted 21 January 2018 - 03:04 PM

Hi, I've written a small console app to test the "private" algorithm to generate a checksum value. The results are very good. I've used the same shader (shadowsmartblit.fxc), because it's relatively short and it was easier for me to test the algorithm. I've just copied bits from 0x25 offset (you should keep the DXBC header and 16 bytes of check sum) to 0x290 offset, this is 620 bytes, the shader must be aligned to 4 bytes. The copied bytes I've saved in binary file. In my console app I read the file. My main:

int main(int argc, char** argv)
{
	FILE *f = fopen(argv[1], "rb");
	fseek(f, 0, SEEK_END);
	long fsize = ftell(f);
	fseek(f, 0, SEEK_SET);

	char *string = (char*)malloc(fsize + 1);
	fread(string, fsize, 1, f);
	fclose(f);

	string[fsize] = 0;

	BYTE* str = (BYTE*)string;

	DWORD out[4];

	CalculateDXBCChecksum(str, atoi(argv[2]), out);

	printf("%08x%08x%08x%08x\n", out[0], out[1], out[2], out[3]);

	return 0;
}

The result is:

b0fb5b0a86b2f1659cd737c3de372d9f

 

And it's exactly the same like in the shader, but the result is in big endian, the shader has little endian convention, of course.

  • BlackScout, Remix1994PL and dexyfex like this

BlackScout
  • BlackScout

    Shaka-Brah

  • Members
  • Joined: 08 Sep 2013
  • None

#233

Posted 21 January 2018 - 09:43 PM

@robi29 Yeah, that works flawlessly.

 

Trying some edits here.


nondin
  • nondin

    Player Hater

  • Members
  • Joined: 03 Feb 2018
  • Hong-Kong

#234

Posted 06 February 2018 - 03:54 PM

@dexyfex

 

Thank you so much for the tool! I have been looking for a path node editor for a long time. 

 

Are you planning to work on the vehicle node flags? How do I read the information stored in those binary numbers? I want to read it because I want to locate the flag which determines the speed limit of a vehicle node.

  • dexyfex likes this

dexyfex
  • dexyfex

    CodeWalker

  • Members
  • Joined: 04 Mar 2017
  • None

#235

Posted 15 March 2018 - 01:15 PM

v.29 of CodeWalker is now available for download at gta5-mods:
https://www.gta5-mod...eractive-3d-map

 

New features in this version include:

- RPF Explorer Edit Mode, with drag & drop 
- New improved Project Window 
- YNV Nav mesh editing (WIP!) 
- CodeWalker.Core library which can be used by other developers 
- Colour theme options for RPF Explorer and Project Window 
- Snap to ground and Snap to grid editing option 
- Vehicle wheel meshes are now rendered (no mirroring yet) 
- AWC Audio Player will now play some audios 
- Improved interiors rendering and selection info 
- Improved GTA folder management 
- Improved nav mesh and paths rendering 
- Bug fixes and performance improvements 
 
Have fun! :)
  • Redman'', Androll, _CP_ and 6 others like this

bobo_vn
  • bobo_vn

    Player Hater

  • Members
  • Joined: 07 Oct 2009
  • Bulgaria

#236

Posted 17 March 2018 - 09:59 AM Edited by bobo_vn, 18 March 2018 - 11:03 AM.

Hi everyone,do someone knows how to spawn unlocked cars with the cargenerator?I've tried multiple flag combinations,but the vehicle is always locked.Maybe i should add that i'm spawning a specific vehicle,not like random one.

Also is there a way to change the surface of some areas ,for example from grass to snow?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users