Jump to content
The Dark Mod Forums

Test file and 'map' cleanup


Serpentine

Recommended Posts

Hey there,

 

There are a few material and particle files (and likely others). Can we start removing these from the SVN? while backing your work up is good and I know that the packaging scripts remove them. It does make working on the engine a bit messy with loads of warnings and errors which are not actually important.

 

If you're finishing an asset and want to iterate design based on feedback, its fine to just use the real files. I can set an ignore rule to allow personal test files to be ignored (stops you accidentally adding them); i.e if the name includes 'ptest', ignore it when committing. Would this be something that would interest anyone?

 

We also have a bunch of maps which are either out of date or not related to mapping within the main repo - Do we really need these?

 

Just trying to get some spring-cleaning done so that I can reduce noise in logs and prevent some bit rot.

Link to comment
Share on other sites

For a logn time I have tried to clean up the repository (even did it after a while because I added a lot of cruft :)

 

So I am all for it.

 

However, it is really complicated, because the testmaps are used a lot, but sometimes a specific issue is not tested for a year, so the testmap gets outdated quickly. I amtrying to fix them everytime I come some across, but it is hopeless. We do have testmaps that still contain D3 AI (and no longer work). However, I am not sure if we really need the testmaps for the old issues - usually, what happens is when someone has an issue, they build a new testmap, anyway...

 

As for the particle and material files, I think these should be cleaned up and have a good chance as there are so few (most of them are actually needed).

 

So, basically, if you clean anything up, I am for it, but can't help you with that (as I spent already hundreds of hours on this :)

 

Btw, don't want to discourage you, but before you start getting side-tracked, could you please commit the new console font, and the compressed normal maps? I'd rather have these for v1.08, then a clean repository ;)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

The font itself is already in, the normalmaps can go in - but will be messy until I can enable them by default, however for that to happen we need the performance regression to be out of the way so that it doesnt end up either being a pain to revert or hiding the problem.

Link to comment
Share on other sites

Ah ok, wasn't aware the font is already in :) Thanx! So commence cleanup :D

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Removed a bunch of these files, nothing too major.

 

While I was in the area I fixed up the skins for various lights. 'non-extinguishable' has the '-' character in it, which is problematic for images/materials/skins/etc. However since the models have a hard path including them, I cant just rename the models and change the skins to represent that. I have replaced the -'s with _'s this should work (I did test, but I would not consider it a clean test).

 

I expect this might not work, but I hope it does.

 

PLEASE stick to a-Z, 0-9 and underscores for names.

Link to comment
Share on other sites

Erm, the change from "models/darkmod/lights/non-extinguishable/lamp_shaded02.lwo" to "models/darkmod/lights/non_extinguishable/lamp_shaded02.lwo" is not a good idea. It means that the actual file is A, but the skin refers to it as B, which will not confuse huimans mightly (it confused me for a couple of minutes while trying to figure out what exactly the diff was about), but also any script that looks for this file.

 

Can you please revert this? Instead the code should be fixed to no longer warn just because a path contains "-" (for whatever reasons the code can't handle a "-", this is wrong and should be fixed).

 

As for the "PLEASE stick to a-Z, 0-9 and underscores for names.": Well, duh, it is too late for that, we have already folders with "-" in it :)

 

Edit: I forgot that our entityDef names have "atdm:foo", I am not exactly happy about the ":" in there, but it needs to stay - we can't rename them now. Not the brightest idea we had, but well, it works for now.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

The skin should still find the model, it does with my little test here, however I'm only looking at it in the engine - not DR.

 

Feel free to revert it, but if you're going to go changing lexers - you're going to have one hell of a time testing that all operand uses are still working correctly. I really doubt that these skin have ever worked correctly, seeing as it cant load the correct image.

Link to comment
Share on other sites

I think those names have been there for a long time.

 

When I worked on the lights I didn't change any of that, just stuck with convention.

 

However I never noticed missing skins on any lights in DR or game. (at least not because of the name, and definitely not by the time i was done.... all skins were working fine)

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

They must have been defaulting to something else, I think the easiest way around it is just to make the model loader replace minuses with underscores. Least work, solves a bunch of possible issues and lets us rename things safely in the future.

Link to comment
Share on other sites

An example of the problem can be seen here - this is the training mission (and as such the list is only that of models used on the map):

WARNING: Couldn't load image: -
WARNING: Couldn't load image: extinguishable/arclight
WARNING: Couldn't load image: extinguishable/electric_plain1_unattached
WARNING: Couldn't load image: extinguishable/grill_light
WARNING: Couldn't load image: extinguishable/grill_light_short
WARNING: Couldn't load image: extinguishable/lamp_shaded
WARNING: Couldn't load image: extinguishable/lamp_shaded02
WARNING: Couldn't load image: extinguishable/lantern_oil_hand
WARNING: Couldn't load image: extinguishable/wallight1
WARNING: Couldn't load image: extinguishable/wallight2
WARNING: Couldn't load image: extinguishable/wallight_3_unattached
WARNING: Couldn't load image: extinguishable/wallight_3_unnatached
WARNING: Couldn't load image: extinguishable/wallight_outdoor3
WARNING: Couldn't load image: models/darkmod/lights/non
WARNING: Couldn't load image: }

Link to comment
Share on other sites

The skin should still find the model, it does with my little test here, however I'm only looking at it in the engine - not DR.

 

Feel free to revert it, but if you're going to go changing lexers - you're going to have one hell of a time testing that all operand uses are still working correctly. I really doubt that these skin have ever worked correctly, seeing as it cant load the correct image.

 

I think the consensus was that the warning is there, but the correct image is loaded, anyway. (At least the engine loads the model!)

 

What I don't understand how you expect (or even the engine does it) to be able to write "foo_bar" and have the engine load the file "foo-bar" from the file-system. That would mean it replaces "_" with "-" while loading, AND that would mean we couldn't have a "_" in a filename, anyway. But we do have files with a "_" in a name, so this can never work.

 

It can be only one of these, either "_" is found, or "-" is found. We have files with "_" in their name and files with "-" in their name and the engine can't simply swap one with the other and still fine the other kind of file.

 

I'll take a look, tracked here: http://bugs.angua.at/view.php?id=3059

 

In the meantime, can you please revert all the changes from "-" to "_" in the skin files please?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

A short look at the code doesn't look like skin files are treated indepently from other declaration files. So it occured to me, would this work:

 

"model" "models/darkmod/lights/non-extinguishable/arclight.lwo"

 

or even this:

 

model "models/darkmod/lights/non-extinguishable/arclight.lwo"

 

We do use the same syntax in the def files (where we ALWAYS add "" around names and values) and if that works for skins, we don't need to modify the code, just change all the skin delcarations with search&replace.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Hmmm sure, that makes sense.

 

As to the assumption about the loader translating -'s to _'s or whatever, the idea is more that we could make all non-word characters into underscores, this would not load them, however it would allow the files to be renamed to comply(rather than allowing more bad sprawl), without breaking any other defs/lexer/tokens. However should this work, it wont be required.

Link to comment
Share on other sites

The funny thing is, the loader does only translate ":", "/" and "\" to "/", so it never cares for underscores or dash. And I don't think we can change this, as it would break other stuff.

 

So I think this is what happens:

 

* if you have "model models/non-extingushable/foo.lwo" - the parser parses this is "model models/non" and "-" and "extingushable/foo.lwo", This will try to apply the skin to the wrong model, and also try to load an image that never exists (and isn't even an image)

* if you have "model models/non_extingushable/foo.lwo" - the parser parses this is "model models/non_extingushable/foo.lwo", This will try to apply the skin to the wrong model, but somehow the skin will still be applied to the right model (haven't found out where this exactly happens)

* if you have "model "models/non_extingushable/foo.lwo"" - the parser parses this is "model models/non_extingushable/foo.lwo", This will try to apply the skin to the right model, and not warn, and not confuse humans. Hopefully :)

 

So, if we add "", it hopefully works. Could you please test this, too? If it works, I don't mind doing the replace, but if you beat me to it, I won't complain either :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

All right, I assume you want to do the change with a script then? I thought maybe we just convert every "model ...." line, regardless of content of the model file name. Simple, but easier :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

  • 4 weeks later...

It doesn't need to be on SVN anymore, but I still use it. Is there an easy way to remove it from SVN without losing the file?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 2 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 4 replies
×
×
  • Create New...