Teardown

Teardown

View Stats:
Nonya Jun 6, 2022 @ 11:23am
Spawning vehicles
Does anybody have the knowledge on how to make a car spawn and appear? I created a new vehicle, works correctly, no mistakes. Only problem is when I turn it into an instance and add the spawn.txt, it will spawn in the map I made it in, but not any other user-created maps.

I already know how to spawn props.
< >
Showing 1-15 of 17 comments
max 2132 Jun 7, 2022 @ 7:43pm 
hey
ONSVRG  [developer] Jun 8, 2022 @ 1:07am 
When you set up your vehicle, make sure the path to the vox models use the MOD/ keyword instead of LEVEL/ so if you have LEVEL/vehicle/car.vox change it to MOD/vehicle/car.vox
Femboy Sarah Jun 8, 2022 @ 1:44am 
Originally posted by ONSVRG:
When you set up your vehicle, make sure the path to the vox models use the MOD/ keyword instead of LEVEL/ so if you have LEVEL/vehicle/car.vox change it to MOD/vehicle/car.vox
If your prefab works as expected on the level you created it on but not anywhere else, this is almost certainly the cause.
Starting a path with 'LEVEL/' tells the game that the path should be relative to a directory with the same name as the current level XML, so if you're playing on 'main.xml' in one mod, it will relative to the directory with the name 'main' in that same mod. However, the important part is if you go to a different level, 'LEVEL/' will point somewhere completely different.
Starting a path with 'MOD/' instead tells the game that the path should be relative to the mod directory. If you spawn a prefab from a mod with the spawnmenu, 'MOD/' will always be relative to the mod the prefab is from, so it should behave the same no matter what level you're spawning it on.
TLDR: You probably want to replace any instance of 'LEVEL/' in your prefab with 'MOD/main/'.
Nonya Jun 8, 2022 @ 11:09am 
Yes, thank you. I already knew before to put it in MOD,
Nonya Jun 8, 2022 @ 11:26am 
For example, I executed the same process in a now deleted mod, I had a whole vehicle group, converted it to prefab and it became an instance. Problem was that when I attempted to spawn it, the spawn menu did not have my mod. I worked through all ways, until I discovered that by placing the XML loosely in the MOD file and not in any other folder it only worked then. But I still had the same problem as now. Everything correct, but no success in other user-generated maps.
Nonya Jun 8, 2022 @ 11:27am 
Originally posted by Max Smith:
hey
Hello.
Femboy Sarah Jun 8, 2022 @ 11:36am 
Originally posted by xadrey:
For example, I executed the same process in a now deleted mod, I had a whole vehicle group, converted it to prefab and it became an instance. Problem was that when I attempted to spawn it, the spawn menu did not have my mod. I worked through all ways, until I discovered that by placing the XML loosely in the MOD file and not in any other folder it only worked then. But I still had the same problem as now. Everything correct, but no success in other user-generated maps.
Weird. What does your 'spawn.txt' look like, and what does the content of the prefab XML look like?
Nonya Jun 8, 2022 @ 11:44am 
Originally posted by Sarah:
Originally posted by xadrey:
For example, I executed the same process in a now deleted mod, I had a whole vehicle group, converted it to prefab and it became an instance. Problem was that when I attempted to spawn it, the spawn menu did not have my mod. I worked through all ways, until I discovered that by placing the XML loosely in the MOD file and not in any other folder it only worked then. But I still had the same problem as now. Everything correct, but no success in other user-generated maps.
Weird. What does your 'spawn.txt' look like, and what does the content of the prefab XML look like?
The only files are main, which includes the car vox, prefab with the car.xml, main.xml and spawn.txt. Spawn contains the following:
prefab/muscle1.xml : Tergum/Castli 1
Femboy Sarah Jun 8, 2022 @ 11:50am 
Originally posted by xadrey:
The only files are main, which includes the car vox, prefab with the car.xml, main.xml and spawn.txt. Spawn contains the following:
prefab/muscle1.xml : Tergum/Castli 1
Is this how I'm meant to interpret your description of the file structure?
main └car.vox prefab └car.xml main.xml spawn.txt
If so, it is rather suspect that 'car.vox' is in 'main/', which again makes me think you're using 'LEVEL/'.
Nonya Jun 8, 2022 @ 11:50am 
This confuses me due to how in another mod created by me, the process of having all xmls in the MOD with spawn.txt included, voxes in a different file, it works and my content spawns in other mods. It is not a vehicle, it is only a prop, which leads me to the conclusion that only props can spawn and vehicles or any other moving machine doesn't spawn.

A small piece of evidence is that the mod "Countryside" that I subscribed to, the person who created the mod has spawnables, only if you attempt to spawn "Gas Pump", it comes out with nothing. That mod has spawnable cars, and they work. confusing ngl
Femboy Sarah Jun 8, 2022 @ 11:54am 
Originally posted by xadrey:
This confuses me due to how in another mod created by me, the process of having all xmls in the MOD with spawn.txt included, voxes in a different file, it works and my content spawns in other mods. It is not a vehicle, it is only a prop, which leads me to the conclusion that only props can spawn and vehicles or any other moving machine doesn't spawn.

A small piece of evidence is that the mod "Countryside" that I subscribed to, the person who created the mod has spawnables, only if you attempt to spawn "Gas Pump", it comes out with nothing. That mod has spawnable cars, and they work. confusing ngl
It is confusing to refer to directories/folders as files. I find it unlikely your issue has anything to do with it being a vehicle.
I subscribed to "Countryside" to investigate, and found that 'prefab/gas-pump.xml' indeed is using a vox with a file path starting with 'LEVEL/', which would be why it's not working.
<prefab version="0.9.5"> <group id_="600346432" open_="true" pos="-22.9 0.3 8.5"> <vox id_="1966986496" tags="explosive=2" pos="0.0 0.1 0.0" prop="true" file="LEVEL/Props/custom/pump.vox" object="pump"> <joint id_="649632512" pos="-0.4 0.0 0.6" collide="true"/> <joint id_="2026038016" pos="0.5 0.0 0.6" collide="true"/> <joint id_="886952832" pos="-0.4 0.0 -0.6" collide="true"/> <joint id_="2027152256" pos="0.5 0.0 -0.6" collide="true"/> </vox> </group> </prefab>
Nonya Jun 8, 2022 @ 11:54am 
Originally posted by Sarah:
Originally posted by xadrey:
The only files are main, which includes the car vox, prefab with the car.xml, main.xml and spawn.txt. Spawn contains the following:
prefab/muscle1.xml : Tergum/Castli 1
Is this how I'm meant to interpret your description of the file structure?
main └car.vox prefab └car.xml main.xml spawn.txt
If so, it is rather suspect that 'car.vox' is in 'main/', which again makes me think you're using 'LEVEL/'.
Yes, the contents are as you depicted.
Nonya Jun 8, 2022 @ 11:56am 
I get what you mean
Nonya Jun 8, 2022 @ 12:02pm 
Hold up, you're correct. It is level
Nonya Jun 8, 2022 @ 12:02pm 
Originally posted by xadrey:
Hold up, you're correct. It is level
something ive been thinking too much
< >
Showing 1-15 of 17 comments
Per page: 1530 50

Date Posted: Jun 6, 2022 @ 11:23am
Posts: 17