Skip to content

Conversation

@NachosChipeados
Copy link
Member

@NachosChipeados NachosChipeados commented Apr 25, 2025

Reloads vmt and vtf files on mod reload. The game currently doesn't automatically reload some of them if they're placed inside a mod folder

2025-04-25.20-43-47.mp4

Testing:

  1. Open englishclient_mp_common.vpk
  2. Grab materials/models/weapons/attachments/cqb_dot_front.vmt, and place it inside of a mod
  3. Modify it however you want. Change its color, texture, whatever
  4. Reload mods
  5. Open a map and equip the Hemlok with default sights

If everything went right, the vanilla Hemloks reticle will now have the changes you applied to cqb_dot_front, since thats the texture it uses

@github-actions github-actions bot added needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Apr 25, 2025
Copy link
Member

@Alystrasz Alystrasz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code not overly complex, looks good to me.
Untested for now.

@Alystrasz Alystrasz removed the needs code review Changes from PR still need to be reviewed in code label May 18, 2025
Copy link
Member

@Alystrasz Alystrasz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NachosChipeados could you provide a detailed way to test your PR?
Your instructions mention updating cqb_dot_front.vmt, but you seem to update another VMT file in your video (yes I know nothing about VMTs).
Providing the test mod would help testing 😃

@NachosChipeados
Copy link
Member Author

@Alystrasz the reason i modified another file, is because that file is from another mod aand when i made the video i didn't really think too much about what file to change for the example. Then, when i was writing this i realized i probably shouldn't ask people to download some random mod just to replicate it lol

The mods i used are Titanfall 1 Ammo Counters and Titanfall 1 Materials. The ammo_counter_screen_bg VMT is from TF1 Materials

@Alystrasz
Copy link
Member

@Alystrasz the reason i modified another file, is because that file is from another mod aand when i made the video i didn't really think too much about what file to change for the example. Then, when i was writing this i realized i probably shouldn't ask people to download some random mod just to replicate it lol

The mods i used are Titanfall 1 Ammo Counters and Titanfall 1 Materials. The ammo_counter_screen_bg VMT is from TF1 Materials

So I installed your PR plus both mods, started a mp match, modified the ammo_counter_screen_bg.vmt file as described in your video, reloaded mods (through reload_mods and reload), and could not reproduce your result.
What am I missing here?

@NachosChipeados
Copy link
Member Author

I don't think you're missing anything, just looks like reload_mods doesn't work with this and i don't know why

@NachosChipeados
Copy link
Member Author

Try manually reloading the mods in the main menu

@ASpoonPlaysGames
Copy link
Contributor

I don't think you're missing anything, just looks like reload_mods doesn't work with this and i don't know why

Probably because your stuff is never called when reload_mods is called. It just goes straight into launcher code.

Honestly this might be better as a launcher pr...?

@NachosChipeados
Copy link
Member Author

Tbh if this got moved to launcher, maybe everything else about that function should as well

@NachosChipeados
Copy link
Member Author

NachosChipeados commented Jun 12, 2025

The again, i specifically added that here because mat_reloadmaterial crashed my game a couple of times when called ingame, and it doesn't do that in the main menu. So maybe it should stay here

Don't remeber how specifically i got the crash to happen or how common it is, just remember seeing something about materialsystem.dll

@ASpoonPlaysGames
Copy link
Contributor

@Alystrasz Could you re-test, but use the in-game mods menu to change and reload your mods instead of reload_mods?

@Alystrasz
Copy link
Member

reload_vmts.webm

Also, am I the only one to see this endlessly loading?

image

@ASpoonPlaysGames
Copy link
Contributor

reload_vmts.webm

Also, am I the only one to see this endlessly loading?

image

Im seeing that as well.

@NachosChipeados
Copy link
Member Author

Yeah, im seeing it too

@Alystrasz Alystrasz closed this Jun 12, 2025
@Alystrasz Alystrasz reopened this Jun 12, 2025
@Alystrasz
Copy link
Member

Fixed I guess 😃

NachosChipeados added a commit to NachosChipeados/NP.VanillaPlus that referenced this pull request Jun 18, 2025
- Mod versioning (R2Northstar/NorthstarMods#903)
- Add crosshair target changed callback (R2Northstar/NorthstarMods#893)
- Reload vmt and vtf files on mod reload (R2Northstar/NorthstarMods#924)
@Alystrasz
Copy link
Member

@NachosChipeados do you have any idea of what I did wrong in #924 (comment) ?

@NachosChipeados
Copy link
Member Author

I have no idea to be honest. Can you try manually doing mat_reloadmaterial models/ in the console?

@NachosChipeados
Copy link
Member Author

OH WAIT, i forgot that mat_reloadmaterial is cheat protected. i may be stupid

@NachosChipeados
Copy link
Member Author

NachosChipeados commented Jul 4, 2025

@Alystrasz Should be working now ^^'

Also, sorry for not responding to the video earlier, i completely forgot about it.

@Alystrasz
Copy link
Member

@Alystrasz Should be working now ^^'

I still cannot reproduce results, I'm stuck with the ammo screen appearing as always 😕
Does the pink/black texture mean something to you? (mod installed improperly perhaps)

@NachosChipeados
Copy link
Member Author

The missing texture is likely due to a missing dependency (customizable reticles framework), but i have no idea why the actual texture reloading doesnt work for you

@Alystrasz
Copy link
Member

I tried again installing all three mods on a fresh profile, but couldn't get anything to work again...
I tried to play with the $isRainbow variable, reloading both in game and through the mods menu, and nothing 😢

Could you try installing your PR and the latest launcher dll, and confirm whether the issue is on my side 😁

@github-actions github-actions bot added the merge conflicts Blocked by merge conflicts, waiting on the author to resolve label Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflicts Blocked by merge conflicts, waiting on the author to resolve needs testing Changes from the PR still need to be tested

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants