Problem modifying the type and number of vehicles spawning

Hurtz

New Member
So I've been having a little problem that I have not been able to figure out. I'm using pwzors files for 1.7.4.4. Vehicles are spawning ok after updating the pSpawn and pMain funtions. I'm trying to change the type of vehicles that spawn and their numbers but haven't been able to make this work. I get the same few vehicles and it won't spawn more that 47 to the object_data table.

I've increased iSpawnNumVeh in pMain to 100 so i should get 100 vehicles right?
I've changed the chance and max num in the object_classes table and the max num gets reset back to default every time I rerun the server.bat file.

So I have two questions?
What am I doing wrong to increase the amount of spawned vehicles?
How can I increase the likely hood of a UAZ or BAF spawning as they always get set to maxnum=0?

pMain
Code:
BEGIN
 
    DECLARE iSpawnNumVeh SMALLINT(3) DEFAULT 100;       
   
    CALL pCleanup();
    CALL pFixMaxNum;
 
    SELECT SUM(MaxNum) FROM object_classes INTO @iMaxNumTotal;
    IF (iSpawnNumVeh > @iMaxNumTotal) THEN
        SET iSpawnNumVeh = @iMaxNumTotal;
    END IF;
 
    WHILE (fGetVehCount() < iSpawnNumVeh) DO
        CALL pSpawn();
    END WHILE;
 
END

pSpawn

Code:
BEGIN
    DECLARE bSpawned        TINYINT(1) DEFAULT 0;
    DECLARE iLID                INT DEFAULT 0;
 
    WHILE (bSpawned = 0) DO
 
        SET iLID = LAST_INSERT_ID();
 
        INSERT INTO object_data (ObjectUID, Instance, Classname, Damage, CharacterID, Worldspace, Inventory, Hitpoints, Fuel, Datestamp)
        SELECT ot.ObjectUID, '1', ot.Classname, ot.Damage, '0', ot.Worldspace, '[]', ot.Hitpoints, '0.05', SYSDATE()
            FROM (SELECT oc.Classname, oc.Chance, oc.MaxNum, oc.Damage, oc.Hitpoints, os.ObjectUID, os.Worldspace
                FROM object_classes AS oc
                INNER JOIN object_spawns AS os
                ON oc.Classname = os.Classname
                ORDER BY RAND()) AS ot
            WHERE NOT EXISTS (SELECT od.ObjectUID
                            FROM object_data AS od
                            WHERE ot.ObjectUID = od.ObjectUID)
            AND fGetClassCount(ot.Classname) < ot.MaxNum
            AND fGetSpawnFromChance(ot.Chance) = 1
            LIMIT 1;
     
            IF (LAST_INSERT_ID() <> iLID) THEN
                SET bSpawned = 1;
            END IF;
     
    END WHILE;
END


Object_classes

Code:
ATV_US_EP1    0.7    7    0.05    [["motor",1],["palivo",0.368047],["wheel_1_1_steering",0.331809],["wheel_1_2_steering",1],["wheel_2_1_steering",0.0473658],["wheel_2_2_steering",0.332376],["karoserie",0.355141],["wheel_1_3_steering",0.0401988],["wheel_2_3_steering",1]]
ATV_CZ_EP1    0.64    0    0.05    [["motor",0.8],["palivo",0.8],["wheel_1_1_steering",1],["wheel_1_2_steering",1],["wheel_2_1_steering",0.0156045],["wheel_1_3_steering",0.0401988],["wheel_2_3_steering",1]]
PBX    0.7    0    0.05    []
Smallboat_1    0.99    0    0.05    []
Smallboat_2    0.99    0    0.05    []
S1203_TK_CIV_EP1    0.67    4    0.05    [["glass1",1],["glass2",1],["glass3",1],["motor",0.8],["palivo",0.8],["wheel_1_1_steering",1],["wheel_1_2_steering",1],["wheel_2_1_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["karoserie",1],["wheel_1_4_steering",1],["wheel_2_4_steering",1],["wheel_1_3_steering",1],["wheel_2_3_steering",1],["glass4",1]]
BAF_Offroad_W    0.50    0    0.05    []
hilux1_civil_3_open    0.71    0    0.05    [["motor",0.95],["karoserie",0.95],["palivo",0.95],["wheel_1_1_steering",1]]
car_hatchback    0.66    1    0.05    [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1]]
Volha_2_TK_CIV_EP1    0.64    6    0.05    [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1]]
UAZ_CDF    0.99    0    0.05    [["glass1",1],["glass2",1],["glass3",1],["motor",0.8],["palivo",0.8],["wheel_1_1_steering",1],["wheel_1_2_steering",1],["wheel_2_1_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["karoserie",1],["wheel_1_4_steering",1],["wheel_2_4_steering",1],["wheel_1_3_steering",1],["wheel_2_3_steering",1],["glass4",1]]
Lada2    0.25    0    0.05    [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1]]
Ural_TK_CIV_EP1    0.7    0    0.05    [["motor",0.8],["karoserie",1],["palivo",0.8]]
V3S_Civ    0.72    1    0.05    [["wheel_1_1_steering",1],["wheel_1_2_steering",1],["wheel_1_3_steering",0.0401988],["wheel_2_1_steering",0.0156045],["wheel_2_3_steering",1],["motor",0.8],["palivo",0.8]]
Ikarus    0.25    7    0.05    [["motor",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_1_2_steering",1],["wheel_2_1_steering",0.0156045],["wheel_1_3_steering",0.0401988],["wheel_2_3_steering",1]]
Old_bike_TK_INS_EP1    0.50    0    0.05    []
Old_bike_TK_CIV_EP1    0.50    10    0.05    []
TT650_Civ    0.99    0    0.05    []
TT650_Ins    0.99    0    0.05    [["motor",0.8],["wheel_1_1_steering",1],["wheel_1_2_steering",1]]
tractor    0.10    0    0.05    [["motor",1],["sklo predni P",0.0275828],["karoserie",1],["palivo",0.00205799],["wheel_2_1_steering",0.0156045],["wheel_1_3_steering",1],["wheel_2_3_steering",0.0161143],["wheel_1_2_steering",0.0082898],["glass1",1],["glass3",0.0224173]]
UH1H_DZ    0.60    6    0.05    [["glass1",1],["glass2",1],["glass3",1],["glass4",1],["glass5",1],["NEtrup",1.1998],["motor",1],["elektronika",1],["mala vrtule",1],["velka vrtule",1],["munice",1.07084],["sklo predni P",1.04818],["sklo predni L",1.11816],["glass6",1.0402]]
 
I figured it out. You need to update the object_classess with classnames and maxnum. You also need to add entry's into the object_spawns to tell them where to spawn. Now on to finding some good cooridinates for vehicle spawns. Is there an app where you can get the worldspace coordiates or does everyone just spawn in a location where they want a vehicle and grab the worldspace from the player spawn table?
 
could you repost all of the edited files you used? I'm not sure if the ones above are the edited ones, or your most recent. Any help would be appreciated...
 
I figured it out. You need to update the object_classess with classnames and maxnum. You also need to add entry's into the object_spawns to tell them where to spawn. Now on to finding some good cooridinates for vehicle spawns. Is there an app where you can get the worldspace coordiates or does everyone just spawn in a location where they want a vehicle and grab the worldspace from the player spawn table?

I gather spawn points by driving around the map and parking my car in a good spot. Then i refresh the table in navicat and grab my coordinates. I then save it in excel for reference and leave a note of where it is and what would be cool to spawn there. Once I've gathered spawn points I then work on inputting them to the table.

Before you ask, yes I can give you my coordinates, but only once I've finished doing the whole map. I'm about 1/5 of the way there so far.
 
Thanks Doc ... I look forward to your coordinates. It's time comsuming poplating these tables and having good coords helps.
 
No worries, I don't know how long it will take though, finding each position takes atleast 5 minutes, so gathering dozens is a long process
 
That would be great! It'll take me that long to figure the rest of this out. Managed to find some spawned vehicles by spawning to them at restart. the maxnum still reverts to 0 every time on about half of them. but i did manage to repair a vehicle and spawn to it. Fuel didn't seem to take though. http:..db.dayzwiki.com/vehicles is the vehicle list that is aproved i believe, and half wont spawn, so i am still working on that. Maxnumber is my big issue right now, along with adding new spawns... do i just make up an objectuid?
 
you can either make the server spawn or add the vehicule yourself to the SQL database. thats what i did for more vehicules and they are still there :D exept the AH6 since it got deleted due to inactivity
 
verbal, there's actually a lot more vehicles than that.

Here's one of my working spawns for the new AH6 chopper. Use it as an example.


58 AH6X_DZ [19,[12155.1,9736.76,0.00143909]] Berezino Football Field Chopper

First is object UID. Make up new numbers for your new spawns. Next is the Classname of the vehicle you want to spawn. Then the Worldspace ID. Last is a description of where the spawn is. Description is very important so you don't forget, because someday you're going to want to know.
 
That would be great! It'll take me that long to figure the rest of this out. Managed to find some spawned vehicles by spawning to them at restart. the maxnum still reverts to 0 every time on about half of them. but i did manage to repair a vehicle and spawn to it. Fuel didn't seem to take though. http:..db.dayzwiki.com/vehicles is the vehicle list that is aproved i believe, and half wont spawn, so i am still working on that. Maxnumber is my big issue right now, along with adding new spawns... do i just make up an objectuid?

Maxnum is reverting because there aren't enough defined spawn points :)
 
so all i do is copy that into a new line in object_data, and #restart?

No, you also need a line in object_classes that defines what the vehicle is and how it spawns.

AH6X_DZ 0.25 1 0.9 [["motor",0.8],["karoserie",1],["palivo",0.8],["elektronika",0.8],["mala vrtule",0.8],["velka vrtule",0.8],["sklo predni P",0.8],["glass1",1],["glass3",0.8]]

This is how that chopper looks in my object_classes files. First is Classname, or the name of the vehicle as recognzied by the server.

Second is Chance. This is the percentage chance that a vehicle will spawn at the spawnpoints that are defined in object_spawns.

MaxNum is the amount of that vehicle that you want to possibly spawn.

Damage is the state at which you want the vehicle to spawn in. I have my choppers set to 0.9 so they are very damaged.

After the 0.9 is the Hitpoints line. Here is where you define what parts the vehicle takes to repair and that can take damage.


If you want a working vehicle to spawn, you set the chance to 1.0, set damage to 0. If you run PSpawn and it goes into your object_data files, you can then edit it's fuel to 1.0 for full fuel.
 
Ok, I would be sincerely grateful if you smart chaps can help me out.

I don't have any other files than the regular bliss lingor files. No pwnerz or any hacked version.

I have gone in and in my world vehicle database I have added new object ids for some new spawns, I have specified for world 2 which is my lingor, I have added in the worldspace, vehicle id etc; etc;

After doing so and mass deleting all vehicles and then doing a new spawn of vehicles, my vehicles show up on the actual in game list of vehicles. However, when I go in game, they aren't at the worldspace coords I put in.

I think maybe out of 20 new spawns I made, 1 actually works.

Is there more to it than simply driving around, seeing a good spot, and recording your worldspace coords for use?

For example on Lingor, behind the Calamar Airport (bottom left area of the map), there is a tarmac area behind the hangars that has NOTHING on it. So I decided to add in some HMMVV's there or the lil bird AH6X or whatever it's called....nothing spawns there, even though my list of active vehicles list the HMMVV, with gear inside it, damage etc; it's just simply not at those coords.

I'm sorry for the long post, but I hope I am missing something simple and I can get this fixed pretty quickly, and that you understood what I'm saying.

I've gotten a C130 to spawn, but nothing else. C130's are not normally on Lingor, so it's not a specific vehicle limitation or anything.
 
This section is for pwnozors package - please ask in the appropriate Bliss section :)
 
Back
Top