View Full Version : Some testing
Mr. Q
04-08-2005, 12:20 AM
I have playing around a bit in PainEd, i don't know much about it but if i like a game a screw around a bit.
The "Leningrad" level isn't used by it's fully potential, i feel the people finisched some levels without taking advantage of the level possibilities to put away secrets while other levels do. Perhaps they came under time pressure, who knows. Anyway i put some more secrets in the level (for those who are addicted to this game), ammo and a few soldiers. Nothing special just to look around in the editor. "Leningrad" NEW (http://users.pandora.be/Mr.Q/C6L5_Leningrad.rar)
Extract it in "...........\Painkiller\Data\Levels" so it looks like this "............\Painkiller\Data\Levels\C6L5_Leningrad"
I would like to test a bit for mapping but i need a new Maya Exporter because the PCFMeshPlug_60.mll isn't working with Maya 6.5 any idee, i already send a mail to the PCF team.
Then i have some questions to, first is there anywhere on the net some info or tutorial for mapping or editing the files etc for Painkiller and second, where can i find the Magic Cards stats in those scripts or files. I looked very closly at Lscripts\Templates but couldn't find it.
And finaly nice work for all those people making video's and bug_fixs (Kalme, Varus etc..)
kalme
04-08-2005, 08:26 AM
Welcome to the forums!
Hey, I like that mod very much! The secrets are harder to get than the original ones and are more PK-like (compared to BOOH-like). Those extra enemies, getting rid of the empty secret, fixing those flames, the extra megahealth -- that's the way this level should have been in the first place!
But in your package, some files are missing (templates etc.). That's no problem as long as you run it under it's original name, but maybe you should complete that.
where can i find the Magic Cards stats in those scripts or files. I looked very closly at Lscripts\Templates but couldn't find it.
What do you mean with "magic cards stats"? Do you mean the requirement that is needed to get certain cards (which are all located in the level files: Levels/<levelname>/<levelname>.lua)?
Mr. Q
04-08-2005, 11:27 AM
I add some things to the original level, if you want it to be an new one i have to put all those templates in, i havn't looked in to that. You know its the first time i experiment with it, i saw some editors before but never did work with it just for Morrowind i made once a plugin containing a new house and a ring to transport you directly to a salesman.
If you make a new level lets say "Streets" can you make it load from the menu wihtout removing any original level from the menu. I mean an extra menu like the shoice "Painkiller" and "Battle Out Of ****" compleet new sing the pact.
For the cards stats i was lookin to the effects they have like time slower, weapons doing double damage. I was looking not for the requirements but what the cards do when used. When i was looking for it i would like to change the "Life Stealer" card because it was taking 5%, but with the 1.62 patch its fixed and it only takes 2.5% life. Also before if i used the "Demon Morf" and "Life Stealer" togehter i ended up with over 40.000 healt witch makes playing on trauma peanuts. But again in the 1.62 patch you can't get over 250 healt witch is better.
kalme
04-08-2005, 04:55 PM
I add some things to the original level, if you want it to be an new one i have to put all those templates in, i havn't looked in to that. You know its the first time i experiment with it, i saw some editors before but never did work with it just for Morrowind i made once a plugin containing a new house and a ring to transport you directly to a salesman.
If you make a new level lets say "Streets" can you make it load from the menu wihtout removing any original level from the menu. I mean an extra menu like the shoice "Painkiller" and "Battle Out Of ****" compleet new sing the pact.
There's no command in Painkiller that lets you start self-made levels directly. But if you've got Powermad installed (latest version), then you can use "pmloadlevel <levelname>" in console to load your custom levels. That way, the original level and your modded one can exist side-by-side. But of course, there are a few thing you need to do:
- You have to include all the files of the original level (taken from Levels.pak, excluding of course those you want to delete or something).
- You have to rename the folder for that level to a custom name.
- You have to rename the two script files located in the level's root folder (<levelname>.CLevel and <levelname>.lua) to <customlevelname>.CLevel and <customlevelname>.lua
- You have to replace every reference to <levelname> in those two scriptfiles (mostly the .lua) to <customlevelname>, for example "C6L5_Leningrad:OnPlay(first)" to "C6L5_LeningradMod:OnPlay(first)".
It's also possible to alter existing menues or create new ones using the scripts. That way, you can also make your level available through the menus (instead of typing in a command at the console). But it requires some work and you would have to provide a custom LScripts.pak together with your level.
For the cards stats i was lookin to the effects they have like time slower, weapons doing double damage. I was looking not for the requirements but what the cards do when used. When i was looking for it i would like to change the "Life Stealer" card because it was taking 5%, but with the 1.62 patch its fixed and it only takes 2.5% life. Also before if i used the "Demon Morf" and "Life Stealer" togehter i ended up with over 40.000 healt witch makes playing on trauma peanuts. But again in the 1.62 patch you can't get over 250 healt witch is better.
Unfortunately this information is distributed over different scripts. But there's an easy way to find the information you are looking for. The central location were silver and golden cards are toggled is in LScripts/Main/Game.lua. Look for the methods "EnableSilverCards()" and "EnableGoldenCards()". There you can find the switches on which the game decides what cards to use, and based on these switches you can find the actual location where the card effect comes into play.
For example, let's say you want to find out how the Rage card (4x damage) works. First, open the file LScripts/Main/Game.lua and search for the method "EnableGoldenCards()" (since Fury is a golden card). Now look for the lines that say
-- rage (Deliver 4x more damage)
if Game.CardsSelected[cards[4].index] then
self.DamageFactor = 4
end
Now you have found the "switch", in that case "self.DamageFactor". Note that "self" in this place is equivalent to "Game", so "self.DamageFactor" actually is the same as "Game.DamageFactor". Now search through all the scripts within the LScripts.pak (I assume you extracted it) for the term "DamageFactor" or ".DamageFactor" or even "Game.DamageFactor". You will find that besides the occurrences in Game.lua, a reference also can be found in CActor.lua. It is located in CActor:OnDamage(), and that's the place we're looking for. CActor is the class every enemy/monster/player is derived from. The OnDamage method is called every time damage is inflicted. If you look at the code, you can see it says
damage = damage * Game.DamageFactor
Because activation of the Rage card set the DamageFactor property to 4, the result here is that four times the damage is inflicted on the actor.
Now if you want to alter the behavior of that card, you could do different things. Alter the location in Game.lua where the factor is set or alter it's behavior in CActor (but be aware of the fact that this also changes the behavior of the Fury card) etc. etc.
That way, you can find all the other places where card effects come into play. Btw. if you look at the next line below the damage altering line in CActor.lua, you can read:
if Game.StealHealth then
local health_add = damage * 0.025
Player.Health = Player.Health + health_add
if Player.Health > 250 then Player.Health = 250 end
end
That for example is the location where the effect of the Health-Stealer-card happens. The trigger again can be found in EnableSilverCards() in Game.lua, where the "StealHealth" property is set to true.
HTH
kalme
04-08-2005, 05:07 PM
A word about searching IN files with Windows XP. By default, Windows XP doesn't search in every file if you are searching for "files containing text". For example, lua files are excluded because Windows doesn't know these are plain text files. To circumvent this problem, do the following
Open the search sidebar in Windows Explorer
In the "search options" panel, click on the "Indexing Service" link
In the dialog, click the "Advanced" button
Another window opens, now click the "Show/Hide console tree" toolbar button
In the appearing tree view at the left side, right-click on "Indexing Service on Local Machine and select "Properties"
In the properties window, select "Index files with unknown extensions", and then click your way through ("OK") back to the Windows Explorer.
Done! Now your search for containing text also includes lua and other "unknown" file types.
Mr. Q
04-08-2005, 11:57 PM
It's a bit complicated now, i'm to drunk. :)
I'll be back tomorow.
For viewing at those files i use "Total Comander" With plug-ings for .PAK files etc... I can view the .LUA files as text.
For what i understand now is that you have to understand a bit of programing for this. I must say i find it nice the way you now these things. Are you a programer yourself or are you involved with this game. Because while it's not the newest game you still make an effort of it. I wish i was rich and could do nothing else then learning about these things.
kalme
04-09-2005, 05:43 AM
I'm not involved with this game, but you're right, I'm a programmer myself. If you've got no programming experience at all, it may be hard to edit those scripts. If you've worked with some programming language (C/C++, Java etc.) before, it shouldn't be that hard.
Mr. Q
04-09-2005, 02:17 PM
Reading it now makes much more sense, thanxs.
I don't know much about programing but in the past i learnd a bit of Basic (C64) so the others codes makes a bit sense but still isn't easy without some help.
Anyway thank you for the help.
Mr. Q
04-11-2005, 08:18 PM
If you have a moment the time would you like to tell whats the most realistic scale for the table, you will see that there are three tables. I have doubts between the two biggest.
The PAK file is here http://users.pandora.be/Mr.Q/New_map.pak
And could you tell me how to load my map in the game i cant seem to find a console in single player and in MP it wont load nomather what i try. For know i only see it in the editor.
kalme
04-12-2005, 05:12 AM
If you've got Powermad installed, then you can use it's "pmloadlevel" command to load a certain level in singleplayer. If you want to use your map in multiplayer, you have to name it correctly. The game checks for a prefix like "dm_", "dmpcf" or "ctf", depending on the multiplayer mode. Since your map is named "New_map", it won't be recognized as valid multiplayer map.
If you want to distribute your map as single package, make sure its extension is ".pkm" (just rename the pak-file). That way it's loaded automatically if you put it into [Painkiller]/Data (else you have to extract the contents of the pakfile).
And about the table... I would take the middle... ;)
Mr. Q
04-12-2005, 09:01 AM
I didn't have the powermad for 1.62, now i have the console but i changed the Powermad.lua file for loading the bonuslevel into loading my map (why didn't i think of it sooner).
I had it as an .pkm file but i didn't know i loaded automatically so i renamed it to .pak, now i know it to thanx.
I'm had this level made to test jump distance and scale for if i would make some single player level but i have a lot to learn, Maya, texture making photoshop, scripting the .lua files because if i make a level you have to have acces to it by the menu. I almost have found it but i could'nt make the level name appear in the menu box but i'll first have to make a level.