ReadDataFile("dc:COMMON\\common.lvl") -- What am I doing wrong?

Started by Ty294, May 18, 2020, 10:31:08 AM

Previous topic - Next topic
Suggest you use full mod tools, understand what all is in the stock common.  Use all stock common items, add new items one at a time, check your req files. 

Check for crash/no crash after each change.
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

The structure of that tool is that you replace stuff in custom, like scripts (I mean, you could replace Data, but think of that as like your backup).
Listen to Led - work through it slowly, don't go replacing many things at once so hopefully the problem can be found.
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

Quote from: Led on May 19, 2020, 05:35:55 PM
Suggest you use full mod tools, understand what all is in the stock common.  Use all stock common items, add new items one at a time, check your req files. 

Check for crash/no crash after each change.
Quote from: Dark_Phantom on May 19, 2020, 09:14:58 PM
The structure of that tool is that you replace stuff in custom, like scripts (I mean, you could replace Data, but think of that as like your backup).
Listen to Led - work through it slowly, don't go replacing many things at once so hopefully the problem can be found.

Again, appreciate your guys help and sorry if I'm straining your patience; this issue gets more and more baffling for me.

So, for one, I have not had a crashing issue at all. The problem is merely that it won't affect anything in the mod map. But as I have established (and tested again to be sure and confirm), Sereja's common will load into my mod map, so my LUA must be correct.

However, if I try to do the same thing with loading my common into the mod map, nothing happens.

But at the same time, I have replaced the base game common.lvl with my common, and have attempted it with a few smaller versions, and it works every time in that circumstance.

So, I just tried another experiment... I replaced the base common.lvl with my common.

D:\SteamLibrary\steamapps\common\Star Wars Battlefront (Classic 2004)\GameData\Data\_LVL_PC\Common\ENG\common.lvl

And took the original common.lvl and put it in my mod map directory.

D:\SteamLibrary\steamapps\common\Star Wars Battlefront (Classic 2004)\GameData\AddOn\SepV\Data\_lvl_pc\COMMON\common.lvl

And it also does not work!

This leads me to suspect that there must be something specific and special in Sereja's common.lvl that gets it to load into the map...

That, or he did not attempt to override any of the interface/msh/odf items in common and just did the pistol animation. Truth be told I don't know the full extent of what his common affects other than the pistol animation...

My attempted changes have been:

Effects:

Replace headshot.fx, lightsabre_deflect.fx, lightsabre_hit.fx, ord_explosion.fx
Add com_sfx_laser_orange.tga, com_sfx_smoke3.tga (to provide textures to new ord_explosion.fx)

Interface:

Replace all_icon.tga, cis_icon.tga, HUD_all_icon.tga, HUD_cis_icon.tga

MSH:

Replace com_icon_alliance.msh, com_icon_CIS.msh

ODF:

Replace com_bldg_controlzone.odf


Again, all changes work if I put the common.lvl directly into the base game, they just won't override if I attempt to load them into a mod map. And likewise, the regular common won't override this changes if I reverse their places.

I'm going to message Sereja on the matter, though I'm not sure how soon I'll get a reply since it appears he's been away a while.

fx and .tga files should replace correctly I believe.
However, you can't override msh and odf using a custom common.  This could be enough to cause a crash but I didn't think it would.

Edit: I guess I should explain:
fx and textures seem to be more flexible and allowed to be loaded in at any trigger.  Take for example the sky changer - which overwrites the sky (usually just through a tga).  However, classes (odf) and geometries (msh) really do not take kindly to being switched out. As in, if you try to replace a class on the spawn screen using the sky changer method or swap in a new geometry for a field object like a pillar, I am pretty sure the game crashes (and if it doesn't it does nothing, it's been a while).  The common.lvl load in falls along the same theory - if you try to replace a static class that has already been called into the map, it will crash.  If it is the same, I think it just ignores it or it loads it again but since there isn't a difference it doesn't crash. This is just the way that the game engine handles these things.
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

Quote from: Dark_Phantom on May 20, 2020, 08:17:06 AM
fx and .tga files should replace correctly I believe.
However, you can't override msh and odf using a custom common.  This could be enough to cause a crash but I didn't think it would.

Edit: I guess I should explain:
fx and textures seem to be more flexible and allowed to be loaded in at any trigger.  Take for example the sky changer - which overwrites the sky (usually just through a tga).  However, classes (odf) and geometries (msh) really do not take kindly to being switched out. As in, if you try to replace a class on the spawn screen using the sky changer method or swap in a new geometry for a field object like a pillar, I am pretty sure the game crashes (and if it doesn't it does nothing, it's been a while).  The common.lvl load in falls along the same theory - if you try to replace a static class that has already been called into the map, it will crash.  If it is the same, I think it just ignores it or it loads it again but since there isn't a difference it doesn't crash. This is just the way that the game engine handles these things.

Ah, I see.

I attempted it again with only FX/TGAs and still got no results though, so I have to imagine I'm doing something else wrong.

HOWEVER, that is largely irrelevant now I would think, since my primary goal was to replace the faction icons. If what you are saying is correct, then am I correct in assuming they cannot be overridden on an per-addon-map basis at all? Essentially the only way to replace them is via the base game common, which of course you don't want to really have to mess with if it's just for an addon map.

Pretty much. Interesting that the fx and tgas aren't working still though.  Animations can also be changed, as you can see from Sereja's common mod, but the msh files are most likely never going to work using this method.

If you use a common.lvl generated from my version of the tool, does it seem to work correctly?
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

Quote from: Dark_Phantom on May 20, 2020, 12:23:42 PM
Pretty much. Interesting that the fx and tgas aren't working still though.  Animations can also be changed, as you can see from Sereja's common mod, but the msh files are most likely never going to work using this method.

If you use a common.lvl generated from my version of the tool, does it seem to work correctly?

Not for pulling it into the addon map, no. It's the same result as the version generated with the Battlebelk version; it works when replacing the main common, but just won't load into mod map.

It would be nice to get it working, but as I indicated, the main reason I wanted it was to attempt to replace/remove the icons for each faction, which apparently I cannot do. So, it is not that big a priority anymore I'm afraid. lol

On a positive note, I tested something completely unrelated, and while it also won't solve my problem, it does present a potentially intriguing discovery (assuming other people have not already discovered it, which is possible, I've clearly missed a lot in eight+ years). But that's another matter.

I appreciate the help, in any case. Guess I'll just have to deal with the fact that two non-mainline factions are gonna have mainline faction logos in the selection page. Oh well! lol


Quote from: Led on May 20, 2020, 02:27:48 PM
I have seen maps with custom holograms.

Did they include in the unit selection screen?

I know it is possible to use custom holos if you make your own controlzone/commandpost .odfs to use on your map. You can just override what meshes are loaded in.

If you've seen versions with custom icons even for the unit selection screen though, I'd love to know which maps they were so I can try to search out assets or reach out to the modders who made them if possible.


Quote from: Led on May 21, 2020, 02:52:01 PM
I think it was just on the CP.

Gotcha. Well, seeing as that is the best I can do, I will use that method.

Thanks again to everyone!