PDA

View Full Version : A New DTS Enhancement Mod


Liz Shaw
08-15-2009, 08:55 AM
Since AHO has declared his Enhancement Addon for DtS finished, I decided to work on a sort of sister mod for it. Replacing sound files isn't a problem for me, but I need to know the following things:


How to replace the character model of certain NPCs.
How to add in extra objectives
How to mark objectives and points of interest on the map
How to add dynamite markers (like in "Eight Snipers")


Here's what I've done so far:


Enemy pain sounds have been replaced with better ones from MoT (except for the male pain responses whenever they're hit by a fragile object or Strogov's fist... what are "voice1", "voice2", "voice3" and "voice4" in DtS used for?).
A couple of female voice files AHO either ignored or missed out have been replaced with better ones from MoT (I doubt they'll work in-game anyway).
"muz3_ger_loop" and "muz4_ger_loop" have been replaced with "muz_ger_1" and "muz_ger_7" from MoT respectively.

AHO
08-15-2009, 02:03 PM
Since AHO has declared his Enhancement Addon for DtS finished,
I decided to work on a sort of sister mod for it.
Sister mod :) sounds sweet ;)



How to replace the character model of certain NPCs.
Exchange the file names of the model files (*.SMF)


How to add in extra objectives
Loook at this old thread of mine:
http://forum.1cpublishing.eu/showthread.php?t=4096






How to mark objectives and points of interest on the map
How to add dynamite markers (like in "Eight Snipers")

This is only possible by patching the levelmaps (*.swd) ask forlik,
he knows more than me.




Enemy pain sounds have been replaced with better ones from MoT
(except for the male pain responses whenever they're hit by a fragile
object or Strogov's fist... what are "voice1", "voice2", "voice3" and "voice4" in DtS used for?).

Well if I remeber correctly. I replaced them already :o



A couple of female voice files AHO either ignored or missed out have been replaced with
better ones from MoT (I doubt they'll work in-game anyway).

Well. I replaced them all ;)




I wish you good luck and don't hesitate to ask forlik or me, if you
have any question.


-AHO

Liz Shaw
08-15-2009, 02:51 PM
Exchange the file names of the model files (*.SMF)

For example, I would like to replace the kissing guard in "Hotel" with one of Volkov's bodyguards from "Embassy". How would I do that?

AHO
08-15-2009, 05:05 PM
For example, I would like to replace the kissing guard in "Hotel" with one of Volkov's bodyguards from "Embassy". How would I do that?


1. You need a hex editor
2. You have to edit the level map file: \Levels\Hotel\hotel.swd
3. Search inside for npc reference "Suitman15" this is the ID of this guy.
Before this entry there is the model reference "Actor\HotelGuard"
4. Replace the reference with "EmbassyAgent_2" or "EmbassyAgent_1"

(*) Problem: The refrence names must have the same length!!!
You had to clone the entry for "EmbassyAgent_*" inside the actors.shadvs
and rename it with a name that fits.

I know its a little complicated ;)

Liz Shaw
08-16-2009, 12:20 AM
Where do I find a hex editor?

AHO
08-16-2009, 09:36 PM
Where do I find a hex editor?
Use Google to find one ;)

Liz Shaw
08-17-2009, 03:06 AM
(*) Problem: The refrence names must have the same length!!!
You had to clone the entry for "EmbassyAgent_*" inside the actors.shadvs
and rename it with a name that fits.

How do I clone an entry?

forlik
08-17-2009, 09:17 AM
How to mark objectives and points of interest on the map
How to add dynamite markers (like in "Eight Snipers")


This is only possible by patching the levelmaps (*.swd) ask forlik, he knows more than me.

I've never done this, but it seems that's not neccesary to modify swd files for these tasks. See svalka.lua file:


function Level.OnLoaded()
...
Actor.MarkAsTarget(Level.FindActor('SNP1') , true);
Level.EnableLevelMark('DYN1', true);

The first command marks 1st sniper as target.
The second command marks 1st dynamite as target.
SNPn and DYNn IDs are described in \svalka\map.shadvs file.
You can search svalka.lua with 'dyn' or 'dynamite' keys to find another useful commands.

Where do I find a hex editor?
Search an editor is much more easy than work with it ;)
A lot of hex editors today (free, non-free, as plugins for file managers):

http://en.wikipedia.org/wiki/Comparison_of_hex_editors

But remember, that any swd-file change (even 1 byte) can lead to the game crush. And it's not easy to find the reason of the crush. So, be careful and always make a copy of the swd-file (perhaps after each successfull step).

How do I clone an entry?
See this thread

http://forum.1cpublishing.eu/showthread.php?t=5390

and ask hykao about shadvs2txt and txt2shadvs converters.
After that you'll have possibility to modify shadvs files with any text editor (like Windows Notepad).

AHO
09-08-2009, 01:49 PM
Hey,
what's the current state of your work?
Give us feedback ;)

Liz Shaw
09-08-2009, 02:23 PM
Hey,
what's the current state of your work?
Give us feedback ;)

I couldn't figure out what to do with the hex editor, so I haven't done anything new. Plus, I have other things on my plate. Actually, how can I place new items in rooms (eg. new clothes, new weapons)?

AHO
09-08-2009, 07:50 PM
I couldn't figure out what to do with the hex editor, so I haven't done anything new. Plus, I have other things on my plate. Actually, how can I place new items in rooms (eg. new clothes, new weapons)?

This is only possible via script commands e.g.

Level.CreateWorldItem( "wear:EmbassyAgent_1" , "equipment" , 821.00, 4.00, -368.00, 0.0, 0.0, 0.0, 'id_wear1' );


"wear:EmbassyAgent_1" is the item you wanna spawn, the
item names you can find inside the equipment.shadvs, weapons.shadvs etc.

"equipment" is the library (class) name. Same as shadvs files I mentioned above

821.00, 4.00, -368.00 are the coordinates (x,y,z). You
can aquire the current position via console command:
pl_showpos.

0.0, 0.0, 0.0 I dunno, let it as it is

'id_wear1' is the id of the newly created item.
Necessary but not used in case of spawning.
-AHO

Liz Shaw
09-09-2009, 02:54 AM
Update:


I've been proof-reading all the Level LUAs.
I also changed a failed mission script from "Diplomat has been killed" to "Diplomat has been attacked", because if you knock him out, it's still classed as killing him.
It's now possible to steal the utility room key from one of the waiters without taking him out.
I added in a key to the diplomat's safe to save players from picking the lock. It's in the possession of the kissing guard.;)


In regards to wanting to place new clothes, I want to place a warden's uniform on the bed in the room near the conference hall in "Stronghold" to start with. AHO, can you please give me the coordinates of said bedroom?

AHO
09-10-2009, 08:34 AM
Update:


I've been proof-reading all the Level LUAs.
I also changed a failed mission script from "Diplomat has been killed" to "Diplomat has been attacked", because if you knock him out, it's still classed as killing him.
It's now possible to steal the utility room key from one of the waiters without taking him out.
I added in a key to the diplomat's safe to save players from picking the lock. It's in the possession of the kissing guard.;)

In regards to wanting to place new clothes, I want to place a warden's uniform on the bed in the room near the conference hall in "Stronghold" to start with. AHO, can you please give me the coordinates of said bedroom?

You can aquire the current position with the console command PL_ShowPos.

Liz Shaw
09-10-2009, 09:58 AM
Have I done this right?

Level.CreateWorldItem( "wear:GermanYellow" , "equipment" , -60.064407, 0.906136, 555.986816, 0.0, 0.0, 0.0, 'id_wear1' );

AHO
09-10-2009, 10:05 AM
Have I done this right?

Level.CreateWorldItem( "wear:GermanYellow" , "equipment" , -60.064407, 0.906136, 555.986816, 0.0, 0.0, 0.0, 'id_wear1' );

This seems correct. But I did not test it. Are the new clothes shown
correctly? Maybe you have to correct the y-coordianate manually.

Note: the id at the end must be unique, so if you create another
item via this command it must have a different name.

PS: Why don't you post some screens shots of your work,
I'm very interessted in your results...

Liz Shaw
09-10-2009, 11:32 AM
This seems correct. But I did not test it. Are the new clothes shown
correctly? Maybe you have to correct the y-coordianate manually.

Note: the id at the end must be unique, so if you create another
item via this command it must have a different name.

PS: Why don't you post some screens shots of your work,
I'm very interessted in your results...

They don't show up, and I'm trying to place them on the bed like what you did. How do I manually adjust the y-coordinate. And as a confirmation, is "GermanYellow" the warden's uniform?

AHO
09-10-2009, 11:48 AM
1They don't show up, and I'm trying to place them on the bed like what you did. 1 /2 How do I manually adjust the y-coordinate. 3 And as a confirmation, is "GermanYellow" the warden's uniform?

It is not shown? Then you did something wrong

1. The game engine makes strange things, sometimes the spawned
item is in or under the ground. So try to change the y-coordinate
manually (the digit)
2. Just change the Number
3. Yes it is, just search in folder \players\ for the file if you are not sure

Liz Shaw
09-10-2009, 01:14 PM
I got the warden's uniform to show up on the bed, but there's something wrong... I think I made up to three duplicates of the uniform in the same position.:grin:

Liz Shaw
09-17-2009, 01:31 PM
How do I only make one warden's uniform appear on the bed instead of multiple uniforms in the same position?

Also, I tried to add a chef's uniform in the Embassy kitchen. However, when I attempted to test it, the level loads with Strogov in his camouflage clothes, without his weapons, under fire.

forlik
09-17-2009, 06:24 PM
How do I only make one warden's uniform appear on the bed instead of multiple uniforms in the same position?
Use one command Level.CreateWorldItem("wardenUniform", ...) instead of multiple.

Also, I tried to add a chef's uniform in the Embassy kitchen. However, when I attempted to test it, the level loads with Strogov in his camouflage clothes, without his weapons, under fire.
Very strange. Is it a result of Level.CreateWorldItem("chefUniform", ...) command? Or you was trying to modify SWD file using hex-editor?

AHO
09-17-2009, 10:33 PM
How do I only make one warden's uniform appear on
the bed instead of multiple uniforms in the same position?

Only spawn your new item in function Level.OnLoaded() or the item
will duplicated every time you load a save game.



Also, I tried to add a chef's uniform in the Embassy kitchen. However, when
I attempted to test it, the level loads with Strogov in his camouflage clothes, without his weapons, under fire.

This occurs, if there is a syntax error in the scripts e.g. missing ")" or ";" etc.
You can check the error message in the console's log

Liz Shaw
09-18-2009, 12:55 AM
Only spawn your new item in function Level.OnLoaded() or the item
will duplicated every time you load a save game.

Thank you, it worked! There's now one uniform on the bed! I still have to work out how to make it register on the map (how to make the red mark and the red circle around the real warden disappear).

AHO
09-22-2009, 09:17 PM
Thank you, it worked! There's now one uniform on the bed!
I still have to work out how to make it register on the map (how to make the red mark
and the red circle around the real warden disappear).

Delete or comment out the line with:
"Actor.MarkAsTarget( comendat , true );"

Or set the second argument to "false".

Liz Shaw
09-24-2009, 04:52 AM
Delete or comment out the line with:
"Actor.MarkAsTarget( comendat , true );"

Or set the second argument to "false".

That only removes the flashing red circle around him even before I get the spare uniform. I meant how to make the red "1" mark disappear from the map once I get the spare uniform.

AHO
09-25-2009, 07:08 PM
That only removes the flashing red circle around him even before I get the spare uniform. I meant how to make the red "1" mark disappear from the map once I get the spare uniform.

Try this command "Level.EnableLevelMark('YOFS' , false );", but I'm not
sure, because I did not test it...

Liz Shaw
09-26-2009, 04:30 AM
Okay, I'm having no luck so far on how to make the map marker in the warden's room disappear once I take the spare uniform. But, here's some updates on what I've done so far:


In "Project Y", there is a bottle of chloroform and a first aid kit in four rooms - the room with the marked scientist, the smokestation room's cubicle, the teacher's desk in the classroom, and in the laboratory next to the safe. There's also a spare officer's uniform in the shower room before you take the corridor to the cyclotron.
In "Embassy", there is a chef's uniform in the kitchen. Apparently, the chef can go upstairs without being told off, but can't enter the staff lounge. This is where a spare agent's uniform comes in. You can find it in the room with the kissing couple.


I also had a go at placing a German soldier's winter uniform in "Winter Cold", but I encountered a problem - Strogov wears TWO hats in the same uniform (the cap protrudes a little bit from the helmet).

forlik
09-26-2009, 09:03 AM
I also had a go at placing a German soldier's winter uniform in "Winter Cold", but I encountered a problem - Strogov wears TWO hats in the same uniform (the cap protrudes a little bit from the helmet).

About German winter uniform, see Cowboy.lua:

Level.AddActionHandler( Level.AH_FINISH_CHANGECLOTH, 'WRFB', "OnChangeFbiCloth" );
...
function Level.OnChangeFbiCloth()
local player = Level.GetPlayer();
if ( player != nil ) then
Actor.EnableMesh( player, "mesh_hat" , false );
Actor.EnableMesh( player, "mesh_glasses" , false );
end;
end;

This part of code removes hat and glasses from Semen in FBI uniform. I think, you can apply this solution to helmet/cap of the German uniform.

Liz Shaw
09-26-2009, 10:29 AM
Is this correct?

Level.AddActionHandler( Level.AH_FINISH_CHANGECLOTH, 'WSOL', "OnChangeWSoldierCloth" );
...

function Level.OnChangeWSoldierCloth()
local player - Level.GetPlayer();
if ( player !=nil ) then
Actor.EnableMesh (player, "mesh_cap" , false);
end;

forlik
09-26-2009, 04:22 PM
Is this correct?
Actor.EnableMesh (player, "mesh_cap" , false);

No. The valid value for the cap mesh is "grm_cap".

Liz Shaw
09-27-2009, 02:46 AM
I think I've got this wrong:

Level.AddActionHandler( Level.AH_ACTOR_KILLED , "PKUR" , "OnKilledKurier");

Level.AddActionHandler( Level.AH_FINISH_CHANGECLOTH, 'WSOL', "OnChangeWSoldierCloth" );

-- patch
Level.AddActionHandler( Level.AH_ACTOR_KILLED , "GO07" , "OnKilledMarkedOfficer");
Level.AddActionHandler( Level.AH_ACTOR_HITTED , "GO07" , "OnKilledMarkedOfficer");

Level.AddActionHandler( Level.AH_ACTOR_KILLED , "GO02" , "OnKilledMarkedOfficer");
Level.AddActionHandler( Level.AH_ACTOR_HITTED , "GO02" , "OnKilledMarkedOfficer");

Level.AddActionHandler( Level.AH_PLAYER_INVENTORY );

...

function Level.ChangeKurierTask()

Level.AddMissionTask( MissionText.Task_2, 'FREE', "levels\\posilka\\free_task.txt" );
Level.RemoveMissionTask( 'GETK' );

Level.PlayMenuSound("task_finish");
Level.AddLargeMessage( MissionText.Message_1, 15.0, 255, 255, 255 );
Level.EnableLevelMark( 'GETK' , false );
Level.EnableLevelMark( 'FREE' , true );

local kurier = Level.FindActor('PKUR');
if ( kurier != nil ) then
Actor.SetMapHidden( kurier, false );
Actor.MarkAsTarget( kurier, true );
end;

Level.EnableLevelMark( 'OFFR' , true );

-- patch
Level.CheckKilledOfficers();

Level.ShowTargetGuards();

end;

function Level.OnChangeWSoldierCloth()

local player - Level.GetPlayer();
if ( player !=nil ) then
Actor.EnableMesh (player, "grm_cap" , false);
end;

When I load the level, a Syntax error is triggered.

forlik
09-27-2009, 08:46 AM
When I load the level, a Syntax error is triggered.

1. Equals instead of minus is needed:
local player - Level.GetPlayer();
2. End of the function is needed:
function Level.OnChangeWSoldierCloth()
local player - Level.GetPlayer();
if ( player !=nil ) then
Actor.EnableMesh (player, "grm_cap" , false);
end;

Liz Shaw
09-27-2009, 09:05 AM
I'm still getting the error! Which position does it have to be in?

forlik
09-27-2009, 11:56 AM
I'm still getting the error! Which position does it have to be in?

http://img140.imagevenue.com/loc526/th_55599_Untitled_122_526lo.jpg (http://img140.imagevenue.com/img.php?image=55599_Untitled_122_526lo.jpg)

P. S. http://www.lua.org/manual/5.1/

Liz Shaw
09-28-2009, 05:53 AM
I think I messed up the "Winter Cold" LUA, so I decided to withdraw placing spare soldier's uniforms for now.

A new problem has been encountered in "Stronghold" - I can't enter the prison in the spare warden's uniform.

forlik
09-28-2009, 08:43 AM
I think I messed up the "Winter Cold" LUA, so I decided to withdraw placing spare soldier's uniforms for now.

You still have LUA compile error? Interesting :)
Send me your posilka.lua by e-mail or PM.

Liz Shaw
09-28-2009, 11:59 AM
You still have LUA compile error? Interesting :)
Send me your posilka.lua by e-mail or PM.

Too late, I replaced it with a backup from before I was working on the clothes.

Liz Shaw
10-10-2009, 02:36 AM
I need help with the following problems:


How to make the spare warden's uniform register as the real warden's uniform. Not only does it register on the map, I can't get into the prison.
In "Hotel", I've been trying to add two different "Steal Key" actions in two locations. I'm having trouble getting both features to work properly.

Liz Shaw
10-21-2009, 05:47 AM
UPDATE:


I've replaced the music in most of the German missions with better music from MoT. I also added MoT music in the Training mission.
The archives chief in "Embassy" is no longer marked as a target when you steal the key off him.
I've added a new mission objective for "Hotel". However, I can't seem to make it work when you load a game saved after it is registered.


I still need to figure out how to make the spare uniform in "Stronghold" register as the warden's.

forlik
10-21-2009, 07:41 AM
I also added MoT music in the Training mission.

"Kamerad, nun heisst's marschieren..."? :)

Liz Shaw
10-21-2009, 08:23 AM
"Kamerad, nun heisst's marschieren..."? :)

No, not that, though I did replace "muz3_ger_loop" with it. I'm talking about the ambient level music.

AHO
10-26-2009, 12:26 PM
Hey Liz, what are you doing exactly?
Modding DtS or MoT or both?
Please post your progress and some screens.

Liz Shaw
10-26-2009, 12:33 PM
Hey Liz, what are you doing exactly?
Modding DtS or MoT or both?
Please post your progress and some screens.

Well now that forlik has released his mod, I'm not sure about doing more modding for DtS. But speaking of screens, how do you make them register in the game folder for My Documents?

Before forlik released his mod, I've been trying to make two Nagant cartridges appear next to the gun in "Hotel", but I'm having no luck.

AHO
10-26-2009, 12:37 PM
Well now that forlik has released his mod, I'm not sure about doing more modding for DtS.


Why not? His mod has nothing to do with yours!


But speaking of screens, how do you make them register in the game folder for My Documents?


Just press F1 and they will be saved automaticly in that folder...