Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

      1. News
      2. Red Dead Online
      3. The Armadillo Inn
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

dexyfex

CodeWalker 3D Map Viewer for GTAV

Recommended Posts

Yoha

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.

Share this post


Link to post
Share on other sites
dexyfex

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

 

Share this post


Link to post
Share on other sites
Ezio Baggins

@dexyfex

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

Share this post


Link to post
Share on other sites
dexyfex

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:)

Share this post


Link to post
Share on other sites
Yoha

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-mods.com/maps/akinav-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

Edited by Yoha

Share this post


Link to post
Share on other sites
Yinepi

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

Edited by Yinepi

Share this post


Link to post
Share on other sites
dexyfex

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

Share this post


Link to post
Share on other sites
P2FX

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.

Share this post


Link to post
Share on other sites
BlackScout

@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)

Edited by BlackScout

Share this post


Link to post
Share on other sites
dexyfex

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.

Share this post


Link to post
Share on other sites
BlackScout

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

Edited by BlackScout

Share this post


Link to post
Share on other sites
dexyfex

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/blog/archive/2015/09/02/parsing-direct3d-shader-bytecode

Edited by dexyfex

Share this post


Link to post
Share on other sites
BlackScout

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.

Edited by BlackScout

Share this post


Link to post
Share on other sites
dexyfex

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.

Share this post


Link to post
Share on other sites
BlackScout

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

 

 

 

VA9SzKt.png

 

from

 

cYyHLbi.png

____________


Values:
yz41uUv.png

Then... It just "crashes".

25eeUlw.png

 

_________________________

gH3oEn6.png

Same size. As it should be.

 

 

 

:s

Edited by BlackScout

Share this post


Link to post
Share on other sites
dexyfex

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...

Share this post


Link to post
Share on other sites
BlackScout

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.)

Edited by BlackScout

Share this post


Link to post
Share on other sites
dexyfex

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/GPUOpen-Tools/common-src-ShaderUtils/blob/master/DX10/DXBCChecksum.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.

Share this post


Link to post
Share on other sites
BlackScout

Oh, now that makes sense...

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

Share this post


Link to post
Share on other sites
robi29

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.

Share this post


Link to post
Share on other sites
BlackScout

@robi29 Yeah, that works flawlessly.

 

Trying some edits here.

Share this post


Link to post
Share on other sites
nondin

@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.

Share this post


Link to post
Share on other sites
dexyfex

v.29 of CodeWalker is now available for download at gta5-mods:
https://www.gta5-mods.com/tools/codewalker-gtav-interactive-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! :)

Share this post


Link to post
Share on other sites
bobo_vn
Posted (edited)

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?

Edited by bobo_vn

Share this post


Link to post
Share on other sites
LeeC2202
Posted (edited)

NVM :(

Edited by LeeC2202

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.