Basic Modding with Playable Examples

This is a discussion on Basic Modding with Playable Examples within the S.T.A.L.K.E.R. SoC Modding, Mapping and Editing forums, part of the S.T.A.L.K.E.R. Shadow of Chernobyl category; Originally Posted by subzeroplainzero Spawn locations, AFAIK, can't be changed through the .ltx files. Spawn rates are controlled by, I ...

S.T.A.L.K.E.R. SoC Modding, Mapping and Editing Want more info about a Mod? Making a Mod? Looking for Modders, Mappers, Skinners, etc.? This is your Spot!

Reply
 
LinkBack Thread Tools Rating: Thread Rating: 9 votes, 5.00 average. Display Modes
  #91  
Old April 25th, 2007
Final Warrior's Avatar
Just another Ghø$† ¡n †h€ ƒøg
 
Join Date: April 4th, 2007
Posts: 294
Rep Power: 0
Final Warrior is a n00b
Send a message via AIM to Final Warrior Send a message via MSN to Final Warrior Send a message via Yahoo to Final Warrior
Default Re: Basic Modding with Playable Examples

Quote:
Originally Posted by subzeroplainzero View Post
Spawn locations, AFAIK, can't be changed through the .ltx files. Spawn rates are controlled by, I presume, all.spawn, though I don't know how you would alter that, nor what program to use to do so.
I beg to differ. I've managed to make a bloodsucker spawn in cordon and also a snork in garbage. I'ts actually a very simple process but it seems to be completely up to the Alife when it decides to spawn them if ever. I think you need to be quite far into the game cos the Alife only really seems to spring into action when you revisit an area long after you've done the relevent missions. I dont think this is true for all areas though, I could be wrong.
Well, like I said before, I really didn't know. But, thanks for the info!

@Fyndir: Are you loading a game or starting a new one?

Oh, and I noticed that you capitalized the "bm" in "wpn_BM16". Try leaving it uncapitalized and see if the game works; I'm not sure how picky the engine is with case.

-- Griffinhart
__________________


"My word is my honor. My honor is my life."
-- Demonchild, Angelkin, Death Incarnate, the Final Warrior

The S.T.A.L.K.E.R. Modding Community
Reply With Quote
Remove advertisements
Advertisement
Advertisement Sponsored links

  #92  
Old April 26th, 2007
I don't spend enough time here
 
Join Date: April 22nd, 2007
Posts: 15
Rep Power: 0
Fyndir is a n00b
Default Re: Basic Modding with Playable Examples

I've tried both with the uncapitalised version, since I had made a quicksave just after buying and testing the niphty gauss rifle, still getting the same crash with no crash log. =(

The game seems to dislike my attempt at making a super-shotgun.
Reply With Quote
  #93  
Old April 26th, 2007
FoxTwo's Avatar
Flight Simmer and MMORPGer
Airman 1st Class
 
Join Date: September 29th, 2005
Location: Singapore
Posts: 55
Rep Power: 0
FoxTwo is a n00b
Send a message via ICQ to FoxTwo Send a message via MSN to FoxTwo Send a message via Yahoo to FoxTwo Send a message via Skype™ to FoxTwo
Default Re: Basic Modding with Playable Examples

Quote:
Originally Posted by Fyndir View Post
Unique Items Code:
Code:
[wpn_Fyn_m1]:wpn_BM16
$spawn = "weapons\bm16"
description = enc_weapons1_wpn-Fyn_m1
inv_name = wpn-Fyn_m1
inv_name_short = wpn-Fyn_m1
cost = 10
I haven't been modding weapons very much but here's some suggestions:

1. replace your spawn line with $spawn = "weapons\uniq\wpn_Fyn_m1" . If the engine is properly following conventional OOP philosophy, you're trying to spawn an existing bm16, not your unique one. The normal bm16 doesn't contain all the properties you defined.

Quote:
Code:
hit_impulse = 6000
fire_distance = 10000
bullet_speed = 150000
rpm = 500
2. I don't know but maybe you should try lowering some of these values. Might be too big for the engine to handle ("Index out of bounds" errors). Bullet speed at 150,000 metres per sec (150 kilometres per second) is... somewhat too fast....

Quote:
Code:
scope_zoom_factor = 7.5
LOL a shotgun with an 8x zoom scope? hahaha... did you mention anywhere in your definition file that "scope_status = 2"? and also to specify which scope it can use? I can't remember but I think it's "scope_name" or something similar. Usually it's "scope_name = wpn_addon_scope" (Russian scope) or "scope_name = wpn_addon_scope_susat" (NATO scope).

Might also be a reason why it's crashing, cos you said there's a scope but I don't see your definition saying you can attach a scope to it....

Anyway I hope my suggestions help.
__________________
Reply With Quote
  #94  
Old April 26th, 2007
I don't spend enough time here
 
Join Date: April 22nd, 2007
Posts: 15
Rep Power: 0
Fyndir is a n00b
Default Re: Basic Modding with Playable Examples

Quote:
Originally Posted by FoxTwo View Post
I haven't been modding weapons very much but here's some suggestions:

1. replace your spawn line with $spawn = "weapons\uniq\wpn_Fyn_m1" . If the engine is properly following conventional OOP philosophy, you're trying to spawn an existing bm16, not your unique one. The normal bm16 doesn't contain all the properties you defined.
If you look at the first post in the thread (the code from which works fine for me) you'll see it uses the original weapon name in the $spawn =, so I can't imagine why changing that would help.



Quote:
Originally Posted by FoxTwo
2. I don't know but maybe you should try lowering some of these values. Might be too big for the engine to handle ("Index out of bounds" errors). Bullet speed at 150,000 metres per sec (150 kilometres per second) is... somewhat too fast....
All those values work fine with the Gauss rifle, and surely those problems and crashes would only appear when I actually fired the gun if that was the case?

Quote:
Originally Posted by FoxTwo
LOL a shotgun with an 8x zoom scope? hahaha... did you mention anywhere in your definition file that "scope_status = 2"? and also to specify which scope it can use? I can't remember but I think it's "scope_name" or something similar. Usually it's "scope_name = wpn_addon_scope" (Russian scope) or "scope_name = wpn_addon_scope_susat" (NATO scope).

Might also be a reason why it's crashing, cos you said there's a scope but I don't see your definition saying you can attach a scope to it....

Anyway I hope my suggestions help.


I'll take the scope out, I didn't really want the shotgun to have a scope but I didn't want to change too much from the original Gauss rifle that was posted, since the code from that worked for me, you know?

I'll try your changes later on (got a job interview to go to now. =O) but I'm just pointing out that I can't imagine any of them being the issue, since they're copied directly over from the Gauss rifle mod.
Reply With Quote
  #95  
Old April 26th, 2007
FoxTwo's Avatar
Flight Simmer and MMORPGer
Airman 1st Class
 
Join Date: September 29th, 2005
Location: Singapore
Posts: 55
Rep Power: 0
FoxTwo is a n00b
Send a message via ICQ to FoxTwo Send a message via MSN to FoxTwo Send a message via Yahoo to FoxTwo Send a message via Skype™ to FoxTwo
Default Re: Basic Modding with Playable Examples

Well like I said, I haven't been modding guns much. Also, I also do have crashes before for just HOLDING a modded weapon, but at least I have logs to tell me that some stuff I defined in the weapon conflicted with something else and hence...crash!

Oh yeah, sorry I never actually followed niphty's tutorial (and his Gauss gun) when modding my weapons... I was doing it trial and error, and sticking basically to the same principles as I did for armour.

Some stuff might work for the Gauss gun because in the actual Gauss gun definition, the pre-requisites were already defined. ie, in the actual Gauss gun file, it already contains a "scope_status = 1" line, hence just a "scope_zoom_factor" definition defined in the unique file is enough to alter the properties. The bm16 weapon doesn't have a scope_status = 1 line I believe, hence might be a reason to cause it to crash (as an example).

So, maybe you should look at the actual wpn_bm16.ltx file so that you know which attributes you can alter and which are missing from the Gauss Gun that you shouldn't include in your unique file definition.
__________________
Reply With Quote
  #96  
Old April 26th, 2007
I don't spend enough time here
 
Join Date: April 22nd, 2007
Posts: 15
Rep Power: 0
Fyndir is a n00b
Default Re: Basic Modding with Playable Examples

Code:
[wpn_Fyn_m1]:wpn_bm16
$spawn = "weapons\wpn-bm16"
description = enc_weapons1_wpn-Fyn_m1
inv_name = wpn-Fyn_m1
inv_name_short = wpn-Fyn_m1
cost = 10
ammo_limit = 1000
ammo_current = 500
ammo_mag_size = 2
ammo_class = ammo_12x70_buck,ammo_12x76_zhekan,ammo_12x76_dart
inv_weight       = 1.0
sprint_allowed = true
misfire_probability = 0.0
condition_shot_dec = 0.0
hit_power = 10
hit_impulse = 2500
fire_distance = 500
bullet_speed = 1250
rpm = 1000
Far more reasonable numbers, scope value removed and the fire mode value removed (there is no fire mode value for the bm16, so the same logic applied that applied to the scope I felt).

Still doesn't work though. =(

Thanks for trying, FoxTwo, but I guess I'll just have to wait till Niphty or someone turns up and saves the day. =P
Reply With Quote
  #97  
Old April 26th, 2007
FoxTwo's Avatar
Flight Simmer and MMORPGer
Airman 1st Class
 
Join Date: September 29th, 2005
Location: Singapore
Posts: 55
Rep Power: 0
FoxTwo is a n00b
Send a message via ICQ to FoxTwo Send a message via MSN to FoxTwo Send a message via Yahoo to FoxTwo Send a message via Skype™ to FoxTwo
Default Re: Basic Modding with Playable Examples

Fyndir, How about another approach? The Gauss rifle is "weapon_class = Sniper Rifle" but the bm16 is "weapon_class = Shotgun". Perhaps you should derive a different weapon, ie make another Sniper Rifle with your super-charged values and see if it works (with everything else at your original super-charged values). If it does, then we can nail it down that you can't apply these definitions across weapon classes...
__________________
Reply With Quote
  #98  
Old April 26th, 2007
Final Warrior's Avatar
Just another Ghø$† ¡n †h€ ƒøg
 
Join Date: April 4th, 2007
Posts: 294
Rep Power: 0
Final Warrior is a n00b
Send a message via AIM to Final Warrior Send a message via MSN to Final Warrior Send a message via Yahoo to Final Warrior
Default Re: Basic Modding with Playable Examples

weapon_class doesn't affect anything but where the gun appears in the buy menu for multiplayer; I have an Abakan shooting shotgun shells in my game, and it works pefectly fine.

Changing scope_zoom_factor, if the weapon does not have a scope texture, will simply make the gun's iron sights have an insane amount of zoom (or not, depending on the value you give it).

$spawn doesn't affect much either, in my experience; leaving it the way it already is should be fine.

Here's my Abakan that's been converted to a shotgun; compare and contrast my changes to yours, maybe we'll find something:


Code:
[wpn_autoshotgun]:wpn_abakan    ;Ñïàñ-12 Õàíòåðà
$spawn                         = "weapons\wpn_abakan"    
description                = enc_weapons1_wpn-autoshotgun
inv_name                = wpn-autoshotgun
inv_name_short                = wpn-autoshotgun
inv_weight                = 1.8
cost                    = 1
fire_modes                = 1, -1
ammo_class                = ammo_12x70_buck, ammo_12x76_zhekan, ammo_12x76_dart
ammo_mag_size                = 12
fire_distance                = 150
bullet_speed                = 400
rpm                    = 200
scope_status                = 0
silencer_status                = 0
grenade_launcher_status            = 2
hit_power                = 1.30
hit_impulse                = 240
condition_shot_dec             = -1.0
misfire_probability            = 0.0
fire_dispersion_base            = 0.20
cam_relax_speed                = 0.65
cam_dispersion                 = 0.02
cam_dispersion_inc             = 0.005
cam_dispertion_frac             = 0.04
cam_max_angle                 = 0.6
cam_max_angle_horz             = 0.9
cam_step_angle_horz             = 0.05
snd_shoot                = weapons\tm_spas12_shot
You can ignore those cam_ values and stuff, they're just for recoil/accuracy.

-- Griffinhart
__________________


"My word is my honor. My honor is my life."
-- Demonchild, Angelkin, Death Incarnate, the Final Warrior

The S.T.A.L.K.E.R. Modding Community
Reply With Quote
  #99  
Old April 26th, 2007
I don't spend enough time here
 
Join Date: April 17th, 2007
Location: Oregon
Posts: 15
Rep Power: 0
Savage117 has disabled reputation
Default Re: Basic Modding with Playable Examples

Ok Fyndir, I too am a amatuer modder but I think I see your problem, I will try to demonstrate.

Quote:
[wpn_Fyn_m1]:wpn_bm16 <------------ Here wpn_bm16 has a underscore. also wpn_Fyn_m1 has 2 underscores.
$spawn = "weapons\wpn-bm16" <----------- Here wpn-bm16 has a dash instead of a underscore.
description = enc_weapons1_wpn-Fyn_m1 <-------- Here wpn-Fyn_m1 has a dash and a underscore.
inv_name = wpn-Fyn_m1 <-------- And here
inv_name_short = wpn-Fyn_m1 <---------- And here
cost = 10
ammo_limit = 1000
ammo_current = 500
ammo_mag_size = 2
ammo_class = ammo_12x70_buck,ammo_12x76_zhekan,ammo_12x76_dart <------ Here, try placing spaces after your commas.
inv_weight = 1.0
sprint_allowed = true
misfire_probability = 0.0
condition_shot_dec = 0.0
hit_power = 10
hit_impulse = 2500
fire_distance = 500
bullet_speed = 1250
rpm = 1000
These are the only discrepencies I could see, the dashes in your wpn_Fyn_m1 line may not make any difference, but the difference between $spawn = "weapons\wpn-bm16" and [wpn_Fyn_m1]:wpn_bm16 may make a big difference. I think the $spawn line actually is the part that tries to find the wpn_bm16.ltx file and reference it for the values you didnt change, if the name is different than the file name it might not work.

Also, I think the inv_name = wpn-Fyn_m1 and the inv_name_short = wpn-Fyn_m1 lines are what the trader.ltx files reference for their info and the line you are putting in the trader is wpn_Fyn_m1 = 1, 3, notice the dash in the inv_name = wpn-Fyn_m1 line and the underscore in wpn_Fyn_m1 = 1, 3, this may make a difference. You might want to change this stuff even if it doesnt work, just to keep your code clean. Also, if you dont put wpn_Fyn_m1 = 1, 3 in the right lines on the trader file your item will not apear in his inventory or it might crash your game.

I hope my long winded reply helps, iv been having plenty of difficulty with my own guns too, if I name my gun with my own name like:[wpn_sav_m1]:wpn_bm16 it comes up with an error when I load my test save and wont put any of my addisions in the inventory, its like it goes back to its default settings even after I followed Niphties tutorial to a T like you did, his tutorial is perfect but for some reason "Your results may Differ" comes to mind.

Thanx for listening,
Savage117
Reply With Quote
  #100  
Old April 26th, 2007
Final Warrior's Avatar
Just another Ghø$† ¡n †h€ ƒøg
 
Join Date: April 4th, 2007
Posts: 294
Rep Power: 0
Final Warrior is a n00b
Send a message via AIM to Final Warrior Send a message via MSN to Final Warrior Send a message via Yahoo to Final Warrior
Default Re: Basic Modding with Playable Examples

@Savage117: if you take a look at my own code, notice that description, inv_name and inv_name_short both use a dash instead of an underscore. inv_name and inv_name_short are both separate from the ID of the weapon itself, and are irrelevant.

However, I believe you've found the problem. Fyndir, try using an underscore rather than a dash in $spawn = "weapons\wpn-bm16". That might be the problem.

-- Griffinhart
__________________


"My word is my honor. My honor is my life."
-- Demonchild, Angelkin, Death Incarnate, the Final Warrior

The S.T.A.L.K.E.R. Modding Community
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
basic modding kathmondar91 DoW Modding and Editing 18 January 21st, 2007 06:39 AM
Basic Modding [Sonic]uk ST:A2 Modding, Mapping and Editing 6 May 31st, 2006 04:50 AM
basic modding utilities/tutorials... Grover ST:SC3 Modding, Mapping and Editing 3 September 23rd, 2004 07:54 PM
Possible Examples McCleod SW:JK3 Modding, Mapping and Editing 0 October 15th, 2003 03:12 PM


All times are GMT -7.