Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

Sign in to follow this  
sanke

Need help for spawning script

Recommended Posts

Hi,

I need some help with my private hive Taviana Server!

In the MYSQL Database is the default spawningscript, pMain.

Code:


BEGIN
DECLARE iSpawnNumVeh SMALLINT(15) DEFAULT 200;

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

Here I can edit how many vehciles i would like to spawn. But it only spawns allways same dameged vehicles:

example


2 137 1 MMT_Civ 6.1.2013 23:18:49 0 [90,[13248,19383,0]] [] [] 0.05000 0.05000 6.1.2013 23:18:49
53 202 1 Old_bike_TK_CIV_EP1 6.1.2013 23:18:49 0 [88,[15526.4,8412.45,0]] [] [] 0.05000 0.05000 6.1.2013 23:18:49
54 94 1 Old_bike_TK_CIV_EP1 6.1.2013 23:18:49 0 [270,[5850,9901,0]] [] [] 0.05000 0.05000 6.1.2013 23:18:49
55 108 1 LadaLM 6.1.2013 23:18:49 0 [320,[16704,10623,0]] [] [["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],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] 0.05000 0.05000 6.1.2013 23:18:49
56 188 1 Old_moto_TK_Civ_EP1 6.1.2013 23:18:49 0 [1,[16149.9,11571.7,0]] [] [["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],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] 0.05000 0.05000 6.1.2013 23:18:49
57 42 1 LadaLM 6.1.2013 23:18:49 0 [130,[10939,868,0]] [] [["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],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] 0.05000 0.05000 6.1.2013 23:18:49
58 267 1 Lada2_TK_CIV_EP1 6.1.2013 23:18:49 0 [80,[12627.7,13612.9,0]] [] [["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],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] 0.05000 0.05000 6.1.2013 23:18:49
59 135 1 tractor 6.1.2013 23:18:49 0 [100,[11110,17900,0]] [] [["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],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] 0.05000 0.05000 6.1.2013 23:18:49
60 124 1 S1203_ambulance_EP1 6.1.2013 23:18:49 0 [20,[10163,18965,0]] [] [["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],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] 0.05000 0.05000 6.1.2013 23:18:49
61 247 1 MMT_Civ 6.1.2013 23:18:49 0 [224,[12617.1,15157.4,0]] [] [] 0.05000 0.05000 6.1.2013 23:18:49
62 91 1 tractor 6.1.2013 23:18:49 0 [320,[5987,9604,0]] [] [["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],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] 0.05000 0.05000 6.1.2013 23:18:49
63 274 1 TT650_TK_CIV_EP1 6.1.2013 23:18:49 0 [8,[15724.4,13410.8,0]] [] [["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],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] 0.05000 0.05000 6.1.2013 23:18:49
64 72 1 Old_bike_TK_CIV_EP1 6.1.2013 23:18:49 0 [320,[7914,6697,0]] [] [] 0.05000 0.05000 6.1.2013 23:18:49
65 259 1 LadaLM 6.1.2013 23:18:49 0 [326,[11922.9,15458,0]] [] [["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],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] 0.05000 0.05000 6.1.2013 23:18:49
66 123 1 V3S_Civ 6.1.2013 23:18:49 0 [30,[9937,19091,0]] [] [["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],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] 0.05000 0.05000 6.1.2013 23:18:49
67 233 1 car_sedan 6.1.2013 23:18:49 0 [269,[14730.8,9807.05,0]] [] [["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],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] 0.05000 0.05000 6.1.2013 23:18:49

Now my Question is it possible to spawn random damaged vehicles?

Thx

Sanke

Share this post


Link to post
Share on other sites

Now, I am no scripter, but have you tried simply adding copies of the lines for vehicles, and editing the #.# value after the component name? (For example change the ["motor",0.8] to ["motor",1.0] or ["motor",0.2] for a fixed or an even more damaged engine?)

Edit; And of course change the position values.

Edited by Dancing.Russian.Man

Share this post


Link to post
Share on other sites

Now, I am no scripter, but have you tried simply adding copies of the lines for vehicles, and editing the #.# value after the component name? (For example change the ["motor",0.8] to ["motor",1.0] or ["motor",0.2] for a fixed or an even more damaged engine?)

Edit; And of course change the position values.

Of cause would this possible, but it would be much work with 200 vehicles ;)

Share this post


Link to post
Share on other sites

Of cause would this possible, but it would be much work with 200 vehicles ;)

Well it's not like you have to make every vehicle uniquely damaged. Why not make 1-3 possible variants of the vehicles? It's not like it has 200 lines for vehicles even now, even though it spawns 200.

Edit; For example, like in my first post. One variant would be wrecked to hell, another would need a little work, and one would be fixed right off. Let the spawn sequence pick which ones to spawn.That should make it at least a little random.

Edited by Dancing.Russian.Man

Share this post


Link to post
Share on other sites

Hi there.

There is 3 tables important for what you want to do, actually only 2 tables need to be altered.

First the "Object Classes" table, here are all objects then can spawn in. ( note: in this table you also have to declare the amount of objects that can spawn ( for instance there is a "UH1" in the list and it can spawn for instance 10 times, now there needs to be 10 "UH1" in the second table with different spawn positions)

The second table ( i'm sorry i do not have it on this pc, so i dont know the exact name) It is the table that holds all spawnpoints for the objects, this table can have multiple objects of the same sort, so for example it can have 5 hiluxes in there, but all of them have a different spawnpoint. So if you want 200 vehicles spawn on 200 different places you have to manually insert all these vehicles into this table.

In the "PMain" function you only need to change the amount to spawn :

BEGIN

DECLARE iSpawnNumVeh SMALLINT(15) DEFAULT 200;

In this case change the 200 to whatever you want, but again if you say 200, the second table needs to have 200 objects with spawnpoints.

Hope this helped :)

Edited by Allie

Share this post


Link to post
Share on other sites

Adding spawnpoints for loot or even for spawned in vehicles and objects, be prepared to do A LOT OF WORK.

Thats how it is, lots of work, for a giggle just try create a new island for Arma, thats work :)

I prepared a DayZ mission to be able to have a race with 20 Hiluxes, this took me the whole night only to figure out all spawnpoints, i had them all placed in the editor and then read out the coordinates from the mission.sqf file. Crap thing is in the mission.sqm the possitions are in a different order then in the spawn table of the database, so i also had to change the order of all spawnpoints coordinates manually.

Welcome to the world of Operation Flashpoint/Arma :)

Edited by Allie

Share this post


Link to post
Share on other sites
Sign in to follow this  

×