Sign in to follow this  
Lazarus

A FEW MINOR EDITS, PLEASE ADVISE.

Recommended Posts

I'm hoping someone might be able to assist with the following edits I'm trying to make to the single player campaign:

1.  Increasing the amount of ammo that "spawns" in police sedans and vans.   Any changes I make to the default.loot file causes all loot (from EVERY container, lockbox, and corpse) in the game to 'disappear'.  E.g., if I change any of the "weights" or add entries ( like Ammo_Pistol (weight = 1.0);) to the following, all loot in the game vanishes:


LootedObject("Cont_SedanPolice")
    {
        ColorSet(ColorSet_Cont_Lockpick);
        use Empty(weight = 0.0);
        use CashMedium(weight = 3.0);
        use CashBig(weight = 1.5);
        use Weapons_Firearms(weight = 0.001);
        use Upgrades(weight = 2.0);
        use Healing_Items(weight = 1.0);
        use Valuables_Default(weight = 1.5);
    }

Furthermore,  I haven't been able to find any entries (in ANY of the .loot files) for the police vans, only the sedans.

2.  Changing the basic gear that Kyle Crane starts with during the main story quest.  None of the changes I've made in the default_player_setup.scr file seems have had any effect, so I'm assuming that's not the file(s) I need to edit.  I'd also like to change what vendors have for sale at various points in the game, but I'm not certain which .scr file(s) in the scripts/trading folder I need to edit.

3.  Decreasing the 'frequency' in which zombies re-spawn after Crane has 'cleared' an area.  I'd also like to decrease (somewhat at least) the 'probability' that virals will appear and swarm Crane every time a bomber or gas tank zombie explodes.

Any assistance would be greatly appreciated.  Many thanks in advance!

Share this post


Link to post
Share on other sites

1. I believe that if you incorrectly format something in that file, it will cause the issue you are having. You are definitely doing something wrong in this file. Are you adding new LootedObject types?

2. If you want to add stuff to the starting player inventory, I guess you could try editing the XML quest script and use the "give-weapon" phase. I've being using bundle_items to give players loads of stuff using that phase (in a custom map though not campain - but I assume it would be possible)

3. Zombies spawn in different ways. There are crowd spawners, box spawners and navmesh spawners (which I know much less about). Unfortunately, I'm not able to offer much advise for this one!

 

Good luck :)

Share this post


Link to post
Share on other sites
2 hours ago, Ahmet Ibrahim said:

1. I believe that if you incorrectly format something in that file, it will cause the issue you are having. You are definitely doing something wrong in this file. Are you adding new LootedObject types?

2. If you want to add stuff to the starting player inventory, I guess you could try editing the XML quest script and use the "give-weapon" phase. I've being using bundle_items to give players loads of stuff using that phase (in a custom map though not campain - but I assume it would be possible)

3. Zombies spawn in different ways. There are crowd spawners, box spawners and navmesh spawners (which I know much less about). Unfortunately, I'm not able to offer much advise for this one!

 

Good luck :)

Thanks for the prompt reply, Ahmet.  AFAIK, I'm not adding any new LootedObject types, only existing (vanilla) ones to the default.loot file.   For example, in the default.loot file (line 147+) I added the following loot object types to the existing block of text:

use Ammo_Pistol(weight = 1.0);
use Ammo_Shotgun(weight = 1.0);
use Ammo_Rifle(weight = 0.2);        
use Ammo_Subsonic(weight = 1.0);

Here's what the "edited" version looks like:

LootedObject("Cont_SedanPolice")
{
    ColorSet(ColorSet_Cont_Lockpick);
    use Empty(weight = 0.0);
    use CashMedium(weight = 3.0);
    use CashBig(weight = 1.5);		
    use Weapons_Firearms(weight = 0.04);
    use Ammo_Pistol(weight = 1.0);
    use Ammo_Shotgun(weight = 1.0);
    use Ammo_Rifle(weight = 0.2);		
    use Ammo_Subsonic(weight = 1.0);
    use Upgrades(weight = 2.0);
    use Healing_Items(weight = 1.0);
    use Valuables_Default(weight = 1.5);
}

AFAIK, I'm using the correct "syntax", although I have no idea what the "weight" values represent, in terms of the probability of any given object being present.  I'm also unable to determine which loot file(s) contain data for the police vans.

With regards to the quest script, I'm assuming you're referring to the data\quests\slums\ .xml files.  I glanced at the slums_q_start_quest.xml, but didn't see any "give-weapon" phase "arguments", so I'm not certain how to correctly format and add such "argument" (assuming this is the file I'd need to edit to change Kyle's starting inventory).

 

 

Share this post


Link to post
Share on other sites
Quote

I have no idea what the "weight" values represent

This represents to probability of an object spawning. So if a cup had weight 1.0 and a plate had weight 100.0 - you'll rarely see a cup in a container!

Quote

I'm assuming you're referring to the data\quests\slums\ .xml files.  I glanced at the slums_q_start_quest.xml, but didn't see any "give-weapon" phase "arguments", so I'm not certain how to correctly format and add such "argument" (assuming this is the file I'd need to edit to change Kyle's starting inventory).

This is correct. I would recommend you create the script in a custom map, compile the .xml file using the give-weapon phase and try copying it into the first quest of the game. Would recommend you use File Locator to find the necessary files to make this edit: https://www.mythicsoft.com/filelocatorlite/download/

You could find the text script in game for the first quest, search that in common_text_all.xlsx which would be in data/ maps but I believe might be already packed in an .bin state so you would need to download it - might be here: http://dldt.byethost16.com/wiki/index.php/Main_Page
Then find the reference for that text and use File Locator to find which .xml quest file it relates to and add the give-weapon phase. Not 100% sure if it would work but I guess it could!

In regards to you loot container issue, I'm not sure what is causing the problem. There's definitely something not working with the loot containers which is what causes them not to spawn anything in. Would recommend some trail and error with the things you added to that file and any other related files you may have edited! Try replacing all the modded files back to their normal ones and copying your ones back in one by one until something breaks.

Again, good luck!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this