PDA

View Full Version : Zoom Crash Starts at Chapter 3


Chancellor23
01-07-2010, 06:25 AM
Have really been enjoying this game. Completed through Chapter 2, including first three Challenge Rooms. Have encountered a problem at the beginning of Chapter 3: If I right-click the mouse (zoom weapon view), the game crashes, displaying a bunch of script errors. This has not happened before in this game.

Have searched these forums. Purchased the Aspyr version and updated, using Aspyr's Patch v1.2. Have tried Ztorm's widescreen FOV Lscripts fix, which was supposed to fix this issue. Nothing has worked. Right-clicking to zoom the rifle sight worked perfectly until Chapter 3. Now, the game simply crashes.

Has anybody else experienced this? Does anyone know of a fix for this problem? It seems odd that the problem didn't surface until Chapter 3.

Gniarf
01-07-2010, 01:44 PM
1-No I have not experienced this issue.
2-If you want to be of use and/or want anyone to help, please specify which script errors you get. I understand it's a paint in the you_know_what to copy all those, but there is a file, script_error.log, located in the same directory as the main.exe which contains the error messages. Please post the latest/most relevant error.

Chancellor23
01-07-2010, 08:52 PM
Hello Gniarf. Thank you for responding. You're right, I should have provided more specific information. Have accumulated additional data. So, here goes...

The Problem: Starting with Chapter 3, when I press the right mouse button to zoom the rifle sight, NVN crashes.

Let's start with my system specs:
Dell XPS 730x
Windows Vista Ultimate 64-Bit, Service Pack 2
CPU: Intel Core i7-940 2.93 GHz
RAM: 6GB
Video: nVidia GeForce GTX 285 (2 GPUs, SLI)
Audio: Creative Sound Blaster X-Fi Titanium

My NVN video settings are High, with a screen resolution of 1920x1200. Have changed only one key binding: Moved the Special attack from the Q key to the F key because I accidentally kept throwing away my melee weapon when grabbing for the WASD keys (not good in the Challenge Rooms). No other changes, except when I modified the config.ini files to enable widescreen FOV during my third install of the game. Did not apply the widescreen FOV fix to my fourth install.

History:
1) Installed Aspyr retail copy of NVN. Created new profile. Played through Chapter 2, including the first three Challenge Rooms. Rifle zoom crashed NVN at start of Chapter 3.

2) Reinstalled NVN and applied Aspyr 1.2 patch. Created new profile and played through to Chapter 3, where the rifle zoom crashed NVN again.

3) Reinstalled NVN; applied Aspyr 1.2 patch; applied Ztorm's widescreen FOV patch (including the LScripts CWeapon.lua file patch). Created new profile and played through to Chapter 3, where the rifle zoom crashed NVN again.

4) Reinstalled again and applied the Aspyr 1.2 patch. Created new profile and played through to Chapter 3. Same rifle zoom crash problem. Now holding, pending a solution. I really need the rifle zoom in Chapter 3.

It seems odd that this problem doesn't occur until Chapter 3. Also, I have no problem in Chapter 3 when I press the right mouse button to zoom the other weapons: pistol, luger, shotgun--only the rifle. This rifle is the one with which you start Chapter 3: brown stock with a bayonet attached. It's one wheel click up from the Winchester shotgun.

When the game crashes, I get an error screen with three buttons: Abort, Retry, Ignore. No matter which button I push, the game closes and returns me to my desktop.

I tried to find the script_error.log. It wasn't in the application program folder: C:\Program Files (x86)\Aspyr\NecroVisioN\Bin. Instead, I found it in my user NVN folder, where my profiles are stored; specifically in this folder: C:\Users\Paul\AppData\Local\VirtualStore\Program Files (x86)\Aspyr\NecroVisioN\Bin.

Here's the latest error message. In fact, all of the error messages are exactly the same, except for the date- and time-stamps of the crashes.
./Data/LScripts/Classes/Types/Vector.lua:53:Set
./Data/LScripts/Classes/CPlayer.lua:1880:Tick
./Data/LScripts/Main/GObjects.lua:216:?
[C]:-1:foreachi
./Data/LScripts/Main/GObjects.lua:222:Tick
./Data/LScripts/Main/Game.lua:695:Tick
./Data/LScripts/Main/Game.lua:2131:Game_Tick

I've really enjoyed this game so far (I still play Painkiller). But no way I'm going to spend the next 10 chapters with the rifle zoom crashing the game. That would simply be not fun. I'd rather leave with fond memories of what I was able to enjoy playing. I just don't understand why everything works perfectly until Chapter 3.

Let me know if you need more data. And thanks for anything you can do to help.

Gniarf
01-08-2010, 02:44 AM
1-Just to make sure: you NEVER edited config.ini by hand before the 3rd install, right?
2-Could you post you lscript.pak please? If you chose to upload it on a public filehoster, please do not use rapidshare.
3-Do you have several lscripts.pak? For example one in c:\Program Files (x86)\Aspyr\NecroVisioN\data and one in VirtualStore\...\NecroVisioN\Data? Does the game crash/not launch when you delete one of them? Or both?
4-The rifle you get at level 3 is the Gewehr 98. Did you use it in the previous 2 levels? If not you can use the "nvnweapons" cheat code to get it at 1st level, saving you the trouble of playing through the 2 first levels.
5-Just out of curiosity, replace your lscript.pak with this one. It's my lscript.pak v1.2. Normally it shouldn't change anything, but just in case....

Chancellor23
01-08-2010, 08:02 PM
Sorry for the delay. It has taken a little while to research and test all of these items. But here’s what I’ve found. To be clear, I started this process with another clean install: Aspyr retail box and Aspyr 1.2 Patch, Video Options = Ultra High, 1920x1200 resolution, Key Binding Q changed to F. No other changes.

Something I didn’t mention before: I’m running the DX10 version of NVN.

Also, when I was running some of the tests you prescribed below, specifically the “nvnweapons” cheat code tests, I noticed that there were several rifles based on the same physical unit (the GEW 98). The version of the rifle that is causing the game to crash in Chapter 3 is the version with the bayonet attached—not the version with the purple scope attached and not the version with that weird-round-thing-that-I-don’t-know-what-it-does on the end of it. The latter two versions of the GEW 98 worked fine in all tests.

1-Just to make sure: you NEVER edited config.ini by hand before the 3rd install, right?

Correct. Any changes I made during Installs 1, 2, and 4 were accomplished only through the in-game Options screens.

2-Could you post you lscript.pak please? If you chose to upload it on a public filehoster, please do not use rapidshare.

I have attached my lscript.pak file to this posting. This is the version installed by the Aspyr 1.2 Patch. For what it’s worth, I opened both of our lscripts.pak files in MS Word and ran a comparison at the character level. Word reported that there were no differences between the contents of our two PAK files.

3-Do you have several lscripts.pak? For example one in c:\Program Files (x86)\Aspyr\NecroVisioN\data and one in VirtualStore\...\NecroVisioN\Data?

I have only one lscripts.pak file on my computer. It’s located here: C:\Program Files (x86)\Aspyr\NecroVisioN\Data.

4-The rifle you get at level 3 is the Gewehr 98. Did you use it in the previous 2 levels? If not you can use the "nvnweapons" cheat code to get it at 1st level, saving you the trouble of playing through the 2 first levels.

I tested Chapters 1, 2, and 3 using the “nvnweapons” cheat code. I tested the Right Mouse button on all weapons. In Chapters 1 and 2, the Right Mouse button worked successfully for all weapons, including the GEW 98 with bayonet. However, when I tested all weapons in Chapter 3, the Right Mouse button worked successfully for all weapons—except the GEW 98 with bayonet. Using the Right Mouse button with the GEW still crashes the game.

5-Just out of curiosity, replace your lscript.pak with this one. It's my lscript.pak v1.2. Normally it shouldn't change anything, but just in case....

I swapped in your lscript.pak file and ran the same tests that I ran in #4 above—and got the same results. All weapons responded successfully to the Right Mouse button in Chapters 1 and 2, including the GEW 98 with bayonet. In Chapter 3, all of the weapons responded successfully to the Right Mouse button—except for the GEW 98 with bayonet, which crashed the game.

Gniarf
01-09-2010, 04:37 AM
What son of a crap in the holy nine hells is that #$%@ bug??? :confused:

Video Options = Ultra High, 1920x1200 resolution, Key Binding Q changed to F. No other changes. DX10 version of NVN.Out of curiosity try playing in 1024x768 DX9.
that weird-round-thing-that-I-don’t-know-what-it-does on the end of it.It's called a grenade, and what it does is to go boom when you touch it.

I tested Chapters 1, 2, and 3 using the “nvnweapons” cheat code. I tested the Right Mouse button on all weapons. In Chapters 1 and 2, the Right Mouse button worked successfully for all weapons, including the GEW 98 with bayonet. However, when I tested all weapons in Chapter 3, the Right Mouse button worked successfully for all weapons—except the GEW 98 with bayonet. Using the Right Mouse button with the GEW still crashes the game.Re-read 1st line of this post.

test1: I'm starting to wonder if it is not a bug in the copy-protection system.Try replacing your necrovision.exe with the one given below (I never thought .zip compression could do that well).

test2: Put the attached Gew98.CWeapon in your NecroVisioN\Data\lscripts\Templates\Weapons directory.

test3: (I don't believe in this one) put cutscene_madman.CAction in NecroVisioN\Data\levels\Level_03_The_Hill\CAction

test4: put an empty (0 kb) file in NecroVisioN\Data\lscripts and name it Loader.lua. If the game does NOT crash at startup, tests 2&3 are voided and the files should be placed under the other necrovision directory.

What is the size of your levels.pak? Mine is 7 646 505 bytes (and a bit more "on disk").

Sorry to drown you under a flurry of tests, but I cannot reproduce your bug on my computer.1786

Chancellor23
01-09-2010, 05:43 PM
I agree. This problem makes no sense to me. Why does it affect only one specific function of one specific weapon beginning with one specific chapter? It’s like this weapon has data that is stored outside of its definition file. Or its zoom data conflicts with the Chapter 3 data. Or something. I assume that the rendering engine doesn’t change from chapter to chapter. I don’t know the programming language(s); so, the error message is mysterious to me. Just guessing, but it looks like a lot of variable assignments (“set”) or counters (“tick”). Except for the “[C]…” line, which looks like a looping statement (“foreachi”).

I assume that the code is executed sequentially. So, why are there seven lines in the error message? Were they all on the same stack? Which line is causing the crash? In what order is this code executing (top-to-bottom or bottom-to-top)?

Note: After each test below, I reversed the changes that I made to my installation so that I’d start each test with the same files and settings.

Note: Instead of Left Mouse button, Right Mouse button, and Middle Mouse button, I’m going to start calling them Mouse1, Mouse2, and Mouse3, respectively. It’s faster.

Note: When I say that a weapon worked successfully, I mean that the test did not crash the game. Not all weapons have Mouse2 functionality, for example, the GEW98 with Grenade.

Note: Have modified my testing here. Unless stated otherwise, I am testing the Mouse2 functionality on only the GEW 98 with Bayonet to save time because the other weapons have tested successfully in all the other tests.

Out of curiosity try playing in 1024x768 DX9.

Done. No change. The GEW 98 zooms correctly in Chapters 1 and 2, but using Mouse2 in Chapter 3 crashes the game. Same error message as before. Boy, this game sure looks scruffy with these video settings.

It's called a grenade, and what it does is to go boom when you touch it.

Cool. Thanks. I didn’t test Mouse1 or Mouse3 before—just Mouse2.

test1: I'm starting to wonder if it is not a bug in the copy-protection system. Try replacing your necrovision.exe with the one given below (I never thought .zip compression could do that well).

Done. Same problem and same error code. Mouse2 works correctly in Chapters 1 and 2, but crashes the game in Chapter 3. I did receive a “security warning” at game launch, but the game played correctly.

test2: Put the attached Gew98.CWeapon in your NecroVisioN\Data\lscripts\Templates\Weapons directory.

Note: For this test, I tested Mouse2 for all three versions of the GEW98 because I didn’t know if they were all variations based on the template you provided. I also tested Mouse1 and Mouse3 for all three variations because “Gew98.CWeapon” contains behavior definitions for the weapon, for example, “zoom” and “melee.” I had to create the folder path you provided because I have no \lscripts folder in my \Necrovision\Data folder—this is a base retail install, patched to Version 1.2.

Done. In Chapters 1 and 2, the GEW98 with Grenade and the GEW98 with Sight both worked successfully with Mouse1, Mouse2, and Mouse3. In Chapter 3, the GEW98 with Bayonet worked successfully with Mouse1 and Mouse3. In Chapter 3, the GEW98 with Bayonet crashed the game with Mouse2. Same error code as before.

test3: (I don't believe in this one) put cutscene_madman.CAction in NecroVisioN\Data\levels\Level_03_The_Hill\CAction

Note: I did not have the folder path you provided; so I created it for this test.

Done. No change. The GEW 98 zooms correctly in Chapters 1 and 2, but using Mouse2 in Chapter 3 crashes the game. Same error message as before.

test4: put an empty (0 kb) file in NecroVisioN\Data\lscripts and name it Loader.lua. If the game does NOT crash at startup, tests 2&3 are voided and the files should be placed under the other necrovision directory.

Note: I used Notepad to create the empty 0 KB file.

The game did not launch. Instead, I received the following Script Error:
[string “Game:OnSwitchToState(2)”]: attempt to index global ‘Game’ (a nil value)

BTW: The \Data folder in my user profiles directory contains only one subfolder: \Maps—which branches down two levels to four folders, all of which are empty. Meaning: There are no data files in my user \Data folder; there are only folders. All data files are in the program installation folder.

What is the size of your levels.pak? Mine is 7 646 505 bytes (and a bit more "on disk").

Same size as yours: 7,646,505 bytes (7,647,232 bytes on disk).

The only good thing I can say about this bug is that it’s consistent: GEW98 with Bayonet, Mouse2, beginning with Chapter 3.

I suppose I could use the “nvnweapons” cheat code for Chapter 3 and pray that the bug goes away in Chapter 4. But I’m not a Cheat Coder. I wouldn’t experience the game “the way it’s meant to be played.” With or without NVIDIA.

Gniarf
01-10-2010, 06:59 AM
I don't have time to think about the issue right now, I'll make another post later today.

I agree. This problem makes no sense to me. Why does it affect only one specific function of one specific weapon beginning with one specific chapter? It’s like this weapon has data that is stored outside of its definition file.I keep thinking buffer overflow; and keep hoping it is not. (hence the sentence in my previous post)
I don’t know the programming language(s);Lua
Just guessing, but it looks like a lot of variable assignments (“set”) or counters (“tick”). Except for the “[C]…” line, which looks like a looping statement (“foreachi”).
Set is use to set the x,y,z components of a vector.
Tick is called at periodic short intervals to simulate continuous behavior of all things (weapons, ennemies, bullets, effects...) in the game.
foreachi = for each i (I guess i is for item in a array or integer representing a identifier of a instance of a class (a bit like a pointer)).
I assume that the code is executed sequentially.Correct
So, why are there seven lines in the error message?It's the call stack, deepest on the first line. The problem is that this call stack dump is INCOMPLETE !! I mean, the game says:
./Data/LScripts/Classes/Types/Vector.lua:53:Set
./Data/LScripts/Classes/CPlayer.lua:1880:Tick
but at CPlayer:1880 there is a call to Current Weapon's Tick function. And ofc Tick happens to be the n°1 longest and most subfunction calling function. Yippee!
Boy, this game sure looks scruffy with these video settings.Boy, I do love my 1024.
Boy, the devs used 1024.
Boy, don't say "scruffy" until you have tried putting Cfg.GraphicsQuality=0 in config.ini. xD



Same size as yours: 7,646,505 bytes (7,647,232 bytes on disk).So I'll assume we have the same

The only good thing I can say about this bug is that it’s consistent: GEW98 with Bayonet, Mouse2, beginning with Chapter 3. Quite unorthodox for a buffer overflow...

I suppose I could use the “nvnweapons” cheat code for Chapter 3 and pray that the bug goes away in Chapter 4. But I’m not a Cheat Coder. I wouldn’t experience the game “the way it’s meant to be played.” With or without NVIDIA.
1-haha lol
2-Or you could simply avoid the gew98 and find&use the other rifle (smle). But that would be admitting defeat.

Apparently you seem to have some coding experience, so you can try downloading a tool named "Painfull" by xentax to extract the .pak files. Extract lscripts.pak in data\lscripts and you can strat editting the code with notepad. No need to compile or repack the data. (ie: you can delete lscript.pak once its content is extracted, the game directly reads the extracted content)

Gniarf
01-10-2010, 11:41 AM
Put the following CWeapon.lua in NecroVisioN\Data\lscripts\Classes. It will not solve your problem, but it'll log all calls from a CWeapon to CVector:Set into a GniarfLog.txt, which should be in the same directory than script_error.log.

Report the latest (bottom) number.

Chancellor23
01-10-2010, 07:14 PM
Thanks for all the info here.

Boy, I do love my 1024.
Boy, the devs used 1024.
Boy, don't say "scruffy" until you have tried putting Cfg.GraphicsQuality=0 in config.ini. xD

I didn’t mean to insult you. When I considered playing this game, I read a couple of reviews, which said that the graphics were dated and didn’t look great. That didn’t deter me because I believe that game developers have the right to choose whatever graphics style they want. Video games are an art form. And if the designers choose an older style instead of cell-shading or hyper-realism, there’s nothing wrong with that. It would be like saying that Impressionism is dated because it’s Old School. Maybe it is, but that doesn’t invalidate Impressionism. NecroVisioN looks just right to me. I still like Undying and Painkiller. I like Impressionism, too.

However, while trying to solve this crash issue, I implemented Ztorm’s FOV fix and had the opportunity to see the game with Ultra High video settings, at 1920x1200 resolution, in 16:10 aspect ratio. Compared to the Standard 1024x768 settings, the game looked terrific. NVN’s visual style may be older, but that doesn’t mean that its rendering can’t be crisp and clean. Thus, my “scruffy” comment.

2-Or you could simply avoid the gew98 and find&use the other rifle (smle). But that would be admitting defeat.

I’ve considered this, although the GEW98 makes the opening of Chapter 3 much easier. I’m open to a spoiler here. Is the SMLE rifle available later in this level? If so, I could be careful using the GEW98 (no zooming) until I get the other rifle. Or, is one of the other variations of the GEW98 (with Grenade or with Sight) available later in this level? I could switch to one of those because they don’t crash the game.

I played further into Chapter 3 to see if the crash was associated only with the starting location. Nope. Zooming the GEW continues to crash the game.

Apparently you seem to have some coding experience, so you can try downloading a tool named "Painfull" by xentax to extract the .pak files. Extract lscripts.pak in data\lscripts and you can strat editting the code with notepad. No need to compile or repack the data. (ie: you can delete lscript.pak once its content is extracted, the game directly reads the extracted content)

I’m not really a programmer, although good with logic. Played around with BASIC and 6502 Machine Language in the 1980s, and DOS and Postscript in the 1990s. My only experience with class-based code comprises CSS coding for HTML—and not much of that. Since I don’t know Lua, I looked it up at Wikipedia. Apparently, it’s used to script other languages, often C/C++ (which I also don’t know).

However, I decided to take a look at the LScripts.pak file anyway. Doesn’t look like this is going to happen. Downloaded and unzipped the XeNTaX Tool Pack. Painfull wouldn’t launch (run-time error). Its ReadMe told me I should install MultiEx Commander to be sure I’d have all the appropriate DLLs. So, I did that. Painfull still produced the same run-time error. MultiEx Commander itself wouldn’t launch. Said I was missing a file, MSINET.OCX, which is not true. However, it’s in one of my 64-bit Windows folders, which might explain why the software couldn’t find it (it’s not 64-bit software). Additionally, within a minute of installing Commander, Norton AV reported two viruses on my machine: “Suspicious.MH69.A” and “Trojan Horse”. It stopped them and successfully removed them. Odd, since I scanned both Commander and the XeNTaX Tool Pack before I executed the files. Plus Commander was trying to set up an open Internet connection for some reason. I uninstalled all of the XeNTaX applications and deleted the files from my computer. I don’t trust those people.

Put the following CWeapon.lua in NecroVisioN\Data\lscripts\Classes. It will not solve your problem, but it'll log all calls from a CWeapon to CVector:Set into a GniarfLog.txt, which should be in the same directory than script_error.log.

Report the latest (bottom) number.

Done. Twice. I started Chapter 3 and crashed the game. For comparison purposes, I started Chapter 2, loaded all weapons, scrolled to the GEW98 with Bayonet (Mouse3), zoomed the GEW successfully (Mouse2), and then exited the game. The last action before exiting (or crashing) the game in both cases was pressing Mouse2. In both cases, the latest number in the file was 1470. I thought there might be a difference between a successful and an unsuccessful use of Mouse2. There wasn’t.

Another option that I considered, had I been able to edit the PAK files… I assume that each level contains data that determines its startup weapons load-in. I might have been able to change the Chapter 3 opening rifle from the GEW to the SMLE and still have a rifle—it just wouldn’t be the game’s default rifle for Chapter 3. Semi-cheating; but at this point, I could enjoy the game and still sleep at night.

Gniarf
01-10-2010, 09:26 PM
When I considered playing this game, I read a couple of reviews, which said that the graphics were dated and didn’t look great. That didn’t deter me because I believe that game developers have the right to choose whatever graphics style they want. Video games are an art form. And if the designers choose an older style instead of cell-shading or hyper-realism, there’s nothing wrong with that. It would be like saying that Impressionism is dated because it’s Old School. Maybe it is, but that doesn’t invalidate Impressionism. NecroVisioN looks just right to me. I still like Undying and Painkiller. I like Impressionism, too.[Frenetically presses the esc key] Forgive me I should never have said that in the first place.
Is the SMLE rifle available later in this level?Dunno.Or, is one of the other variations of the GEW98 (with Grenade or with Sight) available later in this level?The grenade version is 100m away...maybe a bit more (no I'm not mistaking with the drum-fed smg), sniper version is quite further, but still in this level.
I played further into Chapter 3 to see if the crash was associated only with the starting location. Nope. Zooming the GEW continues to crash the game.Undersrood.
I’m not really a programmerToo bad.
Downloaded and unzipped the XeNTaX Tool Pack.Me I just had a 92kb executable+2 dlls. Its ReadMe told me I should install MultiEx Commander to be sure I’d have all the appropriate DLLs. So, I did that. Painfull still produced the same run-time error. MultiEx Commander itself wouldn’t launch. Said I was missing a file, MSINET.OCX, which is not true. However, it’s in one of my 64-bit Windows folders, which might explain why the software couldn’t find it (it’s not 64-bit software).I didn't install multiex commander, and painfull works, and I'm running win7x64 (but it used to work under xp64 aswell).
Additionally, within a minute of installing Commander, Norton AV reported two viruses on my machine: “Suspicious.MH69.A” and “Trojan Horse”.Feel free to ignore this:the Best.AV.Ever is a brain, other AV are just bullets you shoot in your feet.
Plus Commander was trying to set up an open Internet connection for some reason. I uninstalled all of the XeNTaX applications and deleted the files from my computer. I don’t trust those people.Odd indeed, perhaps commander was checking if a newer version was available, but you don't need that soft anyway. Xentax is, from my personal experience, trustworthy but I wasn't aware he'd made a pack (then again, I didn't check recently).

In both cases, the latest number in the file was 1470.I'll investigate that. But for now, why am I not surprised to see lots of "FOV"s and "zoom" around line 1470 in CWeapon?
Another option that I considered, had I been able to edit the PAK files… I assume that each level contains data that determines its startup weapons load-in. I might have been able to change the Chapter 3 opening rifle from the GEW to the SMLE and still have a rifle—it just wouldn’t be the game’s default rifle for Chapter 3. Semi-cheating; but at this point, I could enjoy the game and still sleep at night.
1-No ned to edit the pak files, just extract their content and edit it, no need to repack.
2-in \NecroVisioN\Data\levels\Level_03_The_Hill\Level_0 3_The_Hill.lua, put:function o:OnApply(first)
Game.CachedWeapons = {

-- "Colt1911_LH",
"SMLE",
"Luger",
"Luger_LH",
"MG8015",
"mp18",

"PlayerShowel",

"player_geballte",
"PlayerDynamite",
"PlayerLamp",
}

Game.PlayerEnabledWeapons =
{
"Colt1911", "Gew98", "PlayerGrenade", "QuickThrow", "Shotgun", "PlayerBayonet",
}

Game.CachedVoiceovers = {
"L03_Voice6843",
"L03_Voice6860","L03_Voice6861","L03_Voice6862","L03_Voice6863","L03_Voice6864","L03_Voice6865","L03_Voice6866", "L03_Voice6867","L03_Voice6868","L03_Voice6869","L03_Voice6870","L03_Voice6871","L03_Voice6872",
"L03_Voice6814","L03_Voice6815","L03_Voice6816","L03_Voice6817","L03_Voice6818","L03_Voice6819","L03_Voice6820","L03_Voice6821","L03_Voice6822","L03_Voice6823","L03_Voice6824","L03_Voice6825","L03_Voice6826","L03_Voice6827","L03_Voice6828","L03_Voice6829","L03_Voice6830","L03_Voice6831","L03_Voice6832"
}
end

function o:OnPlay(first)
if first then
Player.Ammo =
{
Bayonet = 1,
Grenades = 3,
Mk1 = 0,
Dynamite = 0,
Lamp = 0,
Colt = 48,
Luger = 0, -- theoretically not used at all (Luger has common ammo with Colt)
SMLE = 0,
Gew98 = 30,
Gew98Granades = 0,
SMLEGranades = 0,
Shotgun = 10,
Mp18 = 0,
MiniGun = 0,
Geballte = 0,
VampGun = 0,
VampGunRL = 0,
VampGunShotgun = 0,
VampGunFlamer = 0,
}
Player.Health = 100

self:StartWithWeapon("Gew98")

PHYSICS.ActiveMeshGroupEnable(1, false) -- podloga na koncu levela
PHYSICS.ActiveMeshGroupEnable(2, false) -- podloga na koncu levela
PHYSICS.ActiveMeshGroupEnable(3, false) -- drzwi
PHYSICS.ActiveMeshGroupEnable(4, false) -- bunkier
PHYSICS.ActiveMeshGroupEnable(6, false) -- bariera w okopach
PHYSICS.ActiveMeshGroupEnable(7, false) -- murek za trollem

PHYSICS.ActiveMeshGroupEnable(10, false) -- koncowka
PHYSICS.ActiveMeshGroupEnable(11, false) -- koncowka
PHYSICS.ActiveMeshGroupEnable(12, false) -- koncowka
PHYSICS.ActiveMeshGroupEnable(13, false) -- koncowka
PHYSICS.ActiveMeshGroupEnable(14, false) -- koncowka
PHYSICS.ActiveMeshGroupEnable(15, false) -- koncowka
PHYSICS.ActiveMeshGroupEnable(16, false) -- koncowka
PHYSICS.ActiveMeshGroupEnable(17, false) -- koncowka
end

end

Chancellor23
01-11-2010, 05:36 PM
Ok. I think I understand this a little better. After I read the following, I decided to revisit the extraction process.

Me I just had a 92kb executable+2 dlls.

I didn't install multiex commander, and painfull works, and I'm running win7x64 (but it used to work under xp64 aswell).

Odd indeed, perhaps commander was checking if a newer version was available, but you don't need that soft anyway. Xentax is, from my personal experience, trustworthy but I wasn't aware he'd made a pack (then again, I didn't check recently).

Norton reported viruses after I installed MultiEx Commander—not the XeNTaX Tool Pack. So, I decided to give the Tool Pack another try. The Painfull module came with a 92 KB executable, 2 DLLs—what you have—plus a ReadMe.txt file. Originally, I set Compatibility Mode to XP Service Pack 2, which didn’t work. Then I also ran the app as an administrator. It launched successfully.

1-No ned to edit the pak files, just extract their content and edit it, no need to repack.
2-in \NecroVisioN\Data\levels\Level_03_The_Hill\Level_0 3_The_Hill.lua, put:

I extracted the contents of Levels.pak and have access to Level_03_The_Hill.lua. I have some questions about this process: Do I have to extract all of the files in Levels.pak and put them into \NecroVisioN\Data\levels\ (and delete the levels.pak file)? Or can I extract only Level_03_The_Hill.lua and put it into \NecroVisioN\Data\levels\Level_03_The_Hill\?

I did the latter, with your modification. That didn’t change anything. I still started the Chapter 3 with the Gew98 (and the crash). So, I took a closer look at Level_03_The_Hill.lua.

The Game.CachedWeapons table contains the weapons that will be available during the level. I see you replaced the Gew98 with the SMLE. Instead of replacing the Gew98 (it may be necessary later in the level), I added the SMLE to the cache. The Game.PlayerEnabledWeapons table contains your available startup weapons. “SMLE” needs to replace “Gew98” in that table. The self:StartWithWeapon object needs to change from “Gew98” to “SMLE”. Finally, the Player.Ammo table contains your startup ammo. The Gew98 starts with 30 rounds; the SMLE starts with 0. I don’t know at this point, if I need to swap the ammo to the SMLE or if the SMLE shares the Gew98 ammo, like the Luger shares the Colt ammo.

These modifications still didn’t work. I started the level again with the Gew98 (and the crash).

The fact that the SMLE was not cached for Chapter 3 implies that it doesn’t appear in this level. It appears in the Chapter 1 Lua file, but not in the Chapter 2 Lua file, which makes sense because the SMLE appeared in Chapter 1 and the Gew98 appeared in Chapter 2. Given the SMLE is not cached for Chapter 3, I wondered what else might be missing or require changing; so I looked for more cache data. Let’s look at Level_03_The_Hill.cache.

There are a whole bunch of tables here. However, most of them contain no data for the SMLE, which makes sense because the SMLE was not cached for Chapter 3. That could be problem if you tried to use it in Chapter 3. The CacheListModels table contains no SMLE data. I copied that in. Had to place in Position [57] because I don’t know if the position [#] makes a difference. The CacheListSounds table contains some SMLE data, but was missing nine lines of SMLE data, which I added, also at the end of the list, starting at Position [743]. The CacheListItems table contains no SMLE data. However, this table contains weapon clip and shape data (plus other stuff). I inserted data for the SMLE, again at the end, starting in Position [199]. The CacheListAnims table contains no SMLE data. I added that at the end of the table.

My point is: Even though I made the changes I noted above, I don’t know if there’s anything else I need to change to implement the SMLE in Chapter 3. For all I know, there may be other files that require modification. Or not? It says here that Chapter 3 contains 2,292 files in 16 folders. Big odds, there. Plus, a lot of the tables in the .Cache file use numbered vectors. If NVN accesses the data by using those numbers, it might not find the SMLE data that I added to the ends of the tables because the level may not be programmed to generate those numbers.

I copied the revised Level_03_The_Hill.cache file into \NecroVisioN\Data\levels.

No luck. The level still starts with the Gew98.

I peeked ahead, and although the SMLE loads in for Chapter 4, neither rifle appears in the CachedWeapons lists after Chapter 4. So, aiming the Gew98 may not be an issue later in the game. I hope all the other weapons continue to behave properly.

Unless you have another idea, I guess my best bet would be to live with the situation and try real hard to not aim the Gew98 in Chapter 3. If the problem persists in Chapter 4, I’ll move on to something else.

Thanks for all your help.

Gniarf
01-11-2010, 06:28 PM
I extracted the contents of Levels.pak and have access to Level_03_The_Hill.lua. I have some questions about this process: Do I have to extract all of the files in Levels.pak and put them into \NecroVisioN\Data\levels\ (and delete the levels.pak file)? Or can I extract only Level_03_The_Hill.lua and put it into \NecroVisioN\Data\levels\Level_03_The_Hill\?You do NOT need top extract all the files from levels.pak. You can extract only some files (in \NecroVisioN\Data\[pakfile name]\[appropriate subdir]), modify them, keep levels.pak and the game will use the modified files.
Personally I prefer extracting all files and deleting the .pak because:
1-either the game uses my modified files or it crashes
2-no archives to uncompress -> faster loading times.

note: for subtitles.pak, "pakfile name" should be "Movies".

The Game.CachedWeapons table contains the weapons that will be available during the level. I see you replaced the Gew98 with the SMLE.Ugggh! Sorry, I was probably too tired back then and didn't modify the right entry, I should instead have replaced Gew98 by SMLE in the Game.PlayerEnabledWeapons array.
The self:StartWithWeapon object needs to change from “Gew98” to “SMLE”.It's not an object but a funtion call, but that's just a detail. I don’t know at this point, if I need to swap the ammo to the SMLE or if the SMLE shares the Gew98 ammo, like the Luger shares the Colt ammo.Ammo is shared(as far as I remember).

These modifications still didn’t work.WTF²? The files are probably in the wrong directory or not named properly; it should be NecroVisioN\Data\levels\Level_03_The_Hill\Level_03 _The_Hill.lua .Try extracting all the content of levels.pak and renaming the archive to levels.bak; if the game crashs then the files aren't extracted correctly (that dual directory issue again? No wait, we already did the empty loader.lua experiment, so we know the correct subdir).

The fact that the SMLE was not cached for Chapter 3 implies that it doesn’t appear in this level. [all and the stuff until the end]
1-You know when you use the nvnweapons code you get all weapons, but not all weapons are cached, yet you can still use them.
2-I once made a mod that removed all forms of caching (AFAIK), it was supposed to reduce loading times. I think it did indeed, but there was some lag each time we brought up a weapon for the first time (because the game had to load the weapon on the fly).

In short: you don't have to bother about caching to use a weapon.

Chancellor23
01-11-2010, 09:37 PM
All right. For reference purposes, I’ve attached a copy of my modified Level_03_The_Hill.lua file so you can see if I’ve coded anything incorrectly. My changes:

Added the SMLE to the Game.CachedWeapons table.
Substituted the SMLE for the Gew98 in the Game.PlayerEnabledWeapons table.
Changed the self:StartWithWeapon value to SMLE.
Assuming that the SMLE shares ammo with the Gew98, I did not modify the Player.Ammo table.

You do NOT need top extract all the files from levels.pak. You can extract only some files (in \NecroVisioN\Data\[pakfile name]\[appropriate subdir]), modify them, keep levels.pak and the game will use the modified files.

That’s what I thought. It was like that in Painkiller. Unfortunately, that’s what I did and it didn’t work.

WTF²? The files are probably in the wrong directory or not named properly; it should be NecroVisioN\Data\levels\Level_03_The_Hill\Level_03 _The_Hill.lua .Try extracting all the content of levels.pak and renaming the archive to levels.bak; if the game crashs then the files aren't extracted correctly (that dual directory issue again? No wait, we already did the empty loader.lua experiment, so we know the correct subdir).

I triple-checked the pathnames and file placements. The game did not crash upon launch; so, I’m sure I got the filenames and pathnames right. This time, however, I simplified the process because NVN doesn’t seem to be using the individual modified files. In C:\Program Files (x86)\Aspyr\NecroVisioN\Data, I created a subfolder named “Levels”. I copied all of the extracted files and folders into that directory, which is named C:\Program Files (x86)\Aspyr\NecroVisioN\Data\Levels. Then I swapped the modified Level_03_The_Hill.lua into C:\Program Files (x86)\Aspyr\NecroVisioN\Data\Levels\Level_03_The_H ill. To be on the safe side, I moved the levels.pak source file out of the C:\Program Files (x86)\Aspyr\NecroVisioN\Data folder to a safe place so there would be no confusion when I launched the game.

This did not work. I still got the Gew98 and the crash in Chapter 3.

So, I moved the Levels folder to my user profiles Data folder: C:\Users\Paul\AppData\Local\VirtualStore\Program Files (x86)\Aspyr\NecroVisioN\Data\Levels. Because I removed the levels.pak file and the Levels folder out of C:\Program Files (x86)\Aspyr\NecroVisioN\Data, I thought the game might crash. It didn’t. Chapter 3 loaded successfully. But I still got the Gew98 as my startup weapon and aiming still crashes the game.

Final Verdict: I’m going to uninstall and remove all of the NVN folders from the Programs (x86) folder and my user profiles folder. I’ll check the Windows Registry while I’m at it. Then I’m going to reinstall the game, create a new profile, and play through to Chapter 3. If NVN still crashes, I’m going to try playing through the level without aiming the Gew98. Or give up on the game.

This is not a lucrative career. What I really am not looking forward to replaying is that head-shot Challenge Room. That was really rough. Everything else was easy.

Chancellor23
01-11-2010, 09:40 PM
I don't know why, but the file didn't attach. Let's try again.

Chancellor23
01-11-2010, 10:26 PM
Ok. Now I have what I finally consider a Major Development. After all this playing around, I cannot uninstall NVN. I've located the InstallShield Installation Information folder for the app. The error message I'm receiving is that the Setup.exe file is missing. That is true, although where it went and how it was deleted I do not know. I will do an extensive system search, though. I usually keep "protected operating system files" hidden. Unless I need to see them—like now.

I'm going to copy the Setup.exe file from the DVD into the appropriate InstallShield Installation Information folder.

Here's a list of the files that I found in the InstallShield Installation Information folder:

_Setup.dll
data1.cab
data1.hdr
layout.bin
setup.ilg
setup.ini
Do I need to copy anything else into the folder besides Setup.exe in order to make the uninstall successful? For example, do I need to copy data2.cab or ISSetup.dll or setup.bat?

Thanks.

Chancellor23
01-11-2010, 10:47 PM
I had to run the uninstaller from the DVD. All gone now. Reinstalling to base config + Aspyr Patch 1.2. We'll see how a new profile and playing through Chapter 3 works out before deciding whether or not to continue with this app.

No more modding.

Gniarf
01-12-2010, 05:20 PM
No more modding.If you say that there is little I can do for you. I wish you Good luck.

I just wanted to say that I tried your Level_03_The_Hill.lua and upon starting the 3rd level, I had the smle in my hands...

Chancellor23
01-12-2010, 06:11 PM
I wish you Good luck.

Thank you. And thanks for helping me out. It was pretty scary for while when I couldn’t uninstall the game. The Control Panel Programs and Features list told me that the app wasn’t even installed. Finding the correct InstallShield folder was an educational adventure, too. Pure luck that the DVD Setup.exe worked.

I just wanted to say that I tried your Level_03_The_Hill.lua and upon starting the 3rd level, I had the smle in my hands...

Well, the good news is that I figured out how to change the code successfully. The bad news is that it didn’t work for me. Who knows why? Especially since I extracted the whole Levels.pak file and removed the Levels.pak file from the Data folder. It’s like there’s another, immutable installation hiding somewhere on my system. (There isn’t. I searched.) When I get back to Chapter 3, I’ll probably give the file one more try. I mean, if the file works, maybe I just need to apply it to a new profile. If not, I’ll find a way to make it through. Despite the setbacks, I still like this game. Plus, I learned a little about Lua scripting.

You’re a good guy, Gniarf.