Skip to content

Conversation

@clarencechen
Copy link

@clarencechen clarencechen commented Oct 8, 2025

Pull request to attempt a fix for remaining street and SAM issues

  • SAM x Avenue Short T support (contributed by @jflann)
  • Fix Diag STR x Diag Street (see fix IID of diagonal STR (RAM vs RRW) #535)
  • Fix Diag SAM x Diag Road T (SAM terminating)
  • Fix Diag SAM x Diag OWR T (SAM terminating)
  • Fix Diag Road x SAM T (road terminating)
  • Fix Diag OWR x SAM T (OWR terminating)

@clarencechen clarencechen marked this pull request as draft October 8, 2025 01:19
@clarencechen clarencechen force-pushed the street-sam-revisions-v50 branch from 9c6b2b2 to cd47f0a Compare October 10, 2025 08:36
@clarencechen
Copy link
Author

@memo33 @jflann @TarkusSC4 I'd love to know what you think of my first contribution to NAM modding whenever you find the time to comment.

@memo33
Copy link
Collaborator

memo33 commented Oct 18, 2025

Apologies for the radio silence. I'm still speechless and impressed that you've figured all this out on your own.

I haven't had a chance to look at the changes in detail. Though, for the long-T issues with the Segment Orientation Checker, that's something we've recently discussed as the nwm-diag-phase2a branch has the same type of errors. The current plan is to introduce new custom flags for these long-T situations (201, 203 for diagonals, 202 for orthogonal). For example for the first reported override rule:

0x5E59E200,0,0,0x5F504700,0,0=0x5E59E200,0,0,0x5E59E280,0,0

instead of:

Onewayroad~(0,0,1,3) & Sam2~(0,1,0,0) | Onewayroad~(1,3,0,0) & Street~(3,0,0,0) | % | Onewayroad~(1,3,0,0) & Sam2~(3,0,0,0)

the definition would become:

Onewayroad~(0,0,1,3) & Sam2~(0,1,203,0) | Onewayroad~(1,3,0,0) & Street~(203,0,0,0) | % | Onewayroad~(1,3,0,0) & Sam2~(203,0,0,0)

i.e. the far tile segment of the long-T would be Sam2~(203,0,0,0), which allows distinguishing it from the segment of the short-T Sam2~(3,0,0,0) (if that's still a thing). This way, the output tiles of the rule also have matching flags, which satisfies the Segment Orientation Checker. (Even longer T's consisting of more than 2 tiles might need more flags.)

Regarding the actual implementation of these Street and SAM T intersections, that's probably something @jflann will be able to comment more on, being more familiar with the original issues with them.

Also, I think I might break out the 0x5d500100 vs 0x5d302000 changes into a separate PR to have a less noisy diff here.

@jflann
Copy link
Member

jflann commented Oct 19, 2025

I've not been able to review this very carefully yet as I don't have all the development tools set up at the moment. I will echo what memo said - it is very impressive that you've managed to figure out how this all works.

Have you been able to verify that your changes have the desired effect in game? That is, have you managed to compile a version of the NAM controller and tested it? There are scripts in the repository which are designed to build the controllers for release. You can run this and then load it in game in place of the installed NAM controller. Otherwise, we have a tool that can display RUL2 code, you can give it just the new portions of the meta-generated code and verify that it looks correct visually. If you want to try that, come reach out to one of us on the SC4E Discord server so we can point you in the right direction.

Thanks again for your contribution.

@clarencechen
Copy link
Author

clarencechen commented Oct 20, 2025

I've not been able to review this very carefully yet as I don't have all the development tools set up at the moment. I will echo what memo said - it is very impressive that you've managed to figure out how this all works.

Have you been able to verify that your changes have the desired effect in game? That is, have you managed to compile a version of the NAM controller and tested it? There are scripts in the repository which are designed to build the controllers for release. You can run this and then load it in game in place of the installed NAM controller. Otherwise, we have a tool that can display RUL2 code, you can give it just the new portions of the meta-generated code and verify that it looks correct visually. If you want to try that, come reach out to one of us on the SC4E Discord server so we can point you in the right direction.

Thanks again for your contribution.

Hi, thanks for taking the time to review my contributions the RUL2 code. TBH, I don't think I would have been able to do it without @memo33's metarules DSL. I've just compiled this code into a new NAM controller and tested it in the game, but there are some missing textures as I've had to guess some of the IID assignments for the resolver without access to the SAM WIP texture pack you referenced in your PR. Let's connect on the SC4E Discord for the latest textures and the RUL2 visualizer utility, as I'm also interested in contributing to the NWM diagonal T intersection code to accelerate the release of NAM 50.

@clarencechen clarencechen force-pushed the street-sam-revisions-v50 branch from d3457b2 to ae1c5c9 Compare October 25, 2025 10:05
@clarencechen
Copy link
Author

Sugarloaf-Apr  24, 501761420640 The T-End intersections seem to be working well with the latest NAM controller and NAM.DLL

@clarencechen clarencechen force-pushed the street-sam-revisions-v50 branch from acd8314 to 3fdfb29 Compare October 25, 2025 22:35
@memo33
Copy link
Collaborator

memo33 commented Nov 9, 2025

Also, I think I might break out the 0x5d500100 vs 0x5d302000 changes into a separate PR to have a less noisy diff here.

I've force-pushed, removing 2 commits in favor of #535, as mentioned above.

@clarencechen clarencechen marked this pull request as ready for review November 14, 2025 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants